@escalated-dev/escalated 0.8.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +388 -361
  3. package/package.json +85 -84
  4. package/src/components/ActiveChatsPanel.vue +246 -246
  5. package/src/components/AdminDashboard.stories.js +1423 -1423
  6. package/src/components/AttachmentList.vue +65 -65
  7. package/src/components/ChatActionBar.vue +226 -226
  8. package/src/components/ChatBubble.vue +162 -162
  9. package/src/components/ChatComposer.vue +308 -308
  10. package/src/components/ChatQueue.vue +222 -222
  11. package/src/components/ChatThread.vue +197 -197
  12. package/src/components/CustomTicketActions.stories.js +71 -0
  13. package/src/components/CustomTicketActions.vue +101 -0
  14. package/src/components/EscalatedLayout.vue +628 -604
  15. package/src/components/FollowButton.vue +20 -1
  16. package/src/components/MentionDropdown.vue +154 -154
  17. package/src/components/MetricComparison.vue +89 -89
  18. package/src/components/PercentileChart.vue +67 -67
  19. package/src/components/PeriodSelector.vue +98 -98
  20. package/src/components/PresenceIndicator.vue +228 -213
  21. package/src/components/ReplyComposer.vue +336 -336
  22. package/src/components/ReplyThread.vue +153 -153
  23. package/src/components/ReportChart.vue +395 -395
  24. package/src/components/ReportExportButton.vue +108 -108
  25. package/src/components/SaveViewDialog.vue +172 -172
  26. package/src/components/SavedViewSidebar.vue +208 -208
  27. package/src/components/SkillTagManager.vue +3 -0
  28. package/src/components/SnoozeButton.vue +247 -247
  29. package/src/components/TicketFilters.vue +270 -270
  30. package/src/components/TicketList.vue +655 -655
  31. package/src/components/TicketSidebar.vue +4 -0
  32. package/src/components/TicketSplitDialog.vue +98 -98
  33. package/src/components/TicketSubjects.stories.js +63 -0
  34. package/src/components/TicketSubjects.vue +107 -0
  35. package/src/components/TwoFactorSetup.vue +1 -37
  36. package/src/components/VariableTokenInput.vue +111 -111
  37. package/src/components/WorkflowActionConfig.vue +287 -287
  38. package/src/components/WorkflowActionList.vue +350 -350
  39. package/src/components/WorkflowConditionBuilder.vue +265 -265
  40. package/src/components/WorkflowTriggerSelector.vue +125 -125
  41. package/src/components/admin/newsletters/AnalyticsTiles.stories.js +14 -0
  42. package/src/components/admin/newsletters/AnalyticsTiles.vue +55 -0
  43. package/src/components/admin/newsletters/DeliveriesTable.stories.js +28 -0
  44. package/src/components/admin/newsletters/DeliveriesTable.vue +104 -0
  45. package/src/components/admin/newsletters/DynamicFilterBuilder.stories.js +11 -0
  46. package/src/components/admin/newsletters/DynamicFilterBuilder.vue +53 -0
  47. package/src/components/admin/newsletters/ListMemberTable.stories.js +12 -0
  48. package/src/components/admin/newsletters/ListMemberTable.vue +53 -0
  49. package/src/components/admin/newsletters/MarkdownEditor.stories.js +6 -0
  50. package/src/components/admin/newsletters/MarkdownEditor.vue +53 -0
  51. package/src/components/admin/newsletters/MergeFieldDropdown.stories.js +6 -0
  52. package/src/components/admin/newsletters/MergeFieldDropdown.vue +84 -0
  53. package/src/components/admin/newsletters/PreviewIframe.stories.js +7 -0
  54. package/src/components/admin/newsletters/PreviewIframe.vue +40 -0
  55. package/src/components/admin/newsletters/SummaryTiles.stories.js +8 -0
  56. package/src/components/admin/newsletters/SummaryTiles.vue +63 -0
  57. package/src/composables/useChat.js +187 -187
  58. package/src/composables/useI18n.js +102 -102
  59. package/src/composables/useMentions.js +134 -134
  60. package/src/composables/usePermissions.js +31 -0
  61. package/src/composables/useRealtime.js +182 -182
  62. package/src/index.js +85 -84
  63. package/src/locales/README.md +13 -13
  64. package/src/locales/ar.json +727 -727
  65. package/src/locales/de.json +690 -690
  66. package/src/locales/en.json +889 -729
  67. package/src/locales/es.json +691 -691
  68. package/src/locales/fr.json +691 -691
  69. package/src/locales/index.js +16 -16
  70. package/src/locales/it.json +727 -727
  71. package/src/locales/ja.json +727 -727
  72. package/src/locales/ko.json +727 -727
  73. package/src/locales/nl.json +727 -727
  74. package/src/locales/pl.json +727 -727
  75. package/src/locales/pt-BR.json +727 -727
  76. package/src/locales/ru.json +727 -727
  77. package/src/locales/tr.json +727 -727
  78. package/src/locales/zh-CN.json +727 -727
  79. package/src/pages/Admin/Automations/Form.vue +280 -0
  80. package/src/pages/Admin/Automations/Index.vue +230 -0
  81. package/src/pages/Admin/Newsletters/Compose.vue +192 -0
  82. package/src/pages/Admin/Newsletters/Edit.vue +24 -0
  83. package/src/pages/Admin/Newsletters/Index.vue +141 -0
  84. package/src/pages/Admin/Newsletters/Lists/Create.vue +64 -0
  85. package/src/pages/Admin/Newsletters/Lists/Index.vue +59 -0
  86. package/src/pages/Admin/Newsletters/Lists/Show.vue +53 -0
  87. package/src/pages/Admin/Newsletters/Settings.vue +85 -0
  88. package/src/pages/Admin/Newsletters/Show.vue +140 -0
  89. package/src/pages/Admin/Newsletters/Templates/Create.vue +11 -0
  90. package/src/pages/Admin/Newsletters/Templates/Index.vue +54 -0
  91. package/src/pages/Admin/Newsletters/Templates/Show.vue +65 -0
  92. package/src/pages/Admin/Newsletters/usePreview.js +44 -0
  93. package/src/pages/Admin/Plugins/Index.vue +10 -2
  94. package/src/pages/Admin/Reports/AgentDetail.vue +132 -132
  95. package/src/pages/Admin/Reports/AgentRanking.vue +246 -246
  96. package/src/pages/Admin/Reports/Cohorts.vue +180 -180
  97. package/src/pages/Admin/Reports/Comparison.vue +141 -141
  98. package/src/pages/Admin/Reports/Dashboard.vue +226 -226
  99. package/src/pages/Admin/Reports/ResolutionTimes.vue +164 -164
  100. package/src/pages/Admin/Reports/ResponseTimes.vue +164 -164
  101. package/src/pages/Admin/Reports/SlaTrends.vue +183 -183
  102. package/src/pages/Admin/Settings/DatabaseConnection.vue +228 -0
  103. package/src/pages/Admin/Settings/PublicTickets.vue +163 -0
  104. package/src/pages/Admin/Settings/SsoSettings.vue +157 -4
  105. package/src/pages/Admin/Settings/TwoFactor.vue +32 -6
  106. package/src/pages/Admin/Settings.vue +1008 -1008
  107. package/src/pages/Admin/Skills/Form.vue +30 -10
  108. package/src/pages/Admin/Tickets/Index.vue +126 -126
  109. package/src/pages/Admin/Tickets/Show.vue +254 -249
  110. package/src/pages/Admin/Users/Index.vue +145 -145
  111. package/src/pages/Admin/Webhooks/DeliveryLog.vue +1 -2
  112. package/src/pages/Admin/Workflows/Builder.vue +207 -207
  113. package/src/pages/Admin/Workflows/Form.vue +24 -0
  114. package/src/pages/Admin/Workflows/Index.vue +235 -235
  115. package/src/pages/Admin/Workflows/Logs.vue +286 -286
  116. package/src/pages/Agent/TicketIndex.vue +112 -112
  117. package/src/pages/Agent/TicketShow.vue +547 -494
  118. package/src/pages/Customer/Index.vue +56 -56
  119. package/src/pages/Customer/KnowledgeBase/Article.vue +129 -129
  120. package/src/pages/Plugin/Page.vue +61 -0
  121. package/src/plugin.js +175 -175
  122. package/src/utils/mentionHighlight.js +24 -24
  123. package/src/widget/EscalatedWidget.vue +804 -804
  124. package/src/widget/index.js +254 -254
