Documentation
¶
Index ¶
- Constants
- func AboutPage() []g.Node
- func AccountPictureSection(userID int, hasPicture bool, pictureURL, errMsg string) g.Node
- func Ad(d AdDetail, userID int, csrfToken string) []g.Node
- func AdGridNode(userID, adID, imageCount, nextPage int, ...) g.Node
- func AdImageSrc(adID, index int, size string) string
- func AdListNode(userID, adID int, priceDisplay, title, location, facetLabel string, ...) g.Node
- func AdNodes(cards []AdCard, userID, view, page int, csrfToken string, pagination bool) []g.Node
- func AdRemoveModal(adID int, csrfToken string) g.Node
- func AdShareModal(path string) g.Node
- func AdUnavailable() []g.Node
- func AdminContent(activeTab string) g.Node
- func AdminContentWithClicks(activeTab string, clicks ClickAdminData) g.Node
- func AdminContentWithEmbeddings(activeTab string, emb EmbeddingAdminData) g.Node
- func AdminContentWithQueue(activeTab string, queueStats QueueStats, queueEntries []SMSQueueEntry) g.Node
- func AdminDashboardContainer(activeTab string) g.Node
- func AdminDashboardContainerWithClicks(activeTab string, clicks ClickAdminData) g.Node
- func AdminDashboardContainerWithEmbeddings(activeTab string, emb EmbeddingAdminData) g.Node
- func AdminDashboardContainerWithQueue(activeTab string, queueStats QueueStats, queueEntries []SMSQueueEntry) g.Node
- func AdminDashboardPage(stats QueueStats, entries []SMSQueueEntry) []g.Node
- func AdminSettingsTab() g.Node
- func AdminTabs(activeTab string) g.Node
- func AdsContent(view int, adNodes []g.Node) g.Node
- func Autofocus() g.Node
- func BookmarkButton(adID int, bookmarked bool, csrfToken string) g.Node
- func CategoryItem(currentCategoryID, categoryID int, name, imageFile, returnParam string) g.Node
- func CategorySelectModal(selectedID int, returnParam string, categories []CategoryOption) g.Node
- func ChangePhoneRequestForm() g.Node
- func ChangePhoneSection() g.Node
- func ChangePhoneSuccess(userName, phoneE64 string) g.Node
- func ChangePhoneVerifySection(phoneE64 string) g.Node
- func ClicksTab(d ClickAdminData) g.Node
- func CloseEventMessage(d CloseEventData, attrs ...g.Node) g.Node
- func CloseRockThrowModalsOOB() []g.Node
- func ConversationContentInput(conversationID int, attrs ...g.Node) g.Node
- func ConversationContentInputClearSwapOOB(conversationID int) g.Node
- func ConversationEmptyMessageDeleteSwapOOB(conversationID int) g.Node
- func ConversationForm(conversationID, adID int, csrfToken string, canPost bool, ...) g.Node
- func ConversationFormSwapOOB(conversationID, adID int, csrfToken string, canPost bool) g.Node
- func ConversationListItem(d ConversationListItemData) g.Node
- func ConversationListItemSwapOOB(conversationID int, conversationItemNode g.Node) g.Node
- func ConversationListSSESink() g.Node
- func ConversationMessageActionsBanner(d ConversationModalData, extraAttrs ...g.Node) g.Node
- func ConversationMessageActionsSwapOOB(d ConversationModalData) g.Node
- func ConversationMessageAppendOOB(conversationID int) g.Node
- func ConversationMessagesAppendSwapForTest() string
- func ConversationMessagesArea(conversationID int, canPost bool, messageNodes []g.Node, extraAttrs ...g.Node) g.Node
- func ConversationMessagesPanel(d ConversationModalData) g.Node
- func ConversationMessagesSelector(conversationID int) string
- func ConversationModalSwapOOB(d ConversationModalData) g.Node
- func ConversationModalWithRock(d ConversationModalData) g.Node
- func ConversationSSESink(conversationID int) g.Node
- func CopyButton(path string) g.Node
- func CopyButtonCopied(path string) g.Node
- func DeleteAccountConfirmModal(csrfToken string) g.Node
- func DonatePage() []g.Node
- func EditAd(category CategoryOption, cfg uiads.AdFormConfig, fields g.Node) []g.Node
- func EmbeddingsTab(d EmbeddingAdminData) g.Node
- func ErrorDiv(errMsg string) g.Node
- func ErrorDivWithID(id, errMsg string) g.Node
- func ErrorPageContent(code int, message string) []g.Node
- func FAQPage(expandedSection string) []g.Node
- func FAQSectionIDs() []string
- func FilterToggle(expanded bool) g.Node
- func GenerateSVG(adID, imageID int, size, class string) g.Node
- func GetViewName(view int) string
- func HomePage(userID, view int, q string, filtersExpanded, searchVisible bool, ...) []g.Node
- func ImageFullScreen(adID, current, count int, size string) g.Node
- func ImageFullScreenUpdate(adID, current, count int, size string) g.Node
- func ImageNode(adID, count, current int, size, heightClass string, clickable bool) g.Node
- func ImageNodeWithThumbnails(adID, count, current int, size, heightClass string, clickable bool) g.Node
- func ImageThumbnails(adID, current, count int, size, heightClass string, clickable bool) g.Node
- func LoginForm(returnPath string) g.Node
- func LoginPage(returnPath string) []g.Node
- func MessageItem(d MessageItemData, attrs ...g.Node) g.Node
- func MessageTimeline(messages []MessageItemData, rocks []RockEventData, closes []CloseEventData) []g.Node
- func MessagesPage(items []ConversationListItemData) []g.Node
- func MyAdsContainer(activeTab string, view int, adNodes []g.Node) g.Node
- func MyAdsPage(activeTab string, view int, adNodes []g.Node) []g.Node
- func MyAdsTabs(activeTab string) g.Node
- func NewAd(category CategoryOption, fields g.Node) []g.Node
- func NoInAreaMatchesMessage(within int, unit, location string) g.Node
- func NotificationsSSESink() g.Node
- func NotificationsSection(smsOptedOut bool) g.Node
- func NotificationsSectionSwapOOB(smsOptedOut bool) g.Node
- func OutsideAreaHeading() g.Node
- func Page(userID int, hasUnread bool, userName, title, currentPath, csrfToken string, ...) g.Node
- func PasswordField(view PasswordFieldView) g.Node
- func PrivacyPolicyPage() []g.Node
- func RecoverExpiredPanel() g.Node
- func RecoverFailedPanel(message string) g.Node
- func RecoverPage(code, twilioFrom string, expiresAt time.Time) []g.Node
- func RecoverResetForm(username string) g.Node
- func RecoverUnavailablePage() []g.Node
- func RecoverWaitingPanel(code, twilioFrom string, expiresAt time.Time) g.Node
- func RegisterForm(username string) g.Node
- func RegisterPage(username string) []g.Node
- func RegisterPassword(username, phoneE64 string) g.Node
- func RegisterVerify(username, phoneE64 string) g.Node
- func RemoveIntroBanner() g.Node
- func RemoveModal(name string) []g.Node
- func RockCountBadge(rockCount int) g.Node
- func RockEventMessage(d RockEventData, attrs ...g.Node) g.Node
- func RockIcons(adID int, rockCount int) g.Node
- func RockOpinionLink(conversationID int) g.Node
- func RockOpinionModal(d RockOpinionModalData) g.Node
- func RockThrowConfirmModal(d RockThrowConfirmData) g.Node
- func RockThrowLink(d ConversationModalData) g.Node
- func RockThrowPreviewModal(d RockThrowPreviewData) g.Node
- func SMSQueueFilters() g.Node
- func SMSQueueRow(entry SMSQueueEntry) g.Node
- func SMSQueueRows(entries []SMSQueueEntry) g.Node
- func SMSQueueStats(stats QueueStats) g.Node
- func SMSQueueTab(stats QueueStats, entries []SMSQueueEntry) g.Node
- func SMSQueueTableHeader() g.Node
- func SMSQueueTableWithEntries(entries []SMSQueueEntry) g.Node
- func SSEEventConversation(conversationID int) string
- func SearchArea(q string, expanded bool, filterFacets []facet.Def, filters uiads.SearchFilters, ...) g.Node
- func SearchAreaOOB(q string, expanded bool, filterFacets []facet.Def, filters uiads.SearchFilters, ...) g.Node
- func SearchContainer(userID, view int, q string, filtersExpanded, searchVisible bool, ...) g.Node
- func SearchLocationModal(f uiads.SearchFilters) g.Node
- func SearchResults(view int, results []g.Node) g.Node
- func SearchResultsEmptyMessage() g.Node
- func SearchResultsOOB(view int, results []g.Node) g.Node
- func SearchResultsResponse(view, page int, results []g.Node) g.Node
- func SearchToggleOOB(searchVisible bool) g.Node
- func SearchView(view int, filters uiads.SearchFilters, results []g.Node) g.Node
- func SearchWidget(userID, view int, q string, filtersExpanded, searchVisible bool, ...) g.Node
- func SetAdImageURLFunc(f func(adID, index int, size string) string)
- func SetUserAccountPictureURLFunc(f func(userID int) string)
- func SettingsPage(name, phoneE64 string, smsOptedOut bool, userID int, hasAccountPicture bool, ...) []g.Node
- func SiteFooter() g.Node
- func StaticRockIcons(rockCount int) g.Node
- func TermsOfServicePage() []g.Node
- func TurnstileWidget() g.Node
- func UnreadIndicatorSwapOOB(hasUnread bool) g.Node
- func UnreadSSESink() g.Node
- func UserAccountPictureBanner(d UserProfileData) g.Node
- func UserAccountPictureSrc(userID int) string
- func UserMenu(userName, memberSince string, userID int, isAdmin bool, hasUnread bool, ...) g.Node
- func UserNameLink(userID int, userName string, extra ...g.Node) g.Node
- func UserProfileAds(pathPrefix string, view int, adNodes []g.Node) g.Node
- func UserProfilePage(d UserProfileData, view int, adNodes []g.Node) []g.Node
- func UserRockIcons(userID int, rockCount int) g.Node
- func UserShareModal(path string) g.Node
- func UserSummaryFragment(d UserProfileData) g.Node
- func ValidFAQSection(id string) bool
- func ValidateView(viewStr string) int
- func WelcomePage(rockCount int) []g.Node
- type AdCard
- type AdDetail
- type AdHistoryEntry
- type CategoryOption
- type ClickAdRow
- type ClickAdminData
- type ClickImageRow
- type CloseEventData
- type ConversationListItemData
- type ConversationModalData
- type EmbeddingActivityRow
- type EmbeddingAdminData
- type EmbeddingCachePanel
- type MessageItemData
- type MissingEmbeddingRow
- type PasswordFieldView
- type QueueStats
- type RockEventData
- type RockEventKind
- type RockOpinionModalData
- type RockThrowConfirmData
- type RockThrowPreviewData
- type SMSQueueEntry
- type SMSQueueEntryInput
- type UserProfileData
Constants ¶
const ( SSEEventUnread = "unread" SSEEventConversationList = "conversation-list" SSEEventNotifications = "notifications" )
Named SSE events — listeners exist only when the matching UI is mounted, so missing-target OOB errors are avoided on other pages.
const ( SettingsChangePasswordErrorID = "change-password-error" SettingsChangePhoneErrorID = "change-phone-error" SettingsDeleteAccountErrorID = "delete-account-error" SettingsAccountPictureErrorID = "account-picture-error" )
const ( ViewGrid int = iota + 1 ViewList )
View types
const RecoverPasswordErrorID = "recover-password-error"
Variables ¶
This section is empty.
Functions ¶
func AccountPictureSection ¶ added in v0.0.72
AccountPictureSection is the settings block for upload/URL/remove.
func AdGridNode ¶
func AdImageSrc ¶ added in v0.0.56
AdImageSrc returns a reused PresignGet URL, or "" when the object is missing.
func AdListNode ¶
func AdShareModal ¶
func AdUnavailable ¶ added in v0.0.44
func AdminContent ¶
func AdminContentWithClicks ¶ added in v0.0.18
func AdminContentWithClicks(activeTab string, clicks ClickAdminData) g.Node
func AdminContentWithEmbeddings ¶ added in v0.0.18
func AdminContentWithEmbeddings(activeTab string, emb EmbeddingAdminData) g.Node
func AdminContentWithQueue ¶
func AdminContentWithQueue(activeTab string, queueStats QueueStats, queueEntries []SMSQueueEntry) g.Node
func AdminDashboardContainer ¶
func AdminDashboardContainerWithClicks ¶ added in v0.0.18
func AdminDashboardContainerWithClicks(activeTab string, clicks ClickAdminData) g.Node
func AdminDashboardContainerWithEmbeddings ¶ added in v0.0.18
func AdminDashboardContainerWithEmbeddings(activeTab string, emb EmbeddingAdminData) g.Node
func AdminDashboardContainerWithQueue ¶
func AdminDashboardContainerWithQueue(activeTab string, queueStats QueueStats, queueEntries []SMSQueueEntry) g.Node
func AdminDashboardPage ¶
func AdminDashboardPage(stats QueueStats, entries []SMSQueueEntry) []g.Node
func AdminSettingsTab ¶
func Autofocus ¶ added in v0.0.43
Autofocus marks a field for initial focus. HTMX focuses [autofocus] after swaps.
func CategoryItem ¶
func CategorySelectModal ¶
func CategorySelectModal(selectedID int, returnParam string, categories []CategoryOption) g.Node
func ChangePhoneRequestForm ¶ added in v0.0.48
func ChangePhoneSection ¶ added in v0.0.48
func ChangePhoneSuccess ¶ added in v0.0.48
func ChangePhoneVerifySection ¶ added in v0.0.48
func ClicksTab ¶ added in v0.0.18
func ClicksTab(d ClickAdminData) g.Node
func CloseEventMessage ¶ added in v0.0.44
func CloseEventMessage(d CloseEventData, attrs ...g.Node) g.Node
CloseEventMessage renders a journal entry for ad/account deletion.
func CloseRockThrowModalsOOB ¶ added in v0.0.87
CloseRockThrowModalsOOB removes confirm/preview modals after a successful throw.
func ConversationContentInputClearSwapOOB ¶ added in v0.0.42
ConversationContentInputClearSwapOOB replaces the message input with an empty field after send.
func ConversationEmptyMessageDeleteSwapOOB ¶ added in v0.0.43
ConversationEmptyMessageDeleteSwapOOB removes the empty-state placeholder when the first message is appended.
func ConversationForm ¶
func ConversationFormSwapOOB ¶ added in v0.0.44
func ConversationListItem ¶
func ConversationListItem(d ConversationListItemData) g.Node
func ConversationListSSESink ¶ added in v0.0.43
func ConversationMessageActionsBanner ¶ added in v0.0.42
func ConversationMessageActionsBanner(d ConversationModalData, extraAttrs ...g.Node) g.Node
func ConversationMessageActionsSwapOOB ¶ added in v0.0.42
func ConversationMessageActionsSwapOOB(d ConversationModalData) g.Node
func ConversationMessageAppendOOB ¶ added in v0.0.43
func ConversationMessagesAppendSwapForTest ¶ added in v0.0.43
func ConversationMessagesAppendSwapForTest() string
ConversationMessagesAppendSwapForTest exposes the append swap spec for tests.
func ConversationMessagesArea ¶ added in v0.0.42
func ConversationMessagesPanel ¶ added in v0.0.42
func ConversationMessagesPanel(d ConversationModalData) g.Node
func ConversationMessagesSelector ¶ added in v0.0.43
func ConversationModalSwapOOB ¶
func ConversationModalSwapOOB(d ConversationModalData) g.Node
ConversationModalSwapOOB returns the modal div with hx-swap-oob="outerHTML". Used when the first message creates a conversation.
func ConversationModalWithRock ¶ added in v0.0.35
func ConversationModalWithRock(d ConversationModalData) g.Node
func ConversationSSESink ¶ added in v0.0.43
func CopyButton ¶
func CopyButtonCopied ¶
func DeleteAccountConfirmModal ¶ added in v0.0.44
func DonatePage ¶ added in v0.0.93
func EditAd ¶
func EditAd(category CategoryOption, cfg uiads.AdFormConfig, fields g.Node) []g.Node
func EmbeddingsTab ¶ added in v0.0.18
func EmbeddingsTab(d EmbeddingAdminData) g.Node
func ErrorDivWithID ¶
func ErrorPageContent ¶
ErrorPageContent returns the content for error pages
func FAQSectionIDs ¶ added in v0.0.91
func FAQSectionIDs() []string
func FilterToggle ¶
func GenerateSVG ¶
GenerateSVG is a missing-image placeholder sized like an <img> via class.
func GetViewName ¶
func ImageFullScreenUpdate ¶
func ImageNodeWithThumbnails ¶
func ImageThumbnails ¶
func MessageItem ¶
func MessageItem(d MessageItemData, attrs ...g.Node) g.Node
func MessageTimeline ¶
func MessageTimeline(messages []MessageItemData, rocks []RockEventData, closes []CloseEventData) []g.Node
MessageTimeline renders chat messages with rock and close journal entries inserted chronologically. Timestamps must already be in the viewer's timezone.
func MessagesPage ¶
func MessagesPage(items []ConversationListItemData) []g.Node
func NoInAreaMatchesMessage ¶ added in v0.0.20
NoInAreaMatchesMessage is shown when geo search has no matches in the within area.
func NotificationsSSESink ¶ added in v0.0.84
func NotificationsSection ¶
func NotificationsSectionSwapOOB ¶ added in v0.0.84
func OutsideAreaHeading ¶ added in v0.0.20
OutsideAreaHeading separates in-area from out-of-area search results.
func PasswordField ¶ added in v0.0.20
func PasswordField(view PasswordFieldView) g.Node
PasswordField renders a password input with an HTMX visibility toggle.
func PrivacyPolicyPage ¶ added in v0.0.76
func RecoverExpiredPanel ¶ added in v0.0.51
func RecoverFailedPanel ¶ added in v0.0.51
func RecoverPage ¶ added in v0.0.51
func RecoverResetForm ¶ added in v0.0.51
func RecoverUnavailablePage ¶ added in v0.0.51
func RecoverWaitingPanel ¶ added in v0.0.51
func RegisterForm ¶
func RegisterPage ¶
func RegisterPassword ¶
func RegisterVerify ¶
func RemoveIntroBanner ¶ added in v0.0.37
func RemoveModal ¶
RemoveModal returns swap-oob delete elements to remove a modal and its backdrop
func RockCountBadge ¶ added in v0.0.35
RockCountBadge shows user's remaining rocks
func RockEventMessage ¶ added in v0.0.42
func RockEventMessage(d RockEventData, attrs ...g.Node) g.Node
RockEventMessage renders a journal entry for a rock throw or unthrow.
func RockIcons ¶ added in v0.0.35
RockIcons renders clickable rock icons for an ad Each icon links to a rock by ordinal position Only shows rocks bound to the ad (when inquirer throws)
func RockOpinionLink ¶ added in v0.0.35
RockOpinionLink renders a link for participants to view the assessment.
func RockOpinionModal ¶ added in v0.0.35
func RockOpinionModal(d RockOpinionModalData) g.Node
RockOpinionModal renders the cached or generated dispute assessment.
func RockThrowConfirmModal ¶ added in v0.0.87
func RockThrowConfirmModal(d RockThrowConfirmData) g.Node
RockThrowConfirmModal is a single scrollable confirm before throwing a rock.
func RockThrowLink ¶ added in v0.0.35
func RockThrowLink(d ConversationModalData) g.Node
RockThrowLink renders a button to throw/unthrow a rock in the conversation modal
func RockThrowPreviewModal ¶ added in v0.0.87
func RockThrowPreviewModal(d RockThrowPreviewData) g.Node
RockThrowPreviewModal is a stacked modal for pre-throw dispute assessment.
func SMSQueueFilters ¶
func SMSQueueRow ¶
func SMSQueueRow(entry SMSQueueEntry) g.Node
func SMSQueueRows ¶
func SMSQueueRows(entries []SMSQueueEntry) g.Node
func SMSQueueStats ¶
func SMSQueueStats(stats QueueStats) g.Node
func SMSQueueTab ¶
func SMSQueueTab(stats QueueStats, entries []SMSQueueEntry) g.Node
func SMSQueueTableHeader ¶
func SMSQueueTableWithEntries ¶
func SMSQueueTableWithEntries(entries []SMSQueueEntry) g.Node
func SSEEventConversation ¶ added in v0.0.43
func SearchArea ¶ added in v0.0.22
func SearchArea(q string, expanded bool, filterFacets []facet.Def, filters uiads.SearchFilters, searchVisible bool) g.Node
SearchArea renders the search box, filter toggle, and optional expanded facets.
func SearchAreaOOB ¶ added in v0.0.22
func SearchAreaOOB(q string, expanded bool, filterFacets []facet.Def, filters uiads.SearchFilters, searchVisible bool) g.Node
SearchAreaOOB swaps #search-area when the filter panel is shown or hidden.
func SearchContainer ¶
func SearchLocationModal ¶ added in v0.0.20
func SearchLocationModal(f uiads.SearchFilters) g.Node
SearchLocationModal renders the modal to edit location and within distance.
func SearchResultsEmptyMessage ¶ added in v0.0.20
SearchResultsEmptyMessage is the standard no-results copy for search grids.
func SearchResultsOOB ¶
SearchResultsOOB swaps #search-results out-of-band (show/hide filters).
func SearchResultsResponse ¶
SearchResultsResponse is the HTMX body for /api/search/. Page 1: #search-results with sorry message or first page of ads. Page 2+: ad nodes only (replaces the scroll sentinel).
func SearchToggleOOB ¶ added in v0.0.23
SearchToggleOOB swaps #search-toggle out-of-band after show/hide search.
func SearchView ¶
func SearchWidget ¶
func SetAdImageURLFunc ¶ added in v0.0.56
SetAdImageURLFunc registers the resolver used by image templates.
func SetUserAccountPictureURLFunc ¶ added in v0.0.72
SetUserAccountPictureURLFunc registers the resolver for account pictures.
func SettingsPage ¶
func SiteFooter ¶ added in v0.0.76
func StaticRockIcons ¶ added in v0.0.43
func TermsOfServicePage ¶ added in v0.0.76
func TurnstileWidget ¶ added in v0.0.79
TurnstileWidget renders Cloudflare Turnstile when keys are configured and enforcement is required (not under ALLOW_TEST_REGISTRATION).
func UnreadIndicatorSwapOOB ¶
func UnreadSSESink ¶ added in v0.0.43
func UserAccountPictureBanner ¶ added in v0.0.72
func UserAccountPictureBanner(d UserProfileData) g.Node
UserAccountPictureBanner shows the optional full-width account picture.
func UserAccountPictureSrc ¶ added in v0.0.72
UserAccountPictureSrc returns a PresignGet URL, or "" when missing.
func UserNameLink ¶
UserNameLink renders a link to the user's profile with a hover popup summary
func UserProfileAds ¶ added in v0.0.71
UserProfileAds is the active-ads list with grid/list toggles.
func UserProfilePage ¶
UserProfilePage renders the user profile page body
func UserRockIcons ¶ added in v0.0.35
UserRockIcons renders clickable rock icons for a user Each icon links to a rock by ordinal position Shows rocks bound to the user (when owner throws)
func UserShareModal ¶ added in v0.0.92
func UserSummaryFragment ¶
func UserSummaryFragment(d UserProfileData) g.Node
UserSummaryFragment is the popup content loaded on hover
func ValidFAQSection ¶
func ValidateView ¶
func WelcomePage ¶
Types ¶
type AdCard ¶
type AdCard struct {
ID int
PriceDisplay string
HasPrice bool
Title string
Location string
CreatedAt time.Time
ImageCount int
Active bool
Bookmarked bool
RockCount int
FacetLabel string
}
AdCard holds presentation fields for an ad in search or list views.
type AdDetail ¶
type AdDetail struct {
ID int
OwnerID int
ImageCount int
PriceDisplay string
HasPrice bool
Title string
Location string
DescriptionOriginal string
DescriptionHistory []AdHistoryEntry
// ShowLoginForDetails is true when edit history exists but is hidden
// until the viewer logs in.
ShowLoginForDetails bool
CreatedAt time.Time
ExpiresAt time.Time
Bookmarked bool
Active bool
Inactive bool
Deleted bool
IsTest bool
Reachable bool
RockCount int
FacetLabel string
FacetDetails []string // formal facets not shown in title or price row
Tags []string
}
AdDetail holds presentation fields for a single ad page.
type AdHistoryEntry ¶
AdHistoryEntry holds one edit-history block on the ad detail page.
type CategoryOption ¶
CategoryOption holds presentation fields for a category picker item.
type ClickAdRow ¶ added in v0.0.18
type ClickAdRow struct {
AdID int
Title string
CategoryName string
UserCount int
AdViews int
ImageClicks int
LastActivity string
}
ClickAdRow is one row in the top-ads table.
type ClickAdminData ¶ added in v0.0.18
type ClickAdminData struct {
UsersWithClicks int
AdsClicked int
AdDetailViews int
ActiveLast7Days int
TopAds []ClickAdRow
TopImages []ClickImageRow
}
ClickAdminData holds presentation fields for the clicks admin tab.
type ClickImageRow ¶ added in v0.0.18
type ClickImageRow struct {
AdID int
Title string
ImageIndex int
UserCount int
Clicks int
LastClick string
}
ClickImageRow is one row in the top-images table.
type CloseEventData ¶ added in v0.0.44
CloseEventData holds presentation fields for an ad/account close journal entry. EventAt is in the viewer's timezone.
type ConversationListItemData ¶
type ConversationListItemData struct {
ConversationID int
AdID int
OwnerID int
InquirerID int
CurrentUserID int
AdTitle string
LastMessageContent string
OtherUserName string
LastMessageAt *time.Time
UpdatedAt time.Time
HasUnread bool
RockCount int
OtherUserRockCount int
OtherUserDeleted bool
}
ConversationListItemData holds presentation fields for a messages list row. LastMessageAt and UpdatedAt are in the viewer's timezone when set.
type ConversationModalData ¶
type ConversationModalData struct {
ConversationID int
AdID int
OwnerID int
InquirerID int
CurrentUserID int
InquirerRockCount int
OwnerRockCount int
AdTitle string
OwnerName string
InquirerName string
OwnerDeleted bool
InquirerDeleted bool
CSRFToken string
CanPost bool
HasThrownRock bool
CanThrowRock bool
MessageNodes []g.Node
RockThrowerID *int
TargetModalID string
// DisabledInputPlaceholder overrides the closed send-field placeholder.
DisabledInputPlaceholder string
}
ConversationModalData holds presentation fields for a conversation modal.
type EmbeddingActivityRow ¶ added in v0.0.25
type EmbeddingActivityRow struct {
AdID int
AdTitle string
ActivityType string
Weight float32
Timestamp string
}
EmbeddingActivityRow holds one weighted activity used to build an embedding.
type EmbeddingAdminData ¶ added in v0.0.18
type EmbeddingAdminData struct {
EmbedderProvider string
EmbedderModel string
EmbeddedCount int
MissingCount int
QueueDepth int
Caches []EmbeddingCachePanel
MissingAds []MissingEmbeddingRow
CategoryID int
Categories []CategoryOption
UserActivities []EmbeddingActivityRow
SiteActivities []EmbeddingActivityRow
}
EmbeddingAdminData holds presentation fields for the embeddings admin tab.
type EmbeddingCachePanel ¶ added in v0.0.18
type EmbeddingCachePanel struct {
Name string
Hits int64
Misses int64
HitRatePct float64
ItemCount int64
MemoryKB float64
}
EmbeddingCachePanel holds cache metrics for one embedding cache tier.
type MessageItemData ¶
MessageItemData holds presentation fields for a single chat message. CreatedAt is in the viewer's timezone.
type MissingEmbeddingRow ¶ added in v0.0.18
MissingEmbeddingRow holds one ad awaiting vector indexing.
type PasswordFieldView ¶ added in v0.0.20
type PasswordFieldView struct {
Name string
ID string // DOM id stem; defaults to Name when empty
Autocomplete string
Value string
Visible bool
Autofocus bool
// PreventAutofill uses readonly-until-focus so password managers
// don't fill the field on page load (e.g. change-password forms
// that also include a username for the save prompt).
PreventAutofill bool
}
PasswordFieldView holds state for a password input with visibility toggle.
type QueueStats ¶
QueueStats holds SMS queue counts for the admin dashboard.
type RockEventData ¶ added in v0.0.35
type RockEventData struct {
ConversationID int
ThrowerID int
CurrentUserID int
Kind RockEventKind
EventAt time.Time
OwnerID int
InquirerID int
OwnerName string
InquirerName string
Reason string
ShowAssessmentHint bool
}
RockEventData holds presentation fields for a rock journal timeline entry. EventAt is in the viewer's timezone.
type RockEventKind ¶ added in v0.0.42
type RockEventKind int
RockEventKind identifies a rock journal entry type.
const ( RockEventThrown RockEventKind = iota RockEventUnthrown )
type RockOpinionModalData ¶ added in v0.0.35
type RockOpinionModalData struct {
ConversationID int
AdID int
AdTitle string
Summary string
AssessmentScore int
AssessmentDetail string
Resolution string
Reasoning string
AdFacts []string
GeneratedAt *time.Time
}
RockOpinionModalData holds presentation fields for a dispute assessment modal. Party identities are never shown; roles are Owner / Inquirer only.
type RockThrowConfirmData ¶ added in v0.0.87
type RockThrowConfirmData struct {
ConversationID int
AdID int
CSRFToken string
Remaining int
ThrowLabel string
// AtAd is true when the inquirer is throwing at the listing.
AtAd bool
// OtherUserID / OtherName are the counterparty (ad owner when AtAd, else inquirer).
OtherUserID int
OtherName string
}
RockThrowConfirmData drives the pre-throw confirmation modal.
type RockThrowPreviewData ¶ added in v0.0.87
type RockThrowPreviewData struct {
Summary string
AssessmentScore int
AssessmentDetail string
Resolution string
Reasoning string
}
RockThrowPreviewData is the inline assessment preview inside the confirm modal.
type SMSQueueEntry ¶
type SMSQueueEntry struct {
ID int
AdTitle string
Status string
CreatedAt string
ProcessedAt *string
}
SMSQueueEntry represents a queue entry for UI rendering
func SMSQueueEntriesFrom ¶
func SMSQueueEntriesFrom(entries []SMSQueueEntryInput) []SMSQueueEntry