rimecms 0.31.3 → 0.31.5
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/README.md +6 -207
- package/dist/adapter-sqlite/auth.server.d.ts +1 -1
- package/dist/adapter-sqlite/generate-schema/templates.server.d.ts +2 -2
- package/dist/adapter-sqlite/generate-schema/templates.server.js +3 -1
- package/dist/adapter-sqlite/generate-schema/write.server.js +7 -3
- package/dist/adapter-sqlite/transform.server.js +1 -1
- package/dist/core/collections/upload/util/path.d.ts +2 -1
- package/dist/core/collections/upload/util/path.js +3 -3
- package/dist/core/config/auth/better-auth-hooks.server.d.ts +1 -1
- package/dist/core/config/auth/better-auth-hooks.server.js +1 -2
- package/dist/core/config/auth/better-auth-permissions.d.ts +27 -67
- package/dist/core/config/auth/better-auth.server.d.ts +649 -481
- package/dist/core/config/auth/better-auth.server.js +2 -1
- package/dist/core/config/server/write.server.js +5 -0
- package/dist/core/constant.d.ts +10 -0
- package/dist/core/constant.js +22 -0
- package/dist/core/dev/cli/build/templates.js +2 -0
- package/dist/core/dev/cli/clear/index.server.js +5 -5
- package/dist/core/dev/cli/init/index.server.js +15 -28
- package/dist/core/dev/cli/init/templates.d.ts +14 -0
- package/dist/core/dev/cli/init/templates.js +58 -3
- package/dist/core/dev/constants.d.ts +20 -7
- package/dist/core/dev/constants.js +58 -10
- package/dist/core/dev/generate/routes/common.server.js +36 -33
- package/dist/core/dev/generate/routes/index.server.d.ts +6 -3
- package/dist/core/dev/generate/routes/index.server.js +13 -7
- package/dist/core/dev/generate/routes/util.server.d.ts +14 -6
- package/dist/core/dev/generate/routes/util.server.js +17 -6
- package/dist/core/dev/generate/sanitize/index.server.js +3 -3
- package/dist/core/dev/generate/types/index.server.js +3 -2
- package/dist/core/dev/vite/index.server.js +4 -8
- package/dist/core/ensure.server.d.ts +2 -2
- package/dist/core/ensure.server.js +17 -8
- package/dist/core/handlers/auth.server.js +18 -11
- package/dist/core/handlers/routes.server.d.ts +1 -1
- package/dist/core/handlers/routes.server.js +4 -3
- package/dist/core/operations/hooks/before-read/populate-url.server.js +2 -1
- package/dist/core/plugins/cache/handler.server.js +1 -1
- package/dist/core/rime.server.d.ts +1302 -966
- package/dist/core/rime.server.js +6 -0
- package/dist/fields/number/component/number.css +0 -2
- package/dist/fields/relation/component/upload/upload.css +9 -0
- package/dist/fields/rich-text/component/drag-handle/drag-handle.css +0 -1
- package/dist/fields/rich-text/component/styles/rich-text.css +7 -0
- package/dist/fields/rich-text/core/extensions/drag-handle/helpers/findNextElementFromCursor.d.ts +1 -1
- package/dist/fields/rich-text/core/svelte/node-view-wrapper.svelte.d.ts +12 -5
- package/dist/panel/components/sections/collection/header/SelectUI.svelte.d.ts +3 -3
- package/dist/panel/components/sections/collection/list/row/Row.svelte +2 -1
- package/dist/panel/components/sections/collection/tree/CollectionTreeNode.svelte +2 -1
- package/dist/panel/components/sections/document/AuthAPIKeyDialog.svelte.d.ts +3 -3
- package/dist/panel/components/sections/document/AuthFooter.svelte +2 -1
- package/dist/panel/components/sections/document/Versions.svelte +1 -1
- package/dist/panel/components/sections/live/Consumer.svelte.d.ts +11 -4
- package/dist/panel/components/sections/live/LiveEdit.svelte.d.ts +13 -6
- package/dist/panel/components/sections/live/LiveFloatingUI.svelte.d.ts +3 -3
- package/dist/panel/components/ui/calendar/calendar.css +0 -11
- package/dist/panel/components/ui/card-resource/card-resource.svelte +2 -1
- package/dist/panel/components/ui/command/command-group.css +0 -1
- package/dist/panel/components/ui/label/label.css +1 -0
- package/dist/panel/components/ui/nav/Nav.svelte +1 -1
- package/dist/panel/components/ui/nav/NavItem.svelte +3 -2
- package/dist/panel/components/ui/nav/UserButton.svelte +3 -3
- package/dist/panel/components/ui/radio-group/radio-group.css +0 -2
- package/dist/panel/components/ui/scroll-area/scroll-area.css +4 -0
- package/dist/panel/components/ui/sheet/sheet.css +16 -0
- package/dist/panel/components/ui/tabs/tabs.css +0 -7
- package/dist/panel/context/documentForm.svelte.js +5 -6
- package/dist/panel/navigation.d.ts +7 -2
- package/dist/panel/navigation.js +11 -6
- package/dist/panel/pages/area/actions.server.js +4 -3
- package/dist/panel/pages/area/load.server.js +3 -2
- package/dist/panel/pages/auth/forgot-password/ForgotPassword.svelte +2 -1
- package/dist/panel/pages/auth/reset-password/ResetPassword.svelte +2 -1
- package/dist/panel/pages/auth/sign-in/SignIn.svelte +3 -2
- package/dist/panel/pages/auth/sign-in/actions.server.js +2 -2
- package/dist/panel/pages/auth/sign-in/load.server.d.ts +1 -1
- package/dist/panel/pages/auth/sign-in/load.server.js +2 -2
- package/dist/panel/pages/collection/load.server.js +9 -4
- package/dist/panel/pages/collection-document/actions.server.js +5 -3
- package/dist/panel/pages/collection-document/load.server.js +10 -6
- package/dist/panel/pages/dashboard/load.server.js +5 -4
- package/dist/panel/pages/live/Live.svelte +3 -7
- package/dist/panel/style/index.css +0 -6
- package/dist/panel/util/auth.js +1 -1
- package/dist/panel/util/url.d.ts +30 -1
- package/dist/panel/util/url.js +36 -2
- package/package.json +8 -6
- package/dist/panel/components/ui/dropdown-menu/index.d.ts +0 -23
package/dist/core/rime.server.js
CHANGED
|
@@ -8,6 +8,7 @@ import { getBaseAuthConfig } from './config/auth/better-auth.server.js';
|
|
|
8
8
|
import { createConfigContext } from './config/config-context.server.js';
|
|
9
9
|
import validate from './config/server/validate.server.js';
|
|
10
10
|
import writeMemo from './config/server/write.server.js';
|
|
11
|
+
import { regenerateDrizzleConfig, regenerateHooks } from './dev/cli/init/templates.js';
|
|
11
12
|
import generateRoutes from './dev/generate/routes/index.server.js';
|
|
12
13
|
import generateTypes from './dev/generate/types/index.server.js';
|
|
13
14
|
import { RimeError } from './errors/index.js';
|
|
@@ -44,8 +45,13 @@ export async function createRime(config) {
|
|
|
44
45
|
}
|
|
45
46
|
if (changed) {
|
|
46
47
|
generateRoutes(config);
|
|
48
|
+
// Before generateSchema(): it shells out to drizzle-kit generate/migrate, which read
|
|
49
|
+
// drizzle.config.ts's schema path straight off disk — stale here means the wrong (or
|
|
50
|
+
// missing) schema file.
|
|
51
|
+
regenerateDrizzleConfig();
|
|
47
52
|
await generateSchema(config);
|
|
48
53
|
await generateTypes(config);
|
|
54
|
+
regenerateHooks();
|
|
49
55
|
}
|
|
50
56
|
else {
|
|
51
57
|
logger.debug('Nothing to generate');
|
|
@@ -76,7 +76,6 @@
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/* Chrome, Safari, Edge, Opera */
|
|
79
|
-
|
|
80
79
|
.rz-number__input::-webkit-outer-spin-button,
|
|
81
80
|
.rz-number__input::-webkit-inner-spin-button {
|
|
82
81
|
-webkit-appearance: none;
|
|
@@ -84,7 +83,6 @@
|
|
|
84
83
|
}
|
|
85
84
|
|
|
86
85
|
/* Firefox */
|
|
87
|
-
|
|
88
86
|
.rz-number__input[type='number'] {
|
|
89
87
|
-webkit-appearance: textfield;
|
|
90
88
|
appearance: textfield;
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
flex-wrap: wrap;
|
|
25
25
|
gap: var(--rz-size-4);
|
|
26
26
|
}
|
|
27
|
+
|
|
27
28
|
.rz-relation-upload__list:not(.rz-relation-upload__list[data-many]) {
|
|
28
29
|
@container relation-upload-list (min-width: 285px) {
|
|
29
30
|
.rz-card-resource {
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
}
|
|
44
|
+
|
|
43
45
|
.rz-relation-upload__actions {
|
|
44
46
|
display: flex;
|
|
45
47
|
margin-top: var(--rz-size-3);
|
|
@@ -56,6 +58,7 @@
|
|
|
56
58
|
.rz-relation-upload__actions.rz-relation-upload__actions--list-empty {
|
|
57
59
|
margin-top: 0;
|
|
58
60
|
}
|
|
61
|
+
|
|
59
62
|
.rz-relation-upload__search {
|
|
60
63
|
height: var(--rz-size-10);
|
|
61
64
|
align-items: center;
|
|
@@ -64,25 +67,30 @@
|
|
|
64
67
|
border-bottom-left-radius: 0;
|
|
65
68
|
border-bottom-right-radius: 0;
|
|
66
69
|
}
|
|
70
|
+
|
|
67
71
|
.rz-relation-upload__command-list {
|
|
68
72
|
padding: var(--rz-size-2);
|
|
69
73
|
}
|
|
74
|
+
|
|
70
75
|
.rz-relation-upload__command-item[aria-selected='true'] {
|
|
71
76
|
/* background-color: hsl(var(--rz-gray-5)); */
|
|
72
77
|
background-color: var(--rz-popover-high-light-bg);
|
|
73
78
|
}
|
|
79
|
+
|
|
74
80
|
.rz-relation-upload__grid-item {
|
|
75
81
|
display: flex;
|
|
76
82
|
gap: var(--rz-size-4);
|
|
77
83
|
padding-left: var(--rz-size-1);
|
|
78
84
|
padding-right: var(--rz-size-1);
|
|
79
85
|
}
|
|
86
|
+
|
|
80
87
|
.rz-relation-upload__grid-thumbnail {
|
|
81
88
|
width: var(--rz-size-16);
|
|
82
89
|
height: var(--rz-size-16);
|
|
83
90
|
overflow: hidden;
|
|
84
91
|
border-radius: var(--rz-radius-lg);
|
|
85
92
|
}
|
|
93
|
+
|
|
86
94
|
.rz-relation-upload__grid-filename {
|
|
87
95
|
margin-top: var(--rz-size-2);
|
|
88
96
|
display: -webkit-box;
|
|
@@ -94,6 +102,7 @@
|
|
|
94
102
|
font-variation-settings: 'wght' 600;
|
|
95
103
|
font-weight: 600;
|
|
96
104
|
}
|
|
105
|
+
|
|
97
106
|
.rz-relation-upload__grid-filesize,
|
|
98
107
|
.rz-relation-upload__grid-mimetype {
|
|
99
108
|
text-align: left;
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
display: inline-block;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
|
|
25
26
|
/** Disabled style */
|
|
26
27
|
.rz-rich-text__editor > [contenteditable='false'] {
|
|
27
28
|
color: hsl(var(--rz-color-fg) / 0.5);
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
opacity: 0.9;
|
|
32
33
|
}
|
|
33
34
|
}
|
|
35
|
+
|
|
34
36
|
/** All editor > node */
|
|
35
37
|
.ProseMirror > *:not(.ProseMirror-gapcursor) {
|
|
36
38
|
background-color: hsl(var(--rz-input-bg));
|
|
@@ -53,13 +55,16 @@
|
|
|
53
55
|
border-bottom: 1px solid var(--rz-input-border-color);
|
|
54
56
|
}
|
|
55
57
|
}
|
|
58
|
+
|
|
56
59
|
/** Disable focus-style on the whole editor */
|
|
57
60
|
.ProseMirror-focused {
|
|
58
61
|
outline: none;
|
|
59
62
|
}
|
|
63
|
+
|
|
60
64
|
.rz-rich-text__editor[data-error]:has(.ProseMirror-focused) {
|
|
61
65
|
border-color: hsl(var(--rz-color-alert));
|
|
62
66
|
}
|
|
67
|
+
|
|
63
68
|
.rz-rich-text__editor .ProseMirror .is-empty:not(table)::before {
|
|
64
69
|
content: attr(data-placeholder);
|
|
65
70
|
color: hsl(var(--rz-color-fg) / 0.3);
|
|
@@ -72,6 +77,7 @@
|
|
|
72
77
|
.rz-rich-text__editor .ProseMirror blockquote.is-empty::before {
|
|
73
78
|
margin-left: var(--rz-size-6);
|
|
74
79
|
}
|
|
80
|
+
|
|
75
81
|
/** Text styles */
|
|
76
82
|
.rz-rich-text__editor .ProseMirror {
|
|
77
83
|
h1 {
|
|
@@ -170,6 +176,7 @@
|
|
|
170
176
|
font-weight: 500;
|
|
171
177
|
}
|
|
172
178
|
}
|
|
179
|
+
|
|
173
180
|
/** Fix gap cursor position */
|
|
174
181
|
.rz-field-rich-text .ProseMirror-gapcursor:after {
|
|
175
182
|
left: calc(var(--left-spacing) + var(--rz-size-4));
|
package/dist/fields/rich-text/core/extensions/drag-handle/helpers/findNextElementFromCursor.d.ts
CHANGED
|
@@ -16,6 +16,6 @@ export declare const findElementNextToCoords: (options: FindElementNextToCoords)
|
|
|
16
16
|
pos: null;
|
|
17
17
|
} | {
|
|
18
18
|
resultElement: HTMLElement;
|
|
19
|
-
resultNode: import("
|
|
19
|
+
resultNode: import("prosemirror-model").Node | null;
|
|
20
20
|
pos: number;
|
|
21
21
|
};
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
2
|
-
declare
|
|
3
|
-
props
|
|
4
|
-
as?: T
|
|
2
|
+
declare function $$render<T extends keyof SvelteHTMLElements = 'div'>(): {
|
|
3
|
+
props: SvelteHTMLElements[T] & {
|
|
4
|
+
as?: T;
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
exports: {};
|
|
7
|
+
bindings: "";
|
|
8
|
+
slots: {};
|
|
9
|
+
events: {};
|
|
10
|
+
};
|
|
11
|
+
declare class __sveltets_Render<T extends keyof SvelteHTMLElements = 'div'> {
|
|
12
|
+
props(): ReturnType<typeof $$render<T>>['props'];
|
|
13
|
+
events(): ReturnType<typeof $$render<T>>['events'];
|
|
14
|
+
slots(): ReturnType<typeof $$render<T>>['slots'];
|
|
8
15
|
bindings(): "";
|
|
9
16
|
exports(): {};
|
|
10
17
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
type
|
|
3
|
-
export default
|
|
1
|
+
declare const SelectUI: import("svelte").Component<Record<string, never>, {}, "">;
|
|
2
|
+
type SelectUI = ReturnType<typeof SelectUI>;
|
|
3
|
+
export default SelectUI;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import type { GenericDoc } from '../../../../../../core/types/doc.js';
|
|
4
4
|
import Checkbox from '../../../../ui/checkbox/checkbox.svelte';
|
|
5
5
|
import { getLocaleContext } from '../../../../../context/locale.svelte';
|
|
6
|
+
import { panelUrl } from '../../../../../util/url.js';
|
|
6
7
|
import { getValueAtPath } from '../../../../../../util/object';
|
|
7
8
|
import StatusDot from '../../StatusDot.svelte';
|
|
8
9
|
import UploadThumbCell from '../../upload-thumb-cell/UploadThumbCell.svelte';
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
{/if}
|
|
60
61
|
<label for="checkbox-{doc.id}" class="rz-list-row__title">{doc.title || '[untitled]'}</label>
|
|
61
62
|
{:else}
|
|
62
|
-
<a class="rz-list-row__link" href=
|
|
63
|
+
<a class="rz-list-row__link" href={panelUrl(config.kebab, doc.id)}>
|
|
63
64
|
{#if doc._thumbnail}
|
|
64
65
|
<UploadThumbCell url={doc._thumbnail} mimeType={doc.mimeType} />
|
|
65
66
|
{:else}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { GenericDoc } from '../../../../../core/types/doc.js';
|
|
3
3
|
import type { CollectionContext } from '../../../../context/collection.svelte.js';
|
|
4
|
+
import { panelUrl } from '../../../../util/url.js';
|
|
4
5
|
import { GripVertical } from '@lucide/svelte';
|
|
5
6
|
import StatusDot from '../StatusDot.svelte';
|
|
6
7
|
import CollectionTreeNode from './CollectionTreeNode.svelte';
|
|
@@ -12,7 +13,7 @@
|
|
|
12
13
|
|
|
13
14
|
{#key `${parentId}-${doc.id}-${doc._position}`}
|
|
14
15
|
<div data-parent={parentId} data-id={doc.id} class="rz-collection-node">
|
|
15
|
-
<a href=
|
|
16
|
+
<a href={panelUrl(doc._type, doc.id)} class="rz-collection-node__row">
|
|
16
17
|
<div class="rz-collection-node__grip"><GripVertical size="12" /></div>
|
|
17
18
|
<div>
|
|
18
19
|
{doc.title}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type Props = {
|
|
2
2
|
apiKey: string | null;
|
|
3
3
|
};
|
|
4
|
-
declare const
|
|
5
|
-
type
|
|
6
|
-
export default
|
|
4
|
+
declare const AuthAPIKeyDialog: import("svelte").Component<Props, {}, "apiKey">;
|
|
5
|
+
type AuthAPIKeyDialog = ReturnType<typeof AuthAPIKeyDialog>;
|
|
6
|
+
export default AuthAPIKeyDialog;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import type { DocumentFormContext } from '../../../context/documentForm.svelte.js';
|
|
8
8
|
import { getUserContext } from '../../../context/user.svelte.js';
|
|
9
9
|
import { authClient } from '../../../util/auth';
|
|
10
|
+
import { panelUrl } from '../../../util/url.js';
|
|
10
11
|
import validate from '../../../../util/validate';
|
|
11
12
|
import { toast } from 'svelte-sonner';
|
|
12
13
|
import Button from '../../ui/button/button.svelte';
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
async function sendPasswordResetLink() {
|
|
28
29
|
const { data, error } = await authClient.requestPasswordReset({
|
|
29
30
|
email: form.values.email,
|
|
30
|
-
redirectTo:
|
|
31
|
+
redirectTo: `${panelUrl('reset-password')}?slug=staff`
|
|
31
32
|
});
|
|
32
33
|
if (error && error.message) {
|
|
33
34
|
toast.error(error.message);
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
if (doc._prototype === 'collection') {
|
|
33
33
|
return `${panelUrl(kebabSlug, doc.id)}?versionId=${doc.versionId}`;
|
|
34
34
|
} else {
|
|
35
|
-
return `${panelUrl(kebabSlug)}
|
|
35
|
+
return `${panelUrl(kebabSlug)}?versionId=${doc.versionId}`;
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
</script>
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import type { WithRelationPopulated } from '../../../../util/types';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
-
declare
|
|
4
|
-
props
|
|
3
|
+
declare function $$render<T>(): {
|
|
4
|
+
props: {
|
|
5
5
|
child: Snippet<[doc: WithRelationPopulated<T>]>;
|
|
6
6
|
data: {
|
|
7
7
|
doc: T;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
exports: {};
|
|
11
|
+
bindings: "";
|
|
12
|
+
slots: {};
|
|
13
|
+
events: {};
|
|
14
|
+
};
|
|
15
|
+
declare class __sveltets_Render<T> {
|
|
16
|
+
props(): ReturnType<typeof $$render<T>>['props'];
|
|
17
|
+
events(): ReturnType<typeof $$render<T>>['events'];
|
|
18
|
+
slots(): ReturnType<typeof $$render<T>>['slots'];
|
|
12
19
|
bindings(): "";
|
|
13
20
|
exports(): {};
|
|
14
21
|
}
|
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
import { type Snippet } from 'svelte';
|
|
2
|
-
declare
|
|
3
|
-
props
|
|
2
|
+
declare function $$render<T>(): {
|
|
3
|
+
props: {
|
|
4
4
|
/** Initial value */
|
|
5
|
-
data?: T
|
|
5
|
+
data?: T;
|
|
6
6
|
/** Full path to the field being edited from the root of the document, e.g. `attributes.title` or `layout.sections.2:paragraph.text` */
|
|
7
7
|
path?: string;
|
|
8
8
|
/** Update URI of the API ex: `/pages/123` */
|
|
9
9
|
update?: string;
|
|
10
10
|
child: Snippet<[value: T, props: {
|
|
11
|
-
onclick?: ((e: MouseEvent) => void)
|
|
11
|
+
onclick?: null | ((e: MouseEvent) => void);
|
|
12
12
|
role?: "button" | null;
|
|
13
13
|
tabindex?: 0 | null;
|
|
14
14
|
'data-live-panel-trigger'?: "" | null;
|
|
15
15
|
'data-is-active'?: "" | null;
|
|
16
16
|
}]>;
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
exports: {};
|
|
19
|
+
bindings: "";
|
|
20
|
+
slots: {};
|
|
21
|
+
events: {};
|
|
22
|
+
};
|
|
23
|
+
declare class __sveltets_Render<T> {
|
|
24
|
+
props(): ReturnType<typeof $$render<T>>['props'];
|
|
25
|
+
events(): ReturnType<typeof $$render<T>>['events'];
|
|
26
|
+
slots(): ReturnType<typeof $$render<T>>['slots'];
|
|
20
27
|
bindings(): "";
|
|
21
28
|
exports(): {};
|
|
22
29
|
}
|
|
@@ -7,6 +7,6 @@ type Props = {
|
|
|
7
7
|
activePanel: ActivePanel | null;
|
|
8
8
|
currentDevice: 'desktop' | 'mobile';
|
|
9
9
|
};
|
|
10
|
-
declare const
|
|
11
|
-
type
|
|
12
|
-
export default
|
|
10
|
+
declare const LiveFloatingUI: import("svelte").Component<Props, {}, "currentDevice">;
|
|
11
|
+
type LiveFloatingUI = ReturnType<typeof LiveFloatingUI>;
|
|
12
|
+
export default LiveFloatingUI;
|
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
.rz-date__popover-content {
|
|
8
8
|
border-radius: var(--rz-radius-md);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
10
|
/**************************************/
|
|
12
|
-
|
|
13
11
|
/* Cell
|
|
14
12
|
/**************************************/
|
|
15
13
|
|
|
@@ -33,7 +31,6 @@
|
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
/**************************************/
|
|
36
|
-
|
|
37
34
|
/* Day
|
|
38
35
|
/**************************************/
|
|
39
36
|
|
|
@@ -104,7 +101,6 @@
|
|
|
104
101
|
}
|
|
105
102
|
|
|
106
103
|
/**************************************/
|
|
107
|
-
|
|
108
104
|
/* Grid
|
|
109
105
|
/**************************************/
|
|
110
106
|
|
|
@@ -114,7 +110,6 @@
|
|
|
114
110
|
}
|
|
115
111
|
|
|
116
112
|
/**************************************/
|
|
117
|
-
|
|
118
113
|
/* Grid-row
|
|
119
114
|
/**************************************/
|
|
120
115
|
|
|
@@ -126,7 +121,6 @@
|
|
|
126
121
|
}
|
|
127
122
|
|
|
128
123
|
/**************************************/
|
|
129
|
-
|
|
130
124
|
/* Head
|
|
131
125
|
/**************************************/
|
|
132
126
|
|
|
@@ -140,7 +134,6 @@
|
|
|
140
134
|
}
|
|
141
135
|
|
|
142
136
|
/**************************************/
|
|
143
|
-
|
|
144
137
|
/* Head-cell
|
|
145
138
|
/**************************************/
|
|
146
139
|
|
|
@@ -153,7 +146,6 @@
|
|
|
153
146
|
}
|
|
154
147
|
|
|
155
148
|
/**************************************/
|
|
156
|
-
|
|
157
149
|
/* Heading
|
|
158
150
|
/**************************************/
|
|
159
151
|
|
|
@@ -164,12 +156,10 @@
|
|
|
164
156
|
}
|
|
165
157
|
|
|
166
158
|
/**************************************/
|
|
167
|
-
|
|
168
159
|
/* Next / Prev
|
|
169
160
|
/**************************************/
|
|
170
161
|
|
|
171
162
|
/** Next */
|
|
172
|
-
|
|
173
163
|
.rz-calendar-next-button {
|
|
174
164
|
height: var(--rz-size-7);
|
|
175
165
|
width: var(--rz-size-7);
|
|
@@ -184,7 +174,6 @@
|
|
|
184
174
|
}
|
|
185
175
|
|
|
186
176
|
/** Prev */
|
|
187
|
-
|
|
188
177
|
.rz-calendar-prev-button {
|
|
189
178
|
height: var(--rz-size-7);
|
|
190
179
|
width: var(--rz-size-7);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { mimeTypeToIcon } from '../../../util/upload.js';
|
|
3
|
+
import { panelUrl } from '../../../util/url.js';
|
|
3
4
|
import { Edit, FileIcon, X } from '@lucide/svelte';
|
|
4
5
|
|
|
5
6
|
type Resource = {
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
|
|
41
42
|
<div class="rz-card-resource__info">
|
|
42
43
|
<p class="rz-card-resource__title">
|
|
43
|
-
{resource.title} <a href=
|
|
44
|
+
{resource.title} <a href={panelUrl(resource._type, resource.id)}><Edit size="12" /></a>
|
|
44
45
|
</p>
|
|
45
46
|
{#if isUpload}
|
|
46
47
|
<p class="rz-card-resource__info-text">{resource.filesize}</p>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<div class:rz-nav--collapsed={isCollapsed} class="rz-nav">
|
|
38
38
|
<div class="rz-nav__content">
|
|
39
39
|
<div class="rz-nav__header" class:rz-nav__header--collapsed={isCollapsed}>
|
|
40
|
-
<NavItem href=
|
|
40
|
+
<NavItem href={panelUrl()} {isCollapsed} route={dashBoardRoute} />
|
|
41
41
|
</div>
|
|
42
42
|
|
|
43
43
|
<div class="rz-nav__body">
|
|
@@ -23,8 +23,9 @@
|
|
|
23
23
|
|
|
24
24
|
let active = $derived.by(() => {
|
|
25
25
|
const routePathname = new URL(route.url).pathname;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
const panelRoot = `/${page.params.panel}`;
|
|
27
|
+
if (routePathname === panelRoot) {
|
|
28
|
+
return pathname === panelRoot;
|
|
28
29
|
}
|
|
29
30
|
const reg = new RegExp(`^${routePathname}(/.*)?$`);
|
|
30
31
|
return reg.test(pathname);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { env } from '$env/dynamic/public';
|
|
3
2
|
import * as Tooltip from '../tooltip';
|
|
4
3
|
import { getUserContext } from '../../../context/user.svelte.js';
|
|
5
4
|
import { authClient } from '../../../util/auth.js';
|
|
5
|
+
import { panelUrl } from '../../../util/url.js';
|
|
6
6
|
import { LogOut } from '@lucide/svelte';
|
|
7
7
|
import { toast } from 'svelte-sonner';
|
|
8
8
|
import Button from '../button/button.svelte';
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
async function signout() {
|
|
16
16
|
const result = await authClient.signOut();
|
|
17
17
|
if (result.data?.success) {
|
|
18
|
-
window.location.href =
|
|
18
|
+
window.location.href = panelUrl('sign-in');
|
|
19
19
|
} else {
|
|
20
20
|
toast.error(`Can't sign-out, please try again`);
|
|
21
21
|
}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
{#if !navCollapsed}
|
|
27
27
|
<div class="rz-user-button">
|
|
28
28
|
<div class="rz-user-button__left">
|
|
29
|
-
<a href=
|
|
29
|
+
<a href={panelUrl('staff', user.attributes.id)}>
|
|
30
30
|
{user.attributes.name?.charAt(0) || ''}
|
|
31
31
|
</a>
|
|
32
32
|
<div class="rz-user-button__name">{user.attributes.name}</div>
|
|
@@ -22,13 +22,11 @@
|
|
|
22
22
|
flex-shrink: 0;
|
|
23
23
|
cursor: pointer;
|
|
24
24
|
}
|
|
25
|
-
|
|
26
25
|
.rz-radio-group-item:hover {
|
|
27
26
|
--border-color: var(--rz-gray-2);
|
|
28
27
|
--border-opacity: 0.3;
|
|
29
28
|
border-width: 6px;
|
|
30
29
|
}
|
|
31
|
-
|
|
32
30
|
.rz-radio-group-item[data-state='checked'] {
|
|
33
31
|
border: 6px solid hsl(var(--rz-color-spot));
|
|
34
32
|
background-color: hsl(var(--rz-gray-19));
|
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
height: 100%;
|
|
7
7
|
width: 100%;
|
|
8
8
|
}
|
|
9
|
+
|
|
9
10
|
/**************************************/
|
|
10
11
|
/* ScrollBar
|
|
11
12
|
/**************************************/
|
|
13
|
+
|
|
12
14
|
.rz-scroll-area-scroll-bar {
|
|
13
15
|
display: flex;
|
|
14
16
|
touch-action: none;
|
|
@@ -28,9 +30,11 @@
|
|
|
28
30
|
height: 100%;
|
|
29
31
|
border-left: 1px solid transparent;
|
|
30
32
|
}
|
|
33
|
+
|
|
31
34
|
.rz-scroll-area-scroll-bar--vertical .rz-scroll-area-scroll-bar__thumb {
|
|
32
35
|
flex: 1;
|
|
33
36
|
}
|
|
37
|
+
|
|
34
38
|
.rz-scroll-area-scroll-bar__thumb {
|
|
35
39
|
background-color: hsl(var(--rz-color-border));
|
|
36
40
|
position: relative;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**************************************/
|
|
2
2
|
/* Content
|
|
3
3
|
/**************************************/
|
|
4
|
+
|
|
4
5
|
.rz-sheet-content {
|
|
5
6
|
--ease: cubic-bezier(0.445, 0.05, 0.55, 0.95);
|
|
6
7
|
position: fixed;
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
width: 50%;
|
|
29
30
|
}
|
|
30
31
|
}
|
|
32
|
+
|
|
31
33
|
@keyframes exit {
|
|
32
34
|
from {
|
|
33
35
|
opacity: 1;
|
|
@@ -38,6 +40,7 @@
|
|
|
38
40
|
transform: translate3d(100%, 0, 0);
|
|
39
41
|
}
|
|
40
42
|
}
|
|
43
|
+
|
|
41
44
|
@keyframes enter {
|
|
42
45
|
from {
|
|
43
46
|
opacity: 0;
|
|
@@ -48,12 +51,14 @@
|
|
|
48
51
|
transform: translate3d(0%, 0, 0);
|
|
49
52
|
}
|
|
50
53
|
}
|
|
54
|
+
|
|
51
55
|
.rz-sheet-content__close {
|
|
52
56
|
position: absolute;
|
|
53
57
|
z-index: 1010;
|
|
54
58
|
right: var(--rz-size-4);
|
|
55
59
|
top: var(--rz-size-4);
|
|
56
60
|
}
|
|
61
|
+
|
|
57
62
|
.rz-sheet-content__close:focus-visible {
|
|
58
63
|
outline: none;
|
|
59
64
|
/* --rz-ring-offset: 2px; */
|
|
@@ -62,6 +67,7 @@
|
|
|
62
67
|
0 0 0 var(--rz-ring-offset, 0px) hsl(var(--rz-ring-offset-bg, var(--rz-gray-6)) / 1),
|
|
63
68
|
0 0 0 calc(var(--rz-ring-offset, 0px) + 1px) hsl(var(--rz-color-ring) / var(--rz-ring-opacity, 1));
|
|
64
69
|
}
|
|
70
|
+
|
|
65
71
|
.rz-sheet-content--right {
|
|
66
72
|
height: 100%;
|
|
67
73
|
right: 0;
|
|
@@ -69,16 +75,20 @@
|
|
|
69
75
|
bottom: 0;
|
|
70
76
|
border-left: var(--rz-border);
|
|
71
77
|
}
|
|
78
|
+
|
|
72
79
|
/**************************************/
|
|
73
80
|
/* Description
|
|
74
81
|
/**************************************/
|
|
82
|
+
|
|
75
83
|
.rz-sheet-description {
|
|
76
84
|
color: hsl(var(--rz-color-fg) / 0.7);
|
|
77
85
|
font-size: var(--rz-text-sm);
|
|
78
86
|
}
|
|
87
|
+
|
|
79
88
|
/**************************************/
|
|
80
89
|
/* Footer
|
|
81
90
|
/**************************************/
|
|
91
|
+
|
|
82
92
|
.rz-sheet-footer {
|
|
83
93
|
display: flex;
|
|
84
94
|
flex-direction: column-reverse;
|
|
@@ -90,9 +100,11 @@
|
|
|
90
100
|
flex-direction: row;
|
|
91
101
|
}
|
|
92
102
|
}
|
|
103
|
+
|
|
93
104
|
/**************************************/
|
|
94
105
|
/* Header
|
|
95
106
|
/**************************************/
|
|
107
|
+
|
|
96
108
|
.rz-sheet-header {
|
|
97
109
|
display: flex;
|
|
98
110
|
flex-direction: column;
|
|
@@ -106,9 +118,11 @@
|
|
|
106
118
|
text-align: left;
|
|
107
119
|
}
|
|
108
120
|
}
|
|
121
|
+
|
|
109
122
|
/**************************************/
|
|
110
123
|
/* Overlay
|
|
111
124
|
/**************************************/
|
|
125
|
+
|
|
112
126
|
.rz-sheet-overlay {
|
|
113
127
|
background-color: var(--rz-overlay-color);
|
|
114
128
|
position: fixed;
|
|
@@ -116,9 +130,11 @@
|
|
|
116
130
|
z-index: 100;
|
|
117
131
|
backdrop-filter: blur(var(--rz-overlay-blur));
|
|
118
132
|
}
|
|
133
|
+
|
|
119
134
|
/**************************************/
|
|
120
135
|
/* Title
|
|
121
136
|
/**************************************/
|
|
137
|
+
|
|
122
138
|
.rz-sheet-title {
|
|
123
139
|
font-size: var(--rz-text-lg);
|
|
124
140
|
font-variation-settings: 'wght' 600;
|