@lobb-js/studio 0.33.0 → 0.34.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/applyUITheme.d.ts +2 -0
- package/dist/{applyStudioTheme.js → applyUITheme.js} +4 -4
- package/dist/components/LlmButton.svelte +4 -2
- package/dist/components/LlmButton.svelte.d.ts +1 -0
- package/dist/components/Studio.svelte +15 -7
- package/dist/components/createManyButton.svelte +2 -2
- package/dist/components/dataTable/dataTable.svelte +1 -1
- package/dist/components/dataTable/dataTableTabs.svelte +1 -1
- package/dist/components/dataTable/filter.svelte +3 -2
- package/dist/components/dataTable/filterButton.svelte +1 -1
- package/dist/components/dataTable/footer.svelte +1 -1
- package/dist/components/dataTable/header.svelte +14 -21
- package/dist/components/dataTable/listViewChildren.svelte +1 -1
- package/dist/components/dataTable/sort.svelte +1 -1
- package/dist/components/dataTable/sortButton.svelte +1 -1
- package/dist/components/dataTable/table.svelte +4 -4
- package/dist/components/dataTablePopup/dataTablePopup.svelte +1 -1
- package/dist/components/detailView/create/createDetailView.svelte +2 -2
- package/dist/components/detailView/create/createDetailViewButton.svelte +2 -0
- package/dist/components/detailView/create/createDetailViewButton.svelte.d.ts +1 -0
- package/dist/components/detailView/create/createDetailViewChildren.svelte +3 -3
- package/dist/components/detailView/create/createManyView.svelte +2 -2
- package/dist/components/detailView/update/updateDetailView.svelte +2 -2
- package/dist/components/detailView/update/updateDetailViewButton.svelte +2 -0
- package/dist/components/detailView/update/updateDetailViewButton.svelte.d.ts +1 -0
- package/dist/components/detailView/update/updateDetailViewChildren.svelte +3 -3
- package/dist/components/drawer.svelte +2 -2
- package/dist/components/horizontalNav.svelte +85 -0
- package/dist/components/horizontalNav.svelte.d.ts +3 -0
- package/dist/components/importButton.svelte +6 -6
- package/dist/components/mainNav.svelte +15 -0
- package/dist/components/mainNav.svelte.d.ts +6 -0
- package/dist/components/mainNavShared.d.ts +10 -0
- package/dist/components/mainNavShared.js +62 -0
- package/dist/components/rangeCalendarButton.svelte +1 -2
- package/dist/components/routes/home.svelte +1 -1
- package/dist/components/routes/workflows/workflows.svelte +1 -1
- package/dist/components/setServerPage.svelte +1 -1
- package/dist/components/sidebar/sidebar.svelte +2 -2
- package/dist/components/sidebar/sidebarElements.svelte +3 -3
- package/dist/components/singletone.svelte +2 -2
- package/dist/components/ui/skeleton/skeleton.svelte +1 -1
- package/dist/components/ui/tooltip/tooltip-content.svelte +1 -1
- package/dist/components/verticalNav.svelte +174 -0
- package/dist/components/verticalNav.svelte.d.ts +3 -0
- package/dist/components/workflowEditor.svelte +2 -2
- package/dist/store.types.d.ts +4 -3
- package/package.json +2 -2
- package/src/app.css +52 -75
- package/src/lib/{applyStudioTheme.ts → applyUITheme.ts} +5 -5
- package/src/lib/components/LlmButton.svelte +4 -2
- package/src/lib/components/Studio.svelte +15 -7
- package/src/lib/components/createManyButton.svelte +2 -2
- package/src/lib/components/dataTable/dataTable.svelte +1 -1
- package/src/lib/components/dataTable/dataTableTabs.svelte +1 -1
- package/src/lib/components/dataTable/filter.svelte +3 -2
- package/src/lib/components/dataTable/filterButton.svelte +1 -1
- package/src/lib/components/dataTable/footer.svelte +1 -1
- package/src/lib/components/dataTable/header.svelte +14 -21
- package/src/lib/components/dataTable/listViewChildren.svelte +1 -1
- package/src/lib/components/dataTable/sort.svelte +1 -1
- package/src/lib/components/dataTable/sortButton.svelte +1 -1
- package/src/lib/components/dataTable/table.svelte +4 -4
- package/src/lib/components/dataTablePopup/dataTablePopup.svelte +1 -1
- package/src/lib/components/detailView/create/createDetailView.svelte +2 -2
- package/src/lib/components/detailView/create/createDetailViewButton.svelte +2 -0
- package/src/lib/components/detailView/create/createDetailViewChildren.svelte +3 -3
- package/src/lib/components/detailView/create/createManyView.svelte +2 -2
- package/src/lib/components/detailView/update/updateDetailView.svelte +2 -2
- package/src/lib/components/detailView/update/updateDetailViewButton.svelte +2 -0
- package/src/lib/components/detailView/update/updateDetailViewChildren.svelte +3 -3
- package/src/lib/components/drawer.svelte +2 -2
- package/src/lib/components/horizontalNav.svelte +85 -0
- package/src/lib/components/importButton.svelte +6 -6
- package/src/lib/components/mainNav.svelte +15 -0
- package/src/lib/components/mainNavShared.ts +67 -0
- package/src/lib/components/rangeCalendarButton.svelte +1 -2
- package/src/lib/components/routes/home.svelte +1 -1
- package/src/lib/components/routes/workflows/workflows.svelte +1 -1
- package/src/lib/components/setServerPage.svelte +1 -1
- package/src/lib/components/sidebar/sidebar.svelte +2 -2
- package/src/lib/components/sidebar/sidebarElements.svelte +3 -3
- package/src/lib/components/singletone.svelte +2 -2
- package/src/lib/components/ui/skeleton/skeleton.svelte +1 -1
- package/src/lib/components/ui/tooltip/tooltip-content.svelte +1 -1
- package/src/lib/components/verticalNav.svelte +174 -0
- package/src/lib/components/workflowEditor.svelte +2 -2
- package/src/lib/store.types.ts +2 -2
- package/dist/applyStudioTheme.d.ts +0 -2
- package/dist/components/miniSidebar.svelte +0 -300
- package/dist/components/miniSidebar.svelte.d.ts +0 -5
- package/src/lib/components/miniSidebar.svelte +0 -300
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { House, Layers, Library, Workflow } from "lucide-svelte";
|
|
2
|
+
import { emitEvent } from "../eventSystem";
|
|
3
|
+
import { getDashboardNavs } from "../extensions/extensionUtils";
|
|
4
|
+
|
|
5
|
+
export type NavItem = {
|
|
6
|
+
label: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
icon: any;
|
|
9
|
+
represents?: string;
|
|
10
|
+
onclick?: () => void;
|
|
11
|
+
navs?: NavItem[];
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
async function isItemVisible(lobb: any, ctx: any, item: NavItem): Promise<boolean> {
|
|
15
|
+
if (!item.represents) return true;
|
|
16
|
+
const res = await emitEvent({ lobb, ctx }, "auth.canAccess", {
|
|
17
|
+
collection: item.represents,
|
|
18
|
+
action: "read",
|
|
19
|
+
});
|
|
20
|
+
return res === true;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function buildNavSections(lobb: any, ctx: any): Promise<NavItem[][]> {
|
|
24
|
+
const rawSections: NavItem[][] = [
|
|
25
|
+
[
|
|
26
|
+
{ label: "Home", href: "/studio", icon: House },
|
|
27
|
+
{ label: "Collections", href: "/studio/collections", icon: Library },
|
|
28
|
+
{ label: "Data Model", href: "/studio/datamodel", icon: Layers, represents: "core_data_model" },
|
|
29
|
+
{ label: "Workflows", href: "/studio/workflows", icon: Workflow, represents: "core_workflows" },
|
|
30
|
+
],
|
|
31
|
+
[],
|
|
32
|
+
[],
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
const navs = getDashboardNavs(ctx);
|
|
36
|
+
if (navs.top) rawSections[0].push(...(navs.top as NavItem[]));
|
|
37
|
+
if (navs.middle) rawSections[1].push(...(navs.middle as NavItem[]));
|
|
38
|
+
if (navs.bottom) rawSections[2].push(...(navs.bottom as NavItem[]));
|
|
39
|
+
|
|
40
|
+
const result: NavItem[][] = [[], [], []];
|
|
41
|
+
for (let i = 0; i < rawSections.length; i++) {
|
|
42
|
+
for (const item of rawSections[i]) {
|
|
43
|
+
if (item.navs) {
|
|
44
|
+
const visibleChildren: NavItem[] = [];
|
|
45
|
+
for (const child of item.navs) {
|
|
46
|
+
if (await isItemVisible(lobb, ctx, child)) visibleChildren.push(child);
|
|
47
|
+
}
|
|
48
|
+
if (visibleChildren.length && (await isItemVisible(lobb, ctx, item))) {
|
|
49
|
+
result[i].push({ ...item, navs: visibleChildren });
|
|
50
|
+
}
|
|
51
|
+
} else if (await isItemVisible(lobb, ctx, item)) {
|
|
52
|
+
result[i].push(item);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return result;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function isItemActive(currentPath: string, item: NavItem): boolean {
|
|
60
|
+
if (item.navs) return item.navs.some((c) => isItemActive(currentPath, c));
|
|
61
|
+
if (!item.href) return false;
|
|
62
|
+
const itemHref = item.href.replace(/\/$/, "") || "/";
|
|
63
|
+
// "/studio" needs an exact match — it's a prefix of every other
|
|
64
|
+
// route, so startsWith would always light it up.
|
|
65
|
+
if (itemHref === "/studio") return currentPath === "/studio";
|
|
66
|
+
return currentPath === itemHref || currentPath.startsWith(itemHref + "/");
|
|
67
|
+
}
|
|
@@ -33,9 +33,8 @@
|
|
|
33
33
|
<Popover.Root>
|
|
34
34
|
<Popover.Trigger
|
|
35
35
|
class={cn(
|
|
36
|
-
buttonVariants({ variant: "outline" }),
|
|
36
|
+
buttonVariants({ variant: "outline", size: "sm" }),
|
|
37
37
|
!value && "text-muted-foreground",
|
|
38
|
-
"h-7 px-3 text-xs font-normal",
|
|
39
38
|
)}
|
|
40
39
|
>
|
|
41
40
|
<CalendarIcon class="mr-2 size-4" />
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<div class="text-4xl">Welcome back</div>
|
|
35
35
|
<div>Sign in to your account</div>
|
|
36
36
|
</div>
|
|
37
|
-
<div class="flex flex-col gap-6 rounded-md border bg-
|
|
37
|
+
<div class="flex flex-col gap-6 rounded-md border bg-card p-6">
|
|
38
38
|
<div class="flex flex-col gap-2">
|
|
39
39
|
<div>
|
|
40
40
|
<div class="mb-1 text-sm font-medium">Server</div>
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
>
|
|
91
91
|
<div
|
|
92
92
|
class="
|
|
93
|
-
bg-
|
|
93
|
+
bg-card border-r overflow-hidden
|
|
94
94
|
"
|
|
95
95
|
style="
|
|
96
96
|
{sidebarProperties.collapsed ? 'border-right-width: 0px; padding: 0px;' : ''}
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
</div>
|
|
124
124
|
<div
|
|
125
125
|
class="
|
|
126
|
-
text-
|
|
126
|
+
text-foreground p-2 overflow-y-auto overflow-x-clip
|
|
127
127
|
"
|
|
128
128
|
style="max-height: {sidebarBodyHeight}px;"
|
|
129
129
|
>
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
href={node.href}
|
|
90
90
|
variant="ghost"
|
|
91
91
|
class="
|
|
92
|
-
flex items-center justify-between p-2 gap-2
|
|
93
|
-
rounded-md {isselected ? 'bg-muted' : ''}
|
|
92
|
+
flex items-center justify-between p-2 gap-2 text-muted-foreground
|
|
93
|
+
rounded-md {isselected ? 'bg-muted' : 'hover:bg-muted-soft'}
|
|
94
94
|
"
|
|
95
95
|
title={node.name}
|
|
96
96
|
>
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
{#if node.icon}
|
|
99
99
|
<node.icon size="17.5" />
|
|
100
100
|
{/if}
|
|
101
|
-
<div class="text-xs {isselected ? 'text-
|
|
101
|
+
<div class="text-xs {isselected ? 'text-foreground font-medium' : ''}">
|
|
102
102
|
{node.name}
|
|
103
103
|
</div>
|
|
104
104
|
</div>
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
</script>
|
|
40
40
|
|
|
41
41
|
<div class="flex flex-col h-full bg-background">
|
|
42
|
-
<div class="flex justify-between items-center gap-2 p-2 border-b h-
|
|
42
|
+
<div class="flex justify-between items-center gap-2 p-2 border-b h-12 shrink-0">
|
|
43
43
|
<div class="flex items-center gap-1">
|
|
44
44
|
<SidebarTrigger />
|
|
45
45
|
</div>
|
|
46
46
|
<div>
|
|
47
|
-
<Button
|
|
47
|
+
<Button size="sm" Icon={Save} onclick={handleSave}>
|
|
48
48
|
Save
|
|
49
49
|
</Button>
|
|
50
50
|
</div>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
bind:ref
|
|
15
15
|
{sideOffset}
|
|
16
16
|
class={cn(
|
|
17
|
-
"bg-
|
|
17
|
+
"bg-popover text-popover-foreground border shadow-sm animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs",
|
|
18
18
|
className
|
|
19
19
|
)}
|
|
20
20
|
{...restProps}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { X } from "lucide-svelte";
|
|
3
|
+
import { onMount } from "svelte";
|
|
4
|
+
import { page } from "$app/state";
|
|
5
|
+
import { goto } from "$app/navigation";
|
|
6
|
+
import Button from "./ui/button/button.svelte";
|
|
7
|
+
import Separator from "./ui/separator/separator.svelte";
|
|
8
|
+
import * as Tooltip from "./ui/tooltip";
|
|
9
|
+
import * as Accordion from "./ui/accordion/index.js";
|
|
10
|
+
import * as Popover from "./ui/popover";
|
|
11
|
+
import { getStudioContext } from "../context";
|
|
12
|
+
import { mediaQueries } from "../utils";
|
|
13
|
+
import { buildNavSections, isItemActive, type NavItem } from "./mainNavShared";
|
|
14
|
+
|
|
15
|
+
const { lobb, ctx } = getStudioContext();
|
|
16
|
+
|
|
17
|
+
let isSmallScreen = $derived(!mediaQueries.sm.current);
|
|
18
|
+
let isCollapsed = $state(true);
|
|
19
|
+
$effect(() => {
|
|
20
|
+
isCollapsed = isSmallScreen;
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
let sections: NavItem[][] = $state([[], [], []]);
|
|
24
|
+
onMount(async () => {
|
|
25
|
+
sections = await buildNavSections(lobb, ctx);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const currentPath = $derived(page.url.pathname.replace(/\/$/, "") || "/");
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
{#snippet section(section: NavItem[])}
|
|
32
|
+
<div class="flex flex-col {isSmallScreen ? 'gap-0' : 'gap-2'}">
|
|
33
|
+
{#each section as item}
|
|
34
|
+
{@const active = isItemActive(currentPath, item)}
|
|
35
|
+
{#if isSmallScreen}
|
|
36
|
+
{#if !item.navs}
|
|
37
|
+
<Button
|
|
38
|
+
onclick={() => {
|
|
39
|
+
if (item.onclick) item.onclick();
|
|
40
|
+
else if (item.href) goto(item.href);
|
|
41
|
+
isCollapsed = true;
|
|
42
|
+
}}
|
|
43
|
+
class="flex items-center justify-start flex-nowrap text-nowrap h-10 w-full {active
|
|
44
|
+
? 'bg-accent text-foreground'
|
|
45
|
+
: 'text-foreground/70 hover:bg-accent/50 hover:text-foreground'}"
|
|
46
|
+
variant="ghost"
|
|
47
|
+
size="icon"
|
|
48
|
+
Icon={item.icon}
|
|
49
|
+
>
|
|
50
|
+
{item.label}
|
|
51
|
+
</Button>
|
|
52
|
+
{:else}
|
|
53
|
+
<Accordion.Root type="single">
|
|
54
|
+
<Accordion.Item class="border-b-0">
|
|
55
|
+
<Accordion.Trigger class="justify-between p-0 h-10">
|
|
56
|
+
<div
|
|
57
|
+
class="flex items-center gap-2 {active
|
|
58
|
+
? 'text-accent-foreground'
|
|
59
|
+
: 'text-foreground/70'}"
|
|
60
|
+
>
|
|
61
|
+
<item.icon size="18" />
|
|
62
|
+
<div class="text-nowrap">{item.label}</div>
|
|
63
|
+
</div>
|
|
64
|
+
</Accordion.Trigger>
|
|
65
|
+
<Accordion.Content class="pl-2 border-l border-border">
|
|
66
|
+
{#each item.navs as childItem}
|
|
67
|
+
{@const childActive = isItemActive(currentPath, childItem)}
|
|
68
|
+
<Button
|
|
69
|
+
onclick={() => {
|
|
70
|
+
if (childItem.onclick) childItem.onclick();
|
|
71
|
+
else if (childItem.href) goto(childItem.href);
|
|
72
|
+
isCollapsed = true;
|
|
73
|
+
}}
|
|
74
|
+
class="flex items-center justify-start flex-nowrap text-nowrap h-8 w-full {childActive
|
|
75
|
+
? 'bg-accent text-foreground'
|
|
76
|
+
: 'text-foreground/70 hover:bg-accent/50 hover:text-foreground'}"
|
|
77
|
+
variant="ghost"
|
|
78
|
+
size="icon"
|
|
79
|
+
Icon={childItem.icon}
|
|
80
|
+
>
|
|
81
|
+
{childItem.label}
|
|
82
|
+
</Button>
|
|
83
|
+
{/each}
|
|
84
|
+
</Accordion.Content>
|
|
85
|
+
</Accordion.Item>
|
|
86
|
+
</Accordion.Root>
|
|
87
|
+
{/if}
|
|
88
|
+
{:else}
|
|
89
|
+
<Tooltip.Root>
|
|
90
|
+
<Tooltip.Trigger>
|
|
91
|
+
{#if !item.navs}
|
|
92
|
+
<Button
|
|
93
|
+
onclick={() => { if (item.onclick) item.onclick(); }}
|
|
94
|
+
href={item.href}
|
|
95
|
+
class={active
|
|
96
|
+
? 'bg-accent text-foreground'
|
|
97
|
+
: 'text-foreground/70 hover:bg-accent/50 hover:text-foreground'}
|
|
98
|
+
variant="ghost"
|
|
99
|
+
size="icon"
|
|
100
|
+
Icon={item.icon}
|
|
101
|
+
></Button>
|
|
102
|
+
{:else}
|
|
103
|
+
<Popover.Root>
|
|
104
|
+
<Popover.Trigger>
|
|
105
|
+
<Button
|
|
106
|
+
class={active
|
|
107
|
+
? 'bg-accent text-foreground'
|
|
108
|
+
: 'text-foreground/70 hover:bg-accent/50 hover:text-foreground'}
|
|
109
|
+
variant="ghost"
|
|
110
|
+
size="icon"
|
|
111
|
+
Icon={item.icon}
|
|
112
|
+
></Button>
|
|
113
|
+
</Popover.Trigger>
|
|
114
|
+
<Popover.Content sideOffset={17.5} side="right" class="popover_content w-60 mb-4 p-0">
|
|
115
|
+
<div class="py-1">
|
|
116
|
+
{#each item.navs as childItem}
|
|
117
|
+
{@const childActive = isItemActive(currentPath, childItem)}
|
|
118
|
+
<div class="px-1 text-xs text-muted-foreground">
|
|
119
|
+
<Button
|
|
120
|
+
variant="ghost"
|
|
121
|
+
class="flex h-7 w-full justify-start p-2 text-xs font-normal {childActive
|
|
122
|
+
? 'bg-accent text-accent-foreground'
|
|
123
|
+
: 'text-muted-foreground'}"
|
|
124
|
+
Icon={childItem.icon}
|
|
125
|
+
onclick={() => { if (childItem.onclick) childItem.onclick(); }}
|
|
126
|
+
href={childItem.href}
|
|
127
|
+
>
|
|
128
|
+
{childItem.label}
|
|
129
|
+
</Button>
|
|
130
|
+
</div>
|
|
131
|
+
{/each}
|
|
132
|
+
</div>
|
|
133
|
+
</Popover.Content>
|
|
134
|
+
</Popover.Root>
|
|
135
|
+
{/if}
|
|
136
|
+
</Tooltip.Trigger>
|
|
137
|
+
<Tooltip.Content side="right" sideOffset={15}>
|
|
138
|
+
{item.label}
|
|
139
|
+
</Tooltip.Content>
|
|
140
|
+
</Tooltip.Root>
|
|
141
|
+
{/if}
|
|
142
|
+
{/each}
|
|
143
|
+
</div>
|
|
144
|
+
{/snippet}
|
|
145
|
+
|
|
146
|
+
<div
|
|
147
|
+
class="
|
|
148
|
+
{isSmallScreen ? 'fixed top-0 left-0 h-full z-50' : 'relative'}
|
|
149
|
+
border-r border-border bg-card text-foreground w-screen
|
|
150
|
+
{isCollapsed
|
|
151
|
+
? 'max-w-0 p-0'
|
|
152
|
+
: `max-w-14 ${isSmallScreen ? 'px-3 pb-3' : 'p-2'}`}"
|
|
153
|
+
style="transition: max-width 150ms, padding 150ms; {isSmallScreen && !isCollapsed ? 'max-width: 100vw' : ''}"
|
|
154
|
+
>
|
|
155
|
+
{#if isSmallScreen && !isCollapsed}
|
|
156
|
+
<X
|
|
157
|
+
class="absolute h-10 text-foreground/70 hover:bg-transparent cursor-pointer hover:text-foreground"
|
|
158
|
+
style="left: 0.6rem; top: 0rem;"
|
|
159
|
+
size="18"
|
|
160
|
+
onclick={() => (isCollapsed = !isCollapsed)}
|
|
161
|
+
/>
|
|
162
|
+
{/if}
|
|
163
|
+
<div class="flex h-full flex-col justify-between gap-2 w-full overflow-hidden">
|
|
164
|
+
<div class="flex flex-col gap-2 {isSmallScreen ? 'pt-8' : ''}">
|
|
165
|
+
{@render section(sections[0])}
|
|
166
|
+
<Separator class="bg-border" />
|
|
167
|
+
{@render section(sections[1])}
|
|
168
|
+
</div>
|
|
169
|
+
<div class="flex flex-col gap-2">
|
|
170
|
+
<Separator class="bg-border" />
|
|
171
|
+
{@render section(sections[2])}
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
<div>
|
|
158
158
|
{#if workflow.id}
|
|
159
159
|
<Button
|
|
160
|
-
class="
|
|
160
|
+
size="sm" class="w-full"
|
|
161
161
|
variant="default"
|
|
162
162
|
onclick={handleUpdateWorkflow}
|
|
163
163
|
Icon={Edit}
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
</Button>
|
|
168
168
|
{:else}
|
|
169
169
|
<Button
|
|
170
|
-
class="
|
|
170
|
+
size="sm" class="w-full"
|
|
171
171
|
variant="default"
|
|
172
172
|
onclick={handleCreateWorkflow}
|
|
173
173
|
Icon={Plus}
|
package/src/lib/store.types.ts
CHANGED
|
@@ -27,14 +27,14 @@ interface Collection {
|
|
|
27
27
|
}
|
|
28
28
|
type Collections = Record<string, Collection>;
|
|
29
29
|
|
|
30
|
-
export interface
|
|
30
|
+
export interface UITheme {
|
|
31
31
|
light?: Record<string, string>;
|
|
32
32
|
dark?: Record<string, string>;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
interface Meta {
|
|
36
36
|
version: string;
|
|
37
|
-
|
|
37
|
+
ui?: { theme?: UITheme; horizontalNav?: boolean };
|
|
38
38
|
relations: Array<any>;
|
|
39
39
|
collections: Collections;
|
|
40
40
|
extensions: Record<string, any>;
|