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 AdFlyerPage(d AdFlyerData) 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, flyerHref 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 CategorySelect(selected CategoryOption, categories []CategoryOption, returnParam string) 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 EmbeddingActivityRows(id string, rows []EmbeddingActivityRow) 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 FunStatsPage(d FunStatsData) []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, categories []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 AdFlyerData
- type AdHistoryEntry
- type CategoryOption
- type ClickAdRow
- type ClickAdminData
- type ClickImageRow
- type CloseEventData
- type ConversationListItemData
- type ConversationModalData
- type EmbeddingActivityRow
- type EmbeddingAdminData
- type EmbeddingCachePanel
- type FunStatsData
- type FunStatsMonth
- type MessageItemData
- type MissingEmbeddingRow
- type PasswordFieldView
- type QueueStats
- type RockEventData
- type RockEventKind
- type RockOpinionModalData
- type RockThrowConfirmData
- type RockThrowPreviewData
- type SMSQueueEntry
- type SMSQueueEntryInput
- type UserOption
- 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 ¶
AccountPictureSection is the settings block for upload/URL/remove.
func AdFlyerPage ¶
func AdFlyerPage(d AdFlyerData) g.Node
func AdGridNode ¶
func AdImageSrc ¶
AdImageSrc returns a reused PresignGet URL, or "" when the object is missing.
func AdListNode ¶
func AdShareModal ¶
func AdUnavailable ¶
func AdminContent ¶
func AdminContentWithClicks ¶
func AdminContentWithClicks(activeTab string, clicks ClickAdminData) g.Node
func AdminContentWithEmbeddings ¶
func AdminContentWithEmbeddings(activeTab string, emb EmbeddingAdminData) g.Node
func AdminContentWithQueue ¶
func AdminContentWithQueue(activeTab string, queueStats QueueStats, queueEntries []SMSQueueEntry) g.Node
func AdminDashboardContainer ¶
func AdminDashboardContainerWithClicks ¶
func AdminDashboardContainerWithClicks(activeTab string, clicks ClickAdminData) g.Node
func AdminDashboardContainerWithEmbeddings ¶
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 CategoryItem ¶
func CategorySelect ¶
func CategorySelect(selected CategoryOption, categories []CategoryOption, returnParam string) g.Node
func ChangePhoneRequestForm ¶
func ChangePhoneSection ¶
func ChangePhoneSuccess ¶
func ClicksTab ¶
func ClicksTab(d ClickAdminData) g.Node
func CloseEventMessage ¶
func CloseEventMessage(d CloseEventData, attrs ...g.Node) g.Node
CloseEventMessage renders a journal entry for ad/account deletion.
func CloseRockThrowModalsOOB ¶
CloseRockThrowModalsOOB removes confirm/preview modals after a successful throw.
func ConversationContentInputClearSwapOOB ¶
ConversationContentInputClearSwapOOB replaces the message input with an empty field after send.
func ConversationEmptyMessageDeleteSwapOOB ¶
ConversationEmptyMessageDeleteSwapOOB removes the empty-state placeholder when the first message is appended.
func ConversationForm ¶
func ConversationFormSwapOOB ¶
func ConversationListItem ¶
func ConversationListItem(d ConversationListItemData) g.Node
func ConversationListSSESink ¶
func ConversationMessageActionsBanner ¶
func ConversationMessageActionsBanner(d ConversationModalData, extraAttrs ...g.Node) g.Node
func ConversationMessageActionsSwapOOB ¶
func ConversationMessageActionsSwapOOB(d ConversationModalData) g.Node
func ConversationMessagesAppendSwapForTest ¶
func ConversationMessagesAppendSwapForTest() string
ConversationMessagesAppendSwapForTest exposes the append swap spec for tests.
func ConversationMessagesPanel ¶
func ConversationMessagesPanel(d ConversationModalData) g.Node
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 ¶
func ConversationModalWithRock(d ConversationModalData) g.Node
func ConversationSSESink ¶
func CopyButton ¶
func CopyButtonCopied ¶
func DonatePage ¶
func EditAd ¶
func EditAd(category CategoryOption, cfg uiads.AdFormConfig, fields g.Node) []g.Node
func EmbeddingActivityRows ¶
func EmbeddingActivityRows(id string, rows []EmbeddingActivityRow) g.Node
func EmbeddingsTab ¶
func EmbeddingsTab(d EmbeddingAdminData) g.Node
func ErrorDivWithID ¶
func ErrorPageContent ¶
ErrorPageContent returns the content for error pages
func FAQSectionIDs ¶
func FAQSectionIDs() []string
func FilterToggle ¶
func FunStatsPage ¶
func FunStatsPage(d FunStatsData) []g.Node
func GenerateSVG ¶
GenerateSVG is a missing-image placeholder sized like an <img> via class.
func GetViewName ¶
func HomePage ¶
func HomePage(userID, view int, q string, filtersExpanded, searchVisible bool, category CategoryOption, categories []CategoryOption, filterFacets []facet.Def, filters uiads.SearchFilters, results []g.Node) []g.Node
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 NewAd ¶
func NewAd(category CategoryOption, categories []CategoryOption, fields g.Node) []g.Node
func NoInAreaMatchesMessage ¶
NoInAreaMatchesMessage is shown when geo search has no matches in the within area.
func NotificationsSSESink ¶
func NotificationsSection ¶
func OutsideAreaHeading ¶
OutsideAreaHeading separates in-area from out-of-area search results.
func PasswordField ¶
func PasswordField(view PasswordFieldView) g.Node
PasswordField renders a password input with an HTMX visibility toggle.
func PrivacyPolicyPage ¶
func RecoverExpiredPanel ¶
func RecoverFailedPanel ¶
func RecoverResetForm ¶
func RecoverUnavailablePage ¶
func RecoverWaitingPanel ¶
func RegisterForm ¶
func RegisterPage ¶
func RegisterPassword ¶
func RegisterVerify ¶
func RemoveIntroBanner ¶
func RemoveModal ¶
RemoveModal returns swap-oob delete elements to remove a modal and its backdrop
func RockCountBadge ¶
RockCountBadge shows user's remaining rocks
func RockEventMessage ¶
func RockEventMessage(d RockEventData, attrs ...g.Node) g.Node
RockEventMessage renders a journal entry for a rock throw or unthrow.
func RockIcons ¶
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 ¶
RockOpinionLink renders a link for participants to view the assessment.
func RockOpinionModal ¶
func RockOpinionModal(d RockOpinionModalData) g.Node
RockOpinionModal renders the cached or generated dispute assessment.
func RockThrowConfirmModal ¶
func RockThrowConfirmModal(d RockThrowConfirmData) g.Node
RockThrowConfirmModal is a single scrollable confirm before raising a flag.
func RockThrowLink ¶
func RockThrowLink(d ConversationModalData) g.Node
RockThrowLink renders a button to throw/unthrow a rock in the conversation modal
func RockThrowPreviewModal ¶
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 ¶
func SearchArea ¶
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 ¶
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 SearchContainer(userID, view int, q string, filtersExpanded, searchVisible bool, category CategoryOption, categories []CategoryOption, filterFacets []facet.Def, filters uiads.SearchFilters, results []g.Node) g.Node
func SearchLocationModal ¶
func SearchLocationModal(f uiads.SearchFilters) g.Node
SearchLocationModal renders the modal to edit location and within distance.
func SearchResultsEmptyMessage ¶
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 ¶
SearchToggleOOB swaps #search-toggle out-of-band after show/hide search.
func SearchView ¶
func SearchWidget ¶
func SetAdImageURLFunc ¶
SetAdImageURLFunc registers the resolver used by image templates.
func SetUserAccountPictureURLFunc ¶
SetUserAccountPictureURLFunc registers the resolver for account pictures.
func SettingsPage ¶
func SiteFooter ¶
func StaticRockIcons ¶
func TermsOfServicePage ¶
func TurnstileWidget ¶
TurnstileWidget renders Cloudflare Turnstile when keys are configured and enforcement is required (not under ALLOW_TEST_REGISTRATION).
func UnreadIndicatorSwapOOB ¶
func UnreadSSESink ¶
func UserAccountPictureBanner ¶
func UserAccountPictureBanner(d UserProfileData) g.Node
UserAccountPictureBanner shows the optional full-width account picture.
func UserAccountPictureSrc ¶
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 ¶
UserProfileAds is the active-ads list with grid/list toggles.
func UserProfilePage ¶
UserProfilePage renders the user profile page body
func UserRockIcons ¶
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 ¶
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 AdFlyerData ¶
type AdFlyerData struct {
ID int
ImageCount int
PriceDisplay string
HasPrice bool
Title string
Location string
Description string
FacetLabel string
FacetDetails []string
Tags []string
AdURL string
}
AdFlyerData holds presentation fields for the print-only ad flyer.
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
type EmbeddingAdminData struct {
EmbedderProvider string
EmbedderModel string
EmbeddedCount int
MissingCount int
QueueDepth int
Caches []EmbeddingCachePanel
MissingAds []MissingEmbeddingRow
CategoryID int
SiteCategoryID int
Categories []CategoryOption
UserID int
Users []UserOption
UserActivities []EmbeddingActivityRow
SiteActivities []EmbeddingActivityRow
}
EmbeddingAdminData holds presentation fields for the embeddings admin tab.
type EmbeddingCachePanel ¶
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 FunStatsData ¶
type FunStatsData struct {
Months []FunStatsMonth
}
FunStatsData holds presentation fields for /funstats.
type FunStatsMonth ¶
FunStatsMonth is one month on the public fun stats graphs.
type MessageItemData ¶
MessageItemData holds presentation fields for a single chat message. CreatedAt is in the viewer's timezone.
type MissingEmbeddingRow ¶
MissingEmbeddingRow holds one ad awaiting vector indexing.
type PasswordFieldView ¶
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 ¶
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 ¶
type RockEventKind int
RockEventKind identifies a rock journal entry type.
const ( RockEventThrown RockEventKind = iota RockEventUnthrown )
type RockOpinionModalData ¶
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 ¶
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 ¶
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
type SMSQueueEntryInput ¶
type SMSQueueEntryInput struct {
ID int
AdTitle string
Status string
CreatedAt time.Time
ProcessedAt *time.Time
}
SMSQueueEntryInput holds raw queue entry fields for UI formatting.
type UserOption ¶
UserOption holds presentation fields for an admin user picker item.
Source Files
¶
- ad.go
- ad_cards.go
- admin.go
- admin_clicks.go
- admin_embeddings.go
- category.go
- components.go
- donate.go
- error.go
- faq.go
- flyer.go
- funstats.go
- home.go
- image.go
- image_url.go
- legal.go
- login.go
- message.go
- page.go
- qr.go
- recover.go
- register.go
- rock.go
- rock_confirm.go
- rock_opinion.go
- search_location.go
- sse.go
- turnstile.go
- types.go
- user.go
- view.go
- welcome.go