@@ -1,247 +1,247 @@
1
- <script setup>
2
- import { inject, computed, ref } from 'vue';
3
- import { router, useForm } from '@inertiajs/vue3';
4
-
5
- const props = defineProps({
6
- ticket: { type: Object, required: true },
7
- routePrefix: { type: String, default: 'escalated.admin' },
8
- });
9
-
10
- const escDark = inject(
11
- 'esc-dark',
12
- computed(() => false),
13
- );
14
-
15
- const showMenu = ref(false);
16
- const showCustom = ref(false);
17
- const customDatetime = ref('');
18
-
19
- const snoozeForm = useForm({ snoozed_until: '' });
20
-
21
- function snoozeUntil(datetime) {
22
- snoozeForm.snoozed_until = datetime;
23
- snoozeForm.post(route(`${props.routePrefix}.tickets.snooze`, props.ticket.reference), {
24
- preserveScroll: true,
25
- onSuccess: () => {
26
- showMenu.value = false;
27
- showCustom.value = false;
28
- },
29
- });
30
- }
31
-
32
- function snoozePreset(hours) {
33
- const dt = new Date(Date.now() + hours * 3600 * 1000);
34
- snoozeUntil(dt.toISOString());
35
- }
36
-
37
- function snoozeTomorrow9am() {
38
- const dt = new Date();
39
- dt.setDate(dt.getDate() + 1);
40
- dt.setHours(9, 0, 0, 0);
41
- snoozeUntil(dt.toISOString());
42
- }
43
-
44
- function snoozeNextMonday9am() {
45
- const dt = new Date();
46
- const day = dt.getDay();
47
- const daysUntilMonday = day === 0 ? 1 : 8 - day;
48
- dt.setDate(dt.getDate() + daysUntilMonday);
49
- dt.setHours(9, 0, 0, 0);
50
- snoozeUntil(dt.toISOString());
51
- }
52
-
53
- function snoozeCustom() {
54
- if (customDatetime.value) {
55
- snoozeUntil(new Date(customDatetime.value).toISOString());
56
- }
57
- }
58
-
59
- function unsnooze() {
60
- router.post(route(`${props.routePrefix}.tickets.unsnooze`, props.ticket.reference), {}, { preserveScroll: true });
61
- }
62
-
63
- function formatSnoozedUntil(dateStr) {
64
- if (!dateStr) return '';
65
- const dt = new Date(dateStr);
66
- return dt.toLocaleString(undefined, {
67
- month: 'short',
68
- day: 'numeric',
69
- year: 'numeric',
70
- hour: 'numeric',
71
- minute: '2-digit',
72
- });
73
- }
74
-
75
- // Close menu on outside click
76
- function onClickOutside(e) {
77
- if (!e.target.closest('[data-snooze-menu]')) {
78
- showMenu.value = false;
79
- showCustom.value = false;
80
- }
81
- }
82
-
83
- import { watch } from 'vue';
84
- watch(showMenu, (val) => {
85
- if (val) {
86
- document.addEventListener('click', onClickOutside, true);
87
- } else {
88
- document.removeEventListener('click', onClickOutside, true);
89
- }
90
- });
91
- </script>
92
-
93
- <template>
94
- <!-- Snoozed banner -->
95
- <div
96
- v-if="ticket.is_snoozed || (ticket.snoozed_until && new Date(ticket.snoozed_until) > new Date())"
97
- :class="[
98
- 'flex items-center gap-3 rounded-lg px-4 py-2.5 text-sm font-medium',
99
- escDark
100
- ? 'border border-amber-500/20 bg-amber-500/10 text-amber-300'
101
- : 'border border-amber-200 bg-amber-50 text-amber-800',
102
- ]"
103
- >
104
- <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" viewBox="0 0 20 20" fill="currentColor">
105
- <path
106
- fill-rule="evenodd"
107
- d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.828a1 1 0 101.415-1.414L11 9.586V6z"
108
- clip-rule="evenodd"
109
- />
110
- </svg>
111
- <span>Snoozed until {{ formatSnoozedUntil(ticket.snoozed_until) }}</span>
112
- <button
113
- :class="[
114
- 'ml-auto rounded-md px-3 py-1 text-xs font-semibold transition-colors',
115
- escDark
116
- ? 'bg-amber-500/20 text-amber-300 hover:bg-amber-500/30'
117
- : 'bg-amber-200 text-amber-900 hover:bg-amber-300',
118
- ]"
119
- @click="unsnooze"
120
- >
121
- Unsnooze
122
- </button>
123
- </div>
124
-
125
- <!-- Snooze button with dropdown -->
126
- <div
127
- v-if="!ticket.is_snoozed && !(ticket.snoozed_until && new Date(ticket.snoozed_until) > new Date())"
128
- class="relative"
129
- data-snooze-menu
130
- >
131
- <button
132
- :class="[
133
- 'inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm font-medium transition-colors',
134
- escDark
135
- ? 'border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] text-[var(--esc-panel-text-secondary)] hover:bg-[var(--esc-panel-surface)]'
136
- : 'border border-gray-300 bg-white text-gray-700 hover:bg-gray-50',
137
- ]"
138
- @click.stop="showMenu = !showMenu"
139
- >
140
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" viewBox="0 0 20 20" fill="currentColor">
141
- <path
142
- fill-rule="evenodd"
143
- d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.828a1 1 0 101.415-1.414L11 9.586V6z"
144
- clip-rule="evenodd"
145
- />
146
- </svg>
147
- Snooze
148
- </button>
149
- <div
150
- v-if="showMenu"
151
- :class="[
152
- 'absolute right-0 top-full z-50 mt-1 w-56 rounded-lg border py-1 shadow-xl',
153
- escDark ? 'border-white/[0.08] bg-neutral-800' : 'border-gray-200 bg-white',
154
- ]"
155
- >
156
- <button
157
- v-if="!showCustom"
158
- :class="[
159
- 'flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors',
160
- escDark ? 'text-neutral-300 hover:bg-white/[0.06]' : 'text-gray-700 hover:bg-gray-50',
161
- ]"
162
- @click="snoozePreset(1)"
163
- >
164
- 1 hour
165
- </button>
166
- <button
167
- v-if="!showCustom"
168
- :class="[
169
- 'flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors',
170
- escDark ? 'text-neutral-300 hover:bg-white/[0.06]' : 'text-gray-700 hover:bg-gray-50',
171
- ]"
172
- @click="snoozePreset(4)"
173
- >
174
- 4 hours
175
- </button>
176
- <button
177
- v-if="!showCustom"
178
- :class="[
179
- 'flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors',
180
- escDark ? 'text-neutral-300 hover:bg-white/[0.06]' : 'text-gray-700 hover:bg-gray-50',
181
- ]"
182
- @click="snoozeTomorrow9am"
183
- >
184
- Tomorrow 9am
185
- </button>
186
- <button
187
- v-if="!showCustom"
188
- :class="[
189
- 'flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors',
190
- escDark ? 'text-neutral-300 hover:bg-white/[0.06]' : 'text-gray-700 hover:bg-gray-50',
191
- ]"
192
- @click="snoozeNextMonday9am"
193
- >
194
- Next Monday 9am
195
- </button>
196
- <div
197
- v-if="!showCustom"
198
- :class="['my-1 border-t', escDark ? 'border-white/[0.06]' : 'border-gray-100']"
199
- ></div>
200
- <button
201
- v-if="!showCustom"
202
- :class="[
203
- 'flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors',
204
- escDark ? 'text-neutral-300 hover:bg-white/[0.06]' : 'text-gray-700 hover:bg-gray-50',
205
- ]"
206
- @click.stop="showCustom = true"
207
- >
208
- Custom date/time...
209
- </button>
210
- <div v-if="showCustom" class="px-3 py-2 space-y-2">
211
- <input
212
- v-model="customDatetime"
213
- type="datetime-local"
214
- :class="[
215
- 'w-full rounded-md border px-2 py-1.5 text-sm',
216
- escDark
217
- ? 'border-white/10 bg-neutral-900 text-neutral-200'
218
- : 'border-gray-300 bg-white text-gray-900',
219
- ]"
220
- />
221
- <div class="flex gap-2">
222
- <button
223
- :class="[
224
- 'flex-1 rounded-md px-2 py-1 text-xs font-medium transition-colors',
225
- escDark
226
- ? 'bg-white/[0.06] text-neutral-300 hover:bg-white/[0.1]'
227
- : 'bg-gray-100 text-gray-600 hover:bg-gray-200',
228
- ]"
229
- @click.stop="showCustom = false"
230
- >
231
- Back
232
- </button>
233
- <button
234
- :class="[
235
- 'flex-1 rounded-md px-2 py-1 text-xs font-medium text-white transition-colors',
236
- escDark ? 'bg-cyan-600 hover:bg-cyan-500' : 'bg-indigo-600 hover:bg-indigo-500',
237
- ]"
238
- :disabled="!customDatetime"
239
- @click="snoozeCustom"
240
- >
241
- Snooze
242
- </button>
243
- </div>
244
- </div>
245
- </div>
246
- </div>
247
- </template>
1
+ <script setup>
2
+ import { inject, computed, ref } from 'vue';
3
+ import { router, useForm } from '@inertiajs/vue3';
4
+
5
+ const props = defineProps({
6
+ ticket: { type: Object, required: true },
7
+ routePrefix: { type: String, default: 'escalated.admin' },
8
+ });
9
+
10
+ const escDark = inject(
11
+ 'esc-dark',
12
+ computed(() => false),
13
+ );
14
+
15
+ const showMenu = ref(false);
16
+ const showCustom = ref(false);
17
+ const customDatetime = ref('');
18
+
19
+ const snoozeForm = useForm({ snoozed_until: '' });
20
+
21
+ function snoozeUntil(datetime) {
22
+ snoozeForm.snoozed_until = datetime;
23
+ snoozeForm.post(route(`${props.routePrefix}.tickets.snooze`, props.ticket.reference), {
24
+ preserveScroll: true,
25
+ onSuccess: () => {
26
+ showMenu.value = false;
27
+ showCustom.value = false;
28
+ },
29
+ });
30
+ }
31
+
32
+ function snoozePreset(hours) {
33
+ const dt = new Date(Date.now() + hours * 3600 * 1000);
34
+ snoozeUntil(dt.toISOString());
35
+ }
36
+
37
+ function snoozeTomorrow9am() {
38
+ const dt = new Date();
39
+ dt.setDate(dt.getDate() + 1);
40
+ dt.setHours(9, 0, 0, 0);
41
+ snoozeUntil(dt.toISOString());
42
+ }
43
+
44
+ function snoozeNextMonday9am() {
45
+ const dt = new Date();
46
+ const day = dt.getDay();
47
+ const daysUntilMonday = day === 0 ? 1 : 8 - day;
48
+ dt.setDate(dt.getDate() + daysUntilMonday);
49
+ dt.setHours(9, 0, 0, 0);
50
+ snoozeUntil(dt.toISOString());
51
+ }
52
+
53
+ function snoozeCustom() {
54
+ if (customDatetime.value) {
55
+ snoozeUntil(new Date(customDatetime.value).toISOString());
56
+ }
57
+ }
58
+
59
+ function unsnooze() {
60
+ router.post(route(`${props.routePrefix}.tickets.unsnooze`, props.ticket.reference), {}, { preserveScroll: true });
61
+ }
62
+
63
+ function formatSnoozedUntil(dateStr) {
64
+ if (!dateStr) return '';
65
+ const dt = new Date(dateStr);
66
+ return dt.toLocaleString(undefined, {
67
+ month: 'short',
68
+ day: 'numeric',
69
+ year: 'numeric',
70
+ hour: 'numeric',
71
+ minute: '2-digit',
72
+ });
73
+ }
74
+
75
+ // Close menu on outside click
76
+ function onClickOutside(e) {
77
+ if (!e.target.closest('[data-snooze-menu]')) {
78
+ showMenu.value = false;
79
+ showCustom.value = false;
80
+ }
81
+ }
82
+
83
+ import { watch } from 'vue';
84
+ watch(showMenu, (val) => {
85
+ if (val) {
86
+ document.addEventListener('click', onClickOutside, true);
87
+ } else {
88
+ document.removeEventListener('click', onClickOutside, true);
89
+ }
90
+ });
91
+ </script>
92
+
93
+ <template>
94
+ <!-- Snoozed banner -->
95
+ <div
96
+ v-if="ticket.is_snoozed || (ticket.snoozed_until && new Date(ticket.snoozed_until) > new Date())"
97
+ :class="[
98
+ 'flex items-center gap-3 rounded-lg px-4 py-2.5 text-sm font-medium',
99
+ escDark
100
+ ? 'border border-amber-500/20 bg-amber-500/10 text-amber-300'
101
+ : 'border border-amber-200 bg-amber-50 text-amber-800',
102
+ ]"
103
+ >
104
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" viewBox="0 0 20 20" fill="currentColor">
105
+ <path
106
+ fill-rule="evenodd"
107
+ d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.828a1 1 0 101.415-1.414L11 9.586V6z"
108
+ clip-rule="evenodd"
109
+ />
110
+ </svg>
111
+ <span>Snoozed until {{ formatSnoozedUntil(ticket.snoozed_until) }}</span>
112
+ <button
113
+ :class="[
114
+ 'ml-auto rounded-md px-3 py-1 text-xs font-semibold transition-colors',
115
+ escDark
116
+ ? 'bg-amber-500/20 text-amber-300 hover:bg-amber-500/30'
117
+ : 'bg-amber-200 text-amber-900 hover:bg-amber-300',
118
+ ]"
119
+ @click="unsnooze"
120
+ >
121
+ Unsnooze
122
+ </button>
123
+ </div>
124
+
125
+ <!-- Snooze button with dropdown -->
126
+ <div
127
+ v-if="!ticket.is_snoozed && !(ticket.snoozed_until && new Date(ticket.snoozed_until) > new Date())"
128
+ class="relative"
129
+ data-snooze-menu
130
+ >
131
+ <button
132
+ :class="[
133
+ 'inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm font-medium transition-colors',
134
+ escDark
135
+ ? 'border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] text-[var(--esc-panel-text-secondary)] hover:bg-[var(--esc-panel-surface)]'
136
+ : 'border border-gray-300 bg-white text-gray-700 hover:bg-gray-50',
137
+ ]"
138
+ @click.stop="showMenu = !showMenu"
139
+ >
140
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" viewBox="0 0 20 20" fill="currentColor">
141
+ <path
142
+ fill-rule="evenodd"
143
+ d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.828a1 1 0 101.415-1.414L11 9.586V6z"
144
+ clip-rule="evenodd"
145
+ />
146
+ </svg>
147
+ Snooze
148
+ </button>
149
+ <div
150
+ v-if="showMenu"
151
+ :class="[
152
+ 'absolute right-0 top-full z-50 mt-1 w-56 rounded-lg border py-1 shadow-xl',
153
+ escDark ? 'border-white/[0.08] bg-neutral-800' : 'border-gray-200 bg-white',
154
+ ]"
155
+ >
156
+ <button
157
+ v-if="!showCustom"
158
+ :class="[
159
+ 'flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors',
160
+ escDark ? 'text-neutral-300 hover:bg-white/[0.06]' : 'text-gray-700 hover:bg-gray-50',
161
+ ]"
162
+ @click="snoozePreset(1)"
163
+ >
164
+ 1 hour
165
+ </button>
166
+ <button
167
+ v-if="!showCustom"
168
+ :class="[
169
+ 'flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors',
170
+ escDark ? 'text-neutral-300 hover:bg-white/[0.06]' : 'text-gray-700 hover:bg-gray-50',
171
+ ]"
172
+ @click="snoozePreset(4)"
173
+ >
174
+ 4 hours
175
+ </button>
176
+ <button
177
+ v-if="!showCustom"
178
+ :class="[
179
+ 'flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors',
180
+ escDark ? 'text-neutral-300 hover:bg-white/[0.06]' : 'text-gray-700 hover:bg-gray-50',
181
+ ]"
182
+ @click="snoozeTomorrow9am"
183
+ >
184
+ Tomorrow 9am
185
+ </button>
186
+ <button
187
+ v-if="!showCustom"
188
+ :class="[
189
+ 'flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors',
190
+ escDark ? 'text-neutral-300 hover:bg-white/[0.06]' : 'text-gray-700 hover:bg-gray-50',
191
+ ]"
192
+ @click="snoozeNextMonday9am"
193
+ >
194
+ Next Monday 9am
195
+ </button>
196
+ <div
197
+ v-if="!showCustom"
198
+ :class="['my-1 border-t', escDark ? 'border-white/[0.06]' : 'border-gray-100']"
199
+ ></div>
200
+ <button
201
+ v-if="!showCustom"
202
+ :class="[
203
+ 'flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors',
204
+ escDark ? 'text-neutral-300 hover:bg-white/[0.06]' : 'text-gray-700 hover:bg-gray-50',
205
+ ]"
206
+ @click.stop="showCustom = true"
207
+ >
208
+ Custom date/time...
209
+ </button>
210
+ <div v-if="showCustom" class="px-3 py-2 space-y-2">
211
+ <input
212
+ v-model="customDatetime"
213
+ type="datetime-local"
214
+ :class="[
215
+ 'w-full rounded-md border px-2 py-1.5 text-sm',
216
+ escDark
217
+ ? 'border-white/10 bg-neutral-900 text-neutral-200'
218
+ : 'border-gray-300 bg-white text-gray-900',
219
+ ]"
220
+ />
221
+ <div class="flex gap-2">
222
+ <button
223
+ :class="[
224
+ 'flex-1 rounded-md px-2 py-1 text-xs font-medium transition-colors',
225
+ escDark
226
+ ? 'bg-white/[0.06] text-neutral-300 hover:bg-white/[0.1]'
227
+ : 'bg-gray-100 text-gray-600 hover:bg-gray-200',
228
+ ]"
229
+ @click.stop="showCustom = false"
230
+ >
231
+ Back
232
+ </button>
233
+ <button
234
+ :class="[
235
+ 'flex-1 rounded-md px-2 py-1 text-xs font-medium text-white transition-colors',
236
+ escDark ? 'bg-cyan-600 hover:bg-cyan-500' : 'bg-indigo-600 hover:bg-indigo-500',
237
+ ]"
238
+ :disabled="!customDatetime"
239
+ @click="snoozeCustom"
240
+ >
241
+ Snooze
242
+ </button>
243
+ </div>
244
+ </div>
245
+ </div>
246
+ </div>
247
+ </template>