@stacksjs/defaults 0.75.529 → 0.75.537

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/ai/skills/stacks-actions/SKILL.md +1 -1
  2. package/ai/skills/stacks-build/SKILL.md +1 -1
  3. package/ai/skills/stacks-dashboard/SKILL.md +2 -2
  4. package/ai/skills/stacks-database/SKILL.md +1 -1
  5. package/ai/skills/stacks-migrations/SKILL.md +2 -2
  6. package/ai/skills/stacks-native/CATALOG.md +6 -6
  7. package/app/Actions/Dashboard/Commerce/CommerceCouponsAction.ts +27 -15
  8. package/app/Actions/Dashboard/Commerce/CommerceCouponsExportAction.ts +45 -0
  9. package/app/Actions/Dashboard/Commerce/CommerceCustomersAction.ts +22 -12
  10. package/app/Actions/Dashboard/Commerce/CommerceCustomersExportAction.ts +44 -0
  11. package/app/Actions/Dashboard/Commerce/CommercePosCheckoutAction.ts +9 -29
  12. package/app/Actions/Dashboard/Commerce/CommercePrintDevicesAction.ts +7 -9
  13. package/app/Actions/Dashboard/Commerce/CommerceProductDetailAction.ts +9 -8
  14. package/app/Actions/Dashboard/Commerce/CommerceTaxesAction.ts +7 -9
  15. package/app/Actions/Dashboard/Commerce/ManufacturerIndexAction.ts +8 -20
  16. package/app/Actions/Dashboard/Commerce/commerce-coupon-list.test.ts +203 -0
  17. package/app/Actions/Dashboard/Commerce/commerce-coupon-list.ts +248 -0
  18. package/app/Actions/Dashboard/Commerce/commerce-customer-list.test.ts +183 -0
  19. package/app/Actions/Dashboard/Commerce/commerce-customer-list.ts +186 -0
  20. package/app/Actions/Dashboard/Commerce/commerce-customer-records.test.ts +1 -34
  21. package/app/Actions/Dashboard/Commerce/commerce-customer-records.ts +0 -11
  22. package/app/Actions/Dashboard/Commerce/commerce-manufacturer-list.test.ts +118 -0
  23. package/app/Actions/Dashboard/Commerce/commerce-manufacturer-list.ts +41 -0
  24. package/app/Actions/Dashboard/Commerce/commerce-pos-catalog.test.ts +17 -5
  25. package/app/Actions/Dashboard/Commerce/commerce-pos-catalog.ts +17 -3
  26. package/app/Actions/Dashboard/Commerce/commerce-print-device-list.test.ts +99 -0
  27. package/app/Actions/Dashboard/Commerce/commerce-print-device-list.ts +18 -0
  28. package/app/Actions/Dashboard/Commerce/commerce-product-list.ts +5 -5
  29. package/app/Actions/Dashboard/Commerce/commerce-product-options.test.ts +81 -0
  30. package/app/Actions/Dashboard/Commerce/commerce-tax-rate-list.test.ts +99 -0
  31. package/app/Actions/Dashboard/Commerce/commerce-tax-rate-list.ts +18 -0
  32. package/app/Actions/Dashboard/Commerce/coupon-records.test.ts +1 -16
  33. package/app/Actions/Dashboard/Commerce/coupon-records.ts +6 -10
  34. package/app/Actions/Dashboard/Commerce/manufacturer-records.test.ts +5 -17
  35. package/app/Actions/Dashboard/Commerce/manufacturer-records.ts +0 -29
  36. package/app/Actions/Dashboard/Email/captured-mail.test.ts +16 -0
  37. package/app/Actions/Dashboard/Email/captured-mail.ts +9 -1
  38. package/app/Actions/Dashboard/Models/model-write.ts +36 -3
  39. package/app/Actions/Dashboard/Notifications/NotificationDeliveryHistoryAction.ts +13 -58
  40. package/app/Actions/Dashboard/Notifications/notification-delivery-history.ts +74 -0
  41. package/app/Actions/SitemapAction.ts +3 -1
  42. package/app/Models/Notification.ts +3 -1
  43. package/app/Models/NotificationDelivery.ts +4 -0
  44. package/app/Models/User.ts +10 -1
  45. package/bootstrap.ts +10 -2
  46. package/functions/commerce/tax-types.ts +21 -0
  47. package/functions/dashboard-list.test.ts +16 -0
  48. package/functions/dashboard-list.ts +14 -6
  49. package/functions/dashboard-model-record.test.ts +139 -0
  50. package/functions/dashboard-model-record.ts +353 -0
  51. package/functions/monitoring/errors.ts +22 -103
  52. package/functions/notifications/deliveries.ts +7 -38
  53. package/functions/queries.ts +7 -10
  54. package/ide/vscode/package.json +1 -1
  55. package/package.json +5 -5
  56. package/resources/components/Dashboard/Analytics/AnalyticsHub.stx +2 -2
  57. package/resources/components/Dashboard/Analytics/CampaignAnalytics.stx +22 -28
  58. package/resources/components/Dashboard/Analytics/EventAnalytics.stx +26 -34
  59. package/resources/components/Dashboard/Analytics/SalesAnalytics.stx +29 -37
  60. package/resources/components/Dashboard/Analytics/WebAnalyticsBreakdown.stx +12 -16
  61. package/resources/components/Dashboard/Analytics/WebAnalyticsDashboard.stx +43 -53
  62. package/resources/components/Dashboard/App/RequestsOverview.stx +2 -1
  63. package/resources/components/Dashboard/App/SourceInventory.stx +2 -1
  64. package/resources/components/Dashboard/Auth/AccessTokens.stx +3 -5
  65. package/resources/components/Dashboard/Billing/BillingPaymentMethodsPanel.stx +9 -11
  66. package/resources/components/Dashboard/Billing/BillingSettings.stx +1 -1
  67. package/resources/components/Dashboard/Buddy/BuddyAssistant.stx +4 -6
  68. package/resources/components/Dashboard/Commerce/CommerceCategoriesDashboard.stx +2 -2
  69. package/resources/components/Dashboard/Commerce/CommerceCategoriesTable.stx +3 -3
  70. package/resources/components/Dashboard/Commerce/CommerceCategoryDialog.stx +2 -2
  71. package/resources/components/Dashboard/Commerce/CommerceCategoryHierarchy.stx +3 -5
  72. package/resources/components/Dashboard/Commerce/CommerceCouponBreakdown.stx +17 -13
  73. package/resources/components/Dashboard/Commerce/CommerceCouponDialog.stx +1 -1
  74. package/resources/components/Dashboard/Commerce/CommerceCouponsDashboard.stx +57 -85
  75. package/resources/components/Dashboard/Commerce/CommerceCouponsTable.stx +32 -9
  76. package/resources/components/Dashboard/Commerce/CommerceCustomerDialog.stx +1 -1
  77. package/resources/components/Dashboard/Commerce/CommerceCustomersDashboard.stx +49 -83
  78. package/resources/components/Dashboard/Commerce/CommerceCustomersTable.stx +32 -9
  79. package/resources/components/Dashboard/Commerce/CommerceGiftCardBreakdown.stx +9 -15
  80. package/resources/components/Dashboard/Commerce/CommerceGiftCardDialog.stx +1 -1
  81. package/resources/components/Dashboard/Commerce/CommerceGiftCardsDashboard.stx +35 -119
  82. package/resources/components/Dashboard/Commerce/CommerceGiftCardsTable.stx +3 -3
  83. package/resources/components/Dashboard/Commerce/CommerceManufacturerDialog.stx +1 -1
  84. package/resources/components/Dashboard/Commerce/CommerceManufacturersDashboard.stx +3 -5
  85. package/resources/components/Dashboard/Commerce/CommerceManufacturersTable.stx +2 -2
  86. package/resources/components/Dashboard/Commerce/CommerceOrderDialog.stx +4 -4
  87. package/resources/components/Dashboard/Commerce/CommerceOrdersDashboard.stx +42 -129
  88. package/resources/components/Dashboard/Commerce/CommerceOrdersTable.stx +3 -3
  89. package/resources/components/Dashboard/Commerce/CommerceOverviewDashboard.stx +1 -1
  90. package/resources/components/Dashboard/Commerce/CommerceOverviewOrdersTable.stx +9 -11
  91. package/resources/components/Dashboard/Commerce/CommerceOverviewProductsTable.stx +5 -7
  92. package/resources/components/Dashboard/Commerce/CommerceOverviewStats.stx +14 -16
  93. package/resources/components/Dashboard/Commerce/CommercePaymentsBreakdown.stx +12 -18
  94. package/resources/components/Dashboard/Commerce/CommercePaymentsDashboard.stx +41 -120
  95. package/resources/components/Dashboard/Commerce/CommercePaymentsTable.stx +1 -1
  96. package/resources/components/Dashboard/Commerce/CommercePosCart.stx +13 -15
  97. package/resources/components/Dashboard/Commerce/CommercePosCatalog.stx +17 -19
  98. package/resources/components/Dashboard/Commerce/CommercePosCheckoutDialog.stx +2 -2
  99. package/resources/components/Dashboard/Commerce/CommercePosDashboard.stx +1 -1
  100. package/resources/components/Dashboard/Commerce/CommercePosReceiptDialog.stx +1 -1
  101. package/resources/components/Dashboard/Commerce/CommerceProductDetailDashboard.stx +5 -5
  102. package/resources/components/Dashboard/Commerce/CommerceProductDialog.stx +3 -3
  103. package/resources/components/Dashboard/Commerce/CommerceProductsDashboard.stx +41 -122
  104. package/resources/components/Dashboard/Commerce/CommerceProductsTable.stx +3 -3
  105. package/resources/components/Dashboard/Commerce/CommerceReviewEditDialog.stx +1 -1
  106. package/resources/components/Dashboard/Commerce/CommerceReviewsDashboard.stx +38 -122
  107. package/resources/components/Dashboard/Commerce/CommerceReviewsTable.stx +2 -2
  108. package/resources/components/Dashboard/Commerce/CommerceTaxDialog.stx +3 -3
  109. package/resources/components/Dashboard/Commerce/CommerceTaxesDashboard.stx +5 -4
  110. package/resources/components/Dashboard/Commerce/CommerceTaxesTable.stx +4 -3
  111. package/resources/components/Dashboard/Commerce/CommerceUnitDialog.stx +3 -7
  112. package/resources/components/Dashboard/Commerce/CommerceUnitsDashboard.stx +3 -5
  113. package/resources/components/Dashboard/Commerce/CommerceUnitsTable.stx +2 -2
  114. package/resources/components/Dashboard/Commerce/CommerceVariantDialog.stx +3 -3
  115. package/resources/components/Dashboard/Commerce/CommerceVariantsDashboard.stx +4 -4
  116. package/resources/components/Dashboard/Commerce/CommerceVariantsTable.stx +3 -5
  117. package/resources/components/Dashboard/Commerce/Delivery/CourierDialog.stx +1 -1
  118. package/resources/components/Dashboard/Commerce/Delivery/CouriersDashboard.stx +1 -1
  119. package/resources/components/Dashboard/Commerce/Delivery/CouriersTable.stx +2 -2
  120. package/resources/components/Dashboard/Commerce/Delivery/DeliveryOverviewDashboard.stx +44 -52
  121. package/resources/components/Dashboard/Commerce/Delivery/DeliveryPagination.stx +2 -2
  122. package/resources/components/Dashboard/Commerce/Delivery/DeliveryRouteDialog.stx +1 -1
  123. package/resources/components/Dashboard/Commerce/Delivery/DeliveryRoutesDashboard.stx +1 -1
  124. package/resources/components/Dashboard/Commerce/Delivery/DeliveryRoutesTable.stx +2 -2
  125. package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveriesDashboard.stx +1 -1
  126. package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryTable.stx +2 -2
  127. package/resources/components/Dashboard/Commerce/Delivery/LicenseKeyDialog.stx +3 -3
  128. package/resources/components/Dashboard/Commerce/Delivery/LicenseKeysDashboard.stx +1 -1
  129. package/resources/components/Dashboard/Commerce/Delivery/LicenseKeysTable.stx +2 -2
  130. package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodsDashboard.stx +1 -1
  131. package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodsTable.stx +2 -2
  132. package/resources/components/Dashboard/Commerce/Delivery/ShippingRateDialog.stx +2 -2
  133. package/resources/components/Dashboard/Commerce/Delivery/ShippingRatesDashboard.stx +1 -1
  134. package/resources/components/Dashboard/Commerce/Delivery/ShippingRatesTable.stx +2 -2
  135. package/resources/components/Dashboard/Commerce/Delivery/ShippingZoneDialog.stx +1 -1
  136. package/resources/components/Dashboard/Commerce/Delivery/ShippingZonesDashboard.stx +1 -1
  137. package/resources/components/Dashboard/Commerce/Delivery/ShippingZonesTable.stx +4 -8
  138. package/resources/components/Dashboard/Commerce/PaymentDetailsDialog.stx +1 -3
  139. package/resources/components/Dashboard/Commerce/PrintDeviceBreakdown.stx +9 -15
  140. package/resources/components/Dashboard/Commerce/PrintDeviceDialog.stx +1 -1
  141. package/resources/components/Dashboard/Commerce/PrintDevicesDashboard.stx +3 -3
  142. package/resources/components/Dashboard/Commerce/PrintDevicesTable.stx +3 -3
  143. package/resources/components/Dashboard/Commerce/PrintLogBreakdown.stx +3 -9
  144. package/resources/components/Dashboard/Commerce/PrintLogDetailsDialog.stx +1 -1
  145. package/resources/components/Dashboard/Commerce/PrintLogsDashboard.stx +4 -4
  146. package/resources/components/Dashboard/Commerce/PrintLogsTable.stx +8 -10
  147. package/resources/components/Dashboard/Commerce/ProductWaitlistDashboard.stx +37 -109
  148. package/resources/components/Dashboard/Commerce/ProductWaitlistEntryDialog.stx +3 -3
  149. package/resources/components/Dashboard/Commerce/ProductWaitlistTable.stx +2 -2
  150. package/resources/components/Dashboard/Commerce/RestaurantWaitlistDashboard.stx +38 -112
  151. package/resources/components/Dashboard/Commerce/RestaurantWaitlistEntryDialog.stx +2 -2
  152. package/resources/components/Dashboard/Commerce/RestaurantWaitlistTable.stx +2 -2
  153. package/resources/components/Dashboard/Content/AuthorsDashboard.stx +4 -4
  154. package/resources/components/Dashboard/Content/BlogDashboard.stx +4 -4
  155. package/resources/components/Dashboard/Content/CommentsDashboard.stx +36 -83
  156. package/resources/components/Dashboard/Content/ContentDashboard.stx +12 -14
  157. package/resources/components/Dashboard/Content/ContentTaxonomyDashboard.stx +2 -2
  158. package/resources/components/Dashboard/Content/FileManagerDashboard.stx +8 -12
  159. package/resources/components/Dashboard/Content/FileStoragePanel.stx +6 -10
  160. package/resources/components/Dashboard/Content/FileUploadDialog.stx +1 -3
  161. package/resources/components/Dashboard/Content/PagesDashboard.stx +39 -78
  162. package/resources/components/Dashboard/Content/PostEditorDialog.stx +4 -8
  163. package/resources/components/Dashboard/Content/PostsDashboard.stx +44 -85
  164. package/resources/components/Dashboard/Content/SeoDashboard.stx +5 -4
  165. package/resources/components/Dashboard/Data/DataRecords.stx +140 -12
  166. package/resources/components/Dashboard/Deployments/DeploymentList.stx +4 -4
  167. package/resources/components/Dashboard/Deployments/DeploymentTable.stx +3 -1
  168. package/resources/components/Dashboard/Elements/DropdownNavigation.stx +5 -7
  169. package/resources/components/Dashboard/Email/CapturedMailDashboard.stx +1 -3
  170. package/resources/components/Dashboard/Email/CapturedMailList.stx +18 -20
  171. package/resources/components/Dashboard/Email/EmailActivityDashboard.stx +24 -28
  172. package/resources/components/Dashboard/Email/EmailSettingsList.stx +6 -8
  173. package/resources/components/Dashboard/Email/EmailSettingsNavigation.stx +10 -12
  174. package/resources/components/Dashboard/Email/EmailSidebar.stx +33 -37
  175. package/resources/components/Dashboard/Email/InboxMessageDetail.stx +1 -1
  176. package/resources/components/Dashboard/Email/InboxMessageList.stx +16 -18
  177. package/resources/components/Dashboard/Email/InboxSettingsDashboard.stx +1 -1
  178. package/resources/components/Dashboard/Environment/EnvironmentDashboard.stx +2 -2
  179. package/resources/components/Dashboard/GlobalSearch.stx +19 -21
  180. package/resources/components/Dashboard/Home/DashboardHome.stx +8 -1
  181. package/resources/components/Dashboard/Infrastructure/CloudDashboard.stx +1 -1
  182. package/resources/components/Dashboard/Infrastructure/DnsDashboard.stx +27 -13
  183. package/resources/components/Dashboard/Infrastructure/LogsDashboard.stx +1 -1
  184. package/resources/components/Dashboard/Infrastructure/MailboxesDashboard.stx +46 -8
  185. package/resources/components/Dashboard/Infrastructure/ServerlessDashboard.stx +1 -1
  186. package/resources/components/Dashboard/Infrastructure/ServersDashboard.stx +1 -1
  187. package/resources/components/Dashboard/Jobs/JobDetail.stx +1 -1
  188. package/resources/components/Dashboard/Jobs/JobHistory.stx +44 -57
  189. package/resources/components/Dashboard/Jobs/JobTable.stx +23 -25
  190. package/resources/components/Dashboard/Kanban/KanbanCardDialog.stx +1 -1
  191. package/resources/components/Dashboard/Library/ComponentsDashboard.stx +1 -1
  192. package/resources/components/Dashboard/Management/AssignmentDrawer.stx +5 -7
  193. package/resources/components/Dashboard/Management/PermissionsDashboard.stx +35 -43
  194. package/resources/components/Dashboard/Marketing/AbandonedCartsDashboard.stx +11 -13
  195. package/resources/components/Dashboard/Marketing/CampaignDialog.stx +1 -3
  196. package/resources/components/Dashboard/Marketing/CampaignsDashboard.stx +2 -2
  197. package/resources/components/Dashboard/Marketing/CampaignsTable.stx +2 -2
  198. package/resources/components/Dashboard/Marketing/MarketingListsDashboard.stx +1 -1
  199. package/resources/components/Dashboard/Marketing/MarketingListsTable.stx +2 -2
  200. package/resources/components/Dashboard/Marketing/SocialPostDialog.stx +1 -3
  201. package/resources/components/Dashboard/Marketing/SocialPostsDashboard.stx +2 -2
  202. package/resources/components/Dashboard/Marketing/SocialPostsTable.stx +2 -2
  203. package/resources/components/Dashboard/Models/ModelRecordActions.stx +11 -2
  204. package/resources/components/Dashboard/Models/ModelRecordCreate.stx +193 -0
  205. package/resources/components/Dashboard/Models/ModelRecordDetail.stx +144 -0
  206. package/resources/components/Dashboard/Models/ModelRecordEdit.stx +176 -0
  207. package/resources/components/Dashboard/Models/ModelRecordsDashboard.stx +52 -186
  208. package/resources/components/Dashboard/Models/ModelsOverview.stx +2 -4
  209. package/resources/components/Dashboard/Monitoring/ErrorDashboard.stx +47 -81
  210. package/resources/components/Dashboard/Monitoring/ErrorTable.stx +4 -2
  211. package/resources/components/Dashboard/NotFoundDashboard.stx +4 -4
  212. package/resources/components/Dashboard/Notifications/NotificationDeliveryHistory.stx +43 -77
  213. package/resources/components/Dashboard/Notifications/NotificationDeliveryOverview.stx +15 -17
  214. package/resources/components/Dashboard/Notifications/NotificationDeliveryTable.stx +1 -1
  215. package/resources/components/Dashboard/Operations/AuditDashboard.stx +1 -1
  216. package/resources/components/Dashboard/Operations/ChangeDashboard.stx +1 -1
  217. package/resources/components/Dashboard/Operations/IncidentDashboard.stx +1 -1
  218. package/resources/components/Dashboard/Operations/MigrationDashboard.stx +2 -2
  219. package/resources/components/Dashboard/Operations/RecoveryDashboard.stx +1 -1
  220. package/resources/components/Dashboard/Operations/SchedulerDashboard.stx +1 -1
  221. package/resources/components/Dashboard/Queries/QueryDashboard.stx +60 -86
  222. package/resources/components/Dashboard/Queries/QueryDetail.stx +5 -9
  223. package/resources/components/Dashboard/Realtime/RealtimeDashboard.stx +6 -8
  224. package/resources/components/Dashboard/Remote/RemoteConsole.stx +14 -20
  225. package/resources/components/Dashboard/Settings/AppearanceSettingsDashboard.stx +48 -54
  226. package/resources/components/Dashboard/Settings/MailSettingsDashboard.stx +8 -8
  227. package/resources/components/Dashboard/Settings/SettingsDashboard.stx +43 -47
  228. package/resources/components/Dashboard/Teams/TeamInvitationDashboard.stx +2 -2
  229. package/resources/components/Dashboard/UI/ActivityTable.stx +2 -1
  230. package/resources/components/Dashboard/UI/Button.stx +15 -0
  231. package/resources/components/Dashboard/UI/MetricCards.stx +5 -7
  232. package/resources/components/Dashboard/UI/Pagination.stx +3 -5
  233. package/resources/components/Dashboard/UI/QuickLinks.stx +2 -2
  234. package/resources/components/Dashboard/UI/Select.stx +1 -0
  235. package/resources/components/Dashboard/UI/Table.stx +139 -96
  236. package/resources/components/Dashboard/UI/Tabs.stx +18 -20
  237. package/routes/dashboard-api.ts +2 -0
  238. package/routes/dashboard.ts +246 -253
  239. package/routes/storefront.ts +31 -0
  240. package/stx-components-plugin.ts +12 -1
  241. package/views/dashboard/content/categories/index.stx +1 -1
  242. package/views/dashboard/content/tags/index.stx +1 -1
  243. package/views/dashboard/layouts/default.stx +27 -12
  244. package/views/dashboard/models/[model]/[id]/edit.stx +8 -0
  245. package/views/dashboard/models/[model]/[id].stx +8 -0
  246. package/views/dashboard/models/[model]/create.stx +8 -0
  247. package/resources/components/Dashboard/CreateRecordModal.stx +0 -138
  248. package/resources/components/Dashboard/Models/EditRecordModal.stx +0 -81
