@stacksjs/defaults 0.75.674 → 0.75.685
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/ai/skills/stacks-ai/SKILL.md +7 -2
- package/ai/skills/stacks-api/SKILL.md +1 -1
- package/ai/skills/stacks-dashboard/SKILL.md +9 -2
- package/ai/skills/stacks-deploy/SKILL.md +8 -0
- package/ai/skills/stacks-desktop/SKILL.md +31 -0
- package/ai/skills/stacks-development/SKILL.md +5 -7
- package/ai/skills/stacks-health/SKILL.md +19 -9
- package/ai/skills/stacks-native/CATALOG.md +24 -24
- package/ai/skills/stacks-newsletter/SKILL.md +10 -4
- package/ai/skills/stacks-router/SKILL.md +2 -2
- package/ai/skills/stacks-routes/SKILL.md +2 -2
- package/ai/skills/stacks-scheduler/SKILL.md +16 -2
- package/ai/skills/stacks-security/SKILL.md +24 -0
- package/ai/skills/stacks-socials/SKILL.md +17 -1
- package/ai/skills/stacks-storage/SKILL.md +34 -15
- package/app/Actions/SubscriberEmailAction.ts +26 -10
- package/app/Jobs/Inspire.ts +33 -0
- package/functions/dashboard-sidebar-order.ts +3 -0
- package/ide/vscode/package.json +1 -1
- package/package.json +8 -7
- package/project/storage/framework/types/request-context.d.ts +3 -0
- package/resources/components/Dashboard/Billing/BillingPaymentMethodsPanel.stx +3 -10
- package/resources/components/Dashboard/Billing/BillingPlanSummary.stx +3 -10
- package/resources/components/Dashboard/Billing/BillingSettings.stx +13 -15
- package/resources/components/Dashboard/Billing/BillingTransactionHistory.stx +2 -9
- package/resources/components/Dashboard/DashboardSectionLanding.stx +72 -0
- package/resources/components/Dashboard/DashboardSectionSidebar.stx +78 -0
- package/resources/components/Dashboard/GlobalSearch.stx +3 -1
- package/resources/components/Dashboard/Home/DashboardHome.stx +14 -1
- package/resources/components/Dashboard/Settings/AppearanceSettingsDashboard.stx +21 -92
- package/resources/components/Dashboard/Settings/DashboardSettingsFrame.stx +98 -0
- package/resources/components/Dashboard/Settings/DashboardThemePicker.stx +4 -9
- package/resources/components/Dashboard/Settings/MailSettingsDashboard.stx +162 -167
- package/resources/components/Dashboard/Settings/SettingsDashboard.stx +34 -30
- package/resources/components/Dashboard/Settings/SoftwareUpdateDashboard.stx +229 -0
- package/resources/components/Dashboard/UI/DashboardNavigationCards.stx +44 -0
- package/resources/components/Dashboard/UI/Input.stx +1 -0
- package/resources/components/Dashboard/UI/Select.stx +1 -0
- package/resources/components/Dashboard/UI/Table.stx +1 -0
- package/resources/components/Dashboard/UI/Textarea.stx +1 -0
- package/resources/components/Marketing/SubscribeForm.stx +29 -8
- package/resources/functions/dashboard/section-landing.ts +201 -0
- package/resources/functions/dashboard/section-navigation.ts +95 -0
- package/styles/dashboard-theme.css +778 -9
- package/views/dashboard/composables/dashboard-themes.ts +5 -5
- package/views/dashboard/composables/settings-window.ts +116 -0
- package/views/dashboard/composables/useAppearance.ts +13 -4
- package/views/dashboard/composables/useDashboardThemes.ts +2 -1
- package/views/dashboard/composables/useSettingsWindow.ts +23 -0
- package/views/dashboard/layouts/default.stx +32 -20
- package/views/dashboard/layouts/settings.stx +48 -0
- package/views/dashboard/sections/[section].stx +19 -0
- package/views/dashboard/settings/appearance.stx +4 -2
- package/views/dashboard/settings/billing.stx +3 -4
- package/views/dashboard/settings/index.stx +4 -2
- package/views/dashboard/settings/mail.stx +3 -3
- package/views/dashboard/settings/software-update.stx +9 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script client>
|
|
2
2
|
import type { SearchResultItem, SearchResults, SearchUnavailable } from '../../../functions/search'
|
|
3
|
+
import { openDashboardSettings } from '@stacksjs/defaults/views/dashboard/composables/settings-window'
|
|
3
4
|
import { fetchGlobalSearch } from '../../../functions/search'
|
|
4
5
|
|
|
5
6
|
const query = state('')
|
|
@@ -91,7 +92,8 @@ function moveDown(): void {
|
|
|
91
92
|
|
|
92
93
|
function openResult(item: SearchResultItem): void {
|
|
93
94
|
close()
|
|
94
|
-
|
|
95
|
+
if (!openDashboardSettings(item.href))
|
|
96
|
+
navigate(item.href)
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
function selectCurrent(): void {
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
<script server>
|
|
2
|
+
import { buildDashboardSectionHubs } from '@stacksjs/defaults/resources/functions/dashboard/section-navigation'
|
|
3
|
+
import { buildWebSidebarSections } from '@stacksjs/defaults/resources/functions/dashboard/sidebar'
|
|
4
|
+
|
|
5
|
+
export const homeSectionCards = buildDashboardSectionHubs(buildWebSidebarSections())
|
|
6
|
+
.map(({ id, href, label, icon, description, section, roleOptions }) => ({ id, href, label, icon, description, section, roleOptions }))
|
|
7
|
+
</script>
|
|
8
|
+
|
|
1
9
|
<script client>
|
|
2
10
|
import { useDashboard } from '../../../../functions/dashboard'
|
|
3
11
|
|
|
@@ -157,6 +165,11 @@ onMount(() => {
|
|
|
157
165
|
</Button>
|
|
158
166
|
</div>
|
|
159
167
|
|
|
168
|
+
<section data-dashboard-section-overview aria-labelledby="dashboard-sections" class="mb-6">
|
|
169
|
+
<h2 id="dashboard-sections" data-dashboard-ink class="mb-3 font-semibold text-base text-neutral-900 dark:text-white">Sections</h2>
|
|
170
|
+
<DashboardNavigationCards :navigationCards="homeSectionCards" />
|
|
171
|
+
</section>
|
|
172
|
+
|
|
160
173
|
<details :if="issues().length > 0" class="mb-4 px-4 py-3 text-amber-800 text-sm dark:text-amber-200 overview-panel">
|
|
161
174
|
<summary class="font-medium cursor-pointer">Some dashboard data is unavailable</summary>
|
|
162
175
|
<ul class="mt-2 pl-5 list-disc">
|
|
@@ -164,7 +177,7 @@ onMount(() => {
|
|
|
164
177
|
</ul>
|
|
165
178
|
</details>
|
|
166
179
|
|
|
167
|
-
<section aria-labelledby="application-overview" class="mb-5 p-3 sm:p-4 overview-panel">
|
|
180
|
+
<section data-dashboard-metrics aria-labelledby="application-overview" class="mb-5 p-3 sm:p-4 overview-panel">
|
|
168
181
|
<div class="flex flex-wrap gap-2 items-center justify-between mb-3">
|
|
169
182
|
<h2 data-dashboard-ink id="application-overview" class="font-semibold text-base text-neutral-900 dark:text-white">Overview</h2>
|
|
170
183
|
<StxLink data-dashboard-muted to="/requests" class="text-neutral-500 text-sm hover:text-neutral-700 dark:hover:text-neutral-300">Request history</StxLink>
|
|
@@ -38,15 +38,13 @@ const resetError = state('')
|
|
|
38
38
|
// the confirmation and the preview. A settings page whose changes you cannot
|
|
39
39
|
// see until you navigate away is the thing this is avoiding.
|
|
40
40
|
const styleOptions = SIDEBAR_STYLE_OPTIONS
|
|
41
|
-
const colorModes = COLOR_MODE_OPTIONS
|
|
41
|
+
const colorModes = COLOR_MODE_OPTIONS.map(({ id, label }) => ({ value: id, label }))
|
|
42
42
|
const sections = {{ navSections }}
|
|
43
43
|
|
|
44
44
|
const sidebarStyle = appearance.sidebarStyle
|
|
45
45
|
const colorMode = appearance.colorMode
|
|
46
46
|
const hiddenSections = appearance.hiddenSections
|
|
47
47
|
|
|
48
|
-
const hiddenCount = derived(() => hiddenSections().length)
|
|
49
|
-
|
|
50
48
|
function selectStyle(id: SidebarStyle) {
|
|
51
49
|
appearance.setSidebarStyle(id)
|
|
52
50
|
}
|
|
@@ -110,12 +108,6 @@ const selected = (a: unknown, b: unknown) => String(a === b)
|
|
|
110
108
|
color: #2563eb;
|
|
111
109
|
}
|
|
112
110
|
|
|
113
|
-
.appearance-mode[data-selected="true"] {
|
|
114
|
-
border-color: #3b82f6;
|
|
115
|
-
background: #eff6ff;
|
|
116
|
-
color: #1d4ed8;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
111
|
.dark .appearance-option {
|
|
120
112
|
border-color: rgba(255, 255, 255, 0.1);
|
|
121
113
|
background: rgba(255, 255, 255, 0.03);
|
|
@@ -130,12 +122,6 @@ const selected = (a: unknown, b: unknown) => String(a === b)
|
|
|
130
122
|
.dark .appearance-option[data-selected="true"] .appearance-check {
|
|
131
123
|
color: #93c5fd;
|
|
132
124
|
}
|
|
133
|
-
.dark .appearance-mode[data-selected="true"] {
|
|
134
|
-
border-color: #60a5fa;
|
|
135
|
-
background: rgba(59, 130, 246, 0.15);
|
|
136
|
-
color: #bfdbfe;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
125
|
/*
|
|
140
126
|
* Shell miniatures.
|
|
141
127
|
*
|
|
@@ -229,26 +215,17 @@ const selected = (a: unknown, b: unknown) => String(a === b)
|
|
|
229
215
|
</style>
|
|
230
216
|
|
|
231
217
|
<template>
|
|
232
|
-
<div class="
|
|
233
|
-
<
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
/>
|
|
218
|
+
<div class="dashboard-settings-stack">
|
|
219
|
+
<SettingsGroup header="Display">
|
|
220
|
+
<SettingsRow label="Color mode" description="System follows your device’s light or dark mode." setting="color-mode">
|
|
221
|
+
<SegmentedControl :value="colorMode()" :options="colorModes" label="Color mode" variant="mac" @change="selectColorMode($event)" />
|
|
222
|
+
</SettingsRow>
|
|
223
|
+
</SettingsGroup>
|
|
239
224
|
|
|
240
225
|
<DashboardThemePicker />
|
|
241
226
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
<div class="px-6 py-5 border-b border-neutral-200/60 dark:border-white/5">
|
|
245
|
-
<h2 class="font-semibold text-lg text-neutral-900 dark:text-white">Sidebar style</h2>
|
|
246
|
-
<p class="mt-1 text-neutral-500 text-sm dark:text-neutral-400">
|
|
247
|
-
Changes the navigation pane and the shape of every page around it.
|
|
248
|
-
</p>
|
|
249
|
-
</div>
|
|
250
|
-
|
|
251
|
-
<div class="grid gap-4 sm:grid-cols-2 p-6">
|
|
227
|
+
<SettingsGroup header="Sidebar style" footer="Applies when The Original is selected.">
|
|
228
|
+
<div class="grid gap-4 sm:grid-cols-2 p-3">
|
|
252
229
|
<button :for="option in styleOptions"
|
|
253
230
|
type="button"
|
|
254
231
|
class="flex flex-col gap-3 p-4 w-full text-left rounded-xl appearance-option"
|
|
@@ -276,69 +253,21 @@ const selected = (a: unknown, b: unknown) => String(a === b)
|
|
|
276
253
|
<span class="leading-relaxed text-neutral-500 text-xs dark:text-neutral-400">{{ option.description }}</span>
|
|
277
254
|
</button>
|
|
278
255
|
</div>
|
|
279
|
-
</
|
|
280
|
-
|
|
281
|
-
<!-- ===================== Color mode ===================== -->
|
|
282
|
-
<Card variant="default" padding="none">
|
|
283
|
-
<div class="px-6 py-5 border-b border-neutral-200/60 dark:border-white/5">
|
|
284
|
-
<h2 class="font-semibold text-lg text-neutral-900 dark:text-white">Color mode</h2>
|
|
285
|
-
<p class="mt-1 text-neutral-500 text-sm dark:text-neutral-400">
|
|
286
|
-
System follows your operating system and changes with it.
|
|
287
|
-
</p>
|
|
288
|
-
</div>
|
|
289
|
-
|
|
290
|
-
<div class="flex gap-3 p-6" role="group" aria-label="Color mode">
|
|
291
|
-
<button :for="mode in colorModes"
|
|
292
|
-
type="button"
|
|
293
|
-
class="flex flex-1 gap-2 items-center justify-center px-3 py-2 font-medium text-neutral-600 text-sm dark:text-neutral-300 rounded-lg appearance-mode appearance-option"
|
|
294
|
-
:data-selected="selected(colorMode(), mode.id)"
|
|
295
|
-
:aria-pressed="String(selected(colorMode(), mode.id))"
|
|
296
|
-
@click="selectColorMode(mode.id)"
|
|
297
|
-
>
|
|
298
|
-
<span :class="mode.icon" class="h-4 w-4" aria-hidden="true"></span>
|
|
299
|
-
<span>{{ mode.label }}</span>
|
|
300
|
-
</button>
|
|
301
|
-
</div>
|
|
302
|
-
</Card>
|
|
303
|
-
|
|
304
|
-
<!-- ===================== Navigation sections ===================== -->
|
|
305
|
-
<Card variant="default" padding="none">
|
|
306
|
-
<div class="flex flex-wrap gap-4 items-center justify-between px-6 py-5 border-b border-neutral-200/60 dark:border-white/5">
|
|
307
|
-
<div>
|
|
308
|
-
<h2 class="font-semibold text-lg text-neutral-900 dark:text-white">Navigation</h2>
|
|
309
|
-
<p class="mt-1 text-neutral-500 text-sm dark:text-neutral-400">
|
|
310
|
-
Hide sections you do not use. This only affects your sidebar. It does not
|
|
311
|
-
disable anything, and every page stays reachable by URL.
|
|
312
|
-
</p>
|
|
313
|
-
</div>
|
|
314
|
-
<span :if="hiddenCount() > 0" class="px-2.5 py-1 font-medium text-amber-700 text-xs dark:text-amber-300 bg-amber-50 dark:bg-amber-500/10 rounded-full">
|
|
315
|
-
{{ hiddenCount() }} hidden
|
|
316
|
-
</span>
|
|
317
|
-
</div>
|
|
256
|
+
</SettingsGroup>
|
|
318
257
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
:description="section.count + ' items'"
|
|
325
|
-
:ariaLabel="'Show ' + section.label + ' section'"
|
|
326
|
-
labelPosition="left"
|
|
327
|
-
@update:checked="toggleSection(section.id, $event)"
|
|
328
|
-
/>
|
|
329
|
-
</div>
|
|
258
|
+
<SettingsGroup header="Sidebar sections" footer="Hidden sections stay accessible by URL.">
|
|
259
|
+
<div :for="section in sections" class="dashboard-settings-section-toggle">
|
|
260
|
+
<SettingsRow :label="section.label" :description="section.count + ' items'" :setting="'show-section-' + section.id">
|
|
261
|
+
<Switch :checked="isVisible(section.id)" :label="'Show ' + section.label + ' section'" variant="mac" @change="toggleSection(section.id, $event)" />
|
|
262
|
+
</SettingsRow>
|
|
330
263
|
</div>
|
|
331
|
-
</
|
|
264
|
+
</SettingsGroup>
|
|
332
265
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
<Button variant="secondary" size="sm" @click="resetAll()">
|
|
339
|
-
Reset to defaults
|
|
340
|
-
</Button>
|
|
341
|
-
</div>
|
|
266
|
+
<SettingsGroup>
|
|
267
|
+
<SettingsRow label="Restore defaults" description="Reset dashboard appearance and sidebar preferences in this browser." setting="reset-appearance">
|
|
268
|
+
<Button variant="secondary" size="sm" @click="resetAll()">Reset to defaults</Button>
|
|
269
|
+
</SettingsRow>
|
|
270
|
+
</SettingsGroup>
|
|
342
271
|
<p :if="resetError()" class="text-red-700 text-sm dark:text-red-300" role="alert" :text="resetError()"></p>
|
|
343
272
|
</div>
|
|
344
273
|
</template>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<script server>
|
|
2
|
+
const { pane } = defineProps<{ pane: 'general' | 'appearance' | 'mail' | 'billing' | 'software-update' }>()
|
|
3
|
+
|
|
4
|
+
export const panes = [
|
|
5
|
+
{ id: 'general', label: 'General', href: '/settings', icon: 'i-f7-gear-alt-fill', tone: 'grey', description: 'Manage this project’s configuration and environment bindings.', keywords: 'config project environment' },
|
|
6
|
+
{ id: 'appearance', label: 'Appearance', href: '/settings/appearance', icon: 'i-f7-circle-lefthalf-fill', tone: 'purple', description: 'Choose how the dashboard looks and which sections are shown in the sidebar.', keywords: 'theme color mode dark light sidebar display' },
|
|
7
|
+
{ id: 'software-update', label: 'Software Update', href: '/settings/software-update', icon: 'i-f7-arrow-down-circle-fill', tone: 'blue', description: 'Check for Stacks releases and update your projects through Buddy.', keywords: 'upgrade framework version install dependencies' },
|
|
8
|
+
{ id: 'mail', label: 'Mail', href: '/settings/mail', icon: 'i-f7-envelope-fill', tone: 'blue', description: 'Set the sender, delivery driver, and credentials for outgoing mail.', keywords: 'email smtp sender transport' },
|
|
9
|
+
{ id: 'billing', label: 'Billing', href: '/settings/billing', icon: 'i-f7-creditcard-fill', tone: 'green', description: 'View your subscription, payment methods, and transactions.', keywords: 'subscription payment transaction invoice' },
|
|
10
|
+
] as const
|
|
11
|
+
export const activePane = panes.find(item => item.id === pane) ?? panes[0]
|
|
12
|
+
defineClientPayload({ panes, activePane })
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<script client>
|
|
16
|
+
import { dragSettingsWindow, isNativeSettingsWindow, returnToDashboard } from '@stacksjs/defaults/views/dashboard/composables/settings-window'
|
|
17
|
+
import { useSettingsWindow } from '@stacksjs/defaults/views/dashboard/composables/useSettingsWindow'
|
|
18
|
+
|
|
19
|
+
const settingsWindow = useSettingsWindow
|
|
20
|
+
const query = settingsWindow.query
|
|
21
|
+
const search = useRef<HTMLInputElement>('settingsSearch')
|
|
22
|
+
const native = state(isNativeSettingsWindow())
|
|
23
|
+
const entries = {{ panes }}
|
|
24
|
+
const selectedHref = {{ activePane.href }}
|
|
25
|
+
const matching = derived(() => {
|
|
26
|
+
const searchText = query().trim().toLowerCase()
|
|
27
|
+
return entries.filter(({ label, keywords }) => `${label.toLowerCase()} ${keywords}`.includes(searchText))
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
function matches(id: string): boolean {
|
|
31
|
+
return matching().some(item => item.id === id)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function openSearchResult(): void {
|
|
35
|
+
const [result, another] = matching()
|
|
36
|
+
if (result && !another && result.href !== selectedHref)
|
|
37
|
+
navigate(result.href)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
useEventListener('craft:ready', () => native.set(isNativeSettingsWindow()))
|
|
41
|
+
useEventListener('keydown', (event) => {
|
|
42
|
+
if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === 'f') {
|
|
43
|
+
event.preventDefault()
|
|
44
|
+
search.current?.focus()
|
|
45
|
+
search.current?.select()
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<div data-dashboard-settings class="dashboard-settings" :data-settings-native="String(native())">
|
|
51
|
+
<aside class="dashboard-settings-sidebar">
|
|
52
|
+
<div class="dashboard-settings-sidebar-chrome">
|
|
53
|
+
<SidebarHeader windowControls="native" />
|
|
54
|
+
<a href="/" class="dashboard-settings-back" @click="returnToDashboard($event)">
|
|
55
|
+
<span class="i-f7-chevron-left" aria-hidden="true"></span>
|
|
56
|
+
Dashboard
|
|
57
|
+
</a>
|
|
58
|
+
</div>
|
|
59
|
+
<form class="dashboard-settings-search" role="search" @submit.prevent="openSearchResult()">
|
|
60
|
+
<span class="i-f7-search" aria-hidden="true"></span>
|
|
61
|
+
<input x-model="query" ref="settingsSearch" type="search" placeholder="Search" aria-label="Search settings" autocomplete="off">
|
|
62
|
+
</form>
|
|
63
|
+
<nav aria-label="Settings">
|
|
64
|
+
<SettingsSidebarGroup>
|
|
65
|
+
@foreach(panes as item)
|
|
66
|
+
<a href="{{ item.href }}" data-stx-link class="dashboard-settings-nav-item" :hidden="!matches('{{ item.id }}')"
|
|
67
|
+
@if(item.id === activePane.id)aria-current="page"@endif>
|
|
68
|
+
<span class="dashboard-settings-tile" data-tone="{{ item.tone }}" aria-hidden="true">
|
|
69
|
+
<span class="{{ item.icon }}"></span>
|
|
70
|
+
</span>
|
|
71
|
+
{{ item.label }}
|
|
72
|
+
</a>
|
|
73
|
+
@endforeach
|
|
74
|
+
</SettingsSidebarGroup>
|
|
75
|
+
<p :if="matching().length === 0" class="dashboard-settings-search-empty" role="status">No matching settings</p>
|
|
76
|
+
</nav>
|
|
77
|
+
</aside>
|
|
78
|
+
|
|
79
|
+
<div class="dashboard-settings-detail">
|
|
80
|
+
<header class="dashboard-settings-toolbar" @mousedown="dragSettingsWindow($event)">
|
|
81
|
+
<div class="dashboard-settings-history" role="group" aria-label="Settings history">
|
|
82
|
+
<button type="button" aria-label="Back" :disabled="settingsWindow.index() === 0" @click="goBack()">
|
|
83
|
+
<span class="i-f7-chevron-left" aria-hidden="true"></span>
|
|
84
|
+
</button>
|
|
85
|
+
<button type="button" aria-label="Forward" :disabled="settingsWindow.index() >= settingsWindow.lastIndex()" @click="goForward()">
|
|
86
|
+
<span class="i-f7-chevron-right" aria-hidden="true"></span>
|
|
87
|
+
</button>
|
|
88
|
+
</div>
|
|
89
|
+
<h1>{{ activePane.label }}</h1>
|
|
90
|
+
</header>
|
|
91
|
+
<div class="dashboard-settings-pane" data-stx-scroll="settings">
|
|
92
|
+
<div class="dashboard-settings-inner">
|
|
93
|
+
<SettingsPaneHeader :title="activePane.label" :description="activePane.description" :icon="activePane.icon" :tone="activePane.tone" />
|
|
94
|
+
<slot />
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
@@ -179,12 +179,8 @@ function removeTheme(): void {
|
|
|
179
179
|
</style>
|
|
180
180
|
|
|
181
181
|
<template>
|
|
182
|
-
<
|
|
183
|
-
<div class="
|
|
184
|
-
<h2 class="font-semibold text-lg text-neutral-900 dark:text-white">Dashboard theme</h2>
|
|
185
|
-
<p class="mt-1 text-neutral-500 text-sm dark:text-neutral-400">Choose a theme or install one from a JSON file.</p>
|
|
186
|
-
</div>
|
|
187
|
-
<div class="grid gap-4 sm:grid-cols-2 p-6" role="group" aria-label="Dashboard theme">
|
|
182
|
+
<SettingsGroup header="Dashboard theme" footer="Download the starter JSON to build and install your own theme.">
|
|
183
|
+
<div class="grid gap-4 sm:grid-cols-2 p-3" role="group" aria-label="Dashboard theme">
|
|
188
184
|
<button
|
|
189
185
|
:for="theme in themesToShow()"
|
|
190
186
|
type="button"
|
|
@@ -201,7 +197,7 @@ function removeTheme(): void {
|
|
|
201
197
|
<span :if="theme.description" class="text-neutral-500 text-xs dark:text-neutral-400" :text="theme.description"></span>
|
|
202
198
|
</button>
|
|
203
199
|
</div>
|
|
204
|
-
<div class="pb-
|
|
200
|
+
<div class="pb-3 px-3">
|
|
205
201
|
<div class="flex flex-wrap gap-2">
|
|
206
202
|
<input ref="dashboardThemeFile" hidden type="file" accept=".json,application/json" @change="importTheme($event)" />
|
|
207
203
|
<Button variant="secondary" size="sm" @click="themeFile.current?.click()">Install theme</Button>
|
|
@@ -210,9 +206,8 @@ function removeTheme(): void {
|
|
|
210
206
|
</Button>
|
|
211
207
|
<Button :if="selectedInstallation()" variant="outline" size="sm" @click="removeTheme()">Remove theme</Button>
|
|
212
208
|
</div>
|
|
213
|
-
<p class="mt-3 text-neutral-500 text-xs dark:text-neutral-400">To build a theme, download the starter, edit its JSON, and install the file.</p>
|
|
214
209
|
<p :if="feedback()" class="mt-2 text-neutral-700 text-sm dark:text-neutral-200" role="status" :text="feedback()"></p>
|
|
215
210
|
<p :if="failure()" class="mt-2 text-red-700 text-sm dark:text-red-300" role="alert" :text="failure()"></p>
|
|
216
211
|
</div>
|
|
217
|
-
</
|
|
212
|
+
</SettingsGroup>
|
|
218
213
|
</template>
|