@stacksjs/defaults 0.75.611 → 0.75.613
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-actions/SKILL.md +208 -0
- package/ai/skills/stacks-api/SKILL.md +1 -1
- package/ai/skills/stacks-buddy/SKILL.md +1 -1
- package/ai/skills/stacks-dashboard/SKILL.md +79 -0
- package/ai/skills/stacks-middleware/SKILL.md +4 -1
- package/ai/skills/stacks-native/CATALOG.md +12 -12
- package/ai/skills/stacks-validation/SKILL.md +7 -0
- package/app/Actions/Storefront/AddToCartAction.ts +12 -15
- package/app/Actions/Storefront/CheckoutContactAction.ts +18 -10
- package/app/Actions/Storefront/CheckoutShippingAction.ts +20 -10
- package/app/Actions/Storefront/PlaceOrderAction.ts +9 -12
- package/app/Actions/Storefront/UpdateCartItemAction.ts +11 -9
- package/app/Middleware/Abilities.ts +4 -3
- package/app/Middleware/Csrf.ts +10 -1
- package/app/Middleware/Throttle.ts +4 -4
- package/ide/vscode/package.json +1 -1
- package/package.json +5 -5
- package/resources/components/Dashboard/Analytics/AnalyticsPageHeader.stx +3 -13
- package/resources/components/Dashboard/App/RequestsOverview.stx +3 -20
- package/resources/components/Dashboard/App/SourceInventory.stx +1 -5
- package/resources/components/Dashboard/Auth/AccessTokenCreateDialog.stx +11 -28
- package/resources/components/Dashboard/Commerce/CommerceCategoriesDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/CommerceCategoryDialog.stx +9 -9
- package/resources/components/Dashboard/Commerce/CommerceCouponDialog.stx +14 -14
- package/resources/components/Dashboard/Commerce/CommerceCouponsDashboard.stx +5 -9
- package/resources/components/Dashboard/Commerce/CommerceCustomerDialog.stx +7 -7
- package/resources/components/Dashboard/Commerce/CommerceCustomersDashboard.stx +3 -7
- package/resources/components/Dashboard/Commerce/CommerceGiftCardDialog.stx +15 -15
- package/resources/components/Dashboard/Commerce/CommerceGiftCardsDashboard.stx +5 -9
- package/resources/components/Dashboard/Commerce/CommerceManufacturerDialog.stx +12 -15
- package/resources/components/Dashboard/Commerce/CommerceManufacturersDashboard.stx +4 -28
- package/resources/components/Dashboard/Commerce/CommerceOrderDialog.stx +15 -15
- package/resources/components/Dashboard/Commerce/CommerceOrdersDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/CommerceOverviewDashboard.stx +3 -11
- package/resources/components/Dashboard/Commerce/CommercePaymentsDashboard.stx +8 -9
- package/resources/components/Dashboard/Commerce/CommercePosCatalog.stx +3 -20
- package/resources/components/Dashboard/Commerce/CommercePosCheckoutDialog.stx +4 -4
- package/resources/components/Dashboard/Commerce/CommerceProductDialog.stx +14 -14
- package/resources/components/Dashboard/Commerce/CommerceProductsDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/CommerceReviewEditDialog.stx +14 -24
- package/resources/components/Dashboard/Commerce/CommerceReviewsDashboard.stx +5 -43
- package/resources/components/Dashboard/Commerce/CommerceTaxDialog.stx +22 -38
- package/resources/components/Dashboard/Commerce/CommerceTaxesDashboard.stx +5 -33
- package/resources/components/Dashboard/Commerce/CommerceUnitDialog.stx +16 -30
- package/resources/components/Dashboard/Commerce/CommerceUnitsDashboard.stx +4 -28
- package/resources/components/Dashboard/Commerce/CommerceVariantDialog.stx +15 -9
- package/resources/components/Dashboard/Commerce/CommerceVariantsDashboard.stx +8 -9
- package/resources/components/Dashboard/Commerce/Delivery/CourierDialog.stx +14 -12
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRouteDialog.stx +9 -11
- package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryDialog.stx +15 -9
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeyDialog.stx +11 -7
- package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodDialog.stx +14 -8
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRateDialog.stx +11 -17
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZoneDialog.stx +18 -12
- package/resources/components/Dashboard/Commerce/PaymentRefundDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/PrintDeviceDialog.stx +5 -5
- package/resources/components/Dashboard/Commerce/PrintDevicesDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/PrintLogsDashboard.stx +5 -9
- package/resources/components/Dashboard/Commerce/ProductWaitlistDashboard.stx +2 -10
- package/resources/components/Dashboard/Commerce/ProductWaitlistEntryDialog.stx +14 -67
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistDashboard.stx +3 -18
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistEntryDialog.stx +23 -69
- package/resources/components/Dashboard/Content/AuthorEditorDialog.stx +4 -16
- package/resources/components/Dashboard/Content/BlogDashboard.stx +2 -19
- package/resources/components/Dashboard/Content/BlogPostEditorDialog.stx +31 -51
- package/resources/components/Dashboard/Content/CommentsDashboard.stx +1 -1
- package/resources/components/Dashboard/Content/ContentDashboard.stx +1 -11
- package/resources/components/Dashboard/Content/CreateFolderDialog.stx +1 -4
- package/resources/components/Dashboard/Content/FileManagerDashboard.stx +2 -2
- package/resources/components/Dashboard/Content/PageEditorDialog.stx +8 -17
- package/resources/components/Dashboard/Content/PostEditorDialog.stx +35 -45
- package/resources/components/Dashboard/Content/PostsDashboard.stx +1 -13
- package/resources/components/Dashboard/Content/SeoDashboard.stx +2 -20
- package/resources/components/Dashboard/Content/SeoEditorDialog.stx +4 -38
- package/resources/components/Dashboard/Content/TaxonomyEditorDialog.stx +8 -15
- package/resources/components/Dashboard/Data/ActivityLog.stx +1 -5
- package/resources/components/Dashboard/Deployments/DeploymentList.stx +2 -11
- package/resources/components/Dashboard/Email/InboxMessageList.stx +1 -5
- package/resources/components/Dashboard/Infrastructure/DnsDashboard.stx +2 -16
- package/resources/components/Dashboard/Infrastructure/LogsDashboard.stx +6 -10
- package/resources/components/Dashboard/Infrastructure/MailboxesDashboard.stx +1 -5
- package/resources/components/Dashboard/Infrastructure/ServersDashboard.stx +1 -5
- package/resources/components/Dashboard/Jobs/JobHistory.stx +3 -12
- package/resources/components/Dashboard/Kanban/KanbanCardDialog.stx +57 -51
- package/resources/components/Dashboard/Library/ComponentsDashboard.stx +4 -14
- package/resources/components/Dashboard/Library/DependenciesDashboard.stx +2 -15
- package/resources/components/Dashboard/Library/PackagesDashboard.stx +1 -8
- package/resources/components/Dashboard/Library/SourceScaffoldDialog.stx +1 -12
- package/resources/components/Dashboard/Management/PermissionsDashboard.stx +3 -3
- package/resources/components/Dashboard/Marketing/AbandonedCartsDashboard.stx +4 -4
- package/resources/components/Dashboard/Marketing/CampaignDeliveryDialog.stx +3 -5
- package/resources/components/Dashboard/Marketing/CampaignDialog.stx +59 -93
- package/resources/components/Dashboard/Marketing/CampaignsDashboard.stx +5 -5
- package/resources/components/Dashboard/Marketing/MarketingListDialog.stx +12 -26
- package/resources/components/Dashboard/Marketing/MarketingListsDashboard.stx +4 -4
- package/resources/components/Dashboard/Marketing/RecoveryCampaignDialog.stx +12 -43
- package/resources/components/Dashboard/Marketing/SocialPostDialog.stx +7 -41
- package/resources/components/Dashboard/Marketing/SocialPostsDashboard.stx +5 -5
- package/resources/components/Dashboard/Models/ModelRecordsDashboard.stx +7 -23
- package/resources/components/Dashboard/Models/ModelsOverview.stx +2 -12
- package/resources/components/Dashboard/Notifications/NotificationDeliveries.stx +4 -27
- package/resources/components/Dashboard/Notifications/NotificationDeliveryHistory.stx +4 -36
- package/resources/components/Dashboard/Operations/RecoveryDestinationDialog.stx +18 -47
- package/resources/components/Dashboard/Operations/RecoveryPolicyDialog.stx +24 -78
- package/resources/components/Dashboard/Operations/RecoveryRestoreDialog.stx +8 -19
- package/resources/components/Dashboard/Queries/QueryDashboard.stx +3 -21
- package/resources/components/Dashboard/Releases/ReleaseDashboard.stx +2 -9
- package/resources/components/Dashboard/Settings/SettingsDashboard.stx +1 -11
- package/resources/components/Dashboard/UI/Input.stx +50 -1
- package/resources/components/Dashboard/UI/SearchFilter.stx +27 -17
- package/resources/components/Dashboard/UI/Select.stx +4 -1
- package/resources/components/Dashboard/UI/Textarea.stx +16 -1
- package/resources/views/cart.stx +14 -0
- package/resources/views/checkout/contact.stx +15 -1
- package/resources/views/checkout/payment.stx +7 -0
- package/resources/views/checkout/shipping.stx +39 -5
|
@@ -9,7 +9,9 @@ const error = useReactiveProp('error', '')
|
|
|
9
9
|
const emit = defineEmits(['submit', 'close'])
|
|
10
10
|
const name = state('')
|
|
11
11
|
const slug = state('')
|
|
12
|
-
|
|
12
|
+
// Not `description`: a field bound inside the Modal is first read as the
|
|
13
|
+
// Modal's own `description` prop (stacksjs/stacks#3310).
|
|
14
|
+
const descriptionText = state('')
|
|
13
15
|
const status = state('active')
|
|
14
16
|
const isPublic = state(true)
|
|
15
17
|
const doubleOptIn = state(true)
|
|
@@ -39,7 +41,7 @@ effect(() => {
|
|
|
39
41
|
slugIsManual = Boolean(current?.slug)
|
|
40
42
|
name.set(current?.name || '')
|
|
41
43
|
slug.set(current?.slug || '')
|
|
42
|
-
|
|
44
|
+
descriptionText.set(current?.description || '')
|
|
43
45
|
status.set(current?.status || 'active')
|
|
44
46
|
isPublic.set(current?.isPublic ?? true)
|
|
45
47
|
doubleOptIn.set(current?.doubleOptIn ?? true)
|
|
@@ -51,8 +53,8 @@ effect(() => {
|
|
|
51
53
|
slug.set(slugify(currentName))
|
|
52
54
|
})
|
|
53
55
|
|
|
54
|
-
function markSlugManual(
|
|
55
|
-
slugIsManual =
|
|
56
|
+
function markSlugManual(next: string): void {
|
|
57
|
+
slugIsManual = next.trim() !== ''
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
function submit(): void {
|
|
@@ -61,7 +63,7 @@ function submit(): void {
|
|
|
61
63
|
emit('submit', {
|
|
62
64
|
name: name().trim(),
|
|
63
65
|
slug: slugify(slug()),
|
|
64
|
-
description:
|
|
66
|
+
description: descriptionText().trim(),
|
|
65
67
|
status: status(),
|
|
66
68
|
isPublic: isPublic(),
|
|
67
69
|
doubleOptIn: doubleOptIn(),
|
|
@@ -79,27 +81,11 @@ function submit(): void {
|
|
|
79
81
|
<form id="marketing-list-form" @submit.prevent="submit">
|
|
80
82
|
<div :if="error()" role="alert" class="mb-5 p-3 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-lg dark:border-red-900">{{ error() }}</div>
|
|
81
83
|
|
|
82
|
-
<div class="
|
|
83
|
-
<label
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
<label class="block">
|
|
88
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Slug</span>
|
|
89
|
-
<input x-model="slug" type="text" maxlength="120" required autocomplete="off" class="mt-1 px-3 py-2 w-full font-mono text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" @input="markSlugManual($event)" />
|
|
90
|
-
</label>
|
|
91
|
-
<label class="block">
|
|
92
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Description</span>
|
|
93
|
-
<textarea x-model="description" rows="3" maxlength="500" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700"></textarea>
|
|
94
|
-
</label>
|
|
95
|
-
<label class="block">
|
|
96
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Status</span>
|
|
97
|
-
<select x-model="status" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700">
|
|
98
|
-
<option value="active">Active</option>
|
|
99
|
-
<option value="inactive">Inactive</option>
|
|
100
|
-
<option value="archived">Archived</option>
|
|
101
|
-
</select>
|
|
102
|
-
</label>
|
|
84
|
+
<div class="grid gap-4">
|
|
85
|
+
<Input v-model:value="name" label="Name" :maxLength="100" :required="true" autocomplete="off" />
|
|
86
|
+
<Input v-model:value="slug" label="Slug" :maxLength="120" :required="true" autocomplete="off" :spellcheck="false" :monospace="true" @input="markSlugManual" />
|
|
87
|
+
<Textarea v-model:value="descriptionText" label="Description" :rows="3" :maxLength="500" />
|
|
88
|
+
<Select v-model:value="status" label="Status" placeholder="" :options="[{ value: 'active', label: 'Active' }, { value: 'inactive', label: 'Inactive' }, { value: 'archived', label: 'Archived' }]" />
|
|
103
89
|
<div class="grid gap-3 sm:grid-cols-2">
|
|
104
90
|
<!-- Yes or no is the shared switch, as in every model form. -->
|
|
105
91
|
<div class="p-3 border border-gray-200 rounded-lg dark:border-neutral-700">
|
|
@@ -215,10 +215,10 @@ onMount(() => {
|
|
|
215
215
|
|
|
216
216
|
<section class="flex flex-col gap-3">
|
|
217
217
|
<div class="grid gap-3 grid-cols-1 sm:grid-cols-2 xl:grid-cols-4">
|
|
218
|
-
<
|
|
219
|
-
<
|
|
220
|
-
<
|
|
221
|
-
<
|
|
218
|
+
<div class="xl:col-span-1"><SearchFilter v-model:searchValue="search" placeholder="Search email lists" ariaLabel="Search email lists" /></div>
|
|
219
|
+
<Select v-model:value="statusFilter" ariaLabel="Filter status" placeholder="" :options="[{ value: 'all', label: 'All statuses' }, { value: 'active', label: 'Active' }, { value: 'inactive', label: 'Inactive' }, { value: 'archived', label: 'Archived' }]" />
|
|
220
|
+
<Select v-model:value="visibilityFilter" ariaLabel="Filter visibility" placeholder="" :options="[{ value: 'all', label: 'All signup modes' }, { value: 'public', label: 'Public' }, { value: 'private', label: 'Private' }]" />
|
|
221
|
+
<Select v-model:value="sort" ariaLabel="Sort email lists" placeholder="" :options="[{ value: 'name', label: 'Name' }, { value: 'members', label: 'Most members' }, { value: 'campaigns', label: 'Most campaigns' }, { value: 'newest', label: 'Newest' }]" />
|
|
222
222
|
</div>
|
|
223
223
|
<MarketingListsTable :sort-reset-key="sort()" :page-reset-key="viewKey()" :records="filteredRecords()" :loading="loading()" @edit="openEdit" @delete="openDelete" />
|
|
224
224
|
</section>
|
|
@@ -16,7 +16,8 @@ const subject = state('')
|
|
|
16
16
|
const text = state('')
|
|
17
17
|
const fromName = state('')
|
|
18
18
|
const fromAddress = state('')
|
|
19
|
-
|
|
19
|
+
// Text, as the input reports it; read as a number where it is used.
|
|
20
|
+
const idleHours = state('4')
|
|
20
21
|
// The threshold as typed, in major units. Carts and the stored rule hold
|
|
21
22
|
// integer minor units (stacksjs/stacks#2851).
|
|
22
23
|
const minimumValue = state('0')
|
|
@@ -36,7 +37,7 @@ effect(() => {
|
|
|
36
37
|
text.set('')
|
|
37
38
|
fromName.set('')
|
|
38
39
|
fromAddress.set('')
|
|
39
|
-
idleHours.set(defaultIdleHours())
|
|
40
|
+
idleHours.set(String(defaultIdleHours()))
|
|
40
41
|
minimumValue.set('0')
|
|
41
42
|
scheduledAt.set('')
|
|
42
43
|
})
|
|
@@ -89,56 +90,24 @@ function submit(): void {
|
|
|
89
90
|
</script>
|
|
90
91
|
|
|
91
92
|
<Modal :isOpen="open()" title="New recovery campaign" description="Writes to the people whose carts went cold. The audience comes from the carts themselves, not from a list." size="lg" @close="emit('close')">
|
|
92
|
-
<div class="
|
|
93
|
+
<div class="grid gap-4 mt-4">
|
|
93
94
|
<div class="grid gap-4 sm:grid-cols-2">
|
|
94
|
-
<label
|
|
95
|
-
|
|
96
|
-
<input x-model="name" type="text" required class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
97
|
-
</label>
|
|
98
|
-
<label class="block">
|
|
99
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Subject line</span>
|
|
100
|
-
<input x-model="subject" type="text" required class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
101
|
-
</label>
|
|
95
|
+
<Input v-model:value="name" label="Campaign name" :required="true" />
|
|
96
|
+
<Input v-model:value="subject" label="Subject line" :required="true" />
|
|
102
97
|
</div>
|
|
103
98
|
|
|
104
99
|
<div class="grid gap-4 sm:grid-cols-2">
|
|
105
|
-
<label
|
|
106
|
-
|
|
107
|
-
<div class="flex gap-2 items-center mt-1">
|
|
108
|
-
<input x-model="idleHours" type="number" min="1" max="336" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
109
|
-
<span class="text-gray-500 text-sm dark:text-neutral-400">hours</span>
|
|
110
|
-
</div>
|
|
111
|
-
<span class="block mt-1 text-gray-500 text-xs dark:text-neutral-400">Writing to somebody who is still shopping is not a recovery, it is an interruption.</span>
|
|
112
|
-
</label>
|
|
113
|
-
<label class="block">
|
|
114
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Minimum cart value</span>
|
|
115
|
-
<input x-model="minimumValue" type="number" min="0" :step="moneyInputStep(defaultCurrency())" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
116
|
-
<span :if="minimumError()" class="block mt-1 text-red-600 text-xs dark:text-red-400">{{ minimumError() }}</span>
|
|
117
|
-
<span :if="!minimumError()" class="block mt-1 text-gray-500 text-xs dark:text-neutral-400">Leave at zero to chase every cart.</span>
|
|
118
|
-
</label>
|
|
100
|
+
<Input v-model:value="idleHours" label="Wait before writing (hours)" type="number" min="1" max="336" step="1" inputmode="numeric" hint="Writing to somebody who is still shopping is not a recovery, it is an interruption." />
|
|
101
|
+
<Input v-model:value="minimumValue" label="Minimum cart value" type="number" min="0" :step="moneyInputStep(defaultCurrency())" inputmode="decimal" :error="minimumError()" hint="Leave at zero to chase every cart." />
|
|
119
102
|
</div>
|
|
120
103
|
|
|
121
104
|
<div class="grid gap-4 sm:grid-cols-2">
|
|
122
|
-
<
|
|
123
|
-
|
|
124
|
-
<input x-model="fromName" type="text" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
125
|
-
</label>
|
|
126
|
-
<label class="block">
|
|
127
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">From address</span>
|
|
128
|
-
<input x-model="fromAddress" type="email" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
129
|
-
</label>
|
|
105
|
+
<Input v-model:value="fromName" label="From name" />
|
|
106
|
+
<Input v-model:value="fromAddress" label="From address" type="email" />
|
|
130
107
|
</div>
|
|
131
108
|
|
|
132
|
-
<label
|
|
133
|
-
|
|
134
|
-
<textarea x-model="text" rows="3" placeholder="Your cart is still here, and so is everything in it." class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700"></textarea>
|
|
135
|
-
</label>
|
|
136
|
-
|
|
137
|
-
<label class="block">
|
|
138
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Send at</span>
|
|
139
|
-
<input x-model="scheduledAt" type="datetime-local" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
140
|
-
<span class="block mt-1 text-gray-500 text-xs dark:text-neutral-400">Leave empty to save it as a draft and send it from the campaigns screen.</span>
|
|
141
|
-
</label>
|
|
109
|
+
<Textarea v-model:value="text" label="Message" :rows="3" placeholder="Your cart is still here, and so is everything in it." />
|
|
110
|
+
<Input v-model:value="scheduledAt" label="Send at" type="datetime-local" hint="Leave empty to save it as a draft and send it from the campaigns screen." />
|
|
142
111
|
|
|
143
112
|
<div class="p-3 bg-gray-50 dark:bg-neutral-900/50 border border-gray-200 rounded-lg dark:border-neutral-700">
|
|
144
113
|
<p class="font-medium text-gray-900 text-sm dark:text-white">{{ reach().carts.toLocaleString() }} carts match these rules</p>
|
|
@@ -62,51 +62,17 @@ function submit(): void {
|
|
|
62
62
|
<form id="social-post-form" @submit.prevent="submit">
|
|
63
63
|
<div :if="error()" role="alert" class="mb-5 p-3 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-lg dark:border-red-900">{{ error() }}</div>
|
|
64
64
|
|
|
65
|
-
<div class="
|
|
66
|
-
<label
|
|
67
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Content</span>
|
|
68
|
-
<textarea x-model="content" rows="5" maxlength="2000" required class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700"></textarea>
|
|
69
|
-
<span class="block mt-1 text-gray-500 text-xs dark:text-neutral-400">{{ content().length.toLocaleString() }} of 2,000 characters</span>
|
|
70
|
-
</label>
|
|
65
|
+
<div class="grid gap-4">
|
|
66
|
+
<Textarea v-model:value="content" label="Content" :rows="5" :maxLength="2000" :required="true" :showCount="true" />
|
|
71
67
|
<div class="grid gap-4 sm:grid-cols-2">
|
|
72
|
-
<label
|
|
73
|
-
|
|
74
|
-
<select x-model="platform" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700">
|
|
75
|
-
<option value="twitter">Twitter</option>
|
|
76
|
-
<option value="facebook">Facebook</option>
|
|
77
|
-
<option value="instagram">Instagram</option>
|
|
78
|
-
<option value="linkedin">LinkedIn</option>
|
|
79
|
-
<option value="tiktok">TikTok</option>
|
|
80
|
-
<option value="youtube">YouTube</option>
|
|
81
|
-
</select>
|
|
82
|
-
</label>
|
|
83
|
-
<label class="block">
|
|
84
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Status</span>
|
|
85
|
-
<select x-model="status" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700">
|
|
86
|
-
<option value="draft">Draft</option>
|
|
87
|
-
<option value="scheduled">Scheduled</option>
|
|
88
|
-
<option value="published">Published</option>
|
|
89
|
-
<option value="failed">Failed</option>
|
|
90
|
-
</select>
|
|
91
|
-
</label>
|
|
68
|
+
<Select v-model:value="platform" label="Platform" placeholder="" :options="[{ value: 'twitter', label: 'Twitter' }, { value: 'facebook', label: 'Facebook' }, { value: 'instagram', label: 'Instagram' }, { value: 'linkedin', label: 'LinkedIn' }, { value: 'tiktok', label: 'TikTok' }, { value: 'youtube', label: 'YouTube' }]" />
|
|
69
|
+
<Select v-model:value="status" label="Status" placeholder="" :options="[{ value: 'draft', label: 'Draft' }, { value: 'scheduled', label: 'Scheduled' }, { value: 'published', label: 'Published' }, { value: 'failed', label: 'Failed' }]" />
|
|
92
70
|
</div>
|
|
93
71
|
<div class="grid gap-4 sm:grid-cols-2">
|
|
94
|
-
<label
|
|
95
|
-
|
|
96
|
-
<input x-model="scheduledAt" type="datetime-local" :required="status() === 'scheduled'" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
97
|
-
</label>
|
|
98
|
-
<label class="block">
|
|
99
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Owner</span>
|
|
100
|
-
<select x-model="userId" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700">
|
|
101
|
-
<option value="">Unassigned</option>
|
|
102
|
-
<option :for="user in users()" :key="user.id" :value="user.id">{{ user.name }}{{ user.email ? ' - ' + user.email : '' }}</option>
|
|
103
|
-
</select>
|
|
104
|
-
</label>
|
|
72
|
+
<Input v-model:value="scheduledAt" label="Schedule time" type="datetime-local" :required="status() === 'scheduled'" />
|
|
73
|
+
<Select v-model:value="userId" label="Owner" placeholder="" :options="[{ value: '', label: 'Unassigned' }, ...users().map(user => ({ value: user.id, label: user.name + (user.email ? ' - ' + user.email : '') }))]" />
|
|
105
74
|
</div>
|
|
106
|
-
<label
|
|
107
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Image URL</span>
|
|
108
|
-
<input x-model="imageUrl" type="url" maxlength="2000" placeholder="https://example.com/image.jpg" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
109
|
-
</label>
|
|
75
|
+
<Input v-model:value="imageUrl" label="Image URL" type="url" inputmode="url" :maxLength="2000" placeholder="https://example.com/image.jpg" />
|
|
110
76
|
</div>
|
|
111
77
|
</form>
|
|
112
78
|
<template #footer>
|
|
@@ -197,11 +197,11 @@ onMount(() => {
|
|
|
197
197
|
|
|
198
198
|
<section class="flex flex-col gap-3">
|
|
199
199
|
<div class="grid gap-3 grid-cols-1 sm:grid-cols-2 xl:grid-cols-5">
|
|
200
|
-
<
|
|
201
|
-
<
|
|
202
|
-
<
|
|
203
|
-
<
|
|
204
|
-
<
|
|
200
|
+
<SearchFilter v-model:searchValue="search" placeholder="Search social posts" ariaLabel="Search social posts" />
|
|
201
|
+
<Select v-model:value="statusFilter" ariaLabel="Filter social status" placeholder="" :options="[{ value: 'all', label: 'All statuses' }, { value: 'draft', label: 'Draft' }, { value: 'scheduled', label: 'Scheduled' }, { value: 'published', label: 'Published' }, { value: 'failed', label: 'Failed' }]" />
|
|
202
|
+
<Select v-model:value="platformFilter" ariaLabel="Filter platform" placeholder="" :options="[{ value: 'all', label: 'All platforms' }, { value: 'twitter', label: 'Twitter' }, { value: 'facebook', label: 'Facebook' }, { value: 'instagram', label: 'Instagram' }, { value: 'linkedin', label: 'LinkedIn' }, { value: 'tiktok', label: 'TikTok' }, { value: 'youtube', label: 'YouTube' }]" />
|
|
203
|
+
<Select v-model:value="authorFilter" ariaLabel="Filter owner" placeholder="" :options="[{ value: 'all', label: 'All owners' }, { value: '', label: 'Unassigned' }, ...users().map(user => ({ value: user.id, label: user.name }))]" />
|
|
204
|
+
<Select v-model:value="sort" ariaLabel="Sort social posts" placeholder="" :options="[{ value: 'newest', label: 'Newest' }, { value: 'scheduled', label: 'Latest schedule' }, { value: 'reach', label: 'Most reach' }, { value: 'engagement', label: 'Most engagement' }]" />
|
|
205
205
|
</div>
|
|
206
206
|
<SocialPostsTable :sort-reset-key="sort()" :page-reset-key="viewKey()" :records="filteredRecords()" :loading="loading()" @edit="openEdit" @delete="openDelete" />
|
|
207
207
|
</section>
|
|
@@ -90,7 +90,8 @@ const relationNames = state<Record<string, Record<string, string>>>({})
|
|
|
90
90
|
const columnMeta = state<ColumnMeta[]>([])
|
|
91
91
|
const totalCount = state(0)
|
|
92
92
|
const page = state(1)
|
|
93
|
-
|
|
93
|
+
// Text, as the dropdown reports it; a number where the range and the request use it.
|
|
94
|
+
const perPage = state('25')
|
|
94
95
|
const lastPage = state(1)
|
|
95
96
|
const sort = state('')
|
|
96
97
|
const dir = state<'asc' | 'desc'>('desc')
|
|
@@ -167,8 +168,8 @@ const recordLabel = derived(() => {
|
|
|
167
168
|
|
|
168
169
|
const rangeLabel = derived(() => {
|
|
169
170
|
if (totalCount() === 0) return 'No records'
|
|
170
|
-
const from = (page() - 1) * perPage() + 1
|
|
171
|
-
const to = Math.min(page() * perPage(), totalCount())
|
|
171
|
+
const from = (page() - 1) * Number(perPage()) + 1
|
|
172
|
+
const to = Math.min(page() * Number(perPage()), totalCount())
|
|
172
173
|
return `${from.toLocaleString()} to ${to.toLocaleString()} of ${totalCount().toLocaleString()}`
|
|
173
174
|
})
|
|
174
175
|
|
|
@@ -335,7 +336,7 @@ async function load() {
|
|
|
335
336
|
try {
|
|
336
337
|
const params = new URLSearchParams({
|
|
337
338
|
page: String(page()),
|
|
338
|
-
per_page:
|
|
339
|
+
per_page: perPage(),
|
|
339
340
|
dir: dir(),
|
|
340
341
|
})
|
|
341
342
|
if (sort()) params.set('sort', sort())
|
|
@@ -702,18 +703,7 @@ onDestroy(() => {
|
|
|
702
703
|
|
|
703
704
|
<!-- Search + page size -->
|
|
704
705
|
<div :if="migrated()" class="flex flex-wrap gap-3 items-center">
|
|
705
|
-
<
|
|
706
|
-
<div class="flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none">
|
|
707
|
-
<div class="h-4 w-4 text-neutral-400 dark:text-neutral-500 i-hugeicons-search-01"></div>
|
|
708
|
-
</div>
|
|
709
|
-
<input
|
|
710
|
-
type="search"
|
|
711
|
-
x-model="search"
|
|
712
|
-
@input="onSearchInput"
|
|
713
|
-
:placeholder="searchPlaceholder()"
|
|
714
|
-
class="block pl-9 pr-3 py-1.5 w-full text-[13px] text-neutral-900 dark:text-neutral-100 placeholder:text-neutral-400 dark:placeholder:text-neutral-500 bg-white dark:bg-white/10 border border-black/10 rounded-lg dark:border-white/15 focus:border-blue-400 focus:outline-none focus:ring-2 focus:ring-blue-500/20 transition-all"
|
|
715
|
-
>
|
|
716
|
-
</div>
|
|
706
|
+
<SearchFilter v-model:searchValue="search" :placeholder="searchPlaceholder()" class="flex-1 max-w-sm" @search="onSearchInput" />
|
|
717
707
|
|
|
718
708
|
<div :if="activeFilterCount() > 0 || search()" class="flex items-center">
|
|
719
709
|
<Button variant="ghost" size="sm" @click="clearFilters()">
|
|
@@ -723,13 +713,7 @@ onDestroy(() => {
|
|
|
723
713
|
|
|
724
714
|
<div class="flex gap-2 items-center ml-auto text-[12px] text-neutral-500 dark:text-neutral-400">
|
|
725
715
|
<span>Show</span>
|
|
726
|
-
<
|
|
727
|
-
x-model.number="perPage"
|
|
728
|
-
@change="onPerPageChange"
|
|
729
|
-
class="px-2 h-8 text-[12px] text-neutral-700 dark:text-neutral-200 bg-white dark:bg-white/10 border border-black/10 rounded-md dark:border-white/15 focus:border-blue-500/50"
|
|
730
|
-
>
|
|
731
|
-
<option :for="option in PER_PAGE_OPTIONS" :value="option" :selected="option === perPage()">{{ option }}</option>
|
|
732
|
-
</select>
|
|
716
|
+
<Select v-model:value="perPage" ariaLabel="Records per page" size="sm" placeholder="" :options="PER_PAGE_OPTIONS.map(option => ({ value: String(option), label: String(option) }))" @change="onPerPageChange" />
|
|
733
717
|
</div>
|
|
734
718
|
</div>
|
|
735
719
|
|
|
@@ -171,18 +171,8 @@ onMount(() => {
|
|
|
171
171
|
<p class="mt-1 min-h-4 text-neutral-500 text-xs dark:text-neutral-400" :text="matchingLabel()"></p>
|
|
172
172
|
</div>
|
|
173
173
|
<div class="flex flex-col gap-2 sm:flex-row w-full sm:w-auto">
|
|
174
|
-
<
|
|
175
|
-
|
|
176
|
-
<span aria-hidden="true" class="absolute left-3 top-1/2 h-4 w-4 text-neutral-400 pointer-events-none -translate-y-1/2 i-hugeicons-search-01"></span>
|
|
177
|
-
<input x-model="search" type="search" placeholder="Search models" class="block pl-9 pr-3 py-2 w-full text-neutral-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-neutral-300 rounded-lg dark:border-neutral-700 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20">
|
|
178
|
-
</label>
|
|
179
|
-
<label>
|
|
180
|
-
<span class="sr-only">Filter model category</span>
|
|
181
|
-
<select x-model="selectedCategory" class="block px-3 py-2 w-full text-neutral-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-neutral-300 rounded-lg dark:border-neutral-700 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20">
|
|
182
|
-
<option value="all">All categories</option>
|
|
183
|
-
<option :for="category in categories()" :value="category.key">{{ category.label }}</option>
|
|
184
|
-
</select>
|
|
185
|
-
</label>
|
|
174
|
+
<div class="w-full sm:w-64"><SearchFilter v-model:searchValue="search" placeholder="Search models" ariaLabel="Search models" /></div>
|
|
175
|
+
<Select v-model:value="selectedCategory" ariaLabel="Filter model category" placeholder="" :options="[{ value: 'all', label: 'All categories' }, ...categories().map(category => ({ value: category.key, label: category.label }))]" />
|
|
186
176
|
</div>
|
|
187
177
|
</div>
|
|
188
178
|
|
|
@@ -52,7 +52,7 @@ const pendingCount = derived(() => deliveries().filter(delivery => delivery.stat
|
|
|
52
52
|
* What the table is showing: a change returns it to the first page, as this
|
|
53
53
|
* page's own pager did before the table took over paging.
|
|
54
54
|
*/
|
|
55
|
-
const viewKey = derived(() => JSON.stringify([searchQuery(), selectedStatus(), sortDirection()]))
|
|
55
|
+
const viewKey = derived(() => JSON.stringify([searchQuery().trim(), selectedStatus(), sortDirection()]))
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* A component event reaches this handler as the emitted value, not as a
|
|
@@ -135,32 +135,9 @@ onMount(loadDeliveries)
|
|
|
135
135
|
</dl>
|
|
136
136
|
|
|
137
137
|
<div :show="showFilters" class="grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 mt-4">
|
|
138
|
-
<
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
<span class="flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none">
|
|
142
|
-
<span class="h-5 w-5 text-gray-400 i-hugeicons-search-01"></span>
|
|
143
|
-
</span>
|
|
144
|
-
<input x-model.trim="searchQuery" type="search" placeholder="Search recipient or content..." class="block pl-10 py-1.5 w-full text-gray-900 sm:leading-6 sm:text-sm dark:text-neutral-100 placeholder:text-gray-400 dark:bg-neutral-600 border-0 ring-1 ring-gray-300 ring-inset rounded-md dark:ring-neutral-600 focus:ring-2 focus:ring-blue-600 focus:ring-inset" />
|
|
145
|
-
</span>
|
|
146
|
-
</label>
|
|
147
|
-
<label class="block">
|
|
148
|
-
<span class="sr-only">Delivery status</span>
|
|
149
|
-
<select x-model="selectedStatus" class="block pl-3 pr-10 py-1.5 w-full text-gray-900 sm:leading-6 sm:text-sm dark:text-neutral-100 dark:bg-neutral-600 border-0 ring-1 ring-gray-300 ring-inset rounded-md dark:ring-neutral-600 focus:ring-2 focus:ring-blue-600">
|
|
150
|
-
<option value="all">All Statuses</option>
|
|
151
|
-
<option value="sent">Sent</option>
|
|
152
|
-
<option value="delivered">Delivered</option>
|
|
153
|
-
<option value="failed">Failed</option>
|
|
154
|
-
<option value="pending">Pending</option>
|
|
155
|
-
</select>
|
|
156
|
-
</label>
|
|
157
|
-
<label class="block">
|
|
158
|
-
<span class="sr-only">Attempt order</span>
|
|
159
|
-
<select x-model="sortDirection" class="block pl-3 pr-10 py-1.5 w-full text-gray-900 sm:leading-6 sm:text-sm dark:text-neutral-100 dark:bg-neutral-600 border-0 ring-1 ring-gray-300 ring-inset rounded-md dark:ring-neutral-600 focus:ring-2 focus:ring-blue-600">
|
|
160
|
-
<option value="desc">Newest First</option>
|
|
161
|
-
<option value="asc">Oldest First</option>
|
|
162
|
-
</select>
|
|
163
|
-
</label>
|
|
138
|
+
<SearchFilter v-model:searchValue="searchQuery" placeholder="Search recipient or content..." ariaLabel="Search notification deliveries" />
|
|
139
|
+
<Select v-model:value="selectedStatus" ariaLabel="Delivery status" placeholder="" :options="[{ value: 'all', label: 'All Statuses' }, { value: 'sent', label: 'Sent' }, { value: 'delivered', label: 'Delivered' }, { value: 'failed', label: 'Failed' }, { value: 'pending', label: 'Pending' }]" />
|
|
140
|
+
<Select v-model:value="sortDirection" ariaLabel="Attempt order" placeholder="" :options="[{ value: 'desc', label: 'Newest First' }, { value: 'asc', label: 'Oldest First' }]" />
|
|
164
141
|
<div>
|
|
165
142
|
<Button variant="secondary" @click="resetFilters()">Reset Filters</Button>
|
|
166
143
|
</div>
|
|
@@ -122,42 +122,10 @@ onMount(load)
|
|
|
122
122
|
</div>
|
|
123
123
|
|
|
124
124
|
<div class="grid gap-3 grid-cols-1 md:grid-cols-2 xl:grid-cols-6 mt-6">
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
<label>
|
|
130
|
-
<span class="sr-only">Channel</span>
|
|
131
|
-
<select x-model="selectedChannel" class="block px-3 py-2 w-full text-gray-900 text-sm dark:text-neutral-100 dark:bg-neutral-700 border-0 ring-1 ring-gray-300 ring-inset rounded-md dark:ring-neutral-600 focus:ring-2 focus:ring-blue-600">
|
|
132
|
-
<option value="all">All Channels</option>
|
|
133
|
-
<option value="email">Email</option>
|
|
134
|
-
<option value="sms">SMS</option>
|
|
135
|
-
<option value="chat">Chat</option>
|
|
136
|
-
<option value="database">Database</option>
|
|
137
|
-
<option value="push">Push</option>
|
|
138
|
-
<option value="broadcast">Broadcast</option>
|
|
139
|
-
</select>
|
|
140
|
-
</label>
|
|
141
|
-
<label>
|
|
142
|
-
<span class="sr-only">Status</span>
|
|
143
|
-
<select x-model="selectedStatus" class="block px-3 py-2 w-full text-gray-900 text-sm dark:text-neutral-100 dark:bg-neutral-700 border-0 ring-1 ring-gray-300 ring-inset rounded-md dark:ring-neutral-600 focus:ring-2 focus:ring-blue-600">
|
|
144
|
-
<option value="all">All Statuses</option>
|
|
145
|
-
<option value="sent">Sent</option>
|
|
146
|
-
<option value="delivered">Delivered</option>
|
|
147
|
-
<option value="failed">Failed</option>
|
|
148
|
-
<option value="pending">Pending</option>
|
|
149
|
-
</select>
|
|
150
|
-
</label>
|
|
151
|
-
<label>
|
|
152
|
-
<span class="sr-only">Sort field</span>
|
|
153
|
-
<select x-model="sortField" class="block px-3 py-2 w-full text-gray-900 text-sm dark:text-neutral-100 dark:bg-neutral-700 border-0 ring-1 ring-gray-300 ring-inset rounded-md dark:ring-neutral-600 focus:ring-2 focus:ring-blue-600">
|
|
154
|
-
<option value="sent_at">Attempted</option>
|
|
155
|
-
<option value="recipient">Recipient</option>
|
|
156
|
-
<option value="channel">Channel</option>
|
|
157
|
-
<option value="status">Status</option>
|
|
158
|
-
<option value="id">ID</option>
|
|
159
|
-
</select>
|
|
160
|
-
</label>
|
|
125
|
+
<div class="xl:col-span-2"><SearchFilter v-model:searchValue="searchQuery" placeholder="Search recipient or content..." ariaLabel="Search notification history" /></div>
|
|
126
|
+
<Select v-model:value="selectedChannel" ariaLabel="Channel" placeholder="" :options="[{ value: 'all', label: 'All Channels' }, { value: 'email', label: 'Email' }, { value: 'sms', label: 'SMS' }, { value: 'chat', label: 'Chat' }, { value: 'database', label: 'Database' }, { value: 'push', label: 'Push' }, { value: 'broadcast', label: 'Broadcast' }]" />
|
|
127
|
+
<Select v-model:value="selectedStatus" ariaLabel="Status" placeholder="" :options="[{ value: 'all', label: 'All Statuses' }, { value: 'sent', label: 'Sent' }, { value: 'delivered', label: 'Delivered' }, { value: 'failed', label: 'Failed' }, { value: 'pending', label: 'Pending' }]" />
|
|
128
|
+
<Select v-model:value="sortField" ariaLabel="Sort field" placeholder="" :options="[{ value: 'sent_at', label: 'Attempted' }, { value: 'recipient', label: 'Recipient' }, { value: 'channel', label: 'Channel' }, { value: 'status', label: 'Status' }, { value: 'id', label: 'ID' }]" />
|
|
161
129
|
<div class="flex gap-2">
|
|
162
130
|
<Button variant="secondary" iconOnly :ariaLabel="sortDirection === 'asc' ? 'Sort descending' : 'Sort ascending'" @click="toggleSortDirection()">
|
|
163
131
|
<span :class="'h-5 w-5 ' + (sortDirection === 'asc' ? 'i-hugeicons-sort-by-up-01' : 'i-hugeicons-sort-by-down-01')"></span>
|
|
@@ -16,7 +16,8 @@ const secretAccessKey = state('')
|
|
|
16
16
|
const sessionToken = state('')
|
|
17
17
|
const encryption = state<RecoveryDestinationInput['encryption']>('provider')
|
|
18
18
|
const encryptionKey = state('')
|
|
19
|
-
|
|
19
|
+
// Text, as the shared input reports it; a number where it is sent.
|
|
20
|
+
const lockDays = state('0')
|
|
20
21
|
const allowPrivate = state(false)
|
|
21
22
|
const forcePathStyle = state(false)
|
|
22
23
|
|
|
@@ -37,7 +38,7 @@ function submit(): void {
|
|
|
37
38
|
forcePathStyle: forcePathStyle(),
|
|
38
39
|
encryption: encryption(),
|
|
39
40
|
encryptionKey: encryptionKey(),
|
|
40
|
-
lockDays: lockDays(),
|
|
41
|
+
lockDays: Number(lockDays()),
|
|
41
42
|
credentials: {
|
|
42
43
|
accessKeyId: accessKeyId().trim(),
|
|
43
44
|
secretAccessKey: secretAccessKey(),
|
|
@@ -48,38 +49,18 @@ function submit(): void {
|
|
|
48
49
|
</script>
|
|
49
50
|
|
|
50
51
|
<Modal :isOpen="open()" title="Connect recovery destination" description="Backups are only protected after the destination passes a real write, read, checksum, and cleanup test." size="lg" :closable="!busy()" @close="close">
|
|
51
|
-
<form id="recovery-destination-form" class="
|
|
52
|
+
<form id="recovery-destination-form" class="grid gap-4" @submit.prevent="submit">
|
|
52
53
|
<div class="grid gap-4 sm:grid-cols-2">
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
<input id="recovery-destination-name" x-model.trim="name" required placeholder="Production backups" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-lg dark:border-neutral-700" />
|
|
56
|
-
</div>
|
|
57
|
-
<div>
|
|
58
|
-
<label for="recovery-destination-provider" class="block mb-1.5 font-medium text-gray-700 text-sm dark:text-neutral-200">Provider</label>
|
|
59
|
-
<select id="recovery-destination-provider" x-model="provider" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-lg dark:border-neutral-700">
|
|
60
|
-
<option value="aws_s3">AWS S3</option>
|
|
61
|
-
<option value="s3_compatible">S3 compatible</option>
|
|
62
|
-
<option value="aws_backup">AWS Backup</option>
|
|
63
|
-
</select>
|
|
64
|
-
</div>
|
|
54
|
+
<Input v-model:value="name" id="recovery-destination-name" label="Name" :required="true" placeholder="Production backups" />
|
|
55
|
+
<Select v-model:value="provider" id="recovery-destination-provider" label="Provider" placeholder="" :options="[{ value: 'aws_s3', label: 'AWS S3' }, { value: 's3_compatible', label: 'S3 compatible' }, { value: 'aws_backup', label: 'AWS Backup' }]" />
|
|
65
56
|
</div>
|
|
66
57
|
|
|
67
58
|
<div :if="provider() !== 'aws_backup'" class="grid gap-4 sm:grid-cols-2">
|
|
68
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
</div>
|
|
72
|
-
<div>
|
|
73
|
-
<label for="recovery-destination-region" class="block mb-1.5 font-medium text-gray-700 text-sm dark:text-neutral-200">Region</label>
|
|
74
|
-
<input id="recovery-destination-region" x-model.trim="region" placeholder="us-east-1" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-lg dark:border-neutral-700" />
|
|
75
|
-
</div>
|
|
76
|
-
<div>
|
|
77
|
-
<label for="recovery-destination-prefix" class="block mb-1.5 font-medium text-gray-700 text-sm dark:text-neutral-200">Object prefix</label>
|
|
78
|
-
<input id="recovery-destination-prefix" x-model.trim="prefix" placeholder="stacks" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-lg dark:border-neutral-700" />
|
|
79
|
-
</div>
|
|
59
|
+
<Input v-model:value="bucket" id="recovery-destination-bucket" label="Bucket" :required="true" placeholder="stacks-production-backups" :spellcheck="false" />
|
|
60
|
+
<Input v-model:value="region" id="recovery-destination-region" label="Region" placeholder="us-east-1" :spellcheck="false" />
|
|
61
|
+
<Input v-model:value="prefix" id="recovery-destination-prefix" label="Object prefix" placeholder="stacks" :spellcheck="false" />
|
|
80
62
|
<div :if="provider() === 's3_compatible'">
|
|
81
|
-
<
|
|
82
|
-
<input id="recovery-destination-endpoint" x-model.trim="endpoint" type="url" placeholder="https://objects.example.com" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-lg dark:border-neutral-700" />
|
|
63
|
+
<Input v-model:value="endpoint" id="recovery-destination-endpoint" label="HTTPS endpoint" type="url" inputmode="url" placeholder="https://objects.example.com" />
|
|
83
64
|
</div>
|
|
84
65
|
</div>
|
|
85
66
|
|
|
@@ -87,30 +68,20 @@ function submit(): void {
|
|
|
87
68
|
<summary class="font-medium text-gray-900 text-sm dark:text-white cursor-pointer">Static credentials, optional</summary>
|
|
88
69
|
<p class="mt-1 text-gray-500 text-xs dark:text-neutral-400">Leave blank to use the runtime's AWS credential chain. Submitted credentials are encrypted in the control plane.</p>
|
|
89
70
|
<div class="grid gap-4 sm:grid-cols-2 mt-4">
|
|
90
|
-
<
|
|
91
|
-
<
|
|
92
|
-
<
|
|
71
|
+
<Input v-model:value="accessKeyId" ariaLabel="Access key id" autocomplete="off" placeholder="Access key id" :spellcheck="false" :monospace="true" />
|
|
72
|
+
<Input v-model:value="secretAccessKey" ariaLabel="Secret access key" type="password" autocomplete="new-password" placeholder="Secret access key" />
|
|
73
|
+
<div class="sm:col-span-2">
|
|
74
|
+
<Input v-model:value="sessionToken" ariaLabel="Session token" type="password" autocomplete="new-password" placeholder="Session token, optional" />
|
|
75
|
+
</div>
|
|
93
76
|
</div>
|
|
94
77
|
</details>
|
|
95
78
|
|
|
96
79
|
<div class="grid gap-4 sm:grid-cols-2">
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
<select id="recovery-destination-encryption" x-model="encryption" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-lg dark:border-neutral-700">
|
|
100
|
-
<option value="provider">Provider managed</option>
|
|
101
|
-
<option value="client_side">Client side</option>
|
|
102
|
-
<option value="both">Both</option>
|
|
103
|
-
</select>
|
|
104
|
-
</div>
|
|
105
|
-
<div>
|
|
106
|
-
<label for="recovery-destination-lock" class="block mb-1.5 font-medium text-gray-700 text-sm dark:text-neutral-200">Immutable retention days</label>
|
|
107
|
-
<input id="recovery-destination-lock" x-model.number="lockDays" type="number" min="0" max="36500" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-lg dark:border-neutral-700" />
|
|
108
|
-
</div>
|
|
80
|
+
<Select v-model:value="encryption" id="recovery-destination-encryption" label="Encryption" placeholder="" :options="[{ value: 'provider', label: 'Provider managed' }, { value: 'client_side', label: 'Client side' }, { value: 'both', label: 'Both' }]" />
|
|
81
|
+
<Input v-model:value="lockDays" id="recovery-destination-lock" label="Immutable retention days" type="number" min="0" max="36500" step="1" inputmode="numeric" />
|
|
109
82
|
</div>
|
|
110
83
|
<div :if="encryption() !== 'provider'">
|
|
111
|
-
<
|
|
112
|
-
<input id="recovery-destination-key" x-model="encryptionKey" type="password" minlength="32" autocomplete="new-password" required class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-lg dark:border-neutral-700" />
|
|
113
|
-
<p class="mt-1 text-gray-500 text-xs dark:text-neutral-400">At least 32 characters. Keep an independent recovery copy outside this control plane.</p>
|
|
84
|
+
<Input v-model:value="encryptionKey" id="recovery-destination-key" label="Client encryption key" type="password" :minLength="32" autocomplete="new-password" :required="true" hint="At least 32 characters. Keep an independent recovery copy outside this control plane." />
|
|
114
85
|
</div>
|
|
115
86
|
<div :if="provider() === 's3_compatible'" class="flex flex-wrap gap-4">
|
|
116
87
|
<Toggle v-model:checked="forcePathStyle" label="Force path-style URLs" />
|