@uibot/registry 0.18.1 → 0.20.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/README.md +59 -0
- package/dist/component-replacement.d.ts +10 -0
- package/dist/distribution-snapshot.d.ts +22 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11 -11
- package/dist/resource-query.d.ts +4 -0
- package/dist/resources.d.ts +4 -0
- package/dist/resources.js +3 -3
- package/dist/shadcn/r/admin-apps.json +61 -0
- package/dist/shadcn/r/admin-chats.json +54 -0
- package/dist/shadcn/r/admin-error-401.json +54 -0
- package/dist/shadcn/r/admin-error-403.json +54 -0
- package/dist/shadcn/r/admin-error-404.json +54 -0
- package/dist/shadcn/r/admin-error-500.json +54 -0
- package/dist/shadcn/r/admin-error-503.json +54 -0
- package/dist/shadcn/r/admin-forgot-password.json +59 -0
- package/dist/shadcn/r/admin-help.json +53 -0
- package/dist/shadcn/r/admin-otp.json +59 -0
- package/dist/shadcn/r/admin-overview.json +62 -0
- package/dist/shadcn/r/admin-settings-account.json +61 -0
- package/dist/shadcn/r/admin-settings-appearance.json +61 -0
- package/dist/shadcn/r/admin-settings-display.json +61 -0
- package/dist/shadcn/r/admin-settings-notifications.json +61 -0
- package/dist/shadcn/r/admin-settings-profile.json +61 -0
- package/dist/shadcn/r/admin-settings.json +65 -0
- package/dist/shadcn/r/admin-shell.json +25 -6
- package/dist/shadcn/r/admin-sign-in-2.json +67 -0
- package/dist/shadcn/r/admin-sign-in.json +59 -0
- package/dist/shadcn/r/admin-sign-up.json +59 -0
- package/dist/shadcn/r/admin-tasks.json +66 -0
- package/dist/shadcn/r/admin-users.json +66 -0
- package/dist/shadcn/r/auth-01.json +24 -0
- package/dist/shadcn/r/auth-02.json +24 -0
- package/dist/shadcn/r/auth-03.json +24 -0
- package/dist/shadcn/r/auth-04.json +24 -0
- package/dist/shadcn/r/auth-05.json +24 -0
- package/dist/shadcn/r/auth-centered.json +61 -0
- package/dist/shadcn/r/auth-enterprise.json +61 -0
- package/dist/shadcn/r/auth-primitives.json +58 -0
- package/dist/shadcn/r/auth-recovery.json +64 -0
- package/dist/shadcn/r/auth-registration.json +63 -0
- package/dist/shadcn/r/auth-split.json +67 -0
- package/dist/shadcn/r/auth.json +13 -13
- package/dist/shadcn/r/charts.json +45 -18
- package/dist/shadcn/r/chat-artifact.json +49 -0
- package/dist/shadcn/r/chat-focused.json +49 -0
- package/dist/shadcn/r/chat-history.json +49 -0
- package/dist/shadcn/r/chat-knowledge.json +49 -0
- package/dist/shadcn/r/chat-support.json +49 -0
- package/dist/shadcn/r/chat-workspace.json +136 -0
- package/dist/shadcn/r/collection-cell-editor.json +6 -6
- package/dist/shadcn/r/collection-panel-drawer.json +2 -2
- package/dist/shadcn/r/collection-record-menu.json +2 -2
- package/dist/shadcn/r/collection-shared.json +2 -2
- package/dist/shadcn/r/commerce-workspace.json +69 -0
- package/dist/shadcn/r/console-billing.json +68 -0
- package/dist/shadcn/r/console-page.json +289 -0
- package/dist/shadcn/r/console-shell.json +29 -0
- package/dist/shadcn/r/content.json +1 -1
- package/dist/shadcn/r/creation-html-generation.json +3 -3
- package/dist/shadcn/r/creation-reference-generation.json +3 -3
- package/dist/shadcn/r/creation-revision-export.json +3 -3
- package/dist/shadcn/r/creation-shared.json +3 -3
- package/dist/shadcn/r/creation-variant-compare.json +4 -4
- package/dist/shadcn/r/creation-workspace.json +4 -4
- package/dist/shadcn/r/crm-workspace.json +73 -0
- package/dist/shadcn/r/dashboard-01.json +78 -0
- package/dist/shadcn/r/dashboard.json +114 -4
- package/dist/shadcn/r/data-studio.json +1 -1
- package/dist/shadcn/r/data-table.json +138 -10
- package/dist/shadcn/r/data.json +88 -11
- package/dist/shadcn/r/document-assistant.json +54 -0
- package/dist/shadcn/r/document-library.json +49 -0
- package/dist/shadcn/r/document-reading.json +49 -0
- package/dist/shadcn/r/document-workspace.json +164 -0
- package/dist/shadcn/r/document-writing.json +49 -0
- package/dist/shadcn/r/drilldown-menu.json +233 -0
- package/dist/shadcn/r/education-workspace.json +82 -0
- package/dist/shadcn/r/feedback.json +19 -6
- package/dist/shadcn/r/field.json +1 -1
- package/dist/shadcn/r/form.json +12 -12
- package/dist/shadcn/r/grid.json +1 -1
- package/dist/shadcn/r/interactive.json +1 -1
- package/dist/shadcn/r/item-grid.json +219 -0
- package/dist/shadcn/r/kanban.json +1 -1
- package/dist/shadcn/r/layout.json +217 -18
- package/dist/shadcn/r/marketing.json +1 -1
- package/dist/shadcn/r/nav.json +39 -11
- package/dist/shadcn/r/presentation.json +1 -1
- package/dist/shadcn/r/preview-device-frame.json +2 -2
- package/dist/shadcn/r/primitives.json +2 -2
- package/dist/shadcn/r/sections.json +1 -1
- package/dist/shadcn/r/shadcn-admin-shell.json +1 -1
- package/dist/shadcn/r/shadcn-admin.json +23 -22
- package/dist/shadcn/r/sidebar-01.json +42 -0
- package/dist/shadcn/r/sidebar-02.json +42 -0
- package/dist/shadcn/r/sidebar-03.json +30 -0
- package/dist/shadcn/r/sidebar-04.json +30 -0
- package/dist/shadcn/r/sidebar-05.json +36 -0
- package/dist/shadcn/r/sidebar-06.json +42 -0
- package/dist/shadcn/r/sidebar-07.json +54 -0
- package/dist/shadcn/r/sidebar-08.json +54 -0
- package/dist/shadcn/r/sidebar-09.json +36 -0
- package/dist/shadcn/r/sidebar-10.json +66 -0
- package/dist/shadcn/r/sidebar-11.json +30 -0
- package/dist/shadcn/r/sidebar-12.json +48 -0
- package/dist/shadcn/r/sidebar-13.json +30 -0
- package/dist/shadcn/r/sidebar-14.json +30 -0
- package/dist/shadcn/r/sidebar-15.json +84 -0
- package/dist/shadcn/r/sidebar-16.json +66 -0
- package/dist/shadcn/r/sidebar-drilldown.json +29 -0
- package/dist/shadcn/r/sidebar-primitives.json +155 -0
- package/dist/shadcn/r/uibot-base.json +3 -3
- package/dist/shadcn/r/workspace.json +11 -4
- package/dist/shadcn/registry.json +1016 -176
- package/dist/shadcn.d.ts +0 -39
- package/dist/solution-composition.d.ts +45 -0
- package/dist/solution-regions.d.ts +3 -0
- package/dist/solution-spec.d.ts +7 -0
- package/dist/template-source.d.ts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "admin-settings-notifications",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Notification preferences: shared UiBot Admin page source.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"@uibot/data",
|
|
8
|
+
"@uibot/field",
|
|
9
|
+
"@uibot/form",
|
|
10
|
+
"@uibot/layout",
|
|
11
|
+
"@uibot/nav"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "lib/uibot/templates/admin-settings-notifications.uibot.yaml",
|
|
16
|
+
"target": "lib/uibot/templates/admin-settings-notifications.uibot.yaml",
|
|
17
|
+
"content": "version: \"2.0\"\nlayout:\n navigation: sidebar\n container: fluid\n navigationStyle: attached\n offcanvas: attached\n sidebar: expanded\npages:\n - id: settings-notifications\n path: /settings/notifications\n title: Settings · Notifications\n state:\n direction: ltr\n font: Inter\n loading: false\n theme: light\n currentPath: /settings/notifications\n saving: false\n uiError: null\n saved: false\n form:\n notify: all\n communication: false\n marketing: false\n social: true\n security: true\n preferences: []\n blocks:\n - type: PageLayout\n children:\n - type: Box\n props:\n className: \"!flex-row items-start justify-between gap-4 mb-6\"\n children:\n - type: Box\n props:\n gap: xs\n children:\n - type: Heading\n props:\n level: 1\n text: Settings\n - type: Paragraph\n props:\n text: Manage your account settings and set e-mail preferences.\n muted: true\n size: sm\n - type: Divider\n - type: Box\n props:\n className: \"!flex-col gap-10 lg:!flex-row\"\n children:\n - type: Box\n props:\n className: w-full shrink-0 !flex-row flex-wrap gap-1 lg:!flex-col lg:w-48\n [&>a]:shrink-0 [&>a]:px-3 [&>a]:py-2 [&>a]:rounded-md\n lg:[&>a]:px-0 lg:[&>a]:py-0\n children:\n - type: Link\n props:\n label: Profile\n href: /settings/profile\n variant: muted\n - type: Link\n props:\n label: Account\n href: /settings/account\n variant: muted\n - type: Link\n props:\n label: Appearance\n href: /settings/appearance\n variant: muted\n - type: Link\n props:\n label: Notifications\n href: /settings/notifications\n variant: default\n className: bg-muted font-medium lg:bg-transparent\n - type: Link\n props:\n label: Display\n href: /settings/display\n variant: muted\n - type: Box\n props:\n className: max-w-2xl flex-1\n gap: lg\n children:\n - type: Box\n props:\n className: \"!flex-row items-start justify-between gap-4 mb-6\"\n children:\n - type: Box\n props:\n gap: xs\n children:\n - type: Heading\n props:\n level: 2\n text: Notifications\n - type: Paragraph\n props:\n text: Configure how you receive notifications.\n muted: true\n size: sm\n - type: Divider\n - type: Form\n props:\n label: Notifications settings\n pending:\n _or:\n - _state: saving\n - _state: loading\n idempotent: true\n children:\n - type: Field\n props:\n name: notify\n label: Notify me about...\n kind: radio\n options:\n - label: All new messages\n value: all\n - label: Direct messages and mentions\n value: mentions\n - label: Nothing\n value: none\n value:\n _bindState: form.notify\n - type: Field\n props:\n name: communication\n kind: switch\n label: Communication emails\n description: Receive emails about your account activity.\n value:\n _bindState: form.communication\n - type: Field\n props:\n name: marketing\n kind: switch\n label: Marketing emails\n description: Receive emails about new products and features.\n value:\n _bindState: form.marketing\n - type: Field\n props:\n name: social\n kind: switch\n label: Social emails\n description: Receive emails for friend requests and follows.\n value:\n _bindState: form.social\n - type: Field\n props:\n name: security\n kind: switch\n label: Security emails\n description: Receive emails about your account security.\n value:\n _bindState: form.security\n - type: Paragraph\n props:\n text:\n _state: uiError.message\n muted: true\n visible:\n _state: uiError\n - type: Form.Submit\n props:\n label: Update notifications\n disabled:\n _state: saving\n events:\n onChange:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n onSubmit:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: save-preferences\n connectionId: preferences-db\n payload:\n operation:\n _if:\n - _state: preferences.0.id\n - UpdateOne\n - InsertOne\n filter:\n id:\n _state: preferences.0.id\n data:\n section: notifications\n values:\n _event: values\n idempotencyKey:\n _event: value\n expectedVersion:\n _state: preferences.0.version\n loadingPath: saving\n errorPath: uiError\n onSuccess:\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: load-preferences\n connectionId: preferences-db\n payload:\n operation: Find\n filter:\n section: notifications\n responsePath: preferences\n loadingPath: loading\n errorPath: uiError\n onSuccess:\n - action: SetState\n params:\n path: form\n value:\n _if:\n - _state: preferences.0.id\n - _state: preferences.0.values\n - _state: form\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - action: SetState\n params:\n path: saved\n value:\n _not:\n _state: uiError\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - type: Paragraph\n props:\n text: Settings saved.\n muted: true\n visible:\n _state: saved\n events:\n onThemeChange:\n - action: SetState\n params:\n path: theme\n value:\n _event: value\n props:\n headerLinks:\n - label: Settings · Notifications\n href: /settings/notifications\n appearance: admin\n routes:\n - label: Settings · Notifications\n href: /settings/notifications\n theme:\n _state: theme\n direction:\n _state: direction\n font:\n _state: font\n lifecycle:\n onMount:\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: load-preferences\n connectionId: preferences-db\n payload:\n operation: Find\n filter:\n section: notifications\n responsePath: preferences\n loadingPath: loading\n errorPath: uiError\n onSuccess:\n - action: SetState\n params:\n path: form\n value:\n _if:\n - _state: preferences.0.id\n - _state: preferences.0.values\n - _state: form\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\nconnections:\n - id: preferences-db\n type: NowAPI.Collection\n",
|
|
18
|
+
"type": "registry:lib"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "lib/uibot/templates/admin-settings-notifications.uibot.json",
|
|
22
|
+
"target": "lib/uibot/templates/admin-settings-notifications.uibot.json",
|
|
23
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"admin-settings-notifications\",\n \"channel\": \"public\",\n \"template\": {\n \"file\": \"admin-settings-notifications.uibot.yaml\",\n \"contract\": {\n \"name\": \"admin-settings-notifications\",\n \"description\": \"Notification preferences: shared UiBot Admin page source.\",\n \"level\": \"L4\",\n \"category\": \"page\",\n \"keywords\": [\n \"admin-settings-notifications\",\n \"通知偏好设置\",\n \"Notification preferences\",\n \"settings\",\n \"notifications\"\n ],\n \"composedFrom\": [\n \"PageLayout\",\n \"Box\",\n \"Heading\",\n \"Paragraph\",\n \"Divider\",\n \"Link\",\n \"Form\",\n \"Field\",\n \"Form.Submit\"\n ]\n }\n }\n}\n",
|
|
24
|
+
"type": "registry:lib"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"meta": {
|
|
28
|
+
"uibot": {
|
|
29
|
+
"schema": "uibot.registry.item.v1",
|
|
30
|
+
"item": "admin-settings-notifications",
|
|
31
|
+
"channel": "public",
|
|
32
|
+
"template": {
|
|
33
|
+
"file": "admin-settings-notifications.uibot.yaml",
|
|
34
|
+
"contract": {
|
|
35
|
+
"name": "admin-settings-notifications",
|
|
36
|
+
"description": "Notification preferences: shared UiBot Admin page source.",
|
|
37
|
+
"level": "L4",
|
|
38
|
+
"category": "page",
|
|
39
|
+
"keywords": [
|
|
40
|
+
"admin-settings-notifications",
|
|
41
|
+
"通知偏好设置",
|
|
42
|
+
"Notification preferences",
|
|
43
|
+
"settings",
|
|
44
|
+
"notifications"
|
|
45
|
+
],
|
|
46
|
+
"composedFrom": [
|
|
47
|
+
"PageLayout",
|
|
48
|
+
"Box",
|
|
49
|
+
"Heading",
|
|
50
|
+
"Paragraph",
|
|
51
|
+
"Divider",
|
|
52
|
+
"Link",
|
|
53
|
+
"Form",
|
|
54
|
+
"Field",
|
|
55
|
+
"Form.Submit"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "admin-settings-profile",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Profile settings: shared UiBot Admin page source.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"@uibot/data",
|
|
8
|
+
"@uibot/field",
|
|
9
|
+
"@uibot/form",
|
|
10
|
+
"@uibot/layout",
|
|
11
|
+
"@uibot/nav"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "lib/uibot/templates/admin-settings-profile.uibot.yaml",
|
|
16
|
+
"target": "lib/uibot/templates/admin-settings-profile.uibot.yaml",
|
|
17
|
+
"content": "version: \"2.0\"\nlayout:\n navigation: sidebar\n container: fluid\n navigationStyle: attached\n offcanvas: attached\n sidebar: expanded\npages:\n - id: settings-profile\n path: /settings/profile\n title: Settings · Profile\n state:\n direction: ltr\n font: Inter\n loading: false\n theme: light\n currentPath: /settings/profile\n saving: false\n uiError: null\n saved: false\n form:\n username: shadcn\n email: m@example.com\n bio: I own a computer.\n urls:\n - https://shadcn.com\n preferences: []\n blocks:\n - type: PageLayout\n children:\n - type: Box\n props:\n className: \"!flex-row items-start justify-between gap-4 mb-6\"\n children:\n - type: Box\n props:\n gap: xs\n children:\n - type: Heading\n props:\n level: 1\n text: Settings\n - type: Paragraph\n props:\n text: Manage your account settings and set e-mail preferences.\n muted: true\n size: sm\n - type: Divider\n - type: Box\n props:\n className: \"!flex-col gap-10 lg:!flex-row\"\n children:\n - type: Box\n props:\n className: w-full shrink-0 lg:!flex-col lg:w-48 [&>a]:shrink-0 [&>a]:px-3\n [&>a]:py-2 [&>a]:rounded-md lg:[&>a]:px-0 lg:[&>a]:py-0\n direction: row\n wrap: true\n gap: md\n children:\n - type: Link\n props:\n label: Profile\n href: /settings/profile\n variant: default\n className: bg-muted font-medium lg:bg-transparent\n - type: Link\n props:\n label: Account\n href: /settings/account\n variant: muted\n - type: Link\n props:\n label: Appearance\n href: /settings/appearance\n variant: muted\n - type: Link\n props:\n label: Notifications\n href: /settings/notifications\n variant: muted\n - type: Link\n props:\n label: Display\n href: /settings/display\n variant: muted\n - type: Box\n props:\n className: max-w-2xl flex-1\n gap: lg\n children:\n - type: Box\n props:\n className: \"!flex-row items-start justify-between gap-4 mb-6\"\n children:\n - type: Box\n props:\n gap: xs\n children:\n - type: Heading\n props:\n level: 2\n text: Profile\n - type: Paragraph\n props:\n text: This is how others will see you on the site.\n muted: true\n size: sm\n - type: Divider\n - type: Form\n props:\n label: Profile settings\n pending:\n _or:\n - _state: saving\n - _state: loading\n idempotent: true\n children:\n - type: Field\n props:\n name: username\n label: Username\n description: This is your public display name.\n required: true\n value:\n _bindState: form.username\n - type: Field\n props:\n name: email\n label: Email\n kind: email\n required: true\n value:\n _bindState: form.email\n - type: Field\n props:\n name: bio\n label: Bio\n kind: textarea\n description: Describe your role and what you work on.\n value:\n _bindState: form.bio\n - type: Field\n props:\n name: urls\n label: URLs\n kind: urls\n description: Add links to your website, blog, or social media profiles.\n value:\n _bindState: form.urls\n events:\n onChange:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n - type: Paragraph\n props:\n text:\n _state: uiError.message\n muted: true\n visible:\n _state: uiError\n - type: Form.Submit\n props:\n label: Update profile\n disabled:\n _state: saving\n events:\n onChange:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n onSubmit:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: save-preferences\n connectionId: preferences-db\n payload:\n operation:\n _if:\n - _state: preferences.0.id\n - UpdateOne\n - InsertOne\n filter:\n id:\n _state: preferences.0.id\n data:\n section: profile\n values:\n _event: values\n idempotencyKey:\n _event: value\n expectedVersion:\n _state: preferences.0.version\n loadingPath: saving\n errorPath: uiError\n onSuccess:\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: load-preferences\n connectionId: preferences-db\n payload:\n operation: Find\n filter:\n section: profile\n responsePath: preferences\n loadingPath: loading\n errorPath: uiError\n onSuccess:\n - action: SetState\n params:\n path: form\n value:\n _if:\n - _state: preferences.0.id\n - _state: preferences.0.values\n - _state: form\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - action: SetState\n params:\n path: saved\n value:\n _not:\n _state: uiError\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - type: Paragraph\n props:\n text: Settings saved.\n muted: true\n visible:\n _state: saved\n events:\n onThemeChange:\n - action: SetState\n params:\n path: theme\n value:\n _event: value\n props:\n headerLinks:\n - label: Settings · Profile\n href: /settings/profile\n appearance: admin\n routes:\n - label: Settings · Profile\n href: /settings/profile\n theme:\n _state: theme\n direction:\n _state: direction\n font:\n _state: font\n lifecycle:\n onMount:\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: load-preferences\n connectionId: preferences-db\n payload:\n operation: Find\n filter:\n section: profile\n responsePath: preferences\n loadingPath: loading\n errorPath: uiError\n onSuccess:\n - action: SetState\n params:\n path: form\n value:\n _if:\n - _state: preferences.0.id\n - _state: preferences.0.values\n - _state: form\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\nconnections:\n - id: preferences-db\n type: NowAPI.Collection\n",
|
|
18
|
+
"type": "registry:lib"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "lib/uibot/templates/admin-settings-profile.uibot.json",
|
|
22
|
+
"target": "lib/uibot/templates/admin-settings-profile.uibot.json",
|
|
23
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"admin-settings-profile\",\n \"channel\": \"public\",\n \"template\": {\n \"file\": \"admin-settings-profile.uibot.yaml\",\n \"contract\": {\n \"name\": \"admin-settings-profile\",\n \"description\": \"Profile settings: shared UiBot Admin page source.\",\n \"level\": \"L4\",\n \"category\": \"page\",\n \"keywords\": [\n \"admin-settings-profile\",\n \"个人资料设置\",\n \"Profile settings\",\n \"settings\",\n \"profile\"\n ],\n \"composedFrom\": [\n \"PageLayout\",\n \"Box\",\n \"Heading\",\n \"Paragraph\",\n \"Divider\",\n \"Link\",\n \"Form\",\n \"Field\",\n \"Form.Submit\"\n ]\n }\n }\n}\n",
|
|
24
|
+
"type": "registry:lib"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"meta": {
|
|
28
|
+
"uibot": {
|
|
29
|
+
"schema": "uibot.registry.item.v1",
|
|
30
|
+
"item": "admin-settings-profile",
|
|
31
|
+
"channel": "public",
|
|
32
|
+
"template": {
|
|
33
|
+
"file": "admin-settings-profile.uibot.yaml",
|
|
34
|
+
"contract": {
|
|
35
|
+
"name": "admin-settings-profile",
|
|
36
|
+
"description": "Profile settings: shared UiBot Admin page source.",
|
|
37
|
+
"level": "L4",
|
|
38
|
+
"category": "page",
|
|
39
|
+
"keywords": [
|
|
40
|
+
"admin-settings-profile",
|
|
41
|
+
"个人资料设置",
|
|
42
|
+
"Profile settings",
|
|
43
|
+
"settings",
|
|
44
|
+
"profile"
|
|
45
|
+
],
|
|
46
|
+
"composedFrom": [
|
|
47
|
+
"PageLayout",
|
|
48
|
+
"Box",
|
|
49
|
+
"Heading",
|
|
50
|
+
"Paragraph",
|
|
51
|
+
"Divider",
|
|
52
|
+
"Link",
|
|
53
|
+
"Form",
|
|
54
|
+
"Field",
|
|
55
|
+
"Form.Submit"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "admin-settings",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Profile, account, appearance, notifications and display settings.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"@uibot/data",
|
|
8
|
+
"@uibot/field",
|
|
9
|
+
"@uibot/form",
|
|
10
|
+
"@uibot/layout",
|
|
11
|
+
"@uibot/nav"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "lib/uibot/templates/admin-settings.uibot.yaml",
|
|
16
|
+
"target": "lib/uibot/templates/admin-settings.uibot.yaml",
|
|
17
|
+
"content": "version: \"2.0\"\npages:\n - id: settings-profile\n path: /settings/profile\n title: Settings · Profile\n state:\n direction: ltr\n font: Inter\n loading: false\n theme: light\n currentPath: /settings/profile\n saving: false\n uiError: null\n saved: false\n form:\n username: shadcn\n email: m@example.com\n bio: I own a computer.\n urls:\n - https://shadcn.com\n preferences: []\n blocks:\n - type: PageLayout\n children:\n - type: Box\n props:\n className: \"!flex-row items-start justify-between gap-4 mb-6\"\n children:\n - type: Box\n props:\n gap: xs\n children:\n - type: Heading\n props:\n level: 1\n text: Settings\n - type: Paragraph\n props:\n text: Manage your account settings and set e-mail preferences.\n muted: true\n size: sm\n - type: Divider\n - type: Box\n props:\n className: \"!flex-col gap-10 lg:!flex-row\"\n children:\n - type: Box\n props:\n className: w-full shrink-0 lg:!flex-col lg:w-48 [&>a]:shrink-0 [&>a]:px-3\n [&>a]:py-2 [&>a]:rounded-md lg:[&>a]:px-0 lg:[&>a]:py-0\n direction: row\n wrap: true\n gap: md\n children:\n - type: Link\n props:\n label: Profile\n href: /settings/profile\n variant: default\n className: bg-muted font-medium lg:bg-transparent\n - type: Link\n props:\n label: Account\n href: /settings/account\n variant: muted\n - type: Link\n props:\n label: Appearance\n href: /settings/appearance\n variant: muted\n - type: Link\n props:\n label: Notifications\n href: /settings/notifications\n variant: muted\n - type: Link\n props:\n label: Display\n href: /settings/display\n variant: muted\n - type: Box\n props:\n className: max-w-2xl flex-1\n gap: lg\n children:\n - type: Box\n props:\n className: \"!flex-row items-start justify-between gap-4 mb-6\"\n children:\n - type: Box\n props:\n gap: xs\n children:\n - type: Heading\n props:\n level: 2\n text: Profile\n - type: Paragraph\n props:\n text: This is how others will see you on the site.\n muted: true\n size: sm\n - type: Divider\n - type: Form\n props:\n label: Profile settings\n pending:\n _or:\n - _state: saving\n - _state: loading\n idempotent: true\n children:\n - type: Field\n props:\n name: username\n label: Username\n description: This is your public display name.\n required: true\n value:\n _bindState: form.username\n - type: Field\n props:\n name: email\n label: Email\n kind: email\n required: true\n value:\n _bindState: form.email\n - type: Field\n props:\n name: bio\n label: Bio\n kind: textarea\n description: Describe your role and what you work on.\n value:\n _bindState: form.bio\n - type: Field\n props:\n name: urls\n label: URLs\n kind: urls\n description: Add links to your website, blog, or social media profiles.\n value:\n _bindState: form.urls\n events:\n onChange:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n - type: Paragraph\n props:\n text:\n _state: uiError.message\n muted: true\n visible:\n _state: uiError\n - type: Form.Submit\n props:\n label: Update profile\n disabled:\n _state: saving\n events:\n onChange:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n onSubmit:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: save-preferences\n connectionId: preferences-db\n payload:\n operation:\n _if:\n - _state: preferences.0.id\n - UpdateOne\n - InsertOne\n filter:\n id:\n _state: preferences.0.id\n data:\n section: profile\n values:\n _event: values\n idempotencyKey:\n _event: value\n expectedVersion:\n _state: preferences.0.version\n loadingPath: saving\n errorPath: uiError\n onSuccess:\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: load-preferences\n connectionId: preferences-db\n payload:\n operation: Find\n filter:\n section: profile\n responsePath: preferences\n loadingPath: loading\n errorPath: uiError\n onSuccess:\n - action: SetState\n params:\n path: form\n value:\n _if:\n - _state: preferences.0.id\n - _state: preferences.0.values\n - _state: form\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - action: SetState\n params:\n path: saved\n value:\n _not:\n _state: uiError\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - type: Paragraph\n props:\n text: Settings saved.\n muted: true\n visible:\n _state: saved\n events:\n onThemeChange:\n - action: SetState\n params:\n path: theme\n value:\n _event: value\n props:\n headerLinks:\n - label: Settings · Profile\n href: /settings/profile\n appearance: admin\n routes:\n - label: Settings · Profile\n href: /settings/profile\n theme:\n _state: theme\n direction:\n _state: direction\n font:\n _state: font\n lifecycle:\n onMount:\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: load-preferences\n connectionId: preferences-db\n payload:\n operation: Find\n filter:\n section: profile\n responsePath: preferences\n loadingPath: loading\n errorPath: uiError\n onSuccess:\n - action: SetState\n params:\n path: form\n value:\n _if:\n - _state: preferences.0.id\n - _state: preferences.0.values\n - _state: form\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - id: settings-account\n path: /settings/account\n title: Settings · Account\n state:\n direction: ltr\n font: Inter\n loading: false\n theme: light\n currentPath: /settings/account\n saving: false\n uiError: null\n saved: false\n form:\n name: shadcn\n birthday: \"\"\n language: English\n preferences: []\n blocks:\n - type: PageLayout\n children:\n - type: Box\n props:\n className: \"!flex-row items-start justify-between gap-4 mb-6\"\n children:\n - type: Box\n props:\n gap: xs\n children:\n - type: Heading\n props:\n level: 1\n text: Settings\n - type: Paragraph\n props:\n text: Manage your account settings and set e-mail preferences.\n muted: true\n size: sm\n - type: Divider\n - type: Box\n props:\n className: \"!flex-col gap-10 lg:!flex-row\"\n children:\n - type: Box\n props:\n className: w-full shrink-0 !flex-row flex-wrap gap-1 lg:!flex-col lg:w-48\n [&>a]:shrink-0 [&>a]:px-3 [&>a]:py-2 [&>a]:rounded-md\n lg:[&>a]:px-0 lg:[&>a]:py-0\n children:\n - type: Link\n props:\n label: Profile\n href: /settings/profile\n variant: muted\n - type: Link\n props:\n label: Account\n href: /settings/account\n variant: default\n className: bg-muted font-medium lg:bg-transparent\n - type: Link\n props:\n label: Appearance\n href: /settings/appearance\n variant: muted\n - type: Link\n props:\n label: Notifications\n href: /settings/notifications\n variant: muted\n - type: Link\n props:\n label: Display\n href: /settings/display\n variant: muted\n - type: Box\n props:\n className: max-w-2xl flex-1\n gap: lg\n children:\n - type: Box\n props:\n className: \"!flex-row items-start justify-between gap-4 mb-6\"\n children:\n - type: Box\n props:\n gap: xs\n children:\n - type: Heading\n props:\n level: 2\n text: Account\n - type: Paragraph\n props:\n text: Update your account settings. Set your preferred language and timezone.\n muted: true\n size: sm\n - type: Divider\n - type: Form\n props:\n label: Account settings\n pending:\n _or:\n - _state: saving\n - _state: loading\n idempotent: true\n children:\n - type: Field\n props:\n name: name\n label: Name\n description: This is the name that will be displayed on your profile.\n required: true\n value:\n _bindState: form.name\n - type: Field\n props:\n name: birthday\n label: Date of birth\n kind: date\n description: Your date of birth is used to calculate your age.\n value:\n _bindState: form.birthday\n - type: Field\n props:\n name: language\n label: Language\n kind: combobox\n options:\n - value: English\n label: English\n - value: Chinese\n label: Chinese\n - value: French\n label: French\n - value: German\n label: German\n - value: Japanese\n label: Japanese\n value:\n _bindState: form.language\n - type: Paragraph\n props:\n text:\n _state: uiError.message\n muted: true\n visible:\n _state: uiError\n - type: Form.Submit\n props:\n label: Update account\n disabled:\n _state: saving\n events:\n onChange:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n onSubmit:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: save-preferences\n connectionId: preferences-db\n payload:\n operation:\n _if:\n - _state: preferences.0.id\n - UpdateOne\n - InsertOne\n filter:\n id:\n _state: preferences.0.id\n data:\n section: account\n values:\n _event: values\n idempotencyKey:\n _event: value\n expectedVersion:\n _state: preferences.0.version\n loadingPath: saving\n errorPath: uiError\n onSuccess:\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: load-preferences\n connectionId: preferences-db\n payload:\n operation: Find\n filter:\n section: account\n responsePath: preferences\n loadingPath: loading\n errorPath: uiError\n onSuccess:\n - action: SetState\n params:\n path: form\n value:\n _if:\n - _state: preferences.0.id\n - _state: preferences.0.values\n - _state: form\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - action: SetState\n params:\n path: saved\n value:\n _not:\n _state: uiError\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - type: Paragraph\n props:\n text: Settings saved.\n muted: true\n visible:\n _state: saved\n events:\n onThemeChange:\n - action: SetState\n params:\n path: theme\n value:\n _event: value\n props:\n headerLinks:\n - label: Settings · Account\n href: /settings/account\n appearance: admin\n routes:\n - label: Settings · Account\n href: /settings/account\n theme:\n _state: theme\n direction:\n _state: direction\n font:\n _state: font\n lifecycle:\n onMount:\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: load-preferences\n connectionId: preferences-db\n payload:\n operation: Find\n filter:\n section: account\n responsePath: preferences\n loadingPath: loading\n errorPath: uiError\n onSuccess:\n - action: SetState\n params:\n path: form\n value:\n _if:\n - _state: preferences.0.id\n - _state: preferences.0.values\n - _state: form\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - id: settings-appearance\n path: /settings/appearance\n title: Settings · Appearance\n state:\n direction: ltr\n font: Inter\n loading: false\n theme: light\n currentPath: /settings/appearance\n saving: false\n uiError: null\n saved: false\n form:\n font: Inter\n theme: light\n direction: ltr\n preferences: []\n blocks:\n - type: PageLayout\n children:\n - type: Box\n props:\n className: \"!flex-row items-start justify-between gap-4 mb-6\"\n children:\n - type: Box\n props:\n gap: xs\n children:\n - type: Heading\n props:\n level: 1\n text: Settings\n - type: Paragraph\n props:\n text: Manage your account settings and set e-mail preferences.\n muted: true\n size: sm\n - type: Divider\n - type: Box\n props:\n className: \"!flex-col gap-10 lg:!flex-row\"\n children:\n - type: Box\n props:\n className: w-full shrink-0 !flex-row flex-wrap gap-1 lg:!flex-col lg:w-48\n [&>a]:shrink-0 [&>a]:px-3 [&>a]:py-2 [&>a]:rounded-md\n lg:[&>a]:px-0 lg:[&>a]:py-0\n children:\n - type: Link\n props:\n label: Profile\n href: /settings/profile\n variant: muted\n - type: Link\n props:\n label: Account\n href: /settings/account\n variant: muted\n - type: Link\n props:\n label: Appearance\n href: /settings/appearance\n variant: default\n className: bg-muted font-medium lg:bg-transparent\n - type: Link\n props:\n label: Notifications\n href: /settings/notifications\n variant: muted\n - type: Link\n props:\n label: Display\n href: /settings/display\n variant: muted\n - type: Box\n props:\n className: max-w-2xl flex-1\n gap: lg\n children:\n - type: Box\n props:\n className: \"!flex-row items-start justify-between gap-4 mb-6\"\n children:\n - type: Box\n props:\n gap: xs\n children:\n - type: Heading\n props:\n level: 2\n text: Appearance\n - type: Paragraph\n props:\n text: Customize the appearance of the app. Automatically switch between day and\n night themes.\n muted: true\n size: sm\n - type: Divider\n - type: Form\n props:\n label: Appearance settings\n pending:\n _or:\n - _state: saving\n - _state: loading\n idempotent: true\n children:\n - type: Field\n props:\n name: font\n label: Font\n kind: select\n options:\n - value: Inter\n label: Inter\n - value: System\n label: System\n - value: Manrope\n label: Manrope\n value:\n _bindState: form.font\n - type: Field\n props:\n name: theme\n label: Theme\n kind: radio\n options:\n - value: light\n label: Light\n - value: dark\n label: Dark\n - value: system\n label: System\n value:\n _bindState: form.theme\n - type: Field\n props:\n name: direction\n label: Direction\n kind: select\n options:\n - value: ltr\n label: Ltr\n - value: rtl\n label: Rtl\n value:\n _bindState: form.direction\n - type: Paragraph\n props:\n text:\n _state: uiError.message\n muted: true\n visible:\n _state: uiError\n - type: Form.Submit\n props:\n label: Update appearance\n disabled:\n _state: saving\n events:\n onChange:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n onSubmit:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: save-preferences\n connectionId: preferences-db\n payload:\n operation:\n _if:\n - _state: preferences.0.id\n - UpdateOne\n - InsertOne\n filter:\n id:\n _state: preferences.0.id\n data:\n section: appearance\n values:\n _event: values\n idempotencyKey:\n _event: value\n expectedVersion:\n _state: preferences.0.version\n loadingPath: saving\n errorPath: uiError\n onSuccess:\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: load-preferences\n connectionId: preferences-db\n payload:\n operation: Find\n filter:\n section: appearance\n responsePath: preferences\n loadingPath: loading\n errorPath: uiError\n onSuccess:\n - action: SetState\n params:\n path: form\n value:\n _if:\n - _state: preferences.0.id\n - _state: preferences.0.values\n - _state: form\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - action: SetState\n params:\n path: saved\n value:\n _not:\n _state: uiError\n - action: SetState\n params:\n path: theme\n value:\n _state: form.theme\n - action: SetState\n params:\n path: direction\n value:\n _state: form.direction\n - action: SetState\n params:\n path: font\n value:\n _state: form.font\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - type: Paragraph\n props:\n text: Settings saved.\n muted: true\n visible:\n _state: saved\n events:\n onThemeChange:\n - action: SetState\n params:\n path: theme\n value:\n _event: value\n props:\n headerLinks:\n - label: Settings · Appearance\n href: /settings/appearance\n appearance: admin\n routes:\n - label: Settings · Appearance\n href: /settings/appearance\n theme:\n _state: theme\n direction:\n _state: direction\n font:\n _state: font\n lifecycle:\n onMount:\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: load-preferences\n connectionId: preferences-db\n payload:\n operation: Find\n filter:\n section: appearance\n responsePath: preferences\n loadingPath: loading\n errorPath: uiError\n onSuccess:\n - action: SetState\n params:\n path: form\n value:\n _if:\n - _state: preferences.0.id\n - _state: preferences.0.values\n - _state: form\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - id: settings-notifications\n path: /settings/notifications\n title: Settings · Notifications\n state:\n direction: ltr\n font: Inter\n loading: false\n theme: light\n currentPath: /settings/notifications\n saving: false\n uiError: null\n saved: false\n form:\n notify: all\n communication: false\n marketing: false\n social: true\n security: true\n preferences: []\n blocks:\n - type: PageLayout\n children:\n - type: Box\n props:\n className: \"!flex-row items-start justify-between gap-4 mb-6\"\n children:\n - type: Box\n props:\n gap: xs\n children:\n - type: Heading\n props:\n level: 1\n text: Settings\n - type: Paragraph\n props:\n text: Manage your account settings and set e-mail preferences.\n muted: true\n size: sm\n - type: Divider\n - type: Box\n props:\n className: \"!flex-col gap-10 lg:!flex-row\"\n children:\n - type: Box\n props:\n className: w-full shrink-0 !flex-row flex-wrap gap-1 lg:!flex-col lg:w-48\n [&>a]:shrink-0 [&>a]:px-3 [&>a]:py-2 [&>a]:rounded-md\n lg:[&>a]:px-0 lg:[&>a]:py-0\n children:\n - type: Link\n props:\n label: Profile\n href: /settings/profile\n variant: muted\n - type: Link\n props:\n label: Account\n href: /settings/account\n variant: muted\n - type: Link\n props:\n label: Appearance\n href: /settings/appearance\n variant: muted\n - type: Link\n props:\n label: Notifications\n href: /settings/notifications\n variant: default\n className: bg-muted font-medium lg:bg-transparent\n - type: Link\n props:\n label: Display\n href: /settings/display\n variant: muted\n - type: Box\n props:\n className: max-w-2xl flex-1\n gap: lg\n children:\n - type: Box\n props:\n className: \"!flex-row items-start justify-between gap-4 mb-6\"\n children:\n - type: Box\n props:\n gap: xs\n children:\n - type: Heading\n props:\n level: 2\n text: Notifications\n - type: Paragraph\n props:\n text: Configure how you receive notifications.\n muted: true\n size: sm\n - type: Divider\n - type: Form\n props:\n label: Notifications settings\n pending:\n _or:\n - _state: saving\n - _state: loading\n idempotent: true\n children:\n - type: Field\n props:\n name: notify\n label: Notify me about...\n kind: radio\n options:\n - label: All new messages\n value: all\n - label: Direct messages and mentions\n value: mentions\n - label: Nothing\n value: none\n value:\n _bindState: form.notify\n - type: Field\n props:\n name: communication\n kind: switch\n label: Communication emails\n description: Receive emails about your account activity.\n value:\n _bindState: form.communication\n - type: Field\n props:\n name: marketing\n kind: switch\n label: Marketing emails\n description: Receive emails about new products and features.\n value:\n _bindState: form.marketing\n - type: Field\n props:\n name: social\n kind: switch\n label: Social emails\n description: Receive emails for friend requests and follows.\n value:\n _bindState: form.social\n - type: Field\n props:\n name: security\n kind: switch\n label: Security emails\n description: Receive emails about your account security.\n value:\n _bindState: form.security\n - type: Paragraph\n props:\n text:\n _state: uiError.message\n muted: true\n visible:\n _state: uiError\n - type: Form.Submit\n props:\n label: Update notifications\n disabled:\n _state: saving\n events:\n onChange:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n onSubmit:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: save-preferences\n connectionId: preferences-db\n payload:\n operation:\n _if:\n - _state: preferences.0.id\n - UpdateOne\n - InsertOne\n filter:\n id:\n _state: preferences.0.id\n data:\n section: notifications\n values:\n _event: values\n idempotencyKey:\n _event: value\n expectedVersion:\n _state: preferences.0.version\n loadingPath: saving\n errorPath: uiError\n onSuccess:\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: load-preferences\n connectionId: preferences-db\n payload:\n operation: Find\n filter:\n section: notifications\n responsePath: preferences\n loadingPath: loading\n errorPath: uiError\n onSuccess:\n - action: SetState\n params:\n path: form\n value:\n _if:\n - _state: preferences.0.id\n - _state: preferences.0.values\n - _state: form\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - action: SetState\n params:\n path: saved\n value:\n _not:\n _state: uiError\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - type: Paragraph\n props:\n text: Settings saved.\n muted: true\n visible:\n _state: saved\n events:\n onThemeChange:\n - action: SetState\n params:\n path: theme\n value:\n _event: value\n props:\n headerLinks:\n - label: Settings · Notifications\n href: /settings/notifications\n appearance: admin\n routes:\n - label: Settings · Notifications\n href: /settings/notifications\n theme:\n _state: theme\n direction:\n _state: direction\n font:\n _state: font\n lifecycle:\n onMount:\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: load-preferences\n connectionId: preferences-db\n payload:\n operation: Find\n filter:\n section: notifications\n responsePath: preferences\n loadingPath: loading\n errorPath: uiError\n onSuccess:\n - action: SetState\n params:\n path: form\n value:\n _if:\n - _state: preferences.0.id\n - _state: preferences.0.values\n - _state: form\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - id: settings-display\n path: /settings/display\n title: Settings · Display\n state:\n direction: ltr\n font: Inter\n loading: false\n theme: light\n currentPath: /settings/display\n saving: false\n uiError: null\n saved: false\n form:\n recents: true\n home: true\n applications: true\n desktop: true\n downloads: true\n documents: true\n preferences: []\n blocks:\n - type: PageLayout\n children:\n - type: Box\n props:\n className: \"!flex-row items-start justify-between gap-4 mb-6\"\n children:\n - type: Box\n props:\n gap: xs\n children:\n - type: Heading\n props:\n level: 1\n text: Settings\n - type: Paragraph\n props:\n text: Manage your account settings and set e-mail preferences.\n muted: true\n size: sm\n - type: Divider\n - type: Box\n props:\n className: \"!flex-col gap-10 lg:!flex-row\"\n children:\n - type: Box\n props:\n className: w-full shrink-0 !flex-row flex-wrap gap-1 lg:!flex-col lg:w-48\n [&>a]:shrink-0 [&>a]:px-3 [&>a]:py-2 [&>a]:rounded-md\n lg:[&>a]:px-0 lg:[&>a]:py-0\n children:\n - type: Link\n props:\n label: Profile\n href: /settings/profile\n variant: muted\n - type: Link\n props:\n label: Account\n href: /settings/account\n variant: muted\n - type: Link\n props:\n label: Appearance\n href: /settings/appearance\n variant: muted\n - type: Link\n props:\n label: Notifications\n href: /settings/notifications\n variant: muted\n - type: Link\n props:\n label: Display\n href: /settings/display\n variant: default\n className: bg-muted font-medium lg:bg-transparent\n - type: Box\n props:\n className: max-w-2xl flex-1\n gap: lg\n children:\n - type: Box\n props:\n className: \"!flex-row items-start justify-between gap-4 mb-6\"\n children:\n - type: Box\n props:\n gap: xs\n children:\n - type: Heading\n props:\n level: 2\n text: Display\n - type: Paragraph\n props:\n text: Turn items on or off to control what’s displayed in the app.\n muted: true\n size: sm\n - type: Divider\n - type: Form\n props:\n label: Display settings\n pending:\n _or:\n - _state: saving\n - _state: loading\n idempotent: true\n children:\n - type: Paragraph\n props:\n text: Select the items you want to display in the sidebar.\n muted: true\n - type: Field\n props:\n name: recents\n label: Recents\n kind: checkbox\n value:\n _bindState: form.recents\n - type: Field\n props:\n name: home\n label: Home\n kind: checkbox\n value:\n _bindState: form.home\n - type: Field\n props:\n name: applications\n label: Applications\n kind: checkbox\n value:\n _bindState: form.applications\n - type: Field\n props:\n name: desktop\n label: Desktop\n kind: checkbox\n value:\n _bindState: form.desktop\n - type: Field\n props:\n name: downloads\n label: Downloads\n kind: checkbox\n value:\n _bindState: form.downloads\n - type: Field\n props:\n name: documents\n label: Documents\n kind: checkbox\n value:\n _bindState: form.documents\n - type: Paragraph\n props:\n text:\n _state: uiError.message\n muted: true\n visible:\n _state: uiError\n - type: Form.Submit\n props:\n label: Update display\n disabled:\n _state: saving\n events:\n onChange:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n onSubmit:\n - action: SetState\n params:\n path: saved\n value: false\n - action: SetState\n params:\n path: uiError\n value: null\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: save-preferences\n connectionId: preferences-db\n payload:\n operation:\n _if:\n - _state: preferences.0.id\n - UpdateOne\n - InsertOne\n filter:\n id:\n _state: preferences.0.id\n data:\n section: display\n values:\n _event: values\n idempotencyKey:\n _event: value\n expectedVersion:\n _state: preferences.0.version\n loadingPath: saving\n errorPath: uiError\n onSuccess:\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: load-preferences\n connectionId: preferences-db\n payload:\n operation: Find\n filter:\n section: display\n responsePath: preferences\n loadingPath: loading\n errorPath: uiError\n onSuccess:\n - action: SetState\n params:\n path: form\n value:\n _if:\n - _state: preferences.0.id\n - _state: preferences.0.values\n - _state: form\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - action: SetState\n params:\n path: saved\n value:\n _not:\n _state: uiError\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\n - type: Paragraph\n props:\n text: Settings saved.\n muted: true\n visible:\n _state: saved\n events:\n onThemeChange:\n - action: SetState\n params:\n path: theme\n value:\n _event: value\n props:\n headerLinks:\n - label: Settings · Display\n href: /settings/display\n appearance: admin\n routes:\n - label: Settings · Display\n href: /settings/display\n theme:\n _state: theme\n direction:\n _state: direction\n font:\n _state: font\n lifecycle:\n onMount:\n - action: Request\n params:\n connectionId: preferences-db\n request:\n id: load-preferences\n connectionId: preferences-db\n payload:\n operation: Find\n filter:\n section: display\n responsePath: preferences\n loadingPath: loading\n errorPath: uiError\n onSuccess:\n - action: SetState\n params:\n path: form\n value:\n _if:\n - _state: preferences.0.id\n - _state: preferences.0.values\n - _state: form\n onError:\n - action: SetState\n params:\n path: requestFailed\n value: true\nconnections:\n - id: preferences-db\n type: NowAPI.Collection\n",
|
|
18
|
+
"type": "registry:lib"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "lib/uibot/templates/admin-settings.uibot.json",
|
|
22
|
+
"target": "lib/uibot/templates/admin-settings.uibot.json",
|
|
23
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"admin-settings\",\n \"channel\": \"public\",\n \"template\": {\n \"file\": \"admin-settings.uibot.yaml\",\n \"contract\": {\n \"name\": \"admin-settings\",\n \"description\": \"Profile, account, appearance, notifications and display settings.\",\n \"level\": \"L5\",\n \"category\": \"app\",\n \"keywords\": [\n \"admin-settings\",\n \"个人设置套件\",\n \"Personal settings suite\",\n \"settings\",\n \"profile\",\n \"account\",\n \"appearance\",\n \"notifications\",\n \"display\"\n ],\n \"composedFrom\": [\n \"PageLayout\",\n \"Box\",\n \"Heading\",\n \"Paragraph\",\n \"Divider\",\n \"Link\",\n \"Form\",\n \"Field\",\n \"Form.Submit\"\n ]\n }\n }\n}\n",
|
|
24
|
+
"type": "registry:lib"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"meta": {
|
|
28
|
+
"uibot": {
|
|
29
|
+
"schema": "uibot.registry.item.v1",
|
|
30
|
+
"item": "admin-settings",
|
|
31
|
+
"channel": "public",
|
|
32
|
+
"template": {
|
|
33
|
+
"file": "admin-settings.uibot.yaml",
|
|
34
|
+
"contract": {
|
|
35
|
+
"name": "admin-settings",
|
|
36
|
+
"description": "Profile, account, appearance, notifications and display settings.",
|
|
37
|
+
"level": "L5",
|
|
38
|
+
"category": "app",
|
|
39
|
+
"keywords": [
|
|
40
|
+
"admin-settings",
|
|
41
|
+
"个人设置套件",
|
|
42
|
+
"Personal settings suite",
|
|
43
|
+
"settings",
|
|
44
|
+
"profile",
|
|
45
|
+
"account",
|
|
46
|
+
"appearance",
|
|
47
|
+
"notifications",
|
|
48
|
+
"display"
|
|
49
|
+
],
|
|
50
|
+
"composedFrom": [
|
|
51
|
+
"PageLayout",
|
|
52
|
+
"Box",
|
|
53
|
+
"Heading",
|
|
54
|
+
"Paragraph",
|
|
55
|
+
"Divider",
|
|
56
|
+
"Link",
|
|
57
|
+
"Form",
|
|
58
|
+
"Field",
|
|
59
|
+
"Form.Submit"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|