@escalated-dev/escalated 0.7.0 → 0.7.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.
- package/LICENSE +21 -21
- package/README.md +31 -0
- package/package.json +12 -6
- package/src/components/ActiveChatsPanel.vue +246 -0
- package/src/components/ActivityTimeline.stories.js +55 -55
- package/src/components/ActivityTimeline.vue +83 -83
- package/src/components/AdminDashboard.stories.js +1423 -1095
- package/src/components/AgentLoadIndicator.stories.js +37 -37
- package/src/components/AgentLoadIndicator.vue +49 -49
- package/src/components/AgentPerformanceCard.vue +44 -44
- package/src/components/ArticleEditor.vue +82 -82
- package/src/components/AssigneeSelect.vue +37 -37
- package/src/components/AttachmentList.vue +13 -1
- package/src/components/AuditLogEntry.vue +95 -95
- package/src/components/BulkActionBar.vue +166 -166
- package/src/components/CategoryTree.vue +89 -89
- package/src/components/ChartWidget.vue +46 -46
- package/src/components/ChatActionBar.vue +226 -0
- package/src/components/ChatBubble.vue +162 -0
- package/src/components/ChatComposer.vue +308 -0
- package/src/components/ChatQueue.vue +222 -0
- package/src/components/ChatThread.vue +197 -0
- package/src/components/CollisionWarning.stories.js +30 -30
- package/src/components/CollisionWarning.vue +68 -68
- package/src/components/ConditionalFieldRules.vue +135 -135
- package/src/components/ContextPanel.vue +66 -66
- package/src/components/ContextPanelSection.vue +65 -65
- package/src/components/CustomFieldRenderer.vue +159 -159
- package/src/components/EscalatedLayout.vue +29 -6
- package/src/components/FileDropzone.vue +57 -57
- package/src/components/FollowButton.stories.js +30 -30
- package/src/components/FollowButton.vue +88 -88
- package/src/components/KeyboardShortcutHelp.vue +213 -213
- package/src/components/KnowledgePanel.vue +122 -122
- package/src/components/KpiCard.stories.js +32 -32
- package/src/components/KpiCard.vue +88 -88
- package/src/components/MacroDropdown.vue +150 -150
- package/src/components/MentionDropdown.vue +154 -0
- package/src/components/MetricComparison.vue +89 -0
- package/src/components/PercentileChart.vue +67 -0
- package/src/components/PeriodSelector.vue +98 -0
- package/src/components/PermissionMatrix.vue +107 -107
- package/src/components/PinnedNotes.vue +129 -129
- package/src/components/PluginSlot.vue +68 -62
- package/src/components/PresenceIndicator.vue +46 -2
- package/src/components/PriorityBadge.stories.js +33 -33
- package/src/components/PriorityBadge.vue +46 -46
- package/src/components/ReplyComposer.vue +81 -18
- package/src/components/ReplyThread.vue +40 -2
- package/src/components/ReportChart.vue +395 -0
- package/src/components/ReportExportButton.vue +108 -0
- package/src/components/SatisfactionRating.vue +180 -180
- package/src/components/SaveViewDialog.vue +172 -0
- package/src/components/SavedViewSidebar.vue +208 -0
- package/src/components/ScheduleEditor.vue +104 -104
- package/src/components/SideConversation.vue +165 -165
- package/src/components/SideConversationList.vue +147 -147
- package/src/components/SkillTagManager.vue +79 -79
- package/src/components/SlaComplianceChart.vue +46 -53
- package/src/components/SlaTimer.stories.js +35 -35
- package/src/components/SlaTimer.vue +62 -62
- package/src/components/SnoozeButton.vue +247 -0
- package/src/components/StatsCard.stories.js +24 -24
- package/src/components/StatsCard.vue +58 -58
- package/src/components/StatusBadge.stories.js +53 -53
- package/src/components/StatusBadge.vue +78 -78
- package/src/components/TagSelect.vue +84 -84
- package/src/components/TicketFilters.vue +270 -225
- package/src/components/TicketLinkPanel.vue +193 -193
- package/src/components/TicketList.vue +655 -594
- package/src/components/TicketMergeDialog.vue +157 -157
- package/src/components/TicketSplitDialog.vue +98 -0
- package/src/components/TotpInput.stories.js +9 -9
- package/src/components/TotpInput.vue +81 -81
- package/src/components/TwoFactorSetup.vue +113 -113
- package/src/components/VariableTokenInput.vue +111 -0
- package/src/components/WorkflowActionConfig.vue +287 -0
- package/src/components/WorkflowActionList.vue +350 -0
- package/src/components/WorkflowConditionBuilder.vue +265 -0
- package/src/components/WorkflowTriggerSelector.vue +125 -0
- package/src/composables/useChat.js +187 -0
- package/src/composables/useI18n.js +80 -80
- package/src/composables/useKeyboardShortcuts.js +46 -46
- package/src/composables/useMentions.js +134 -0
- package/src/composables/usePluginExtensions.js +159 -159
- package/src/composables/usePluginHooks.js +65 -65
- package/src/composables/useRealtime.js +182 -0
- package/src/defineEscalatedPlugin.js +76 -76
- package/src/index.js +84 -72
- package/src/locales/ar.json +727 -0
- package/src/locales/de.json +678 -430
- package/src/locales/en.json +717 -455
- package/src/locales/es.json +679 -430
- package/src/locales/fr.json +680 -431
- package/src/locales/index.js +12 -2
- package/src/locales/it.json +727 -0
- package/src/locales/ja.json +727 -0
- package/src/locales/ko.json +727 -0
- package/src/locales/nl.json +727 -0
- package/src/locales/pl.json +727 -0
- package/src/locales/pt-BR.json +727 -0
- package/src/locales/ru.json +727 -0
- package/src/locales/tr.json +727 -0
- package/src/locales/zh-CN.json +727 -0
- package/src/pages/Admin/ApiTokens/Index.vue +381 -381
- package/src/pages/Admin/AuditLog/Index.vue +154 -154
- package/src/pages/Admin/BusinessHours/Form.vue +172 -172
- package/src/pages/Admin/BusinessHours/Index.vue +113 -113
- package/src/pages/Admin/CannedResponses/Index.vue +127 -127
- package/src/pages/Admin/Capacity/Index.vue +134 -134
- package/src/pages/Admin/CustomFields/Form.vue +195 -195
- package/src/pages/Admin/CustomFields/Index.vue +134 -134
- package/src/pages/Admin/CustomObjects/Form.vue +202 -202
- package/src/pages/Admin/CustomObjects/Index.vue +127 -127
- package/src/pages/Admin/CustomObjects/Records.vue +228 -228
- package/src/pages/Admin/Departments/Form.vue +75 -75
- package/src/pages/Admin/Departments/Index.vue +110 -109
- package/src/pages/Admin/EscalationRules/Form.vue +157 -157
- package/src/pages/Admin/EscalationRules/Index.vue +178 -178
- package/src/pages/Admin/Import/Connect.vue +0 -1
- package/src/pages/Admin/Import/Index.vue +1 -1
- package/src/pages/Admin/Import/Progress.vue +1 -1
- package/src/pages/Admin/KnowledgeBase/Articles/Form.vue +142 -142
- package/src/pages/Admin/KnowledgeBase/Articles/Index.vue +195 -195
- package/src/pages/Admin/KnowledgeBase/Categories/Index.vue +193 -193
- package/src/pages/Admin/Macros/Index.vue +448 -448
- package/src/pages/Admin/Plugins/Index.vue +327 -327
- package/src/pages/Admin/Reports/AgentDetail.vue +132 -0
- package/src/pages/Admin/Reports/AgentMetrics.vue +115 -115
- package/src/pages/Admin/Reports/AgentRanking.vue +246 -0
- package/src/pages/Admin/Reports/Cohorts.vue +180 -0
- package/src/pages/Admin/Reports/Comparison.vue +141 -0
- package/src/pages/Admin/Reports/CsatReport.vue +127 -127
- package/src/pages/Admin/Reports/Dashboard.vue +36 -21
- package/src/pages/Admin/Reports/ResolutionTimes.vue +164 -0
- package/src/pages/Admin/Reports/ResponseTimes.vue +164 -0
- package/src/pages/Admin/Reports/SlaReport.vue +162 -166
- package/src/pages/Admin/Reports/SlaTrends.vue +183 -0
- package/src/pages/Admin/Reports.vue +206 -206
- package/src/pages/Admin/Roles/Form.vue +71 -71
- package/src/pages/Admin/Roles/Index.vue +122 -122
- package/src/pages/Admin/Settings/CsatSettings.vue +165 -165
- package/src/pages/Admin/Settings/DataRetention.vue +182 -182
- package/src/pages/Admin/Settings/EmailSettings.vue +243 -243
- package/src/pages/Admin/Settings/Sandbox.vue +135 -135
- package/src/pages/Admin/Settings/SsoSettings.vue +218 -218
- package/src/pages/Admin/Settings/TwoFactor.vue +110 -110
- package/src/pages/Admin/Settings.vue +1008 -468
- package/src/pages/Admin/Skills/Form.vue +53 -53
- package/src/pages/Admin/Skills/Index.vue +94 -94
- package/src/pages/Admin/SlaPolicies/Form.vue +118 -118
- package/src/pages/Admin/SlaPolicies/Index.vue +121 -120
- package/src/pages/Admin/Statuses/Form.vue +114 -114
- package/src/pages/Admin/Statuses/Index.vue +153 -153
- package/src/pages/Admin/Tags/Index.vue +191 -191
- package/src/pages/Admin/Tickets/Index.vue +126 -91
- package/src/pages/Admin/Tickets/Show.vue +29 -0
- package/src/pages/Admin/Webhooks/DeliveryLog.vue +120 -120
- package/src/pages/Admin/Webhooks/Form.vue +110 -110
- package/src/pages/Admin/Webhooks/Index.vue +136 -136
- package/src/pages/Admin/Workflows/Builder.vue +207 -0
- package/src/pages/Admin/Workflows/Index.vue +235 -0
- package/src/pages/Admin/Workflows/Logs.vue +286 -0
- package/src/pages/Agent/TicketIndex.vue +112 -88
- package/src/pages/Agent/TicketShow.vue +192 -60
- package/src/pages/Customer/Create.vue +1 -1
- package/src/pages/Customer/Index.vue +31 -31
- package/src/pages/Customer/KnowledgeBase/Article.vue +4 -2
- package/src/pages/Customer/KnowledgeBase/Index.vue +151 -151
- package/src/pages/Customer/Show.vue +69 -63
- package/src/pages/Guest/Create.vue +40 -15
- package/src/pages/Guest/Show.vue +124 -93
- package/src/plugin.js +25 -0
- package/src/utils/mentionHighlight.js +24 -0
- package/src/utils/sanitizeHtml.js +78 -64
- package/src/widget/EscalatedWidget.vue +804 -0
- package/src/widget/index.js +254 -0
- package/src/pages/Admin/Automations/Form.vue +0 -184
- package/src/pages/Admin/Automations/Index.vue +0 -129
|
@@ -1,213 +1,213 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { computed, inject } from 'vue';
|
|
3
|
-
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
show: { type: Boolean, default: false },
|
|
6
|
-
context: { type: String, default: 'list' },
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const emit = defineEmits(['update:show']);
|
|
10
|
-
const escDark = inject(
|
|
11
|
-
'esc-dark',
|
|
12
|
-
computed(() => false),
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
const shortcutGroups = [
|
|
16
|
-
{
|
|
17
|
-
title: 'List View',
|
|
18
|
-
contexts: ['list'],
|
|
19
|
-
shortcuts: [
|
|
20
|
-
{ keys: ['j'], description: 'Move down' },
|
|
21
|
-
{ keys: ['k'], description: 'Move up' },
|
|
22
|
-
{ keys: ['x'], description: 'Toggle select' },
|
|
23
|
-
{ keys: ['Enter'], description: 'Open ticket' },
|
|
24
|
-
],
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
title: 'Detail View',
|
|
28
|
-
contexts: ['detail'],
|
|
29
|
-
shortcuts: [
|
|
30
|
-
{ keys: ['r'], description: 'Reply' },
|
|
31
|
-
{ keys: ['n'], description: 'Internal note' },
|
|
32
|
-
{ keys: ['s'], description: 'Change status' },
|
|
33
|
-
{ keys: ['p'], description: 'Change priority' },
|
|
34
|
-
{ keys: ['f'], description: 'Follow/unfollow' },
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
title: 'Global',
|
|
39
|
-
contexts: ['list', 'detail'],
|
|
40
|
-
shortcuts: [{ keys: ['?'], description: 'Show this help' }],
|
|
41
|
-
},
|
|
42
|
-
];
|
|
43
|
-
|
|
44
|
-
const filteredGroups = computed(() => shortcutGroups.filter((g) => g.contexts.includes(props.context)));
|
|
45
|
-
|
|
46
|
-
function closeModal() {
|
|
47
|
-
emit('update:show', false);
|
|
48
|
-
}
|
|
49
|
-
</script>
|
|
50
|
-
|
|
51
|
-
<template>
|
|
52
|
-
<Teleport to="body">
|
|
53
|
-
<Transition
|
|
54
|
-
enter-active-class="transition duration-200 ease-out"
|
|
55
|
-
enter-from-class="opacity-0"
|
|
56
|
-
enter-to-class="opacity-100"
|
|
57
|
-
leave-active-class="transition duration-150 ease-in"
|
|
58
|
-
leave-from-class="opacity-100"
|
|
59
|
-
leave-to-class="opacity-0"
|
|
60
|
-
>
|
|
61
|
-
<div
|
|
62
|
-
v-if="show"
|
|
63
|
-
class="fixed inset-0 z-[100] flex items-center justify-center"
|
|
64
|
-
@keydown.escape="closeModal"
|
|
65
|
-
>
|
|
66
|
-
<!-- Backdrop -->
|
|
67
|
-
<div class="absolute inset-0 bg-black/60 backdrop-blur-sm" @click="closeModal"></div>
|
|
68
|
-
|
|
69
|
-
<!-- Modal -->
|
|
70
|
-
<div
|
|
71
|
-
role="dialog"
|
|
72
|
-
aria-modal="true"
|
|
73
|
-
aria-label="Keyboard shortcuts"
|
|
74
|
-
:class="[
|
|
75
|
-
'relative z-10 w-full max-w-lg overflow-hidden rounded-2xl border shadow-2xl',
|
|
76
|
-
escDark
|
|
77
|
-
? 'border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]'
|
|
78
|
-
: 'border-gray-200 bg-white',
|
|
79
|
-
]"
|
|
80
|
-
>
|
|
81
|
-
<!-- Header -->
|
|
82
|
-
<div
|
|
83
|
-
:class="[
|
|
84
|
-
'flex items-center justify-between border-b px-6 py-4',
|
|
85
|
-
escDark ? 'border-[var(--esc-panel-border)]' : 'border-gray-200',
|
|
86
|
-
]"
|
|
87
|
-
>
|
|
88
|
-
<div class="flex items-center gap-3">
|
|
89
|
-
<svg
|
|
90
|
-
:class="[
|
|
91
|
-
'h-5 w-5',
|
|
92
|
-
escDark ? 'text-[var(--esc-panel-text-tertiary)]' : 'text-gray-500',
|
|
93
|
-
]"
|
|
94
|
-
fill="none"
|
|
95
|
-
stroke="currentColor"
|
|
96
|
-
stroke-width="1.5"
|
|
97
|
-
viewBox="0 0 24 24"
|
|
98
|
-
>
|
|
99
|
-
<path
|
|
100
|
-
stroke-linecap="round"
|
|
101
|
-
stroke-linejoin="round"
|
|
102
|
-
d="M6.75 7.5l3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0021 18V6a2.25 2.25 0 00-2.25-2.25H5.25A2.25 2.25 0 003 6v12a2.25 2.25 0 002.25 2.25z"
|
|
103
|
-
/>
|
|
104
|
-
</svg>
|
|
105
|
-
<h2
|
|
106
|
-
:class="[
|
|
107
|
-
'text-base font-semibold',
|
|
108
|
-
escDark ? 'text-[var(--esc-panel-text)]' : 'text-gray-900',
|
|
109
|
-
]"
|
|
110
|
-
>
|
|
111
|
-
Keyboard Shortcuts
|
|
112
|
-
</h2>
|
|
113
|
-
</div>
|
|
114
|
-
<button
|
|
115
|
-
aria-label="Close"
|
|
116
|
-
:class="[
|
|
117
|
-
'rounded-lg p-1.5 transition-colors',
|
|
118
|
-
escDark
|
|
119
|
-
? 'text-[var(--esc-panel-text-muted)] hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]'
|
|
120
|
-
: 'text-gray-400 hover:bg-gray-100 hover:text-gray-600',
|
|
121
|
-
]"
|
|
122
|
-
@click="closeModal"
|
|
123
|
-
>
|
|
124
|
-
<svg
|
|
125
|
-
class="h-5 w-5"
|
|
126
|
-
fill="none"
|
|
127
|
-
stroke="currentColor"
|
|
128
|
-
stroke-width="1.5"
|
|
129
|
-
viewBox="0 0 24 24"
|
|
130
|
-
>
|
|
131
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
132
|
-
</svg>
|
|
133
|
-
</button>
|
|
134
|
-
</div>
|
|
135
|
-
|
|
136
|
-
<!-- Body -->
|
|
137
|
-
<div class="max-h-[60vh] overflow-y-auto px-6 py-4">
|
|
138
|
-
<div
|
|
139
|
-
v-for="(group, gi) in filteredGroups"
|
|
140
|
-
:key="gi"
|
|
141
|
-
:class="[
|
|
142
|
-
'pb-4',
|
|
143
|
-
gi < filteredGroups.length - 1 && 'mb-4 border-b',
|
|
144
|
-
escDark ? 'border-[var(--esc-panel-border)]' : 'border-gray-100',
|
|
145
|
-
]"
|
|
146
|
-
>
|
|
147
|
-
<h3
|
|
148
|
-
:class="[
|
|
149
|
-
'mb-3 text-xs font-semibold uppercase tracking-wider',
|
|
150
|
-
escDark ? 'text-[var(--esc-panel-text-muted)]' : 'text-gray-500',
|
|
151
|
-
]"
|
|
152
|
-
>
|
|
153
|
-
{{ group.title }}
|
|
154
|
-
</h3>
|
|
155
|
-
<div class="space-y-2">
|
|
156
|
-
<div
|
|
157
|
-
v-for="(shortcut, si) in group.shortcuts"
|
|
158
|
-
:key="si"
|
|
159
|
-
class="flex items-center justify-between"
|
|
160
|
-
>
|
|
161
|
-
<span
|
|
162
|
-
:class="[
|
|
163
|
-
'text-sm',
|
|
164
|
-
escDark ? 'text-[var(--esc-panel-text-secondary)]' : 'text-gray-700',
|
|
165
|
-
]"
|
|
166
|
-
>
|
|
167
|
-
{{ shortcut.description }}
|
|
168
|
-
</span>
|
|
169
|
-
<div class="flex items-center gap-1">
|
|
170
|
-
<kbd
|
|
171
|
-
v-for="(key, ki) in shortcut.keys"
|
|
172
|
-
:key="ki"
|
|
173
|
-
:class="[
|
|
174
|
-
'inline-flex min-w-[24px] items-center justify-center rounded-md border px-2 py-0.5 text-xs font-semibold',
|
|
175
|
-
escDark
|
|
176
|
-
? 'border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-hover)] text-[var(--esc-panel-text-secondary)]'
|
|
177
|
-
: 'border-gray-300 bg-gray-100 text-gray-700',
|
|
178
|
-
]"
|
|
179
|
-
>
|
|
180
|
-
{{ key }}
|
|
181
|
-
</kbd>
|
|
182
|
-
</div>
|
|
183
|
-
</div>
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
</div>
|
|
187
|
-
|
|
188
|
-
<!-- Footer -->
|
|
189
|
-
<div
|
|
190
|
-
:class="[
|
|
191
|
-
'border-t px-6 py-3 text-center text-xs',
|
|
192
|
-
escDark
|
|
193
|
-
? 'border-[var(--esc-panel-border)] text-[var(--esc-panel-text-muted)]'
|
|
194
|
-
: 'border-gray-100 text-gray-400',
|
|
195
|
-
]"
|
|
196
|
-
>
|
|
197
|
-
Press
|
|
198
|
-
<kbd
|
|
199
|
-
:class="[
|
|
200
|
-
'mx-1 inline-flex items-center rounded border px-1.5 py-0.5 text-[10px] font-semibold',
|
|
201
|
-
escDark
|
|
202
|
-
? 'border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-hover)] text-[var(--esc-panel-text-tertiary)]'
|
|
203
|
-
: 'border-gray-300 bg-gray-100 text-gray-600',
|
|
204
|
-
]"
|
|
205
|
-
>Esc</kbd
|
|
206
|
-
>
|
|
207
|
-
to close
|
|
208
|
-
</div>
|
|
209
|
-
</div>
|
|
210
|
-
</div>
|
|
211
|
-
</Transition>
|
|
212
|
-
</Teleport>
|
|
213
|
-
</template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, inject } from 'vue';
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
show: { type: Boolean, default: false },
|
|
6
|
+
context: { type: String, default: 'list' },
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const emit = defineEmits(['update:show']);
|
|
10
|
+
const escDark = inject(
|
|
11
|
+
'esc-dark',
|
|
12
|
+
computed(() => false),
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
const shortcutGroups = [
|
|
16
|
+
{
|
|
17
|
+
title: 'List View',
|
|
18
|
+
contexts: ['list'],
|
|
19
|
+
shortcuts: [
|
|
20
|
+
{ keys: ['j'], description: 'Move down' },
|
|
21
|
+
{ keys: ['k'], description: 'Move up' },
|
|
22
|
+
{ keys: ['x'], description: 'Toggle select' },
|
|
23
|
+
{ keys: ['Enter'], description: 'Open ticket' },
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
title: 'Detail View',
|
|
28
|
+
contexts: ['detail'],
|
|
29
|
+
shortcuts: [
|
|
30
|
+
{ keys: ['r'], description: 'Reply' },
|
|
31
|
+
{ keys: ['n'], description: 'Internal note' },
|
|
32
|
+
{ keys: ['s'], description: 'Change status' },
|
|
33
|
+
{ keys: ['p'], description: 'Change priority' },
|
|
34
|
+
{ keys: ['f'], description: 'Follow/unfollow' },
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: 'Global',
|
|
39
|
+
contexts: ['list', 'detail'],
|
|
40
|
+
shortcuts: [{ keys: ['?'], description: 'Show this help' }],
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
const filteredGroups = computed(() => shortcutGroups.filter((g) => g.contexts.includes(props.context)));
|
|
45
|
+
|
|
46
|
+
function closeModal() {
|
|
47
|
+
emit('update:show', false);
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<Teleport to="body">
|
|
53
|
+
<Transition
|
|
54
|
+
enter-active-class="transition duration-200 ease-out"
|
|
55
|
+
enter-from-class="opacity-0"
|
|
56
|
+
enter-to-class="opacity-100"
|
|
57
|
+
leave-active-class="transition duration-150 ease-in"
|
|
58
|
+
leave-from-class="opacity-100"
|
|
59
|
+
leave-to-class="opacity-0"
|
|
60
|
+
>
|
|
61
|
+
<div
|
|
62
|
+
v-if="show"
|
|
63
|
+
class="fixed inset-0 z-[100] flex items-center justify-center"
|
|
64
|
+
@keydown.escape="closeModal"
|
|
65
|
+
>
|
|
66
|
+
<!-- Backdrop -->
|
|
67
|
+
<div class="absolute inset-0 bg-black/60 backdrop-blur-sm" @click="closeModal"></div>
|
|
68
|
+
|
|
69
|
+
<!-- Modal -->
|
|
70
|
+
<div
|
|
71
|
+
role="dialog"
|
|
72
|
+
aria-modal="true"
|
|
73
|
+
aria-label="Keyboard shortcuts"
|
|
74
|
+
:class="[
|
|
75
|
+
'relative z-10 w-full max-w-lg overflow-hidden rounded-2xl border shadow-2xl',
|
|
76
|
+
escDark
|
|
77
|
+
? 'border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]'
|
|
78
|
+
: 'border-gray-200 bg-white',
|
|
79
|
+
]"
|
|
80
|
+
>
|
|
81
|
+
<!-- Header -->
|
|
82
|
+
<div
|
|
83
|
+
:class="[
|
|
84
|
+
'flex items-center justify-between border-b px-6 py-4',
|
|
85
|
+
escDark ? 'border-[var(--esc-panel-border)]' : 'border-gray-200',
|
|
86
|
+
]"
|
|
87
|
+
>
|
|
88
|
+
<div class="flex items-center gap-3">
|
|
89
|
+
<svg
|
|
90
|
+
:class="[
|
|
91
|
+
'h-5 w-5',
|
|
92
|
+
escDark ? 'text-[var(--esc-panel-text-tertiary)]' : 'text-gray-500',
|
|
93
|
+
]"
|
|
94
|
+
fill="none"
|
|
95
|
+
stroke="currentColor"
|
|
96
|
+
stroke-width="1.5"
|
|
97
|
+
viewBox="0 0 24 24"
|
|
98
|
+
>
|
|
99
|
+
<path
|
|
100
|
+
stroke-linecap="round"
|
|
101
|
+
stroke-linejoin="round"
|
|
102
|
+
d="M6.75 7.5l3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0021 18V6a2.25 2.25 0 00-2.25-2.25H5.25A2.25 2.25 0 003 6v12a2.25 2.25 0 002.25 2.25z"
|
|
103
|
+
/>
|
|
104
|
+
</svg>
|
|
105
|
+
<h2
|
|
106
|
+
:class="[
|
|
107
|
+
'text-base font-semibold',
|
|
108
|
+
escDark ? 'text-[var(--esc-panel-text)]' : 'text-gray-900',
|
|
109
|
+
]"
|
|
110
|
+
>
|
|
111
|
+
Keyboard Shortcuts
|
|
112
|
+
</h2>
|
|
113
|
+
</div>
|
|
114
|
+
<button
|
|
115
|
+
aria-label="Close"
|
|
116
|
+
:class="[
|
|
117
|
+
'rounded-lg p-1.5 transition-colors',
|
|
118
|
+
escDark
|
|
119
|
+
? 'text-[var(--esc-panel-text-muted)] hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]'
|
|
120
|
+
: 'text-gray-400 hover:bg-gray-100 hover:text-gray-600',
|
|
121
|
+
]"
|
|
122
|
+
@click="closeModal"
|
|
123
|
+
>
|
|
124
|
+
<svg
|
|
125
|
+
class="h-5 w-5"
|
|
126
|
+
fill="none"
|
|
127
|
+
stroke="currentColor"
|
|
128
|
+
stroke-width="1.5"
|
|
129
|
+
viewBox="0 0 24 24"
|
|
130
|
+
>
|
|
131
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
132
|
+
</svg>
|
|
133
|
+
</button>
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
<!-- Body -->
|
|
137
|
+
<div class="max-h-[60vh] overflow-y-auto px-6 py-4">
|
|
138
|
+
<div
|
|
139
|
+
v-for="(group, gi) in filteredGroups"
|
|
140
|
+
:key="gi"
|
|
141
|
+
:class="[
|
|
142
|
+
'pb-4',
|
|
143
|
+
gi < filteredGroups.length - 1 && 'mb-4 border-b',
|
|
144
|
+
escDark ? 'border-[var(--esc-panel-border)]' : 'border-gray-100',
|
|
145
|
+
]"
|
|
146
|
+
>
|
|
147
|
+
<h3
|
|
148
|
+
:class="[
|
|
149
|
+
'mb-3 text-xs font-semibold uppercase tracking-wider',
|
|
150
|
+
escDark ? 'text-[var(--esc-panel-text-muted)]' : 'text-gray-500',
|
|
151
|
+
]"
|
|
152
|
+
>
|
|
153
|
+
{{ group.title }}
|
|
154
|
+
</h3>
|
|
155
|
+
<div class="space-y-2">
|
|
156
|
+
<div
|
|
157
|
+
v-for="(shortcut, si) in group.shortcuts"
|
|
158
|
+
:key="si"
|
|
159
|
+
class="flex items-center justify-between"
|
|
160
|
+
>
|
|
161
|
+
<span
|
|
162
|
+
:class="[
|
|
163
|
+
'text-sm',
|
|
164
|
+
escDark ? 'text-[var(--esc-panel-text-secondary)]' : 'text-gray-700',
|
|
165
|
+
]"
|
|
166
|
+
>
|
|
167
|
+
{{ shortcut.description }}
|
|
168
|
+
</span>
|
|
169
|
+
<div class="flex items-center gap-1">
|
|
170
|
+
<kbd
|
|
171
|
+
v-for="(key, ki) in shortcut.keys"
|
|
172
|
+
:key="ki"
|
|
173
|
+
:class="[
|
|
174
|
+
'inline-flex min-w-[24px] items-center justify-center rounded-md border px-2 py-0.5 text-xs font-semibold',
|
|
175
|
+
escDark
|
|
176
|
+
? 'border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-hover)] text-[var(--esc-panel-text-secondary)]'
|
|
177
|
+
: 'border-gray-300 bg-gray-100 text-gray-700',
|
|
178
|
+
]"
|
|
179
|
+
>
|
|
180
|
+
{{ key }}
|
|
181
|
+
</kbd>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
|
|
188
|
+
<!-- Footer -->
|
|
189
|
+
<div
|
|
190
|
+
:class="[
|
|
191
|
+
'border-t px-6 py-3 text-center text-xs',
|
|
192
|
+
escDark
|
|
193
|
+
? 'border-[var(--esc-panel-border)] text-[var(--esc-panel-text-muted)]'
|
|
194
|
+
: 'border-gray-100 text-gray-400',
|
|
195
|
+
]"
|
|
196
|
+
>
|
|
197
|
+
Press
|
|
198
|
+
<kbd
|
|
199
|
+
:class="[
|
|
200
|
+
'mx-1 inline-flex items-center rounded border px-1.5 py-0.5 text-[10px] font-semibold',
|
|
201
|
+
escDark
|
|
202
|
+
? 'border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-hover)] text-[var(--esc-panel-text-tertiary)]'
|
|
203
|
+
: 'border-gray-300 bg-gray-100 text-gray-600',
|
|
204
|
+
]"
|
|
205
|
+
>Esc</kbd
|
|
206
|
+
>
|
|
207
|
+
to close
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
</div>
|
|
211
|
+
</Transition>
|
|
212
|
+
</Teleport>
|
|
213
|
+
</template>
|