@open-slide/core 1.13.6 → 1.15.0
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/dist/{build-OAZ8maw5.js → build-BsaslS8C.js} +1 -1
- package/dist/cli/bin.js +3 -3
- package/dist/{config-CU_NISD6.js → config-BOc3-oDV.js} +38 -3
- package/dist/{config-CvzwK0tq.d.ts → config-CE2sKgqH.d.ts} +1 -1
- package/dist/dev-BU7OY0ai.js +94 -0
- package/dist/{format-CXtO6ORA.js → format-afijk371.js} +140 -8
- package/dist/index.d.ts +7 -7
- package/dist/index.js +4 -2
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +1 -1
- package/dist/{preview-DZLZ3L9v.js → preview-DbL7Wt77.js} +1 -1
- package/dist/{types-DucrShh9.d.ts → types-GA4ekcYB.d.ts} +37 -0
- package/dist/vite/index.d.ts +2 -2
- package/dist/vite/index.js +1 -1
- package/package.json +2 -2
- package/src/app/components/asset-view.tsx +762 -63
- package/src/app/components/inspector/image-crop-dialog.tsx +3 -3
- package/src/app/components/inspector/inspect-overlay.tsx +44 -32
- package/src/app/components/inspector/inspector-panel.tsx +31 -26
- package/src/app/components/language-toggle.tsx +1 -1
- package/src/app/components/overview-grid.tsx +14 -12
- package/src/app/components/present/control-bar.tsx +24 -21
- package/src/app/components/present/progress-bar.tsx +1 -1
- package/src/app/components/sidebar/folder-item.tsx +26 -22
- package/src/app/components/sidebar/icon-picker.tsx +8 -8
- package/src/app/components/sidebar/sidebar-footer.tsx +100 -31
- package/src/app/components/sidebar/sidebar.tsx +22 -18
- package/src/app/components/style-panel/style-panel.tsx +8 -4
- package/src/app/components/theme-toggle.tsx +3 -3
- package/src/app/components/themes/theme-detail.tsx +2 -2
- package/src/app/components/themes/themes-gallery.tsx +1 -1
- package/src/app/components/thumbnail-rail-scroll.test.ts +60 -0
- package/src/app/components/thumbnail-rail-scroll.ts +33 -0
- package/src/app/components/thumbnail-rail.tsx +235 -66
- package/src/app/components/ui/badge.tsx +16 -13
- package/src/app/components/ui/button.tsx +4 -10
- package/src/app/components/ui/context-menu.tsx +46 -36
- package/src/app/components/ui/dialog.tsx +11 -13
- package/src/app/components/ui/dropdown-menu.tsx +59 -37
- package/src/app/components/ui/label.tsx +2 -5
- package/src/app/components/ui/popover.tsx +25 -18
- package/src/app/components/ui/progress.tsx +8 -6
- package/src/app/components/ui/scroll-area.tsx +5 -5
- package/src/app/components/ui/select.tsx +40 -41
- package/src/app/components/ui/separator.tsx +3 -5
- package/src/app/components/ui/slider.tsx +25 -18
- package/src/app/components/ui/tabs.tsx +8 -8
- package/src/app/components/ui/toggle-group.tsx +8 -7
- package/src/app/components/ui/toggle.tsx +5 -5
- package/src/app/components/ui/tooltip.tsx +39 -22
- package/src/app/lib/asset-filter.test.ts +176 -0
- package/src/app/lib/asset-filter.ts +80 -0
- package/src/app/lib/assets.ts +19 -4
- package/src/app/routes/home-shell.tsx +24 -20
- package/src/app/routes/home.tsx +48 -42
- package/src/app/routes/presenter.tsx +1 -1
- package/src/app/routes/slide.tsx +54 -47
- package/src/app/styles.css +86 -110
- package/src/locale/en.ts +34 -1
- package/src/locale/ja.ts +34 -2
- package/src/locale/types.ts +37 -0
- package/src/locale/zh-cn.ts +34 -1
- package/src/locale/zh-tw.ts +34 -1
- package/dist/dev-C78J1TLR.js +0 -20
|
@@ -79,9 +79,9 @@ export function ImageCropDialog({
|
|
|
79
79
|
</DialogHeader>
|
|
80
80
|
<div className="flex justify-center">
|
|
81
81
|
<ToggleGroup
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
value={[fit]}
|
|
83
|
+
onValueChange={(value) => {
|
|
84
|
+
const v = value[0];
|
|
85
85
|
if (v === 'cover' || v === 'contain') setFit(v);
|
|
86
86
|
}}
|
|
87
87
|
variant="outline"
|
|
@@ -35,9 +35,7 @@ export function InspectOverlay() {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
const onMove = (e: PointerEvent) => {
|
|
38
|
-
if (e.target
|
|
39
|
-
return setHover(null);
|
|
40
|
-
}
|
|
38
|
+
if (!isInspectableEventTarget(e.target)) return setHover(null);
|
|
41
39
|
const el = pickInspectorTarget(pickElement(e.clientX, e.clientY));
|
|
42
40
|
if (!el) return setHover(null);
|
|
43
41
|
const hit = findSlideSource(el, slideId, { hostOnly: true });
|
|
@@ -46,7 +44,7 @@ export function InspectOverlay() {
|
|
|
46
44
|
};
|
|
47
45
|
|
|
48
46
|
const onClick = (e: MouseEvent) => {
|
|
49
|
-
if (e.target
|
|
47
|
+
if (!isInspectableEventTarget(e.target)) return;
|
|
50
48
|
const el = pickInspectorTarget(pickElement(e.clientX, e.clientY));
|
|
51
49
|
if (!el) return;
|
|
52
50
|
const hit = findSlideSource(el, slideId, { hostOnly: true });
|
|
@@ -58,7 +56,7 @@ export function InspectOverlay() {
|
|
|
58
56
|
};
|
|
59
57
|
|
|
60
58
|
const onDblClick = (e: MouseEvent) => {
|
|
61
|
-
if (e.target
|
|
59
|
+
if (!isInspectableEventTarget(e.target)) return;
|
|
62
60
|
const el = pickInspectorTarget(pickElement(e.clientX, e.clientY));
|
|
63
61
|
if (!el) return;
|
|
64
62
|
const hit = findSlideSource(el, slideId, { hostOnly: true });
|
|
@@ -243,7 +241,7 @@ function ImageActionPanel({
|
|
|
243
241
|
const { openCrop, openReplace } = useInspector();
|
|
244
242
|
const t = useLocale();
|
|
245
243
|
return (
|
|
246
|
-
<TooltipProvider
|
|
244
|
+
<TooltipProvider delay={200}>
|
|
247
245
|
<div
|
|
248
246
|
className={cn(
|
|
249
247
|
'absolute flex items-center gap-0.5 rounded-[8px] border border-border bg-popover p-1 text-popover-foreground shadow-floating',
|
|
@@ -258,37 +256,41 @@ function ImageActionPanel({
|
|
|
258
256
|
}}
|
|
259
257
|
>
|
|
260
258
|
<Tooltip>
|
|
261
|
-
<TooltipTrigger
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
e
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
259
|
+
<TooltipTrigger
|
|
260
|
+
render={
|
|
261
|
+
<button
|
|
262
|
+
type="button"
|
|
263
|
+
aria-label={t.inspector.replace}
|
|
264
|
+
onClick={(e) => {
|
|
265
|
+
e.stopPropagation();
|
|
266
|
+
openReplace(anchor);
|
|
267
|
+
}}
|
|
268
|
+
className="inline-flex size-7 items-center justify-center rounded-[5px] text-foreground/85 transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40"
|
|
269
|
+
>
|
|
270
|
+
<ImageIcon className="size-3.5" />
|
|
271
|
+
</button>
|
|
272
|
+
}
|
|
273
|
+
/>
|
|
274
274
|
<TooltipContent side="bottom" data-inspector-ui>
|
|
275
275
|
{t.inspector.replace}
|
|
276
276
|
</TooltipContent>
|
|
277
277
|
</Tooltip>
|
|
278
278
|
<Tooltip>
|
|
279
|
-
<TooltipTrigger
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
e
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
279
|
+
<TooltipTrigger
|
|
280
|
+
render={
|
|
281
|
+
<button
|
|
282
|
+
type="button"
|
|
283
|
+
aria-label={t.inspector.crop}
|
|
284
|
+
onClick={(e) => {
|
|
285
|
+
e.stopPropagation();
|
|
286
|
+
openCrop(anchor as HTMLImageElement);
|
|
287
|
+
}}
|
|
288
|
+
className="inline-flex size-7 items-center justify-center rounded-[5px] text-foreground/85 transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40"
|
|
289
|
+
>
|
|
290
|
+
<Crop className="size-3.5" />
|
|
291
|
+
</button>
|
|
292
|
+
}
|
|
293
|
+
/>
|
|
292
294
|
<TooltipContent side="bottom" data-inspector-ui>
|
|
293
295
|
{t.inspector.crop}
|
|
294
296
|
</TooltipContent>
|
|
@@ -308,6 +310,16 @@ function sameRect(a: RelRect | null, b: RelRect): boolean {
|
|
|
308
310
|
);
|
|
309
311
|
}
|
|
310
312
|
|
|
313
|
+
// Only inspect events that originate inside the slide root. Portaled UI
|
|
314
|
+
// (dialogs, tooltips, toasts) mounts on `document.body`, outside the root;
|
|
315
|
+
// without this guard the capture-phase window listeners swallow clicks
|
|
316
|
+
// meant for a dialog and select the slide element behind it instead.
|
|
317
|
+
function isInspectableEventTarget(target: EventTarget | null): boolean {
|
|
318
|
+
if (!(target instanceof Element)) return false;
|
|
319
|
+
if (target.closest('[data-inspector-ui]')) return false;
|
|
320
|
+
return !!target.closest('[data-inspector-root]');
|
|
321
|
+
}
|
|
322
|
+
|
|
311
323
|
function pickElement(x: number, y: number): HTMLElement | null {
|
|
312
324
|
const stack = document.elementsFromPoint(x, y);
|
|
313
325
|
for (const el of stack) {
|
|
@@ -449,7 +449,7 @@ function FontSizeField({
|
|
|
449
449
|
max={200}
|
|
450
450
|
step={1}
|
|
451
451
|
value={[snapshot.fontSize]}
|
|
452
|
-
onValueChange={(
|
|
452
|
+
onValueChange={(v) => set((Array.isArray(v) ? v[0] : v) ?? snapshot.fontSize)}
|
|
453
453
|
className="flex-1"
|
|
454
454
|
/>
|
|
455
455
|
<NumberField
|
|
@@ -486,6 +486,7 @@ function FontWeightField({
|
|
|
486
486
|
return (
|
|
487
487
|
<Field label={t.inspector.weightLabel}>
|
|
488
488
|
<Select
|
|
489
|
+
items={Object.fromEntries(weightOptions.map((opt) => [opt.value, opt.label]))}
|
|
489
490
|
value={String(snapshot.fontWeight)}
|
|
490
491
|
onValueChange={(value) => {
|
|
491
492
|
const n = Number(value);
|
|
@@ -568,7 +569,7 @@ function LineHeightField({
|
|
|
568
569
|
max={3}
|
|
569
570
|
step={0.05}
|
|
570
571
|
value={[v]}
|
|
571
|
-
onValueChange={(
|
|
572
|
+
onValueChange={(next) => set((Array.isArray(next) ? next[0] : next) ?? v)}
|
|
572
573
|
className="flex-1"
|
|
573
574
|
/>
|
|
574
575
|
<NumberField value={round2(v)} onChange={set} step={0.05} min={0.5} max={5} />
|
|
@@ -600,7 +601,9 @@ function LetterSpacingField({
|
|
|
600
601
|
max={20}
|
|
601
602
|
step={0.1}
|
|
602
603
|
value={[snapshot.letterSpacing]}
|
|
603
|
-
onValueChange={(
|
|
604
|
+
onValueChange={(next) =>
|
|
605
|
+
set((Array.isArray(next) ? next[0] : next) ?? snapshot.letterSpacing)
|
|
606
|
+
}
|
|
604
607
|
className="flex-1"
|
|
605
608
|
/>
|
|
606
609
|
<NumberField
|
|
@@ -633,17 +636,17 @@ function TextAlignField({
|
|
|
633
636
|
return (
|
|
634
637
|
<Field label={t.inspector.alignLabel}>
|
|
635
638
|
<ToggleGroup
|
|
636
|
-
type="single"
|
|
637
639
|
size="sm"
|
|
638
640
|
variant="outline"
|
|
639
|
-
value={snapshot.textAlign}
|
|
641
|
+
value={[snapshot.textAlign]}
|
|
640
642
|
onValueChange={(value) => {
|
|
641
|
-
|
|
643
|
+
const next = value[0];
|
|
644
|
+
if (!next) return;
|
|
642
645
|
apply([
|
|
643
646
|
{
|
|
644
647
|
kind: 'set-style',
|
|
645
648
|
key: 'textAlign',
|
|
646
|
-
value:
|
|
649
|
+
value: next === 'left' ? null : next,
|
|
647
650
|
},
|
|
648
651
|
]);
|
|
649
652
|
}}
|
|
@@ -842,26 +845,28 @@ function AgentWatchingBadge() {
|
|
|
842
845
|
const t = useLocale();
|
|
843
846
|
const connected = useAgentSocketConnected();
|
|
844
847
|
return (
|
|
845
|
-
<TooltipProvider
|
|
848
|
+
<TooltipProvider delay={200}>
|
|
846
849
|
<Tooltip>
|
|
847
|
-
<TooltipTrigger
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
850
|
+
<TooltipTrigger
|
|
851
|
+
render={
|
|
852
|
+
<button
|
|
853
|
+
type="button"
|
|
854
|
+
className="flex shrink-0 cursor-help items-center gap-1.5 rounded-[3px] border border-hairline bg-card px-1.5 py-px text-[10.5px] text-foreground/85 outline-none focus-visible:ring-2 focus-visible:ring-ring/30"
|
|
855
|
+
>
|
|
856
|
+
<span aria-hidden className="relative flex size-1.5 items-center justify-center">
|
|
857
|
+
{connected ? (
|
|
858
|
+
<>
|
|
859
|
+
<span className="absolute inline-flex size-full animate-ping rounded-full bg-emerald-500 opacity-60" />
|
|
860
|
+
<span className="relative inline-flex size-1.5 rounded-full bg-emerald-500" />
|
|
861
|
+
</>
|
|
862
|
+
) : (
|
|
863
|
+
<span className="relative inline-flex size-1.5 rounded-full bg-rose-500" />
|
|
864
|
+
)}
|
|
865
|
+
</span>
|
|
866
|
+
{connected ? t.inspector.agentWatching : t.inspector.agentNotWatching}
|
|
867
|
+
</button>
|
|
868
|
+
}
|
|
869
|
+
/>
|
|
865
870
|
<TooltipContent
|
|
866
871
|
side="bottom"
|
|
867
872
|
align="end"
|
|
@@ -130,7 +130,7 @@ export function OverviewGrid({
|
|
|
130
130
|
</div>
|
|
131
131
|
</div>
|
|
132
132
|
<div ref={gridRef} className="min-h-0 flex-1 overflow-auto px-8 pb-8">
|
|
133
|
-
<TooltipProvider
|
|
133
|
+
<TooltipProvider delay={200}>
|
|
134
134
|
<div
|
|
135
135
|
className="grid justify-center gap-5"
|
|
136
136
|
style={{
|
|
@@ -225,7 +225,7 @@ function OverviewThumb({
|
|
|
225
225
|
className={cn(
|
|
226
226
|
'relative w-full overflow-hidden rounded-[4px] ring-1 transition-shadow',
|
|
227
227
|
styles.thumbSurface,
|
|
228
|
-
isFocused ? 'ring-2 ring-[var(--brand,#
|
|
228
|
+
isFocused ? 'ring-2 ring-[var(--brand,#e5484d)]' : styles.thumbRing,
|
|
229
229
|
)}
|
|
230
230
|
style={{ height: THUMB_H }}
|
|
231
231
|
>
|
|
@@ -243,7 +243,7 @@ function OverviewThumb({
|
|
|
243
243
|
{isCurrent && (
|
|
244
244
|
<span
|
|
245
245
|
aria-hidden
|
|
246
|
-
className="pointer-events-none absolute top-1.5 right-1.5 rounded-[3px] bg-[var(--brand,#
|
|
246
|
+
className="pointer-events-none absolute top-1.5 right-1.5 rounded-[3px] bg-[var(--brand,#e5484d)] px-1.5 py-0.5 font-mono text-[9.5px] tracking-[0.06em] uppercase text-white"
|
|
247
247
|
>
|
|
248
248
|
{t.present.nowBadge}
|
|
249
249
|
</span>
|
|
@@ -296,15 +296,17 @@ function OverviewIndicator({
|
|
|
296
296
|
}) {
|
|
297
297
|
return (
|
|
298
298
|
<Tooltip>
|
|
299
|
-
<TooltipTrigger
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
299
|
+
<TooltipTrigger
|
|
300
|
+
render={
|
|
301
|
+
<span
|
|
302
|
+
role="img"
|
|
303
|
+
aria-label={label}
|
|
304
|
+
className={cn('flex size-4 items-center justify-center', className)}
|
|
305
|
+
>
|
|
306
|
+
<Icon className="size-3.5" strokeWidth={1.9} />
|
|
307
|
+
</span>
|
|
308
|
+
}
|
|
309
|
+
/>
|
|
308
310
|
<TooltipContent side="top" sideOffset={6} container={tooltipContainer ?? undefined}>
|
|
309
311
|
{label}
|
|
310
312
|
</TooltipContent>
|
|
@@ -86,7 +86,7 @@ export function PresentControlBar({
|
|
|
86
86
|
: 'translate-y-8 scale-90 opacity-0 blur-md',
|
|
87
87
|
)}
|
|
88
88
|
>
|
|
89
|
-
<TooltipProvider
|
|
89
|
+
<TooltipProvider delay={300}>
|
|
90
90
|
<TooltipContainerCtx.Provider value={tooltipContainer ?? null}>
|
|
91
91
|
<div
|
|
92
92
|
className={cn(
|
|
@@ -259,30 +259,33 @@ function BarButton({
|
|
|
259
259
|
const container = useContext(TooltipContainerCtx);
|
|
260
260
|
return (
|
|
261
261
|
<Tooltip>
|
|
262
|
-
<TooltipTrigger
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
event
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
262
|
+
<TooltipTrigger
|
|
263
|
+
render={
|
|
264
|
+
<button
|
|
265
|
+
type="button"
|
|
266
|
+
aria-label={label}
|
|
267
|
+
disabled={disabled}
|
|
268
|
+
onClick={(event) => {
|
|
269
|
+
event.stopPropagation();
|
|
270
|
+
onClick();
|
|
271
|
+
}}
|
|
272
|
+
className={cn(
|
|
273
|
+
'inline-flex size-8 items-center justify-center rounded-full transition-colors',
|
|
274
|
+
'hover:bg-white/12 focus-visible:bg-white/12 focus-visible:outline-none',
|
|
275
|
+
'disabled:pointer-events-none disabled:opacity-30',
|
|
276
|
+
active && 'bg-[var(--brand,#e5484d)]/85 text-white hover:bg-[var(--brand,#e5484d)]',
|
|
277
|
+
)}
|
|
278
|
+
>
|
|
279
|
+
{children}
|
|
280
|
+
</button>
|
|
281
|
+
}
|
|
282
|
+
/>
|
|
283
|
+
|
|
281
284
|
<TooltipContent
|
|
282
285
|
container={container ?? undefined}
|
|
283
286
|
side="top"
|
|
284
287
|
sideOffset={6}
|
|
285
|
-
className="bg-black
|
|
288
|
+
className="bg-black text-white"
|
|
286
289
|
>
|
|
287
290
|
{label}
|
|
288
291
|
</TooltipContent>
|
|
@@ -18,7 +18,7 @@ export function PresentProgressBar({ index, total, visible }: Props) {
|
|
|
18
18
|
)}
|
|
19
19
|
>
|
|
20
20
|
<div
|
|
21
|
-
className="h-full w-full origin-left bg-[var(--brand,#
|
|
21
|
+
className="h-full w-full origin-left bg-[var(--brand,#e5484d)] transition-transform duration-200 ease-out"
|
|
22
22
|
style={{ transform: `scaleX(${pct})` }}
|
|
23
23
|
/>
|
|
24
24
|
</div>
|
|
@@ -173,16 +173,18 @@ export function FolderItem({
|
|
|
173
173
|
>
|
|
174
174
|
{row.kind === 'folder' && import.meta.env.DEV ? (
|
|
175
175
|
<Popover>
|
|
176
|
-
<PopoverTrigger
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
176
|
+
<PopoverTrigger
|
|
177
|
+
render={
|
|
178
|
+
<button
|
|
179
|
+
type="button"
|
|
180
|
+
className="flex size-5 shrink-0 items-center justify-center rounded transition-transform hover:scale-110"
|
|
181
|
+
aria-label={t.home.changeIcon}
|
|
182
|
+
onClick={(e) => e.stopPropagation()}
|
|
183
|
+
>
|
|
184
|
+
<FolderIconChip icon={icon} />
|
|
185
|
+
</button>
|
|
186
|
+
}
|
|
187
|
+
/>
|
|
186
188
|
<PopoverContent side="right" align="start" className="w-auto p-2">
|
|
187
189
|
<IconPicker value={row.folder.icon} onChange={(next) => row.onChangeIcon(next)} />
|
|
188
190
|
</PopoverContent>
|
|
@@ -233,19 +235,21 @@ export function FolderItem({
|
|
|
233
235
|
|
|
234
236
|
{row.kind === 'folder' && import.meta.env.DEV && (
|
|
235
237
|
<DropdownMenu>
|
|
236
|
-
<DropdownMenuTrigger
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
238
|
+
<DropdownMenuTrigger
|
|
239
|
+
render={
|
|
240
|
+
<button
|
|
241
|
+
type="button"
|
|
242
|
+
onClick={(e) => e.stopPropagation()}
|
|
243
|
+
className="absolute right-2 top-1/2 size-5 -translate-y-1/2 rounded opacity-0 transition-opacity hover:bg-foreground/10 group-hover:opacity-100 aria-expanded:opacity-100"
|
|
244
|
+
aria-label={t.home.folderActions}
|
|
245
|
+
>
|
|
246
|
+
<MoreHorizontal className="mx-auto size-3.5" />
|
|
247
|
+
</button>
|
|
248
|
+
}
|
|
249
|
+
/>
|
|
246
250
|
<DropdownMenuContent align="end" className="min-w-[140px]">
|
|
247
251
|
<DropdownMenuItem
|
|
248
|
-
|
|
252
|
+
onClick={() => {
|
|
249
253
|
setDraftName(row.folder.name);
|
|
250
254
|
setRenaming(true);
|
|
251
255
|
}}
|
|
@@ -253,7 +257,7 @@ export function FolderItem({
|
|
|
253
257
|
<Pencil />
|
|
254
258
|
{t.common.rename}
|
|
255
259
|
</DropdownMenuItem>
|
|
256
|
-
<DropdownMenuItem variant="destructive"
|
|
260
|
+
<DropdownMenuItem variant="destructive" onClick={() => row.onDelete()}>
|
|
257
261
|
<Trash2 />
|
|
258
262
|
{t.common.delete}
|
|
259
263
|
</DropdownMenuItem>
|
|
@@ -4,14 +4,14 @@ import type { FolderIcon } from '@/lib/sdk';
|
|
|
4
4
|
import { useLocale } from '@/lib/use-locale';
|
|
5
5
|
|
|
6
6
|
export const PRESET_COLORS = [
|
|
7
|
-
'#
|
|
8
|
-
'#
|
|
9
|
-
'#
|
|
10
|
-
'#
|
|
11
|
-
'#
|
|
12
|
-
'#
|
|
13
|
-
'#
|
|
14
|
-
'#
|
|
7
|
+
'#e5484d', // red
|
|
8
|
+
'#f76b15', // orange
|
|
9
|
+
'#ffb224', // amber
|
|
10
|
+
'#30a46c', // green
|
|
11
|
+
'#12a594', // teal
|
|
12
|
+
'#0091ff', // blue
|
|
13
|
+
'#6e56cf', // violet
|
|
14
|
+
'#60646c', // gray
|
|
15
15
|
];
|
|
16
16
|
|
|
17
17
|
export function IconPicker({
|