@@ -10,6 +10,9 @@ import type {
10
10
  DataStats,
11
11
  } from '../../../../functions/data'
12
12
  import { fetchDashboardData } from '../../../../functions/data'
13
+ import type { ModelWriteCapabilities } from '../../../../functions/dashboard-model-record'
14
+ import { deleteModelRecord, fetchModelCapabilities, modelRecordCreateHref, modelRecordEditHref, modelRecordHref } from '../../../../functions/dashboard-model-record'
15
+ import { pushToast } from '../../../../functions/toasts'
13
16
 
14
17
  type DataRecord = DashboardActivity | DashboardSubscriber | DashboardTeam | DashboardUser
15
18
 
@@ -20,34 +23,140 @@ const search = state('')
20
23
  const loading = state(true)
21
24
  const loadError = state('')
22
25
 
23
- const metadata: Record<DataMode, { title: string, description: string, icon: string, empty: string }> = {
26
+ const metadata: Record<DataMode, { title: string, description: string, icon: string, empty: string, one: string, many: string, cards: number }> = {
24
27
  activity: {
25
28
  title: 'Activity Log',
26
29
  description: 'Review the native application audit trail.',
27
30
  icon: 'i-hugeicons-activity-03',
28
31
  empty: 'No activity has been recorded.',
32
+ one: 'entry',
33
+ many: 'entries',
34
+ cards: 3,
29
35
  },
30
36
  users: {
31
37
  title: 'Users',
32
38
  description: 'Review registered application users.',
33
39
  icon: 'i-hugeicons-user-group',
34
40
  empty: 'No users have registered.',
41
+ one: 'user',
42
+ many: 'users',
43
+ cards: 3,
35
44
  },
36
45
  teams: {
37
46
  title: 'Teams',
38
47
  description: 'Review collaborative teams and membership totals.',
39
48
  icon: 'i-hugeicons-user-multiple-02',
40
49
  empty: 'No teams have been created.',
50
+ one: 'team',
51
+ many: 'teams',
52
+ cards: 4,
41
53
  },
42
54
  subscribers: {
43
55
  title: 'Subscribers',
44
56
  description: 'Review subscription status and acquisition sources.',
45
57
  icon: 'i-hugeicons-mail-account-01',
46
58
  empty: 'No subscribers have joined.',
59
+ one: 'subscriber',
60
+ many: 'subscribers',
61
+ cards: 4,
47
62
  },
48
63
  }
49
64
 
50
65
  const page = derived(() => metadata[mode()])
66
+
67
+ /**
68
+ * The model behind each mode's rows, for the eye, pencil and trash. Activity
69
+ * has none: an audit trail is read, never edited or deleted.
70
+ */
71
+ const MODEL_SLUGS: Partial<Record<DataMode, string>> = { users: 'user', teams: 'team', subscribers: 'subscriber' }
72
+ /** The row field an action names: "Edit Ava", "Delete ava@example.com". */
73
+ const ACTION_LABEL_KEYS: Partial<Record<DataMode, string>> = { users: 'name', teams: 'name', subscribers: 'email' }
74
+
75
+ const modelSlug = derived(() => MODEL_SLUGS[mode()] ?? '')
76
+ const capabilities = state<ModelWriteCapabilities>({ create: false, update: false, destroy: false })
77
+ const confirmingDelete = state<Record<string, any> | null>(null)
78
+ const working = state(false)
79
+
80
+ /** View always; edit and delete only where the model's API allows them. */
81
+ const rowActions = derived(() => {
82
+ if (!modelSlug())
83
+ return []
84
+ return [
85
+ { action: 'view', label: 'View' },
86
+ ...(capabilities().update ? [{ action: 'edit', label: 'Edit' }] : []),
87
+ ...(capabilities().destroy ? [{ action: 'delete', label: 'Delete' }] : []),
88
+ ]
89
+ })
90
+ const actionLabelKey = derived(() => ACTION_LABEL_KEYS[mode()] ?? 'id')
91
+ const deleteTitle = derived(() => `Delete this ${page().one}?`)
92
+ const deleteDescription = derived(() => {
93
+ const row = confirmingDelete()
94
+ const name = row ? String(row[actionLabelKey()] ?? row.id) : ''
95
+ return `${name} will be removed through the model, so soft deletes and observers apply.`
96
+ })
97
+
98
+ async function loadCapabilities(): Promise<void> {
99
+ if (!modelSlug()) {
100
+ capabilities.set({ create: false, update: false, destroy: false })
101
+ return
102
+ }
103
+ try {
104
+ capabilities.set(await fetchModelCapabilities(modelSlug()))
105
+ }
106
+ catch {
107
+ // Without them the page still lists and views; it offers no writes.
108
+ capabilities.set({ create: false, update: false, destroy: false })
109
+ }
110
+ }
111
+
112
+ /** Offered where the model can be created from the dashboard at all. */
113
+ const canCreate = derived(() => Boolean(modelSlug()) && capabilities().create)
114
+ const createLabel = derived(() => `Create ${page().one}`)
115
+
116
+ // The create page comes back here, like the record's own pages.
117
+ function createRecord(): void {
118
+ navigate(modelRecordCreateHref(modelSlug(), `/data/${mode()}`))
119
+ }
120
+
121
+ /** The eye and the pencil each open a page of the record's own, which comes back here. */
122
+ function handleRowAction(payload: { action: string, row: Record<string, any> }): void {
123
+ if (payload.action === 'delete')
124
+ confirmingDelete.set(payload.row)
125
+ else if (payload.action === 'edit')
126
+ navigate(modelRecordEditHref(modelSlug(), payload.row.id, { from: `/data/${mode()}` }))
127
+ else
128
+ navigate(modelRecordHref(modelSlug(), payload.row.id, `/data/${mode()}`))
129
+ }
130
+
131
+ async function confirmDelete(): Promise<void> {
132
+ const row = confirmingDelete()
133
+ if (!row)
134
+ return
135
+ working.set(true)
136
+ try {
137
+ await deleteModelRecord(modelSlug(), row.id)
138
+ pushToast('success', `${capitalize(page().one)} ${row[actionLabelKey()] ?? row.id} deleted`)
139
+ confirmingDelete.set(null)
140
+ await loadRecords()
141
+ }
142
+ catch (error) {
143
+ pushToast('error', 'Could not delete', { detail: error instanceof Error ? error.message : String(error) })
144
+ }
145
+ finally {
146
+ working.set(false)
147
+ }
148
+ }
149
+
150
+ /** Each mode's stats fill their row: three cards in a four-column grid left a hole. */
151
+ const statsGridClass = derived(() => page().cards === 3 ? 'grid-cols-1 sm:grid-cols-3' : 'grid-cols-2 lg:grid-cols-4')
152
+
153
+ /** "13 users", or "2 of 13 users" while a search narrows them. */
154
+ const countLabel = derived(() => {
155
+ const total = records().length
156
+ const shown = filteredRecords().length
157
+ const noun = (count: number) => count === 1 ? page().one : page().many
158
+ return shown === total ? `${total} ${noun(total)}` : `${shown} of ${total} ${noun(total)}`
159
+ })
51
160
  const filteredRecords = derived(() => {
52
161
  const query = search().trim().toLowerCase()
53
162
  if (!query)
@@ -92,7 +201,7 @@ function capitalize(value: string): string {
92
201
  return value ? value.charAt(0).toUpperCase() + value.slice(1) : value
93
202
  }
94
203
 
95
- const recorded = (key: string, label: string) => ({ key, label, type: 'datetime' as const, align: 'right' as const, sortable: true, emptyText: 'Never', class: 'text-neutral-500 text-xs whitespace-nowrap dark:text-neutral-400' })
204
+ const recorded = (key: string, label: string, emptyText = 'Never') => ({ key, label, type: 'datetime' as const, align: 'right' as const, sortable: true, emptyText, class: 'text-neutral-500 text-xs whitespace-nowrap dark:text-neutral-400' })
96
205
  const statusColumn = { key: 'statusTone', label: 'Status', type: 'badge' as const, sortable: true, badgeLabelKey: 'statusLabel', badgeClasses: TONES }
97
206
 
98
207
  const COLUMNS_BY_MODE = {
@@ -105,7 +214,9 @@ const COLUMNS_BY_MODE = {
105
214
  users: [
106
215
  { key: 'name', label: 'User', sortable: true, subtitleKey: 'email', class: 'font-medium text-neutral-900 dark:text-white' },
107
216
  { key: 'verificationTone', label: 'Verification', type: 'badge' as const, sortable: true, badgeLabelKey: 'verificationLabel', badgeClasses: TONES },
108
- recorded('updatedAt', 'Updated'),
217
+ // A user nobody has edited has no update time; "Never" read as if the
218
+ // account were broken.
219
+ recorded('updatedAt', 'Updated', 'Not since registering'),
109
220
  recorded('createdAt', 'Registered'),
110
221
  ],
111
222
  teams: [
@@ -176,22 +287,29 @@ async function loadRecords(): Promise<void> {
176
287
 
177
288
  onMount(() => {
178
289
  void loadRecords()
290
+ void loadCapabilities()
179
291
  })
180
292
  </script>
181
293
 
182
- <div class="space-y-6">
294
+ <div class="flex flex-col gap-6">
183
295
  <header class="flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between">
184
296
  <div>
185
297
  <h1 class="font-semibold text-2xl text-neutral-900 tracking-tight dark:text-white">{{ page().title }}</h1>
186
298
  <p class="mt-1 text-neutral-500 text-sm dark:text-neutral-400">{{ page().description }}</p>
187
299
  </div>
188
- <Button variant="secondary" :loading="loading()" @click="loadRecords">
189
- <span :if="!loading()" class="h-4 w-4 i-hugeicons-refresh"></span>
190
- Refresh
191
- </Button>
300
+ <div class="flex flex-none gap-2 items-center">
301
+ <Button variant="secondary" :loading="loading()" @click="loadRecords">
302
+ <span :if="!loading()" class="h-4 w-4 i-hugeicons-refresh"></span>
303
+ Refresh
304
+ </Button>
305
+ <Button :if="canCreate()" variant="primary" @click="createRecord">
306
+ <span aria-hidden="true" class="h-4 w-4 i-hugeicons-add-01"></span>
307
+ {{ createLabel() }}
308
+ </Button>
309
+ </div>
192
310
  </header>
193
311
 
194
- <div class="grid gap-4 grid-cols-2 lg:grid-cols-4">
312
+ <div class="grid gap-4" :class="statsGridClass()">
195
313
  <StatsCard :title="'Total ' + page().title" :icon="page().icon" iconBg="primary">
196
314
  <template #value>{{ statValue('total') }}</template>
197
315
  </StatsCard>
@@ -235,7 +353,7 @@ onMount(() => {
235
353
  <div class="flex flex-col gap-3 items-start sm:flex-row sm:items-center sm:justify-between p-5 border-b border-neutral-200 dark:border-neutral-700">
236
354
  <div>
237
355
  <h2 class="font-semibold text-neutral-900 dark:text-white">{{ page().title }}</h2>
238
- <p class="mt-1 text-neutral-500 text-xs dark:text-neutral-400">Showing {{ filteredRecords().length }} of {{ records().length }} loaded records</p>
356
+ <p class="mt-1 text-neutral-500 text-xs dark:text-neutral-400">{{ countLabel() }}</p>
239
357
  </div>
240
358
  <label class="block relative w-full sm:w-72">
241
359
  <span class="sr-only">Search {{ page().title.toLowerCase() }}</span>
@@ -263,7 +381,7 @@ onMount(() => {
263
381
  passed in the mode that has a slotted column.
264
382
  --}}
265
383
  <template :if="mode() === 'teams'">
266
- <Table :columns="recordColumns()" :data="recordRows()" paginated :page-size="25">
384
+ <Table :columns="recordColumns()" :data="recordRows()" paginated :page-size="25" :framed="false" :row-actions="rowActions()" :action-label-key="actionLabelKey()" @row-action="handleRowAction">
267
385
  <template #cell="{ row }">
268
386
  <StxLink :to="row.modelLink" class="font-medium text-neutral-900 text-sm dark:text-white hover:text-blue-600 dark:hover:text-blue-400">{{ row.name }}</StxLink>
269
387
  <p class="mt-0.5 max-w-xl text-neutral-500 text-xs dark:text-neutral-400" x-text="row.descriptionLabel"></p>
@@ -271,8 +389,18 @@ onMount(() => {
271
389
  </Table>
272
390
  </template>
273
391
  <template :else>
274
- <Table :columns="recordColumns()" :data="recordRows()" paginated :page-size="25" />
392
+ <Table :columns="recordColumns()" :data="recordRows()" paginated :page-size="25" :framed="false" :row-actions="rowActions()" :action-label-key="actionLabelKey()" @row-action="handleRowAction" />
275
393
  </template>
276
394
  </div>
277
395
  </Card>
396
+
397
+ <ConfirmDialog
398
+ :isOpen="Boolean(confirmingDelete())"
399
+ :title="deleteTitle()"
400
+ :description="deleteDescription()"
401
+ :busy="working()"
402
+ :confirmLabel="working() ? 'Deleting' : 'Delete'"
403
+ @close="confirmingDelete.set(null)"
404
+ @confirm="confirmDelete"
405
+ />
278
406
  </div>
@@ -199,7 +199,7 @@ onMount(() => {
199
199
  })
200
200
  </script>
201
201
 
202
- <div class="space-y-6">
202
+ <div class="flex flex-col gap-6">
203
203
  <PageHeader title="Deployments" description="Deployment model records through the guarded dashboard API.">
204
204
  <div class="flex gap-2 items-center">
205
205
  <Button :disabled="isStarting() || isPreviewing()" variant="outline" @click="openDeploymentDialog('preview')">
@@ -239,7 +239,7 @@ onMount(() => {
239
239
  </div>
240
240
  </section>
241
241
 
242
- <section class="space-y-3">
242
+ <section class="flex flex-col gap-3">
243
243
  <div class="flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between">
244
244
  <div>
245
245
  <h2 class="font-semibold text-gray-900 dark:text-white">Deployment history</h2>
@@ -274,7 +274,7 @@ onMount(() => {
274
274
  size="sm"
275
275
  @close="showDeployModal.set(false)"
276
276
  >
277
- <div class="space-y-4">
277
+ <div class="flex flex-col gap-4">
278
278
  <Select
279
279
  v-model:value="environment"
280
280
  :options="environmentOptions"
@@ -308,7 +308,7 @@ onMount(() => {
308
308
  <DeploymentPreviewDialog :plan="previewPlan" @close="previewPlan.set(null)" @deploy="continueFromPreview" />
309
309
 
310
310
  <Modal :isOpen="showRollbackModal()" title="Rollback deployment" description="Preview and validate a preserved release before changing the active runtime." size="lg" @close="showRollbackModal.set(false)">
311
- <div class="space-y-4">
311
+ <div class="flex flex-col gap-4">
312
312
  <div class="grid gap-4 sm:grid-cols-2">
313
313
  <Select v-model:value="environment" :options="environmentOptions" label="Environment" placeholder="" />
314
314
  <Input v-model:value="rollbackSite" label="Site" placeholder="All application sites" hint="Optional site slug." />
@@ -66,7 +66,9 @@ const rows = derived(() => (deployments() as DeploymentRecord[]).map(deployment
66
66
  >
67
67
  <template #actions="{ row }">
68
68
  <div class="text-right">
69
- <StxLink :to="'/deployments/' + row.id" class="font-medium text-blue-600 text-sm dark:text-blue-400 hover:text-blue-500">View</StxLink>
69
+ <StxLink :to="'/deployments/' + row.id" :aria-label="'View deployment ' + row.id" :title="'View deployment ' + row.id" class="inline-flex items-center justify-center h-7 w-7 hover:bg-neutral-100 dark:hover:bg-neutral-800 rounded-md">
70
+ <span aria-hidden="true" class="block h-4 w-4 text-neutral-500 dark:text-neutral-400 i-hugeicons-view"></span>
71
+ </StxLink>
70
72
  </div>
71
73
  </template>
72
74
  </Table>
@@ -44,12 +44,10 @@ function toggle(): void {
44
44
  </button>
45
45
 
46
46
  <ul :if="isOpen()" class="space-y-1">
47
- <template :for="element in elements()">
48
- <li>
49
- <StxLink :to="element.to" class="block px-2 py-1.5 text-neutral-600 text-sm dark:text-neutral-300 hover:text-neutral-900 dark:hover:text-white hover:bg-neutral-100 dark:hover:bg-white/10 rounded-md" @click="setOpen(false)">
50
- {{ element.label }}
51
- </StxLink>
52
- </li>
53
- </template>
47
+ <li :for="element in elements()">
48
+ <StxLink :to="element.to" class="block px-2 py-1.5 text-neutral-600 text-sm dark:text-neutral-300 hover:text-neutral-900 dark:hover:text-white hover:bg-neutral-100 dark:hover:bg-white/10 rounded-md" @click="setOpen(false)">
49
+ {{ element.label }}
50
+ </StxLink>
51
+ </li>
54
52
  </ul>
55
53
  </nav>
@@ -113,9 +113,7 @@ onMount(() => {
113
113
  {{ unreadable().length }} capture{{ unreadable().length === 1 ? '' : 's' }} could not be read and {{ unreadable().length === 1 ? 'was' : 'were' }} left out of this list.
114
114
  </p>
115
115
  <ul class="mt-1 space-y-0.5">
116
- <template :for="problem in unreadable()">
117
- <li class="break-all"><span class="font-mono">{{ problem.capture }}</span> is {{ problemReason(problem) }}</li>
118
- </template>
116
+ <li :for="problem in unreadable()" class="break-all"><span class="font-mono">{{ problem.capture }}</span> is {{ problemReason(problem) }}</li>
119
117
  </ul>
120
118
  </div>
121
119
  </div>
@@ -50,28 +50,26 @@ function rowClass(id: string): string {
50
50
  <p class="mt-1 text-gray-500 text-sm dark:text-neutral-400">Messages sent through the log driver will appear here.</p>
51
51
  </div>
52
52
  <ul :if="!loading() && !error() && rows().length > 0" class="divide-gray-200 divide-y dark:divide-neutral-600">
53
- <template :for="message in rows()">
54
- <li>
55
- <button
56
- type="button"
57
- :class="rowClass(message.id)"
58
- :aria-current="selectedId() === message.id ? 'true' : undefined"
59
- @click="emit('select', message)"
60
- >
61
- <div class="flex gap-3 items-start justify-between">
62
- <div class="min-w-0">
63
- <div class="flex gap-2 items-center">
64
- <span :class="'flex-shrink-0 h-2 w-2 rounded-full ' + (message.source === 'memory' ? 'bg-green-500' : 'bg-blue-500')"></span>
65
- <p class="font-medium text-gray-900 text-sm truncate dark:text-white">{{ message.subject }}</p>
66
- </div>
67
- <p class="mt-1 text-gray-600 text-xs truncate dark:text-neutral-300">To {{ message.to }}</p>
68
- <p class="mt-1 text-gray-500 text-xs truncate dark:text-neutral-400">{{ message.preview || 'No preview available' }}</p>
53
+ <li :for="message in rows()">
54
+ <button
55
+ type="button"
56
+ :class="rowClass(message.id)"
57
+ :aria-current="selectedId() === message.id ? 'true' : undefined"
58
+ @click="emit('select', message)"
59
+ >
60
+ <div class="flex gap-3 items-start justify-between">
61
+ <div class="min-w-0">
62
+ <div class="flex gap-2 items-center">
63
+ <span :class="'flex-shrink-0 h-2 w-2 rounded-full ' + (message.source === 'memory' ? 'bg-green-500' : 'bg-blue-500')"></span>
64
+ <p class="font-medium text-gray-900 text-sm truncate dark:text-white">{{ message.subject }}</p>
69
65
  </div>
70
- <time class="flex-shrink-0 text-gray-500 text-xs dark:text-neutral-400" :datetime="message.sentAt">{{ formatDate(message.sentAt) }}</time>
66
+ <p class="mt-1 text-gray-600 text-xs truncate dark:text-neutral-300">To {{ message.to }}</p>
67
+ <p class="mt-1 text-gray-500 text-xs truncate dark:text-neutral-400">{{ message.preview || 'No preview available' }}</p>
71
68
  </div>
72
- </button>
73
- </li>
74
- </template>
69
+ <time class="flex-shrink-0 text-gray-500 text-xs dark:text-neutral-400" :datetime="message.sentAt">{{ formatDate(message.sentAt) }}</time>
70
+ </div>
71
+ </button>
72
+ </li>
75
73
  </ul>
76
74
  </div>
77
75
  </section>
@@ -279,20 +279,18 @@ onDestroy(() => {
279
279
  </header>
280
280
 
281
281
  <dl class="grid gap-3 grid-cols-2 xl:grid-cols-4 mt-6">
282
- <template :for="stat in statCards">
283
- <div class="px-4 py-3 bg-white dark:bg-neutral-700 ring-1 ring-gray-200 rounded-lg dark:ring-neutral-600">
284
- <div class="flex items-start justify-between">
285
- <div>
286
- <dt class="text-gray-500 text-xs dark:text-neutral-400">{{ stat.name }}</dt>
287
- <dd class="mt-1 font-semibold tabular-nums text-gray-900 text-xl dark:text-white">{{ stat.value }}</dd>
288
- </div>
289
- <span :class="'flex items-center justify-center h-8 w-8 rounded-md ' + stat.tone">
290
- <span :class="'h-4 w-4 ' + stat.icon"></span>
291
- </span>
282
+ <div :for="stat in statCards" class="px-4 py-3 bg-white dark:bg-neutral-700 ring-1 ring-gray-200 rounded-lg dark:ring-neutral-600">
283
+ <div class="flex items-start justify-between">
284
+ <div>
285
+ <dt class="text-gray-500 text-xs dark:text-neutral-400">{{ stat.name }}</dt>
286
+ <dd class="mt-1 font-semibold tabular-nums text-gray-900 text-xl dark:text-white">{{ stat.value }}</dd>
292
287
  </div>
293
- <p class="mt-2 text-gray-500 text-xs dark:text-neutral-400">{{ stat.detail }}</p>
288
+ <span :class="'flex items-center justify-center h-8 w-8 rounded-md ' + stat.tone">
289
+ <span :class="'h-4 w-4 ' + stat.icon"></span>
290
+ </span>
294
291
  </div>
295
- </template>
292
+ <p class="mt-2 text-gray-500 text-xs dark:text-neutral-400">{{ stat.detail }}</p>
293
+ </div>
296
294
  </dl>
297
295
 
298
296
  <section class="mt-6 px-4 py-4 bg-white dark:bg-neutral-700 ring-1 ring-gray-200 rounded-lg dark:ring-neutral-600">
@@ -378,22 +376,20 @@ onDestroy(() => {
378
376
  </tr>
379
377
  </thead>
380
378
  <tbody class="divide-gray-200 divide-y dark:divide-neutral-600">
381
- <template :for="item in activity.recent">
382
- <tr>
383
- <td class="px-4 py-3">
384
- <span class="inline-flex gap-2 items-center text-gray-700 text-sm dark:text-neutral-300">
385
- <span :class="'h-4 w-4 ' + (item.direction === 'received' ? 'i-hugeicons-mail-receive-02' : 'i-hugeicons-mail-send-02')"></span>
386
- <span class="capitalize">{{ item.direction }}</span>
387
- </span>
388
- </td>
389
- <td class="px-4 py-3 max-w-xs font-medium text-gray-900 text-sm truncate dark:text-white">{{ item.subject }}</td>
390
- <td class="px-4 py-3 max-w-xs text-gray-500 text-sm truncate dark:text-neutral-400">{{ item.correspondent }}</td>
391
- <td class="px-4 py-3 text-gray-500 text-sm whitespace-nowrap dark:text-neutral-400">{{ formatDate(item.occurred_at) }}</td>
392
- <td class="px-4 py-3">
393
- <span :class="'inline-flex px-2 py-0.5 font-medium text-xs rounded-full capitalize ' + statusClass(item.status)">{{ item.status }}</span>
394
- </td>
395
- </tr>
396
- </template>
379
+ <tr :for="item in activity.recent">
380
+ <td class="px-4 py-3">
381
+ <span class="inline-flex gap-2 items-center text-gray-700 text-sm dark:text-neutral-300">
382
+ <span :class="'h-4 w-4 ' + (item.direction === 'received' ? 'i-hugeicons-mail-receive-02' : 'i-hugeicons-mail-send-02')"></span>
383
+ <span class="capitalize">{{ item.direction }}</span>
384
+ </span>
385
+ </td>
386
+ <td class="px-4 py-3 max-w-xs font-medium text-gray-900 text-sm truncate dark:text-white">{{ item.subject }}</td>
387
+ <td class="px-4 py-3 max-w-xs text-gray-500 text-sm truncate dark:text-neutral-400">{{ item.correspondent }}</td>
388
+ <td class="px-4 py-3 text-gray-500 text-sm whitespace-nowrap dark:text-neutral-400">{{ formatDate(item.occurred_at) }}</td>
389
+ <td class="px-4 py-3">
390
+ <span :class="'inline-flex px-2 py-0.5 font-medium text-xs rounded-full capitalize ' + statusClass(item.status)">{{ item.status }}</span>
391
+ </td>
392
+ </tr>
397
393
  </tbody>
398
394
  </table>
399
395
  </div>
@@ -33,14 +33,12 @@ function addItem(): void {
33
33
  </form>
34
34
 
35
35
  <ul :if="items.length > 0" class="mt-4 divide-gray-200 divide-y dark:divide-neutral-600">
36
- <template :for="item in items">
37
- <li class="flex items-center justify-between py-3">
38
- <span class="min-w-0 text-gray-700 text-sm truncate dark:text-neutral-200">{{ item }}</span>
39
- <Button variant="danger" size="sm" iconOnly :ariaLabel="'Remove ' + item" @click="emit('remove', item)">
40
- <span class="h-4 w-4 i-hugeicons-cancel-01"></span>
41
- </Button>
42
- </li>
43
- </template>
36
+ <li :for="item in items" class="flex items-center justify-between py-3">
37
+ <span class="min-w-0 text-gray-700 text-sm truncate dark:text-neutral-200">{{ item }}</span>
38
+ <Button variant="danger" size="sm" iconOnly :ariaLabel="'Remove ' + item" @click="emit('remove', item)">
39
+ <span class="h-4 w-4 i-hugeicons-cancel-01"></span>
40
+ </Button>
41
+ </li>
44
42
  </ul>
45
43
 
46
44
  <p :if="items.length === 0" class="mt-4 py-5 text-center text-gray-500 text-sm dark:text-neutral-400">No entries configured.</p>
@@ -19,18 +19,16 @@ function sectionClass(sectionId: string): string {
19
19
  <aside class="overflow-y-auto flex-shrink-0 w-64 bg-white dark:bg-neutral-700 border-gray-200 border-r dark:border-neutral-600">
20
20
  <nav aria-label="Mail settings sections" class="p-4">
21
21
  <ul class="space-y-1">
22
- <template :for="section in sections">
23
- <li>
24
- <button
25
- type="button"
26
- :class="'flex items-center px-3 py-3 w-full text-sm rounded-md ' + sectionClass(section.id)"
27
- @click="emit('select', section.id)"
28
- >
29
- <span :class="section.icon + ' text-lg'"></span>
30
- <span class="ml-3">{{ section.name }}</span>
31
- </button>
32
- </li>
33
- </template>
22
+ <li :for="section in sections">
23
+ <button
24
+ type="button"
25
+ :class="'flex items-center px-3 py-3 w-full text-sm rounded-md ' + sectionClass(section.id)"
26
+ @click="emit('select', section.id)"
27
+ >
28
+ <span :class="section.icon + ' text-lg'"></span>
29
+ <span class="ml-3">{{ section.name }}</span>
30
+ </button>
31
+ </li>
34
32
  </ul>
35
33
  </nav>
36
34
  </aside>
@@ -31,7 +31,7 @@ function folderIcon(folder: MailFolder): string {
31
31
  if (folder.id === 'sent')
32
32
  return 'i-hugeicons-sent'
33
33
  if (folder.id === 'trash')
34
- return 'i-hugeicons-waste'
34
+ return 'i-hugeicons-delete-02'
35
35
  return `i-hugeicons-${folder.id}`
36
36
  }
37
37
 
@@ -71,26 +71,24 @@ function mailboxLabel(): string {
71
71
  <div class="overflow-y-auto flex-1">
72
72
  <nav aria-label="Mail folders" class="mt-1">
73
73
  <ul>
74
- <template :for="folder in folders">
75
- <li class="mb-1">
76
- <button
77
- type="button"
78
- :class="'flex items-center justify-between px-4 py-2 w-full text-sm ' + folderClass(folder.id)"
79
- @click="emit('update:active-folder', folder.id)"
74
+ <li :for="folder in folders" class="mb-1">
75
+ <button
76
+ type="button"
77
+ :class="'flex items-center justify-between px-4 py-2 w-full text-sm ' + folderClass(folder.id)"
78
+ @click="emit('update:active-folder', folder.id)"
79
+ >
80
+ <span class="flex items-center min-w-0">
81
+ <span :class="'mr-3 h-5 w-5 flex-shrink-0 ' + folderIcon(folder)"></span>
82
+ <span class="truncate">{{ folder.name }}</span>
83
+ </span>
84
+ <span
85
+ :show="unreadCount(folder.id) > 0"
86
+ class="ml-2 px-2 font-medium text-gray-800 text-xs dark:text-neutral-200 bg-gray-200 dark:bg-neutral-600 rounded-full"
80
87
  >
81
- <span class="flex items-center min-w-0">
82
- <span :class="'mr-3 h-5 w-5 flex-shrink-0 ' + folderIcon(folder)"></span>
83
- <span class="truncate">{{ folder.name }}</span>
84
- </span>
85
- <span
86
- :show="unreadCount(folder.id) > 0"
87
- class="ml-2 px-2 font-medium text-gray-800 text-xs dark:text-neutral-200 bg-gray-200 dark:bg-neutral-600 rounded-full"
88
- >
89
- {{ unreadCount(folder.id) }}
90
- </span>
91
- </button>
92
- </li>
93
- </template>
88
+ {{ unreadCount(folder.id) }}
89
+ </span>
90
+ </button>
91
+ </li>
94
92
  </ul>
95
93
  </nav>
96
94
 
@@ -98,24 +96,22 @@ function mailboxLabel(): string {
98
96
  <h3 class="font-semibold text-gray-500 text-xs tracking-wider uppercase dark:text-neutral-400">Categories</h3>
99
97
  <nav aria-label="Mail categories" class="mt-2">
100
98
  <ul>
101
- <template :for="category in categories">
102
- <li class="mb-1">
103
- <button
104
- type="button"
105
- class="flex items-center px-2 py-2 w-full text-gray-700 text-sm dark:text-neutral-300 hover:bg-gray-50 dark:hover:bg-neutral-700 rounded"
106
- @click="emit('category', category.id)"
99
+ <li :for="category in categories" class="mb-1">
100
+ <button
101
+ type="button"
102
+ class="flex items-center px-2 py-2 w-full text-gray-700 text-sm dark:text-neutral-300 hover:bg-gray-50 dark:hover:bg-neutral-700 rounded"
103
+ @click="emit('category', category.id)"
104
+ >
105
+ <span :class="'mr-3 h-5 w-5 ' + category.icon"></span>
106
+ <span>{{ category.name }}</span>
107
+ <span
108
+ :if="category.count > 0"
109
+ class="ml-auto px-2 font-medium text-gray-800 text-xs dark:text-neutral-200 bg-gray-200 dark:bg-neutral-600 rounded-full"
107
110
  >
108
- <span :class="'mr-3 h-5 w-5 ' + category.icon"></span>
109
- <span>{{ category.name }}</span>
110
- <span
111
- :if="category.count > 0"
112
- class="ml-auto px-2 font-medium text-gray-800 text-xs dark:text-neutral-200 bg-gray-200 dark:bg-neutral-600 rounded-full"
113
- >
114
- {{ category.count }}
115
- </span>
116
- </button>
117
- </li>
118
- </template>
111
+ {{ category.count }}
112
+ </span>
113
+ </button>
114
+ </li>
119
115
  </ul>
120
116
  </nav>
121
117
  </section>
@@ -38,7 +38,7 @@ function formatDate(value: string): string {
38
38
  <span :class="'block h-5 w-5 ' + (message()?.read ? 'i-hugeicons-mail-02' : 'i-hugeicons-mail-open-01')"></span>
39
39
  </Button>
40
40
  <Button variant="ghost" iconOnly ariaLabel="Delete message" @click="emit('request-delete')">
41
- <span class="block h-5 w-5 i-hugeicons-waste"></span>
41
+ <span class="block h-5 w-5 i-hugeicons-delete-02"></span>
42
42
  </Button>
43
43
  </div>
44
44
  </div>