@antelopejs/dms-saas 0.1.7 → 0.1.8
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.
|
@@ -132,7 +132,9 @@ onMounted(load)
|
|
|
132
132
|
v-else-if="isVisible"
|
|
133
133
|
v-model:open="isOpen"
|
|
134
134
|
:content="popoverPlacement"
|
|
135
|
-
:ui="{
|
|
135
|
+
:ui="{
|
|
136
|
+
content: 'rounded-none border-0 bg-transparent p-0 shadow-none ring-0',
|
|
137
|
+
}"
|
|
136
138
|
>
|
|
137
139
|
<UTooltip
|
|
138
140
|
:text="triggerLabel"
|
|
@@ -141,29 +143,58 @@ onMounted(load)
|
|
|
141
143
|
>
|
|
142
144
|
<button
|
|
143
145
|
type="button"
|
|
144
|
-
class="
|
|
145
|
-
:class="
|
|
146
|
+
class="border-default bg-elevated text-highlighted hover:border-accented flex items-center gap-2.5 rounded-md border text-left transition-colors duration-150"
|
|
147
|
+
:class="
|
|
148
|
+
collapsed ? 'size-9 justify-center p-1' : 'w-full px-2.5 py-[9px]'
|
|
149
|
+
"
|
|
146
150
|
:aria-label="$t('saas.workspaces.switcher_title')"
|
|
147
151
|
>
|
|
148
|
-
<span
|
|
152
|
+
<span
|
|
153
|
+
class="from-primary-500 to-primary-600 bg-linear-to-br inline-flex size-[26px] shrink-0 items-center justify-center rounded-md text-[13px] font-bold text-white"
|
|
154
|
+
>
|
|
149
155
|
<template v-if="current">{{ initialOf(current.name) }}</template>
|
|
150
|
-
<svg
|
|
156
|
+
<svg
|
|
157
|
+
v-if="!current"
|
|
158
|
+
class="size-4"
|
|
159
|
+
viewBox="0 0 24 24"
|
|
160
|
+
fill="none"
|
|
161
|
+
stroke="currentColor"
|
|
162
|
+
stroke-width="1.8"
|
|
163
|
+
stroke-linecap="round"
|
|
164
|
+
stroke-linejoin="round"
|
|
165
|
+
aria-hidden="true"
|
|
166
|
+
>
|
|
151
167
|
<path
|
|
152
168
|
d="M3 21h18M5 21V5l7-3 7 3v16M9 9h.01M15 9h.01M9 13h.01M15 13h.01M9 17h.01M15 17h.01"
|
|
153
169
|
/>
|
|
154
170
|
</svg>
|
|
155
171
|
</span>
|
|
156
172
|
<template v-if="!collapsed">
|
|
157
|
-
<span class="min-w-0 flex-1">
|
|
158
|
-
<span
|
|
173
|
+
<span class="flex min-w-0 flex-1 flex-col leading-[1.25]">
|
|
174
|
+
<span
|
|
175
|
+
class="text-primary font-mono text-[10px] uppercase tracking-[0.08em]"
|
|
176
|
+
>
|
|
159
177
|
{{ triggerCaption }}
|
|
160
178
|
</span>
|
|
161
|
-
<span
|
|
179
|
+
<span
|
|
180
|
+
class="text-highlighted overflow-hidden text-ellipsis whitespace-nowrap text-[13.5px] font-semibold tracking-[-0.01em]"
|
|
181
|
+
>
|
|
162
182
|
{{ triggerLabel }}
|
|
163
183
|
</span>
|
|
164
184
|
</span>
|
|
165
|
-
<span
|
|
166
|
-
|
|
185
|
+
<span
|
|
186
|
+
class="text-dimmed ml-auto inline-flex size-4 shrink-0"
|
|
187
|
+
aria-hidden="true"
|
|
188
|
+
>
|
|
189
|
+
<svg
|
|
190
|
+
class="h-full w-full"
|
|
191
|
+
viewBox="0 0 24 24"
|
|
192
|
+
fill="none"
|
|
193
|
+
stroke="currentColor"
|
|
194
|
+
stroke-width="1.8"
|
|
195
|
+
stroke-linecap="round"
|
|
196
|
+
stroke-linejoin="round"
|
|
197
|
+
>
|
|
167
198
|
<path d="m7 15 5 5 5-5" />
|
|
168
199
|
<path d="m7 9 5-5 5 5" />
|
|
169
200
|
</svg>
|
|
@@ -173,14 +204,16 @@ onMounted(load)
|
|
|
173
204
|
</UTooltip>
|
|
174
205
|
|
|
175
206
|
<template #content>
|
|
176
|
-
<div
|
|
177
|
-
|
|
207
|
+
<div
|
|
208
|
+
class="border-accented bg-elevated flex w-56 flex-col gap-0.5 rounded-lg border p-[5px] shadow-lg"
|
|
209
|
+
>
|
|
210
|
+
<p class="text-dimmed m-0 px-[9px] pb-[3px] pt-[5px] text-[10.5px]">
|
|
178
211
|
{{ $t('saas.workspaces.switcher_title') }}
|
|
179
212
|
</p>
|
|
180
213
|
<input
|
|
181
214
|
v-if="showSearch"
|
|
182
215
|
v-model="searchQuery"
|
|
183
|
-
class="
|
|
216
|
+
class="border-accented bg-default text-highlighted w-full rounded-md border px-2 py-1.5 text-xs"
|
|
184
217
|
type="search"
|
|
185
218
|
:placeholder="$t('saas.workspaces.select')"
|
|
186
219
|
/>
|
|
@@ -191,53 +224,68 @@ onMounted(load)
|
|
|
191
224
|
<li v-for="workspace in filtered" :key="workspace._id">
|
|
192
225
|
<button
|
|
193
226
|
type="button"
|
|
194
|
-
class="
|
|
195
|
-
:class="
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
227
|
+
class="hover:bg-accented hover:text-highlighted flex w-full items-center gap-[9px] rounded-md border-0 px-[9px] py-2 text-left text-[13px]"
|
|
228
|
+
:class="[
|
|
229
|
+
workspace.isCurrent
|
|
230
|
+
? 'bg-primary/12 text-highlighted'
|
|
231
|
+
: 'text-muted bg-transparent',
|
|
232
|
+
{ 'cursor-default': workspace.isCurrent || !!switchingId },
|
|
233
|
+
]"
|
|
199
234
|
@click="selectWorkspace(workspace)"
|
|
200
235
|
>
|
|
201
|
-
<span
|
|
236
|
+
<span
|
|
237
|
+
class="from-primary-500 to-primary-600 bg-linear-to-br inline-flex size-[22px] shrink-0 items-center justify-center rounded-[5px] text-[11px] font-bold text-white"
|
|
238
|
+
>
|
|
202
239
|
{{ initialOf(workspace.name) }}
|
|
203
240
|
</span>
|
|
204
241
|
<span
|
|
205
|
-
class="
|
|
206
|
-
:class="{
|
|
207
|
-
'workspace-switcher-row-name--current': workspace.isCurrent,
|
|
208
|
-
}"
|
|
242
|
+
class="min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap"
|
|
243
|
+
:class="{ 'text-highlighted': workspace.isCurrent }"
|
|
209
244
|
>
|
|
210
245
|
{{ workspace.name }}
|
|
211
246
|
</span>
|
|
212
247
|
<span
|
|
213
248
|
v-if="workspace.planName"
|
|
214
|
-
class="
|
|
249
|
+
class="text-primary shrink-0 whitespace-nowrap font-mono text-[9.5px] uppercase tracking-[0.08em]"
|
|
215
250
|
>
|
|
216
251
|
{{ workspace.planName }}
|
|
217
252
|
</span>
|
|
218
253
|
<span
|
|
219
254
|
v-if="switchingId === workspace._id"
|
|
220
|
-
class="
|
|
255
|
+
class="border-(--ui-text-dimmed) border-t-primary size-3.5 shrink-0 animate-spin rounded-full border-2 [animation-duration:700ms]"
|
|
221
256
|
aria-hidden="true"
|
|
222
257
|
/>
|
|
223
258
|
<span
|
|
224
259
|
v-else-if="workspace.isCurrent"
|
|
225
|
-
class="
|
|
260
|
+
class="text-primary inline-flex size-4 shrink-0"
|
|
226
261
|
aria-hidden="true"
|
|
227
262
|
>
|
|
228
|
-
<svg
|
|
263
|
+
<svg
|
|
264
|
+
class="h-full w-full"
|
|
265
|
+
viewBox="0 0 24 24"
|
|
266
|
+
fill="none"
|
|
267
|
+
stroke="currentColor"
|
|
268
|
+
stroke-width="1.8"
|
|
269
|
+
stroke-linecap="round"
|
|
270
|
+
stroke-linejoin="round"
|
|
271
|
+
>
|
|
272
|
+
<path d="m4 12 5 5L20 6" />
|
|
273
|
+
</svg>
|
|
229
274
|
</span>
|
|
230
275
|
</button>
|
|
231
276
|
</li>
|
|
232
277
|
</ul>
|
|
233
|
-
<p
|
|
278
|
+
<p
|
|
279
|
+
v-else-if="workspaces.length"
|
|
280
|
+
class="text-dimmed m-0 px-[9px] py-2 text-[13px]"
|
|
281
|
+
>
|
|
234
282
|
{{ $t('saas.workspaces.no_results') }}
|
|
235
283
|
</p>
|
|
236
|
-
<div v-if="workspaces.length" class="
|
|
284
|
+
<div v-if="workspaces.length" class="bg-border mx-0.5 my-1 h-px" />
|
|
237
285
|
<button
|
|
238
286
|
v-if="canCreateWorkspace"
|
|
239
287
|
type="button"
|
|
240
|
-
class="
|
|
288
|
+
class="text-primary w-full justify-start border-0 bg-transparent px-[9px] py-2 text-left text-[13px]"
|
|
241
289
|
@click="openCreateModal"
|
|
242
290
|
>
|
|
243
291
|
+ {{ $t('saas.workspaces.create.button') }}
|
|
@@ -256,242 +304,3 @@ onMounted(load)
|
|
|
256
304
|
</template>
|
|
257
305
|
</UModal>
|
|
258
306
|
</template>
|
|
259
|
-
|
|
260
|
-
<style scoped>
|
|
261
|
-
:global(.workspace-switcher-popover) {
|
|
262
|
-
padding: 0;
|
|
263
|
-
border: 0;
|
|
264
|
-
border-radius: 0;
|
|
265
|
-
background: transparent;
|
|
266
|
-
box-shadow: none;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.workspace-switcher-trigger {
|
|
270
|
-
display: flex;
|
|
271
|
-
align-items: center;
|
|
272
|
-
gap: 10px;
|
|
273
|
-
width: 100%;
|
|
274
|
-
padding: 9px 10px;
|
|
275
|
-
border: 1px solid rgba(120, 140, 200, 0.1);
|
|
276
|
-
border-radius: 6px;
|
|
277
|
-
background: #15151b;
|
|
278
|
-
color: #f1f1f3;
|
|
279
|
-
text-align: left;
|
|
280
|
-
transition: border-color 150ms ease;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
.workspace-switcher-trigger:hover {
|
|
284
|
-
border-color: rgba(140, 160, 220, 0.18);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.workspace-switcher-trigger--collapsed {
|
|
288
|
-
width: 36px;
|
|
289
|
-
height: 36px;
|
|
290
|
-
justify-content: center;
|
|
291
|
-
padding: 4px;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.workspace-switcher-avatar,
|
|
295
|
-
.workspace-switcher-row-avatar {
|
|
296
|
-
display: inline-flex;
|
|
297
|
-
flex-shrink: 0;
|
|
298
|
-
align-items: center;
|
|
299
|
-
justify-content: center;
|
|
300
|
-
color: #fff;
|
|
301
|
-
font-weight: 700;
|
|
302
|
-
background: linear-gradient(135deg, #8b5cf6, #7c3aed);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.workspace-switcher-avatar {
|
|
306
|
-
width: 26px;
|
|
307
|
-
height: 26px;
|
|
308
|
-
border-radius: 6px;
|
|
309
|
-
font-size: 13px;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
.workspace-switcher-avatar svg,
|
|
313
|
-
.workspace-switcher-chevron svg,
|
|
314
|
-
.workspace-switcher-check svg {
|
|
315
|
-
width: 100%;
|
|
316
|
-
height: 100%;
|
|
317
|
-
fill: none;
|
|
318
|
-
stroke: currentColor;
|
|
319
|
-
stroke-linecap: round;
|
|
320
|
-
stroke-linejoin: round;
|
|
321
|
-
stroke-width: 1.8;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.workspace-switcher-avatar svg {
|
|
325
|
-
width: 16px;
|
|
326
|
-
height: 16px;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.workspace-switcher-trigger:not(.workspace-switcher-trigger--collapsed)
|
|
330
|
-
> span:nth-child(2) {
|
|
331
|
-
display: flex;
|
|
332
|
-
min-width: 0;
|
|
333
|
-
flex-direction: column;
|
|
334
|
-
line-height: 1.25;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.workspace-switcher-plan,
|
|
338
|
-
.workspace-switcher-row-plan {
|
|
339
|
-
color: #a78bfa;
|
|
340
|
-
font-family: 'JetBrains Mono', ui-monospace, monospace;
|
|
341
|
-
letter-spacing: 0.08em;
|
|
342
|
-
text-transform: uppercase;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.workspace-switcher-plan {
|
|
346
|
-
font-size: 10px;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.workspace-switcher-name {
|
|
350
|
-
overflow: hidden;
|
|
351
|
-
color: #f1f1f3;
|
|
352
|
-
font-family: 'Space Grotesk', Inter, ui-sans-serif, sans-serif;
|
|
353
|
-
font-size: 13.5px;
|
|
354
|
-
font-weight: 600;
|
|
355
|
-
letter-spacing: -0.01em;
|
|
356
|
-
text-overflow: ellipsis;
|
|
357
|
-
white-space: nowrap;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
.workspace-switcher-chevron {
|
|
361
|
-
display: inline-flex;
|
|
362
|
-
width: 16px;
|
|
363
|
-
height: 16px;
|
|
364
|
-
margin-left: auto;
|
|
365
|
-
flex-shrink: 0;
|
|
366
|
-
color: #71717a;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.workspace-switcher-menu {
|
|
370
|
-
display: flex;
|
|
371
|
-
width: 224px;
|
|
372
|
-
flex-direction: column;
|
|
373
|
-
gap: 2px;
|
|
374
|
-
padding: 5px;
|
|
375
|
-
border: 1px solid rgba(140, 160, 220, 0.18);
|
|
376
|
-
border-radius: 8px;
|
|
377
|
-
background: #15151b;
|
|
378
|
-
box-shadow: 0 16px 48px -16px rgb(0 0 0 / 70%);
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.workspace-switcher-menu-title,
|
|
382
|
-
.workspace-switcher-empty {
|
|
383
|
-
color: #71717a;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.workspace-switcher-menu-title {
|
|
387
|
-
margin: 0;
|
|
388
|
-
padding: 5px 9px 3px;
|
|
389
|
-
font-size: 10.5px;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
.workspace-switcher-search {
|
|
393
|
-
width: 100%;
|
|
394
|
-
padding: 6px 8px;
|
|
395
|
-
border: 1px solid rgba(140, 160, 220, 0.18);
|
|
396
|
-
border-radius: 6px;
|
|
397
|
-
background: #0a0b12;
|
|
398
|
-
color: #f1f1f3;
|
|
399
|
-
font-size: 12px;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.workspace-switcher-row {
|
|
403
|
-
display: flex;
|
|
404
|
-
width: 100%;
|
|
405
|
-
align-items: center;
|
|
406
|
-
gap: 9px;
|
|
407
|
-
padding: 8px 9px;
|
|
408
|
-
border: 0;
|
|
409
|
-
border-radius: 6px;
|
|
410
|
-
background: transparent;
|
|
411
|
-
color: #9b9ba4;
|
|
412
|
-
font-size: 13px;
|
|
413
|
-
text-align: left;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.workspace-switcher-row:hover {
|
|
417
|
-
background: #1f1f24;
|
|
418
|
-
color: #f1f1f3;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
.workspace-switcher-row--current {
|
|
422
|
-
background: color-mix(in oklab, #8b5cf6 12%, transparent);
|
|
423
|
-
color: #f1f1f3;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
.workspace-switcher-row-avatar {
|
|
427
|
-
width: 22px;
|
|
428
|
-
height: 22px;
|
|
429
|
-
border-radius: 5px;
|
|
430
|
-
font-size: 11px;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.workspace-switcher-row-name {
|
|
434
|
-
min-width: 0;
|
|
435
|
-
flex: 1;
|
|
436
|
-
overflow: hidden;
|
|
437
|
-
text-overflow: ellipsis;
|
|
438
|
-
white-space: nowrap;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.workspace-switcher-row-name--current {
|
|
442
|
-
color: #f1f1f3;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.workspace-switcher-row-plan {
|
|
446
|
-
flex-shrink: 0;
|
|
447
|
-
font-size: 9.5px;
|
|
448
|
-
white-space: nowrap;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
.workspace-switcher-check {
|
|
452
|
-
display: inline-flex;
|
|
453
|
-
width: 16px;
|
|
454
|
-
height: 16px;
|
|
455
|
-
flex-shrink: 0;
|
|
456
|
-
color: #a78bfa;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
.workspace-switcher-spinner {
|
|
460
|
-
width: 14px;
|
|
461
|
-
height: 14px;
|
|
462
|
-
flex-shrink: 0;
|
|
463
|
-
border: 2px solid #71717a;
|
|
464
|
-
border-top-color: #a78bfa;
|
|
465
|
-
border-radius: 50%;
|
|
466
|
-
animation: workspace-switcher-spin 700ms linear infinite;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
.workspace-switcher-separator {
|
|
470
|
-
height: 1px;
|
|
471
|
-
margin: 4px 2px;
|
|
472
|
-
background: rgba(120, 140, 200, 0.06);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.workspace-switcher-create {
|
|
476
|
-
justify-content: flex-start;
|
|
477
|
-
width: 100%;
|
|
478
|
-
padding: 8px 9px;
|
|
479
|
-
border: 0;
|
|
480
|
-
background: transparent;
|
|
481
|
-
color: #a78bfa;
|
|
482
|
-
font-size: 13px;
|
|
483
|
-
text-align: left;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
.workspace-switcher-empty {
|
|
487
|
-
margin: 0;
|
|
488
|
-
padding: 8px 9px;
|
|
489
|
-
font-size: 13px;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
@keyframes workspace-switcher-spin {
|
|
493
|
-
to {
|
|
494
|
-
transform: rotate(360deg);
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
</style>
|