@stacksjs/defaults 0.70.54
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.
- package/LICENSE.md +21 -0
- package/README.md +2 -0
- package/package.json +20 -0
- package/resources/assets/fonts/013717e9.woff +0 -0
- package/resources/assets/fonts/03355817.woff2 +0 -0
- package/resources/assets/fonts/0380de7e.woff2 +0 -0
- package/resources/assets/fonts/0ba5d32a.woff +0 -0
- package/resources/assets/fonts/0bd57ddf.woff2 +0 -0
- package/resources/assets/fonts/19de0a60.woff2 +0 -0
- package/resources/assets/fonts/20b87e84.woff +0 -0
- package/resources/assets/fonts/4bbc67e1.woff +0 -0
- package/resources/assets/fonts/576fb0d7.woff +0 -0
- package/resources/assets/fonts/5ea10ee5.woff2 +0 -0
- package/resources/assets/fonts/6413fc0a.woff +0 -0
- package/resources/assets/fonts/72c114cf.woff +0 -0
- package/resources/assets/fonts/73c57e73.woff2 +0 -0
- package/resources/assets/fonts/813dca6c.woff +0 -0
- package/resources/assets/fonts/8a9b0995.woff2 +0 -0
- package/resources/assets/fonts/90b4832f.woff +0 -0
- package/resources/assets/fonts/9394ab85.woff2 +0 -0
- package/resources/assets/fonts/9b3c7d7f.woff2 +0 -0
- package/resources/assets/fonts/Monaco.ttf +0 -0
- package/resources/assets/fonts/b1b36d74.woff +0 -0
- package/resources/assets/fonts/b5d74798.woff2 +0 -0
- package/resources/assets/fonts/b9f81a4d.woff +0 -0
- package/resources/assets/fonts/c9784008.woff2 +0 -0
- package/resources/assets/fonts/cf692227.woff +0 -0
- package/resources/assets/fonts/d1c6ab51.woff2 +0 -0
- package/resources/assets/fonts/e2eb62fc.woff +0 -0
- package/resources/assets/fonts/fe21f8d8.woff2 +0 -0
- package/resources/assets/fonts/nps/CampmateScript-Regular.woff2 +0 -0
- package/resources/assets/fonts/nps/NPS_2026-variable.woff2 +0 -0
- package/resources/assets/fonts/nps/RedwoodSerif-Regular.woff2 +0 -0
- package/resources/assets/fonts/nps/SequoiaSans-Regular.woff2 +0 -0
- package/resources/assets/fonts/nps/Switchback-Regular.woff2 +0 -0
- package/resources/assets/images/app-icon.png +0 -0
- package/resources/assets/images/bg-img.png +0 -0
- package/resources/assets/images/park-ridge.svg +15 -0
- package/resources/assets/images/topography.svg +1 -0
- package/resources/assets/scripts/main.ts +2153 -0
- package/resources/assets/styles/README.md +19 -0
- package/resources/assets/styles/docs/main.css +1 -0
- package/resources/assets/styles/docs/overrides.css +1 -0
- package/resources/assets/styles/docs/vars.css +8 -0
- package/resources/assets/styles/main.css +1419 -0
- package/resources/components/Button.stx +70 -0
- package/resources/components/Buttons/BaseButton.stx +39 -0
- package/resources/components/Buttons/Counter.stx +28 -0
- package/resources/components/Buttons/ToggleDark.stx +11 -0
- package/resources/components/Container.stx +10 -0
- package/resources/components/Dashboard/.gitkeep +0 -0
- package/resources/components/Dashboard/Auth/ForgotPassword.stx +127 -0
- package/resources/components/Dashboard/Auth/Login.stx +212 -0
- package/resources/components/Dashboard/Auth/Register.stx +306 -0
- package/resources/components/Dashboard/Avatar.stx +123 -0
- package/resources/components/Dashboard/Billing/ActivePlan.stx +57 -0
- package/resources/components/Dashboard/Billing/CardBrands.stx +32 -0
- package/resources/components/Dashboard/Billing/CardForm.stx +34 -0
- package/resources/components/Dashboard/Billing/OneTimePayment.stx +28 -0
- package/resources/components/Dashboard/Billing/PaymentForm.stx +33 -0
- package/resources/components/Dashboard/Billing/PaymentMethod.stx +66 -0
- package/resources/components/Dashboard/Billing/PaymentMethodList.stx +52 -0
- package/resources/components/Dashboard/Billing/Plans.stx +136 -0
- package/resources/components/Dashboard/Buttons/AppButton.stx +48 -0
- package/resources/components/Dashboard/Buttons/IconButton.stx +20 -0
- package/resources/components/Dashboard/Card.stx +78 -0
- package/resources/components/Dashboard/Chart.stx +75 -0
- package/resources/components/Dashboard/CodeEditor.stx +41 -0
- package/resources/components/Dashboard/Commerce/BulkActionBar.stx +70 -0
- package/resources/components/Dashboard/Commerce/CategoriesTable.stx +133 -0
- package/resources/components/Dashboard/Commerce/CouponsTable.stx +161 -0
- package/resources/components/Dashboard/Commerce/CustomersTable.stx +142 -0
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRoutesTable.stx +80 -0
- package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryTable.stx +85 -0
- package/resources/components/Dashboard/Commerce/Delivery/DriversTable.stx +99 -0
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeysTable.stx +92 -0
- package/resources/components/Dashboard/Commerce/Delivery/LicenseTemplatesTable.stx +88 -0
- package/resources/components/Dashboard/Commerce/Delivery/Pagination.stx +122 -0
- package/resources/components/Dashboard/Commerce/Delivery/SearchFilter.stx +23 -0
- package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodsTable.stx +80 -0
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRatesTable.stx +59 -0
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZonesTable.stx +71 -0
- package/resources/components/Dashboard/Commerce/Delivery/TabNavigation.stx +36 -0
- package/resources/components/Dashboard/Commerce/Forms/CouponsForm.stx +191 -0
- package/resources/components/Dashboard/Commerce/OrdersTable.stx +131 -0
- package/resources/components/Dashboard/Commerce/ProductsTable.stx +170 -0
- package/resources/components/Dashboard/CreateRecordModal.stx +363 -0
- package/resources/components/Dashboard/DashboardLayout.stx +155 -0
- package/resources/components/Dashboard/Deployments/ActivityFeed.stx +54 -0
- package/resources/components/Dashboard/Deployments/DeployScript.stx +23 -0
- package/resources/components/Dashboard/Deployments/DeploymentHistory.stx +97 -0
- package/resources/components/Dashboard/Deployments/DeploymentList.stx +94 -0
- package/resources/components/Dashboard/Deployments/LiveTerminalOutput.stx +18 -0
- package/resources/components/Dashboard/Elements/Dropdown.stx +57 -0
- package/resources/components/Dashboard/Email/EmailActivityChart.stx +111 -0
- package/resources/components/Dashboard/Email/EmailCompose.stx +72 -0
- package/resources/components/Dashboard/Email/EmailDetail.stx +105 -0
- package/resources/components/Dashboard/Email/EmailList.stx +117 -0
- package/resources/components/Dashboard/Email/EmailSearch.stx +40 -0
- package/resources/components/Dashboard/Email/EmailSidebar.stx +133 -0
- package/resources/components/Dashboard/GlobalSearch.stx +124 -0
- package/resources/components/Dashboard/MobileSidebar.stx +47 -0
- package/resources/components/Dashboard/Modals/BaseModal.stx +50 -0
- package/resources/components/Dashboard/Modals/Popups/Alert.stx +112 -0
- package/resources/components/Dashboard/Modals/Popups/Toast.stx +70 -0
- package/resources/components/Dashboard/Modals/ToastWrapper.stx +35 -0
- package/resources/components/Dashboard/Monitoring/ErrorDetailModal.stx +228 -0
- package/resources/components/Dashboard/Monitoring/ErrorsTable.stx +184 -0
- package/resources/components/Dashboard/Navbar.stx +194 -0
- package/resources/components/Dashboard/NavbarModern.stx +188 -0
- package/resources/components/Dashboard/NotificationErrorModal.stx +105 -0
- package/resources/components/Dashboard/NotificationStatusBadge.stx +20 -0
- package/resources/components/Dashboard/Pagination.stx +90 -0
- package/resources/components/Dashboard/Queue/QueueTable.stx +127 -0
- package/resources/components/Dashboard/Settings/Forms/AIForm.stx +126 -0
- package/resources/components/Dashboard/Settings/Forms/AnalyticsForm.stx +52 -0
- package/resources/components/Dashboard/Settings/Forms/AppForm.stx +157 -0
- package/resources/components/Dashboard/Settings/Forms/CLIForm.stx +66 -0
- package/resources/components/Dashboard/Settings/Forms/CacheForm.stx +253 -0
- package/resources/components/Dashboard/Settings/Forms/CloudForm.stx +441 -0
- package/resources/components/Dashboard/Settings/Forms/DNSForm.stx +307 -0
- package/resources/components/Dashboard/Settings/Forms/DatabaseForm.stx +168 -0
- package/resources/components/Dashboard/Settings/Forms/EmailForm.stx +100 -0
- package/resources/components/Dashboard/Settings/Forms/FileSystemForm.stx +259 -0
- package/resources/components/Dashboard/Settings/Forms/HashingForm.stx +119 -0
- package/resources/components/Dashboard/Settings/Forms/LibraryForm.stx +389 -0
- package/resources/components/Dashboard/Settings/Forms/QueueForm.stx +219 -0
- package/resources/components/Dashboard/Settings/Forms/SearchEngineForm.stx +48 -0
- package/resources/components/Dashboard/Settings/Forms/SecurityForm.stx +143 -0
- package/resources/components/Dashboard/Settings/Forms/ServicesForm.stx +194 -0
- package/resources/components/Dashboard/Settings/Forms/StorageForm.stx +191 -0
- package/resources/components/Dashboard/Settings/Forms/TeamsForm.stx +33 -0
- package/resources/components/Dashboard/Settings/SettingsFormManager.stx +181 -0
- package/resources/components/Dashboard/SettingsHeader.stx +88 -0
- package/resources/components/Dashboard/SettingsSidebar.stx +234 -0
- package/resources/components/Dashboard/Sidebar.stx +23 -0
- package/resources/components/Dashboard/SidebarModern.stx +249 -0
- package/resources/components/Dashboard/Skeleton/LoadingCard.stx +15 -0
- package/resources/components/Dashboard/Skeleton/LoadingDetails.stx +26 -0
- package/resources/components/Dashboard/Table.stx +82 -0
- package/resources/components/Dashboard/TerminalContainer.stx +97 -0
- package/resources/components/Dashboard/Tooltip.stx +166 -0
- package/resources/components/Dashboard/Transaction/index.stx +88 -0
- package/resources/components/Dashboard/UI/ActivityTable.stx +54 -0
- package/resources/components/Dashboard/UI/Avatar.stx +102 -0
- package/resources/components/Dashboard/UI/Badge.stx +66 -0
- package/resources/components/Dashboard/UI/Button.stx +73 -0
- package/resources/components/Dashboard/UI/Card.stx +51 -0
- package/resources/components/Dashboard/UI/ChartCard.stx +36 -0
- package/resources/components/Dashboard/UI/Checkbox.stx +74 -0
- package/resources/components/Dashboard/UI/ConfirmDialog.stx +74 -0
- package/resources/components/Dashboard/UI/DataTable.stx +45 -0
- package/resources/components/Dashboard/UI/Dropdown.stx +72 -0
- package/resources/components/Dashboard/UI/DropdownItem.stx +80 -0
- package/resources/components/Dashboard/UI/EmptyState.stx +50 -0
- package/resources/components/Dashboard/UI/FilterBar.stx +48 -0
- package/resources/components/Dashboard/UI/Input.stx +77 -0
- package/resources/components/Dashboard/UI/Modal.stx +75 -0
- package/resources/components/Dashboard/UI/PageHeader.stx +69 -0
- package/resources/components/Dashboard/UI/PageLayout.stx +84 -0
- package/resources/components/Dashboard/UI/Pagination.stx +126 -0
- package/resources/components/Dashboard/UI/QuickLinks.stx +31 -0
- package/resources/components/Dashboard/UI/RouterLink.stx +31 -0
- package/resources/components/Dashboard/UI/Select.stx +84 -0
- package/resources/components/Dashboard/UI/ServiceHealth.stx +38 -0
- package/resources/components/Dashboard/UI/StatsCard.stx +79 -0
- package/resources/components/Dashboard/UI/Table.stx +143 -0
- package/resources/components/Dashboard/UI/Tabs.stx +45 -0
- package/resources/components/Dashboard/UI/Textarea.stx +93 -0
- package/resources/components/Dashboard/UI/Toggle.stx +84 -0
- package/resources/components/Dashboard/UI/WindowControls.stx +135 -0
- package/resources/components/Dashboard/Widget.stx +89 -0
- package/resources/components/Dashboard/WindowControls.stx +119 -0
- package/resources/components/Dashboard/index.ts +106 -0
- package/resources/components/Docs/Demo/ComboboxCode.md +114 -0
- package/resources/components/Docs/Demo/ComboboxDemo.stx +91 -0
- package/resources/components/Docs/Demo/DialogCode.md +42 -0
- package/resources/components/Docs/Demo/DialogDemo.stx +76 -0
- package/resources/components/Docs/Demo/DocsPlayground.stx +39 -0
- package/resources/components/Docs/Demo/DropdownCode.md +109 -0
- package/resources/components/Docs/Demo/DropdownDemo.stx +82 -0
- package/resources/components/Docs/Demo/Hero.stx +100 -0
- package/resources/components/Docs/Demo/ListboxCode.md +87 -0
- package/resources/components/Docs/Demo/ListboxDemo.stx +59 -0
- package/resources/components/Docs/Demo/NotificationCode.md +173 -0
- package/resources/components/Docs/Demo/NotificationDemo.stx +99 -0
- package/resources/components/Docs/Demo/PopoverCode.md +161 -0
- package/resources/components/Docs/Demo/PopoverDemo.stx +96 -0
- package/resources/components/Docs/Demo/RadioGroupCode.md +98 -0
- package/resources/components/Docs/Demo/RadioGroupDemo.stx +53 -0
- package/resources/components/Docs/Demo/StepperCode.md +216 -0
- package/resources/components/Docs/Demo/StepperDemo.stx +137 -0
- package/resources/components/Docs/Demo/SwitchCode.md +24 -0
- package/resources/components/Docs/Demo/SwitchDemo.stx +28 -0
- package/resources/components/Docs/Home.stx +7 -0
- package/resources/components/Docs/HomeContributors.stx +23 -0
- package/resources/components/Docs/HomeSponsors.stx +17 -0
- package/resources/components/Docs/HomeTeam.stx +18 -0
- package/resources/components/Docs/TeamMember.stx +79 -0
- package/resources/components/Email/EmailButton.stx +32 -0
- package/resources/components/Email/EmailDivider.stx +20 -0
- package/resources/components/Email/EmailImage.stx +24 -0
- package/resources/components/Email/EmailLayout.stx +55 -0
- package/resources/components/Email/EmailLink.stx +22 -0
- package/resources/components/Email/EmailSection.stx +20 -0
- package/resources/components/Email/EmailText.stx +30 -0
- package/resources/components/Forum/ForumBreadcrumb.stx +38 -0
- package/resources/components/Forum/ForumCategory.stx +16 -0
- package/resources/components/Forum/ForumCategoryItem.stx +46 -0
- package/resources/components/Forum/ForumLayout.stx +36 -0
- package/resources/components/Forum/ForumPagination.stx +39 -0
- package/resources/components/Forum/ForumPost.stx +71 -0
- package/resources/components/Forum/ForumReplyForm.stx +76 -0
- package/resources/components/Forum/ForumSidebar.stx +86 -0
- package/resources/components/Forum/ForumTopicItem.stx +77 -0
- package/resources/components/Forum/ForumTopicList.stx +23 -0
- package/resources/components/HelloWorld.stx +253 -0
- package/resources/components/Logo.stx +10 -0
- package/resources/components/Marketing/CallToAction.stx +30 -0
- package/resources/components/Marketing/ComingSoon.stx +155 -0
- package/resources/components/Marketing/Faqs.stx +99 -0
- package/resources/components/Marketing/Feature.stx +32 -0
- package/resources/components/Marketing/Fields.stx +28 -0
- package/resources/components/Marketing/Footer.stx +33 -0
- package/resources/components/Marketing/Header.stx +51 -0
- package/resources/components/Marketing/Hero.stx +46 -0
- package/resources/components/Marketing/Layout.stx +26 -0
- package/resources/components/Marketing/NavLink.stx +13 -0
- package/resources/components/Marketing/Plan.stx +43 -0
- package/resources/components/Marketing/Pricing.stx +120 -0
- package/resources/components/Marketing/PrimaryFeatures.stx +80 -0
- package/resources/components/Marketing/PrimaryFeatures2.stx +98 -0
- package/resources/components/Marketing/SecondaryFeatures.stx +80 -0
- package/resources/components/Marketing/Testimonials.stx +120 -0
- package/resources/components/Pagination.stx +149 -0
- package/resources/components/Playground.stx +9 -0
- package/resources/components/README.md +87 -0
- package/resources/components/Storefront/AnnouncementBar.stx +17 -0
- package/resources/components/Storefront/CartDrawer.stx +227 -0
- package/resources/components/Storefront/CheckoutSteps.stx +50 -0
- package/resources/components/Storefront/Footer.stx +81 -0
- package/resources/components/Storefront/Header.stx +66 -0
- package/resources/components/Storefront/OrderSummary.stx +79 -0
- package/resources/components/Storefront/ProductCard.stx +63 -0
- package/resources/components/Storefront/ProductGallery.stx +88 -0
- package/resources/components/Storefront/QuantitySelector.stx +97 -0
- package/resources/components/index.ts +13 -0
- package/resources/emails/email-verification.stx +46 -0
- package/resources/emails/layouts/base.html +113 -0
- package/resources/emails/password-changed.stx +55 -0
- package/resources/emails/password-reset.stx +43 -0
- package/resources/emails/subscription-confirmation.stx +99 -0
- package/resources/emails/welcome.stx +48 -0
- package/resources/functions/README.md +28 -0
- package/resources/functions/counter.ts +13 -0
- package/resources/functions/dark.ts +4 -0
- package/resources/functions/dashboard/analytics.ts +238 -0
- package/resources/functions/dashboard/config-io.ts +316 -0
- package/resources/functions/dashboard/data.ts +375 -0
- package/resources/functions/dashboard/library.ts +250 -0
- package/resources/functions/dashboard/sidebar.ts +537 -0
- package/resources/functions/dashboard/system.ts +150 -0
- package/resources/layouts/403.stx +188 -0
- package/resources/layouts/404.stx +34 -0
- package/resources/layouts/README.md +14 -0
- package/resources/layouts/dashboard/default.stx +20 -0
- package/resources/layouts/dashboard/guest.stx +10 -0
- package/resources/layouts/default.stx +3 -0
- package/resources/layouts/maintenance.stx +11 -0
- package/resources/layouts/storefront.stx +73 -0
- package/resources/layouts/system-tray/default.stx +3 -0
- package/resources/modules/.gitkeep +0 -0
- package/resources/plugins/.gitkeep +0 -0
- package/resources/plugins/preloader.ts +308 -0
- package/resources/types/README.md +3 -0
- package/resources/views/cart.stx +149 -0
- package/resources/views/checkout/contact.stx +101 -0
- package/resources/views/checkout/payment.stx +114 -0
- package/resources/views/checkout/shipping.stx +120 -0
- package/resources/views/coming-soon.stx +9 -0
- package/resources/views/dashboard/custom-page.stx +45 -0
- package/resources/views/dashboard/index.stx +24 -0
- package/resources/views/emails/welcome.stx +0 -0
- package/resources/views/errors/tester.stx +26 -0
- package/resources/views/index.stx +2865 -0
- package/resources/views/orders/[id].stx +130 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
interface NavbarProps {
|
|
3
|
+
showDropdown?: boolean
|
|
4
|
+
isDark?: boolean
|
|
5
|
+
theme?: string
|
|
6
|
+
isSidebarCollapsed?: boolean
|
|
7
|
+
currentPath?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { showDropdown = false, isDark = false, theme = 'light', isSidebarCollapsed = false, currentPath = '/' } = defineProps<NavbarProps>()
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Navbar Component
|
|
14
|
+
* Top navigation bar with search, notifications, and user menu.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
// State
|
|
18
|
+
// Current path (would be provided by router)
|
|
19
|
+
function isActiveRoute(path) {
|
|
20
|
+
return currentPath === path || currentPath.startsWith(path + '/')
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function getNavbarClasses() {
|
|
24
|
+
return isSidebarCollapsed ? 'navbar-collapsed' : 'navbar-expanded'
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
<div
|
|
28
|
+
class="sticky top-0 z-10 h-16 flex shrink-0 items-center gap-x-4 border-b border-gray-200 bg-white px-4 shadow-sm sm:gap-x-6 dark:border-neutral-600 dark:bg-neutral-900 lg:px-8 sm:px-6 transition-all duration-300 {{ getNavbarClasses() }}"
|
|
29
|
+
>
|
|
30
|
+
<button type="button" class="lg:hidden -m-2.5 p-2.5 text-gray-700" title="Open sidebar">
|
|
31
|
+
<span class="sr-only">Open sidebar</span>
|
|
32
|
+
<div class="h-6 w-6 i-hugeicons-menu-01"></div>
|
|
33
|
+
</button>
|
|
34
|
+
|
|
35
|
+
<!-- Separator -->
|
|
36
|
+
<div class="lg:hidden h-6 w-px bg-gray-200" aria-hidden="true"></div>
|
|
37
|
+
|
|
38
|
+
<div class="flex flex-1 gap-x-4 self-stretch lg:gap-x-6">
|
|
39
|
+
<form
|
|
40
|
+
class="flex relative flex-1"
|
|
41
|
+
action="#"
|
|
42
|
+
method="GET"
|
|
43
|
+
>
|
|
44
|
+
<label for="search-field" class="sr-only">Search</label>
|
|
45
|
+
|
|
46
|
+
<div class="absolute inset-y-0 left-0 h-full w-5 text-gray-400 pointer-events-none i-hugeicons-search-01"></div>
|
|
47
|
+
<input
|
|
48
|
+
id="search-field"
|
|
49
|
+
class="block pl-8 pr-0 py-0 h-full w-full text-gray-900 sm:text-sm dark:text-neutral-100 placeholder:text-gray-400 dark:bg-neutral-900 border-none focus:ring-0"
|
|
50
|
+
placeholder="Search..."
|
|
51
|
+
type="search"
|
|
52
|
+
name="search"
|
|
53
|
+
>
|
|
54
|
+
</form>
|
|
55
|
+
|
|
56
|
+
<div class="flex gap-x-4 items-center lg:gap-x-6">
|
|
57
|
+
<button type="button" class="header-icon-button" title="View Errors">
|
|
58
|
+
<span class="sr-only">View Errors</span>
|
|
59
|
+
<a
|
|
60
|
+
href="/errors"
|
|
61
|
+
class="header-link {{ isActiveRoute('/errors') ? 'active-header-link' : '' }}"
|
|
62
|
+
>
|
|
63
|
+
<div class="h-6 w-6 duration-150 ease-in-out transition i-hugeicons-alert-01"></div>
|
|
64
|
+
</a>
|
|
65
|
+
</button>
|
|
66
|
+
|
|
67
|
+
<button type="button" class="header-icon-button" title="View Health Page">
|
|
68
|
+
<span class="sr-only">View Health Page</span>
|
|
69
|
+
<a
|
|
70
|
+
href="/health"
|
|
71
|
+
class="header-link {{ isActiveRoute('/health') ? 'active-header-link' : '' }}"
|
|
72
|
+
>
|
|
73
|
+
<div class="h-6 w-6 duration-150 ease-in-out transition i-hugeicons-health"></div>
|
|
74
|
+
</a>
|
|
75
|
+
</button>
|
|
76
|
+
|
|
77
|
+
<button type="button" class="header-icon-button" title="View Cloud Insights Page">
|
|
78
|
+
<span class="sr-only">View Cloud Insights Page</span>
|
|
79
|
+
<a
|
|
80
|
+
href="/insights"
|
|
81
|
+
class="header-link {{ isActiveRoute('/insights') ? 'active-header-link' : '' }}"
|
|
82
|
+
>
|
|
83
|
+
<div class="h-6 w-6 duration-150 ease-in-out transition i-hugeicons-pulse-01"></div>
|
|
84
|
+
</a>
|
|
85
|
+
</button>
|
|
86
|
+
|
|
87
|
+
<button type="button" class="header-icon-button" title="View Inbox">
|
|
88
|
+
<span class="sr-only">View Inbox</span>
|
|
89
|
+
<a
|
|
90
|
+
href="/inbox"
|
|
91
|
+
class="header-link {{ isActiveRoute('/inbox') ? 'active-header-link' : '' }}"
|
|
92
|
+
>
|
|
93
|
+
<div class="h-6 w-6 duration-150 ease-in-out transition i-hugeicons-mail-02"></div>
|
|
94
|
+
</a>
|
|
95
|
+
</button>
|
|
96
|
+
|
|
97
|
+
<button type="button" class="header-icon-button" title="View notifications">
|
|
98
|
+
<span class="sr-only">View notifications</span>
|
|
99
|
+
<a
|
|
100
|
+
href="/notifications"
|
|
101
|
+
class="header-link {{ isActiveRoute('/notifications') ? 'active-header-link' : '' }}"
|
|
102
|
+
>
|
|
103
|
+
<div class="h-6 w-6 i-hugeicons-notification-02"></div>
|
|
104
|
+
</a>
|
|
105
|
+
</button>
|
|
106
|
+
|
|
107
|
+
<!-- Separator -->
|
|
108
|
+
<div
|
|
109
|
+
class="hidden lg:block lg:h-6 lg:w-px lg:bg-gray-200"
|
|
110
|
+
aria-hidden="true"
|
|
111
|
+
></div>
|
|
112
|
+
|
|
113
|
+
<!-- Profile dropdown -->
|
|
114
|
+
<div class="relative ml-3">
|
|
115
|
+
<div>
|
|
116
|
+
<button
|
|
117
|
+
id="user-menu-button"
|
|
118
|
+
type="button"
|
|
119
|
+
class="flex relative text-sm bg-gray-800 rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white"
|
|
120
|
+
aria-expanded="false"
|
|
121
|
+
aria-haspopup="true"
|
|
122
|
+
data-action="toggle-dropdown"
|
|
123
|
+
title="User profile"
|
|
124
|
+
>
|
|
125
|
+
<span class="absolute -inset-1.5"></span>
|
|
126
|
+
<span class="sr-only">Open user menu</span>
|
|
127
|
+
<img class="h-8 w-8 rounded-full" src="https://avatars.githubusercontent.com/u/6228425" alt="">
|
|
128
|
+
</button>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
@if(showDropdown)
|
|
132
|
+
<div class="absolute right-0 z-10 mt-2 py-1 w-48 bg-white dark:bg-neutral-800 ring-1 ring-black ring-opacity-5 rounded-md focus:outline-none shadow-lg origin-top-right" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button" tabindex="-1">
|
|
133
|
+
<a id="user-menu-item-0" href="#" class="block px-4 py-2 text-gray-700 text-sm dark:text-neutral-200 hover:bg-gray-100 dark:hover:bg-neutral-700" role="menuitem" tabindex="-1">Your Profile</a>
|
|
134
|
+
<a id="user-menu-item-0" href="#" class="block px-4 py-2 text-gray-700 text-sm dark:text-neutral-200 hover:bg-gray-100 dark:hover:bg-neutral-700" role="menuitem" tabindex="-1">Documentation</a>
|
|
135
|
+
<a id="user-menu-item-1" href="#" class="block px-4 py-2 text-gray-700 text-sm dark:text-neutral-200 hover:bg-gray-100 dark:hover:bg-neutral-700" role="menuitem" tabindex="-1">Billing</a>
|
|
136
|
+
<a id="user-menu-item-1" href="#" class="block px-4 py-2 text-gray-700 text-sm dark:text-neutral-200 hover:bg-gray-100 dark:hover:bg-neutral-700" role="menuitem" tabindex="-1">Settings</a>
|
|
137
|
+
<a id="user-menu-item-2" href="#" class="block px-4 py-2 text-gray-700 text-sm dark:text-neutral-200 hover:bg-gray-100 dark:hover:bg-neutral-700" role="menuitem" tabindex="-1" data-action="logout">Sign out</a>
|
|
138
|
+
<a
|
|
139
|
+
id="user-menu-item-4"
|
|
140
|
+
href="#"
|
|
141
|
+
class="flex justify-between my-1 px-4 py-2 leading-6 text-gray-500 text-sm dark:text-neutral-400 hover:text-neutral-600 dark:hover:text-gray-200 hover:bg-neutral-50 dark:hover:bg-neutral-700"
|
|
142
|
+
role="menuitem"
|
|
143
|
+
tabindex="-1"
|
|
144
|
+
>
|
|
145
|
+
<label for="small" class="self-center mr-2 text-gray-500 text-sm dark:text-neutral-300">
|
|
146
|
+
Theme
|
|
147
|
+
</label>
|
|
148
|
+
|
|
149
|
+
<select
|
|
150
|
+
id="small"
|
|
151
|
+
class="dark:placeholder-gray-400 text-gray-500 text-sm dark:text-white bg-gray-50 dark:bg-neutral-700 border border-gray-300 rounded-lg dark:border-neutral-600 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-500 dark:focus:ring-blue-500"
|
|
152
|
+
data-model="theme"
|
|
153
|
+
>
|
|
154
|
+
<option value="light">Light</option>
|
|
155
|
+
<option value="dark">Dark</option>
|
|
156
|
+
<option value="auto">Auto</option>
|
|
157
|
+
</select>
|
|
158
|
+
</a>
|
|
159
|
+
</div>
|
|
160
|
+
@endif
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
<style scoped>
|
|
166
|
+
.header-icon-button {
|
|
167
|
+
@apply p-2.5 -m-2.5;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.header-link {
|
|
171
|
+
@apply text-gray-400 hover:text-neutral-500 transition-colors duration-150;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.header-link div {
|
|
175
|
+
@apply transition-colors duration-150;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.active-header-link {
|
|
179
|
+
@apply text-blue-600 dark:text-blue-400;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.active-header-link div {
|
|
183
|
+
@apply text-blue-600 dark:text-blue-400;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* Navbar responsive styles */
|
|
187
|
+
.navbar-expanded {
|
|
188
|
+
width: 100%;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.navbar-collapsed {
|
|
192
|
+
width: 100%;
|
|
193
|
+
}
|
|
194
|
+
</style>
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
<script server>
|
|
2
|
+
// `<script server>` (not bare `<script>`) so the function declarations and
|
|
3
|
+
// const bindings below — `getBreadcrumb`, `isActiveRoute`, `getUser`,
|
|
4
|
+
// `getNotificationCount`, `defaultUser` — get extracted into this
|
|
5
|
+
// component's render context. Without `server` STX treats the script as
|
|
6
|
+
// client-only and the template's `@foreach(getBreadcrumb(currentPath || '/')
|
|
7
|
+
// as crumb)` evaluates against an empty context, producing
|
|
8
|
+
// `[Foreach Error]: getBreadcrumb is not iterable` on every navigation.
|
|
9
|
+
interface NavbarModernProps {
|
|
10
|
+
currentPath?: string
|
|
11
|
+
user?: Record<string, any>
|
|
12
|
+
notificationCount?: number
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { currentPath = '/', user, notificationCount = 3 } = defineProps<NavbarModernProps>()
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Modern Navbar Component
|
|
19
|
+
* A clean, refined navigation header for the dashboard.
|
|
20
|
+
* Note: Window controls are handled natively by Craft on macOS.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
// Default user data
|
|
24
|
+
const defaultUser = {
|
|
25
|
+
name: 'Chris Breuer',
|
|
26
|
+
email: 'chris@stacksjs.org',
|
|
27
|
+
avatar: 'https://avatars.githubusercontent.com/u/6228425',
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function getBreadcrumb(path) {
|
|
31
|
+
const parts = (path || '/').split('/').filter(Boolean)
|
|
32
|
+
return parts.map((part, index) => ({
|
|
33
|
+
label: part.charAt(0).toUpperCase() + part.slice(1).replace(/-/g, ' '),
|
|
34
|
+
path: '/' + parts.slice(0, index + 1).join('/'),
|
|
35
|
+
isLast: index === parts.length - 1,
|
|
36
|
+
}))
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function isActiveRoute(path) {
|
|
40
|
+
return currentPath === path || currentPath.startsWith(path + '/')
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function getUser() {
|
|
44
|
+
return user || defaultUser
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function getNotificationCount() {
|
|
48
|
+
return notificationCount
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
51
|
+
<header class="flex sticky top-0 z-40 gap-4 items-center px-4 h-14 bg-white/80 dark:bg-neutral-900/80 border-b border-neutral-200/50 dark:border-neutral-700/50 backdrop-blur-xl">
|
|
52
|
+
<!-- Breadcrumb navigation -->
|
|
53
|
+
<nav class="hidden lg:flex gap-2 items-center text-sm">
|
|
54
|
+
<a href="/" class="text-neutral-400 hover:text-neutral-600 dark:hover:text-neutral-300 transition-colors">
|
|
55
|
+
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
56
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path>
|
|
57
|
+
</svg>
|
|
58
|
+
</a>
|
|
59
|
+
@foreach(getBreadcrumb(currentPath || '/') as crumb)
|
|
60
|
+
<span class="text-neutral-300 dark:text-neutral-600">/</span>
|
|
61
|
+
@if(!crumb.isLast)
|
|
62
|
+
<a href="{{ crumb.path }}" class="text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-200 transition-colors">
|
|
63
|
+
{{ crumb.label }}
|
|
64
|
+
</a>
|
|
65
|
+
@else
|
|
66
|
+
<span class="font-medium text-neutral-700 dark:text-neutral-200">{{ crumb.label }}</span>
|
|
67
|
+
@endif
|
|
68
|
+
@endforeach
|
|
69
|
+
</nav>
|
|
70
|
+
|
|
71
|
+
<!-- Spacer -->
|
|
72
|
+
<div class="flex-1"></div>
|
|
73
|
+
|
|
74
|
+
<!-- Search -->
|
|
75
|
+
<div class="hidden sm:flex items-center">
|
|
76
|
+
<div class="flex relative items-center w-56 lg:w-64">
|
|
77
|
+
<svg class="absolute left-3 h-4 w-4 text-neutral-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
78
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
|
79
|
+
</svg>
|
|
80
|
+
<input
|
|
81
|
+
type="text"
|
|
82
|
+
placeholder="Search..."
|
|
83
|
+
class="pl-10 pr-16 py-2 w-full text-neutral-900 text-sm dark:text-white placeholder:text-neutral-400 bg-neutral-100 dark:bg-neutral-800 border-none rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500/40 cursor-pointer"
|
|
84
|
+
readonly
|
|
85
|
+
@click="$emit('open-search')"
|
|
86
|
+
@focus="$emit('open-search')"
|
|
87
|
+
/>
|
|
88
|
+
<div class="flex absolute right-3 items-center">
|
|
89
|
+
<kbd class="hidden lg:inline-flex px-1.5 py-0.5 font-medium text-[10px] text-neutral-400 bg-white dark:bg-neutral-700 border border-neutral-200 rounded dark:border-neutral-600 shadow-sm">
|
|
90
|
+
⌘K
|
|
91
|
+
</kbd>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<!-- Right section -->
|
|
97
|
+
<div class="flex gap-2 items-center">
|
|
98
|
+
<!-- Bug/Errors -->
|
|
99
|
+
<a
|
|
100
|
+
href="/monitoring/errors"
|
|
101
|
+
class="p-2 rounded-lg transition-colors {{ isActiveRoute('/monitoring/errors') ? 'text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30' : 'text-neutral-500 hover:text-neutral-700 hover:bg-neutral-100 dark:text-neutral-400 dark:hover:text-neutral-200 dark:hover:bg-neutral-800' }}"
|
|
102
|
+
title="Error Tracking"
|
|
103
|
+
>
|
|
104
|
+
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
105
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path>
|
|
106
|
+
</svg>
|
|
107
|
+
</a>
|
|
108
|
+
|
|
109
|
+
<!-- Health -->
|
|
110
|
+
<a
|
|
111
|
+
href="/health"
|
|
112
|
+
class="p-2 rounded-lg transition-colors {{ isActiveRoute('/health') ? 'text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30' : 'text-neutral-500 hover:text-neutral-700 hover:bg-neutral-100 dark:text-neutral-400 dark:hover:text-neutral-200 dark:hover:bg-neutral-800' }}"
|
|
113
|
+
title="System Health"
|
|
114
|
+
>
|
|
115
|
+
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
116
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"></path>
|
|
117
|
+
</svg>
|
|
118
|
+
</a>
|
|
119
|
+
|
|
120
|
+
<!-- Notifications -->
|
|
121
|
+
<a
|
|
122
|
+
href="/notifications"
|
|
123
|
+
class="relative p-2 rounded-lg transition-colors {{ isActiveRoute('/notifications') ? 'text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30' : 'text-neutral-500 hover:text-neutral-700 hover:bg-neutral-100 dark:text-neutral-400 dark:hover:text-neutral-200 dark:hover:bg-neutral-800' }}"
|
|
124
|
+
title="Notifications"
|
|
125
|
+
>
|
|
126
|
+
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
127
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"></path>
|
|
128
|
+
</svg>
|
|
129
|
+
@if(getNotificationCount() > 0)
|
|
130
|
+
<span class="flex absolute right-1 top-1 items-center justify-center px-1 h-4 min-w-[16px] font-bold text-[10px] text-white bg-red-500 rounded-full">
|
|
131
|
+
{{ getNotificationCount() > 9 ? '9+' : getNotificationCount() }}
|
|
132
|
+
</span>
|
|
133
|
+
@endif
|
|
134
|
+
</a>
|
|
135
|
+
|
|
136
|
+
<!-- Separator -->
|
|
137
|
+
<div class="mx-1 h-6 w-px bg-neutral-200 dark:bg-neutral-700"></div>
|
|
138
|
+
|
|
139
|
+
<!-- User dropdown -->
|
|
140
|
+
<div class="relative" data-dropdown="user">
|
|
141
|
+
<button
|
|
142
|
+
type="button"
|
|
143
|
+
class="flex gap-2 items-center p-1 hover:bg-neutral-100 dark:hover:bg-neutral-800 rounded-lg transition-colors"
|
|
144
|
+
data-action="toggle-dropdown"
|
|
145
|
+
>
|
|
146
|
+
<img
|
|
147
|
+
src="{{ getUser().avatar }}"
|
|
148
|
+
alt="{{ getUser().name }}"
|
|
149
|
+
class="object-cover h-8 w-8 rounded-full"
|
|
150
|
+
/>
|
|
151
|
+
<span class="hidden lg:block font-medium text-neutral-700 text-sm dark:text-neutral-200">
|
|
152
|
+
{{ getUser().name }}
|
|
153
|
+
</span>
|
|
154
|
+
<svg class="hidden lg:block h-4 w-4 text-neutral-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
155
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
|
156
|
+
</svg>
|
|
157
|
+
</button>
|
|
158
|
+
|
|
159
|
+
<!-- Dropdown menu -->
|
|
160
|
+
<div class="hidden absolute right-0 z-50 mt-2 py-1 w-56 bg-white dark:bg-neutral-800 border border-neutral-200 rounded-xl dark:border-neutral-700 shadow-lg" data-dropdown-content>
|
|
161
|
+
<div class="px-4 py-3 border-b border-neutral-200 dark:border-neutral-700">
|
|
162
|
+
<p class="font-medium text-neutral-900 text-sm dark:text-white">{{ getUser().name }}</p>
|
|
163
|
+
<p class="text-neutral-500 text-xs truncate dark:text-neutral-400">{{ getUser().email }}</p>
|
|
164
|
+
</div>
|
|
165
|
+
<div class="py-1">
|
|
166
|
+
<a href="/profile" class="flex gap-3 items-center px-4 py-2 text-neutral-700 text-sm dark:text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-700">
|
|
167
|
+
Your Profile
|
|
168
|
+
</a>
|
|
169
|
+
<a href="/settings" class="flex gap-3 items-center px-4 py-2 text-neutral-700 text-sm dark:text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-700">
|
|
170
|
+
Settings
|
|
171
|
+
</a>
|
|
172
|
+
<a href="/billing" class="flex gap-3 items-center px-4 py-2 text-neutral-700 text-sm dark:text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-700">
|
|
173
|
+
Billing
|
|
174
|
+
</a>
|
|
175
|
+
</div>
|
|
176
|
+
<div class="py-1 border-neutral-200 border-t dark:border-neutral-700">
|
|
177
|
+
<button
|
|
178
|
+
type="button"
|
|
179
|
+
class="flex gap-3 items-center px-4 py-2 w-full text-red-600 text-sm dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20"
|
|
180
|
+
data-action="logout"
|
|
181
|
+
>
|
|
182
|
+
Sign out
|
|
183
|
+
</button>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</header>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
interface NotificationErrorModalProps {
|
|
3
|
+
isOpen?: boolean
|
|
4
|
+
notificationId?: string
|
|
5
|
+
notificationType?: string
|
|
6
|
+
errorMessage?: string
|
|
7
|
+
sentAt?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { isOpen = false, notificationId = '', notificationType = 'email', errorMessage = '', sentAt = '' } = defineProps<NotificationErrorModalProps>()
|
|
11
|
+
</script>
|
|
12
|
+
@if(isOpen)
|
|
13
|
+
<div class="fixed inset-0 overflow-y-auto z-50" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
|
14
|
+
<div class="flex sm:block items-end justify-center pb-20 pt-4 px-4 sm:p-0 min-h-screen text-center">
|
|
15
|
+
<!-- Background overlay -->
|
|
16
|
+
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 dark:bg-neutral-900 dark:bg-opacity-75 transition-opacity" aria-hidden="true" data-close-modal></div>
|
|
17
|
+
|
|
18
|
+
<!-- Modal panel -->
|
|
19
|
+
<div class="inline-block overflow-hidden sm:my-8 sm:max-w-4xl sm:w-full text-left bg-white dark:bg-neutral-800 rounded-lg shadow-xl transition-all transform align-bottom sm:align-middle">
|
|
20
|
+
<div class="pb-4 pt-5 px-4 sm:p-6 sm:pb-4 bg-white dark:bg-neutral-800">
|
|
21
|
+
<div class="sm:flex sm:items-start">
|
|
22
|
+
<div class="flex flex-shrink-0 items-center justify-center mx-auto sm:mx-0 h-12 w-12 sm:h-10 sm:w-10 bg-red-100 dark:bg-red-900 rounded-full">
|
|
23
|
+
<div class="h-6 w-6 text-red-600 dark:text-red-400 i-hugeicons-alert-triangle"></div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="mt-3 sm:ml-4 sm:mt-0 w-full text-center sm:text-left">
|
|
26
|
+
<h3 class="font-medium leading-6 text-gray-900 text-lg dark:text-neutral-100" id="modal-title">
|
|
27
|
+
Notification Error Details
|
|
28
|
+
</h3>
|
|
29
|
+
|
|
30
|
+
<!-- Error details section -->
|
|
31
|
+
<div class="mt-4 p-4 bg-red-50 dark:bg-red-900/30 rounded-md">
|
|
32
|
+
<div class="flex">
|
|
33
|
+
<div class="flex-shrink-0">
|
|
34
|
+
<div class="h-5 w-5 text-red-400 i-hugeicons-alert-circle"></div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="ml-3">
|
|
37
|
+
<h3 class="font-medium text-red-800 text-sm dark:text-red-300">Error Message</h3>
|
|
38
|
+
<div class="mt-2 text-red-700 text-sm dark:text-red-200">
|
|
39
|
+
<p>{{ errorMessage }}</p>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<!-- Logs section -->
|
|
46
|
+
<div class="mt-4">
|
|
47
|
+
<h4 class="font-medium text-gray-900 text-md dark:text-neutral-100">Notification Logs</h4>
|
|
48
|
+
<p class="mb-2 text-gray-500 text-sm dark:text-neutral-400">
|
|
49
|
+
Detailed logs for {{ notificationType }} notification ID: {{ notificationId }}
|
|
50
|
+
</p>
|
|
51
|
+
|
|
52
|
+
<!-- Logs table placeholder -->
|
|
53
|
+
<div class="overflow-hidden mt-2 ring-1 ring-black ring-opacity-5 sm:rounded-lg dark:ring-opacity-20 shadow">
|
|
54
|
+
<table class="min-w-full divide-gray-300 divide-y dark:divide-neutral-600">
|
|
55
|
+
<thead class="bg-gray-50 dark:bg-neutral-700">
|
|
56
|
+
<tr>
|
|
57
|
+
<th scope="col" class="pl-4 pr-3 py-3.5 sm:pl-6 font-semibold text-gray-900 text-left text-sm dark:text-neutral-100">Timestamp</th>
|
|
58
|
+
<th scope="col" class="px-3 py-3.5 font-semibold text-gray-900 text-left text-sm dark:text-neutral-100">Level</th>
|
|
59
|
+
<th scope="col" class="px-3 py-3.5 font-semibold text-gray-900 text-left text-sm dark:text-neutral-100">Message</th>
|
|
60
|
+
<th scope="col" class="px-3 py-3.5 font-semibold text-gray-900 text-left text-sm dark:text-neutral-100">Context</th>
|
|
61
|
+
</tr>
|
|
62
|
+
</thead>
|
|
63
|
+
<tbody class="bg-white dark:bg-neutral-800 divide-gray-200 divide-y dark:divide-neutral-600">
|
|
64
|
+
<tr class="hover:bg-gray-50 dark:hover:bg-neutral-700/50">
|
|
65
|
+
<td class="pl-4 pr-3 py-4 sm:pl-6 text-gray-500 text-sm whitespace-nowrap dark:text-neutral-400">
|
|
66
|
+
{{ sentAt }}
|
|
67
|
+
</td>
|
|
68
|
+
<td class="px-3 py-4 text-sm">
|
|
69
|
+
<span class="inline-flex items-center px-2 py-1 font-medium text-red-700 text-xs dark:text-red-400 bg-red-50 dark:bg-red-900/30 rounded-md">
|
|
70
|
+
ERROR
|
|
71
|
+
</span>
|
|
72
|
+
</td>
|
|
73
|
+
<td class="px-3 py-4 text-gray-500 text-sm dark:text-neutral-400">
|
|
74
|
+
{{ errorMessage }}
|
|
75
|
+
</td>
|
|
76
|
+
<td class="px-3 py-4 text-gray-500 text-sm dark:text-neutral-400">
|
|
77
|
+
-
|
|
78
|
+
</td>
|
|
79
|
+
</tr>
|
|
80
|
+
</tbody>
|
|
81
|
+
</table>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="sm:flex sm:flex-row-reverse px-4 py-3 sm:px-6 bg-gray-50 dark:bg-neutral-700">
|
|
88
|
+
<button
|
|
89
|
+
type="button"
|
|
90
|
+
class="inline-flex justify-center mt-3 px-4 py-2 sm:ml-3 sm:mt-0 w-full sm:w-auto font-medium text-base text-gray-700 sm:text-sm dark:text-neutral-200 bg-white dark:bg-neutral-600 hover:bg-gray-50 dark:hover:bg-neutral-500 border border-gray-300 rounded-md dark:border-neutral-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 shadow-sm"
|
|
91
|
+
data-close-modal
|
|
92
|
+
>
|
|
93
|
+
Close
|
|
94
|
+
</button>
|
|
95
|
+
<button
|
|
96
|
+
type="button"
|
|
97
|
+
class="inline-flex justify-center px-4 py-2 sm:ml-3 w-full sm:w-auto font-medium text-base text-white sm:text-sm bg-blue-600 hover:bg-blue-700 border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 shadow-sm"
|
|
98
|
+
>
|
|
99
|
+
Download Logs
|
|
100
|
+
</button>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
@endif
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
interface NotificationStatusBadgeProps {
|
|
3
|
+
status?: 'delivered' | 'sent' | 'pending' | 'failed'
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const { status = 'pending' } = defineProps<NotificationStatusBadgeProps>()
|
|
7
|
+
|
|
8
|
+
const statusColors: Record<string, string> = {
|
|
9
|
+
delivered: 'text-green-700 dark:text-green-300 bg-green-50 dark:bg-green-900/50 ring-green-600/20',
|
|
10
|
+
sent: 'text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/50 ring-blue-600/20',
|
|
11
|
+
pending: 'text-yellow-700 dark:text-yellow-300 bg-yellow-50 dark:bg-yellow-900/50 ring-yellow-600/20',
|
|
12
|
+
failed: 'text-red-700 dark:text-red-300 bg-red-50 dark:bg-red-900/50 ring-red-600/20',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const colorClass = statusColors[status] || 'text-gray-700 dark:text-neutral-300 bg-gray-50 dark:bg-neutral-900/50 ring-gray-600/20'
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<span class="inline-flex items-center rounded-md px-2 py-1 text-xs font-medium ring-1 ring-inset {{ colorClass }}">
|
|
19
|
+
{{ status }}
|
|
20
|
+
</span>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
interface PaginationProps {
|
|
3
|
+
currentPage?: number
|
|
4
|
+
perPage?: number
|
|
5
|
+
total?: number
|
|
6
|
+
from?: number
|
|
7
|
+
to?: number
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { currentPage = 1, perPage = 20, total = 875, from = 1, to = 20 } = defineProps<PaginationProps>()
|
|
11
|
+
</script>
|
|
12
|
+
<div class="flex items-center justify-between px-4 py-3 sm:px-6 bg-white dark:bg-neutral-800 border-gray-200 border-t rounded-bl-lg rounded-br-lg dark:border-neutral-600">
|
|
13
|
+
<div class="flex sm:hidden flex-1 justify-between">
|
|
14
|
+
<a
|
|
15
|
+
href="#"
|
|
16
|
+
class="inline-flex relative items-center px-4 py-2 font-medium text-gray-700 text-sm dark:text-neutral-200 bg-white hover:bg-gray-50 border border-gray-300 rounded-md dark:border-neutral-600"
|
|
17
|
+
>Previous</a>
|
|
18
|
+
<a
|
|
19
|
+
href="#"
|
|
20
|
+
class="inline-flex relative items-center ml-3 px-4 py-2 font-medium text-gray-700 text-sm dark:text-neutral-200 bg-white hover:bg-gray-50 border border-gray-300 rounded-md dark:border-neutral-600"
|
|
21
|
+
>Next</a>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
|
|
24
|
+
<div>
|
|
25
|
+
<p class="text-gray-700 text-sm dark:text-neutral-200 dark:text-neutral-300">
|
|
26
|
+
Showing <span class="font-semibold">{{ from }}</span> to <span class="font-semibold">{{ to }}</span> of <span class="font-semibold">{{ total }}</span> results
|
|
27
|
+
</p>
|
|
28
|
+
</div>
|
|
29
|
+
<div>
|
|
30
|
+
<nav
|
|
31
|
+
class="inline-flex -space-x-px rounded-md shadow-sm isolate"
|
|
32
|
+
aria-label="Pagination"
|
|
33
|
+
>
|
|
34
|
+
<a
|
|
35
|
+
href="#"
|
|
36
|
+
class="inline-flex relative focus:z-20 items-center px-2 py-2 font-medium text-gray-500 text-sm dark:text-neutral-300 dark:text-neutral-400 bg-white dark:bg-neutral-700 hover:bg-gray-50 border border-gray-300 rounded-l-md dark:border-neutral-600"
|
|
37
|
+
>
|
|
38
|
+
<span class="sr-only">First</span>
|
|
39
|
+
<div class="h-5 w-5 i-hugeicons-chevron-double-left-20-solid"></div>
|
|
40
|
+
</a>
|
|
41
|
+
<a
|
|
42
|
+
href="#"
|
|
43
|
+
class="inline-flex relative focus:z-20 items-center px-2 py-2 font-medium text-gray-500 text-sm dark:text-neutral-300 dark:text-neutral-400 bg-white dark:bg-neutral-700 hover:bg-gray-50 border border-gray-300 dark:border-neutral-600"
|
|
44
|
+
>
|
|
45
|
+
<span class="sr-only">Previous</span>
|
|
46
|
+
<div class="h-5 w-5 i-hugeicons-chevron-left-20-solid"></div>
|
|
47
|
+
</a>
|
|
48
|
+
<a
|
|
49
|
+
href="#"
|
|
50
|
+
aria-current="page"
|
|
51
|
+
class="inline-flex relative z-20 items-center px-4 py-2 font-medium text-blue-600 text-sm dark:text-teal-50 bg-neutral-50 dark:bg-neutral-600 hover:bg-neutral-50 border border-neutral-400 dark:border-neutral-600"
|
|
52
|
+
>1</a>
|
|
53
|
+
<a
|
|
54
|
+
href="#"
|
|
55
|
+
aria-current="page"
|
|
56
|
+
class="inline-flex relative items-center px-4 py-2 font-medium text-sm dark:text-teal-50 dark-hover:bg-gray-600 dark:bg-neutral-700 hover:bg-neutral-50 border dark:border-neutral-600"
|
|
57
|
+
>2</a>
|
|
58
|
+
<a
|
|
59
|
+
href="#"
|
|
60
|
+
aria-current="page"
|
|
61
|
+
class="inline-flex relative items-center px-4 py-2 font-medium text-sm dark:text-teal-50 dark-hover:bg-gray-600 dark:bg-neutral-700 hover:bg-neutral-50 border dark:border-neutral-600"
|
|
62
|
+
>3</a>
|
|
63
|
+
<a
|
|
64
|
+
href="#"
|
|
65
|
+
aria-current="page"
|
|
66
|
+
class="inline-flex relative items-center px-4 py-2 font-medium text-sm dark:text-teal-50 dark-hover:bg-gray-600 dark:bg-neutral-700 hover:bg-neutral-50 border dark:border-neutral-600"
|
|
67
|
+
>4</a>
|
|
68
|
+
<a
|
|
69
|
+
href="#"
|
|
70
|
+
aria-current="page"
|
|
71
|
+
class="inline-flex relative items-center px-4 py-2 font-medium text-sm dark:text-teal-50 dark-hover:bg-gray-600 dark:bg-neutral-700 hover:bg-neutral-50 border dark:border-neutral-600"
|
|
72
|
+
>5</a>
|
|
73
|
+
<a
|
|
74
|
+
href="#"
|
|
75
|
+
class="inline-flex relative focus:z-20 items-center px-2 py-2 font-medium text-gray-500 text-sm dark:text-neutral-300 dark:text-neutral-400 bg-white dark:bg-neutral-700 hover:bg-gray-50 border border-gray-300 dark:border-neutral-600"
|
|
76
|
+
>
|
|
77
|
+
<span class="sr-only">Next</span>
|
|
78
|
+
<div class="h-5 w-5 i-hugeicons-chevron-right-20-solid"></div>
|
|
79
|
+
</a>
|
|
80
|
+
<a
|
|
81
|
+
href="#"
|
|
82
|
+
class="inline-flex relative focus:z-20 items-center px-2 py-2 font-medium text-gray-500 text-sm dark:text-neutral-300 dark:text-neutral-400 bg-white dark:bg-neutral-700 hover:bg-gray-50 border border-gray-300 rounded-r-md dark:border-neutral-600"
|
|
83
|
+
>
|
|
84
|
+
<span class="sr-only">Last</span>
|
|
85
|
+
<div class="h-5 w-5 i-hugeicons-chevron-double-right-20-solid"></div>
|
|
86
|
+
</a>
|
|
87
|
+
</nav>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|