@allbluecn/web-app 0.9.4 → 0.10.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/package.json +12 -10
- package/public/favicon.ico +0 -0
- package/src/__tests__/paraglide.test.ts +43 -0
- package/src/__tests__/setup.ts +27 -9
- package/src/assets/illustrations/empty-states/workspace-empty.svg +5 -0
- package/src/assets/illustrations/knowledge/law-card-illustration.svg +5 -0
- package/src/assets/logo/logo.tsx +53 -36
- package/src/components/agents/agent-card.tsx +7 -7
- package/src/components/agents/agent-form-dialog.tsx +41 -42
- package/src/components/agents/agent-selector.tsx +6 -8
- package/src/components/agents/agents-page.tsx +26 -28
- package/src/components/agents/skill-card.tsx +1 -4
- package/src/components/agents/skill-form-dialog.tsx +19 -21
- package/src/components/agents/slash-skill-menu.tsx +5 -7
- package/src/components/agents/use-agent-handlers.ts +5 -8
- package/src/components/ai/ai-chat-prompt.tsx +26 -33
- package/src/components/ai/global-chat-panel.tsx +10 -11
- package/src/components/ai/use-knowledge-bases.ts +2 -2
- package/src/components/anyhub/anyhub-app-card.tsx +13 -15
- package/src/components/anyhub/anyhub-app-runner.tsx +5 -7
- package/src/components/anyhub/anyhub-install-dialog.tsx +16 -18
- package/src/components/anyhub/anyhub-management-view.tsx +9 -11
- package/src/components/anyhub/anyhub-marketplace-view.tsx +14 -17
- package/src/components/anyhub/anyhub-permission-panel.tsx +8 -11
- package/src/components/anyhub/anyhub-provider.tsx +0 -1
- package/src/components/anyhub/anyhub-top-nav.tsx +5 -8
- package/src/components/auth/auth-header.tsx +2 -2
- package/src/components/auth/icon-input.tsx +0 -1
- package/src/components/auth/oauth-section.tsx +3 -5
- package/src/components/auth/password-input.tsx +2 -4
- package/src/components/auth/session-guard.tsx +0 -1
- package/src/components/auth/sso-section.tsx +3 -4
- package/src/components/billing/__tests__/seats-manager.test.tsx +5 -9
- package/src/components/billing/billing-panel.tsx +5 -6
- package/src/components/billing/checkout-redirect.ts +6 -10
- package/src/components/billing/feature-gate.tsx +2 -3
- package/src/components/billing/invoice-history.tsx +9 -11
- package/src/components/billing/login-prompt-dialog.tsx +10 -11
- package/src/components/billing/pricing-card.tsx +6 -7
- package/src/components/billing/pricing-page.tsx +4 -5
- package/src/components/billing/seats-manager.tsx +19 -20
- package/src/components/billing/subscription-card.tsx +13 -14
- package/src/components/billing/upgrade-prompt.tsx +11 -13
- package/src/components/changelog/changelog-page.tsx +36 -26
- package/src/components/chat/ai-chat-history/components/conversation-header.tsx +4 -5
- package/src/components/chat/ai-chat-history/components/conversation-item.tsx +15 -17
- package/src/components/chat/ai-chat-history/components/conversation-search.tsx +3 -4
- package/src/components/chat/ai-chat-history/components/empty-state.tsx +5 -6
- package/src/components/chat/ai-chat-history/index.tsx +11 -15
- package/src/components/chat/ai-chat-history/utils/group-conversations.ts +9 -2
- package/src/components/chat/ai-citations/components/citation-item.tsx +3 -5
- package/src/components/chat/ai-citations/components/citations-list.tsx +4 -6
- package/src/components/chat/ai-citations/components/inline-citation.tsx +2 -4
- package/src/components/chat/ai-citations/components/source-components.tsx +6 -10
- package/src/components/chat/ai-citations/index.tsx +3 -4
- package/src/components/chat/ai-citations/utils.ts +15 -3
- package/src/components/chat/ai-conversation.tsx +10 -12
- package/src/components/chat/ai-message/components/message-actions.tsx +7 -9
- package/src/components/chat/ai-message/components/streaming-indicator.tsx +3 -4
- package/src/components/chat/ai-message/index.tsx +5 -5
- package/src/components/chat/ai-message/utils/dom-utils.ts +1 -1
- package/src/components/chat/ai-prompt-input/components/action-buttons.tsx +14 -16
- package/src/components/chat/ai-prompt-input/components/agent-mode-select.tsx +10 -5
- package/src/components/chat/ai-prompt-input/components/context-badge.tsx +2 -3
- package/src/components/chat/ai-prompt-input/components/kb-context-selector.tsx +6 -8
- package/src/components/chat/ai-prompt-input/components/model-select.tsx +14 -7
- package/src/components/chat/ai-prompt-input/components/page-user-context-selector.tsx +6 -8
- package/src/components/chat/ai-prompt-input/index.tsx +18 -11
- package/src/components/chat/ai-prompt-input/types.ts +6 -5
- package/src/components/chat/ai-thinking.tsx +6 -9
- package/src/components/chat/chat-thread-page.tsx +4 -5
- package/src/components/chat/interrupt-approval.tsx +6 -8
- package/src/components/command/command-palette.tsx +7 -10
- package/src/components/design/project-card.tsx +2 -3
- package/src/components/design/sketch/code-preview.tsx +3 -4
- package/src/components/design/sketch/export-panel.tsx +3 -4
- package/src/components/design/sketch/property-panel.tsx +16 -17
- package/src/components/error/global-error-boundary.tsx +65 -0
- package/src/components/forms/app-array-field.tsx +3 -4
- package/src/components/forms/app-combobox.tsx +2 -3
- package/src/components/forms/app-date-picker.tsx +2 -3
- package/src/components/forms/app-form-dialog.tsx +3 -4
- package/src/components/forms/app-select.tsx +2 -3
- package/src/components/forms/hooks/use-form-submit.ts +2 -2
- package/src/components/forms/schemas/common.ts +4 -6
- package/src/components/hotkeys/shortcuts-panel.tsx +2 -3
- package/src/components/iteration/auto-schedule-dialog.tsx +12 -13
- package/src/components/iteration/burndown-chart.tsx +6 -8
- package/src/components/iteration/constants.ts +5 -4
- package/src/components/iteration/create-iteration-dialog.tsx +14 -15
- package/src/components/iteration/iteration-card.tsx +3 -4
- package/src/components/iteration/iteration-editor.tsx +7 -8
- package/src/components/iteration/iteration-progress-bar.tsx +3 -5
- package/src/components/iteration/iteration-status-badge.tsx +1 -3
- package/src/components/kibo-ui/contribution-graph/index.tsx +37 -9
- package/src/components/knowledge/dialog/knowledge-form-dialog.tsx +8 -9
- package/src/components/knowledge/doc-properties.tsx +12 -13
- package/src/components/knowledge/editor/doc-header.tsx +7 -8
- package/src/components/knowledge/editor/knowledge-doc-editor.tsx +9 -9
- package/src/components/knowledge/knowledge-homepage.tsx +6 -7
- package/src/components/knowledge/knowledge-tag-input.tsx +3 -4
- package/src/components/knowledge/knowledge-toolbar.tsx +38 -40
- package/src/components/knowledge/knowledge-tree-item.tsx +21 -22
- package/src/components/knowledge/knowledge-tree.tsx +15 -16
- package/src/components/knowledge-public/bookmark-card.tsx +13 -14
- package/src/components/knowledge-public/bookmark-form-dialog.tsx +25 -26
- package/src/components/knowledge-public/knowledge-card-grid.tsx +3 -3
- package/src/components/knowledge-public/knowledge-filters.tsx +9 -10
- package/src/components/knowledge-public/knowledge-form-dialog.tsx +62 -63
- package/src/components/knowledge-public/knowledge-search-bar.tsx +3 -4
- package/src/components/knowledge-public/legal-compliance-editor.tsx +30 -31
- package/src/components/knowledge-public/markdown-editor.tsx +3 -4
- package/src/components/knowledge-public/markdown-view.tsx +2 -3
- package/src/components/knowledge-public/sharers-avatar-group.tsx +3 -4
- package/src/components/knowledge-public/tag-filter.tsx +3 -4
- package/src/components/layout/sidebar-03/__tests__/nav-workspace.test.tsx +42 -79
- package/src/components/layout/sidebar-03/__tests__/user-menu-anonymous.test.tsx +51 -0
- package/src/components/layout/sidebar-03/app-sidebar.tsx +3 -4
- package/src/components/layout/sidebar-03/index.tsx +0 -1
- package/src/components/layout/sidebar-03/nav-anyhub.tsx +4 -5
- package/src/components/layout/sidebar-03/nav-knowledge.tsx +80 -37
- package/src/components/layout/sidebar-03/nav-main.tsx +10 -12
- package/src/components/layout/sidebar-03/nav-notifications.tsx +19 -28
- package/src/components/layout/sidebar-03/nav-search-trigger.tsx +3 -5
- package/src/components/layout/sidebar-03/nav-workspace.tsx +32 -12
- package/src/components/layout/sidebar-03/team-switcher.tsx +0 -1
- package/src/components/layout/sidebar-03/user-menu.tsx +33 -13
- package/src/components/magicui/components/animate/avatar-group.tsx +0 -1
- package/src/components/magicui/primitives/animate/avatar-group.tsx +0 -1
- package/src/components/magicui/primitives/animate/slot.tsx +0 -1
- package/src/components/magicui/primitives/animate/tooltip.tsx +0 -1
- package/src/components/magicui/sparkles-text.tsx +0 -1
- package/src/components/mindmap/mindmap-doc-editor.tsx +15 -15
- package/src/components/notifications/settings-notifications.tsx +22 -23
- package/src/components/notifications/team-notifications.tsx +27 -29
- package/src/components/plugin-slots/__tests__/plugin-settings-tabs.test.tsx +4 -4
- package/src/components/plugin-slots/plugin-settings-tabs.tsx +15 -11
- package/src/components/project/create-project-dialog.tsx +60 -34
- package/src/components/project/invite-member-dialog.tsx +20 -21
- package/src/components/project/project-activity-list.tsx +19 -24
- package/src/components/project/project-member-manager.tsx +27 -28
- package/src/components/project/project-module-card.tsx +5 -6
- package/src/components/project/schemas/create-project.ts +3 -5
- package/src/components/prototype/component/GenericPrototype.tsx +0 -1
- package/src/components/prototype/component-preview.tsx +0 -1
- package/src/components/settings/ai/api-key-field.tsx +8 -10
- package/src/components/settings/ai/create-custom-model-dialog.tsx +28 -21
- package/src/components/settings/ai/create-custom-provider-dialog.tsx +15 -16
- package/src/components/settings/ai/model-card.tsx +25 -10
- package/src/components/settings/ai/model-manager.tsx +24 -16
- package/src/components/settings/ai/provider-card.tsx +9 -11
- package/src/components/settings/ai/provider-detail-form.tsx +24 -26
- package/src/components/settings/ai/provider-grid.tsx +23 -13
- package/src/components/settings/language-selector.tsx +13 -15
- package/src/components/settings/personal-team/account/account-client.tsx +14 -16
- package/src/components/settings/personal-team/account/avatar/notion-avatar-editor.tsx +36 -28
- package/src/components/settings/personal-team/account/settings-profile.tsx +39 -40
- package/src/components/settings/personal-team/team/team-client.tsx +45 -50
- package/src/components/settings/personal-team/team/team-invitations.tsx +89 -95
- package/src/components/settings/personal-team/team/team-member-list.tsx +50 -47
- package/src/components/shadcn-space/blocks/pricing-01/pricing.tsx +170 -172
- package/src/components/shared-kit/data-viz/contribution-graph-tooltip.tsx +128 -15
- package/src/components/shared-kit/dialogs/name-confirm-dialog.tsx +16 -16
- package/src/components/shared-kit/i18n/language-switcher.tsx +6 -9
- package/src/components/shared-kit/i18n/translator-text.tsx +2 -4
- package/src/components/shared-kit/icons/lucide-icon-picker/panel.tsx +7 -8
- package/src/components/shared-kit/logos/logo-icon.tsx +64 -0
- package/src/components/shared-kit/navigation/nav-float-button.tsx +3 -5
- package/src/components/shared-kit/pages/placeholder-page.tsx +2 -4
- package/src/components/shared-kit/theme/animated-theme-toggler.tsx +0 -1
- package/src/components/shared-kit/theme/theme-toggle.tsx +0 -1
- package/src/components/shared-kit/timezone/timezone-select.tsx +6 -7
- package/src/components/story/__tests__/constants.test.ts +7 -7
- package/src/components/story/__tests__/dependency-type-badge.test.ts +5 -5
- package/src/components/story/ai/action-registry.ts +12 -11
- package/src/components/story/ai/handlers/more-popover.tsx +5 -6
- package/src/components/story/ai/prototype-dialog.tsx +9 -10
- package/src/components/story/ai/split-dialog.tsx +22 -23
- package/src/components/story/ai/story-ai-panel.tsx +29 -30
- package/src/components/story/ai/story-ai-preview-list.tsx +16 -9
- package/src/components/story/ai/story-ai-toolbar.tsx +12 -13
- package/src/components/story/columns.tsx +33 -17
- package/src/components/story/constants.ts +73 -69
- package/src/components/story/create-story-dialog.tsx +13 -14
- package/src/components/story/detail/__tests__/categories.test.tsx +8 -10
- package/src/components/story/detail/__tests__/dependencies-button.test.tsx +3 -5
- package/src/components/story/detail/activity-tabs.tsx +6 -7
- package/src/components/story/detail/activity-timeline.tsx +33 -35
- package/src/components/story/detail/comment-input.tsx +7 -8
- package/src/components/story/detail/comment-item.tsx +15 -16
- package/src/components/story/detail/comment-thread.tsx +6 -7
- package/src/components/story/detail/reaction-bar.tsx +2 -3
- package/src/components/story/detail/story-detail-body.tsx +26 -28
- package/src/components/story/detail/story-detail-toolbar/associated-attachments-panel.tsx +42 -45
- package/src/components/story/detail/story-detail-toolbar/categories.tsx +13 -14
- package/src/components/story/detail/story-detail-toolbar/children.tsx +19 -22
- package/src/components/story/detail/story-detail-toolbar/dependencies.tsx +3 -5
- package/src/components/story/detail/story-detail-toolbar/dependency-panel.tsx +30 -20
- package/src/components/story/detail/story-detail-toolbar.tsx +16 -11
- package/src/components/story/detail/story-properties.tsx +7 -8
- package/src/components/story/display/__tests__/display-dropdown.test.tsx +3 -5
- package/src/components/story/display/__tests__/use-paged-story-groups.test.ts +2 -0
- package/src/components/story/display/constants.ts +27 -26
- package/src/components/story/display/display-dropdown.tsx +20 -26
- package/src/components/story/display/group-resolver.tsx +12 -14
- package/src/components/story/display/use-grouped-stories.ts +3 -5
- package/src/components/story/display/use-paged-story-groups.ts +12 -13
- package/src/components/story/filters/add-filter-dropdown.tsx +4 -5
- package/src/components/story/filters/applied-filters.tsx +7 -9
- package/src/components/story/filters/filter-condition.tsx +9 -12
- package/src/components/story/filters/filter-row.tsx +5 -6
- package/src/components/story/filters/filter-toggle.tsx +2 -3
- package/src/components/story/filters/filter-types.ts +24 -23
- package/src/components/story/filters/filter-value-input.tsx +3 -4
- package/src/components/story/infinite-scroll-sentinel.tsx +2 -3
- package/src/components/story/inline-editors/__tests__/dependency-type-select.test.tsx +18 -23
- package/src/components/story/inline-editors/__tests__/labels-editor.test.tsx +9 -11
- package/src/components/story/inline-editors/__tests__/priority-editor.test.tsx +21 -25
- package/src/components/story/inline-editors/__tests__/state-editor.test.tsx +21 -25
- package/src/components/story/inline-editors/assignee-editor.tsx +8 -9
- package/src/components/story/inline-editors/date-editor.tsx +4 -5
- package/src/components/story/inline-editors/dependency-type-select.tsx +15 -12
- package/src/components/story/inline-editors/inline-trigger.tsx +2 -3
- package/src/components/story/inline-editors/labels-editor.tsx +16 -17
- package/src/components/story/inline-editors/parent-story-editor.tsx +3 -4
- package/src/components/story/inline-editors/priority-editor.tsx +6 -8
- package/src/components/story/inline-editors/state-editor.tsx +6 -7
- package/src/components/story/inline-editors/story-select-dialog.tsx +25 -26
- package/src/components/story/inline-editors/title-editor.tsx +2 -3
- package/src/components/story/peek-panel.tsx +6 -7
- package/src/components/story/relations/__tests__/knowledge-select-dialog.test.tsx +2 -0
- package/src/components/story/relations/__tests__/link-manage-dialog.test.tsx +2 -0
- package/src/components/story/relations/attachment-manage-dialog.tsx +23 -24
- package/src/components/story/relations/general-groups.ts +12 -29
- package/src/components/story/relations/knowledge-select-dialog.tsx +21 -22
- package/src/components/story/relations/link-manage-dialog.tsx +12 -13
- package/src/components/story/relations/story-ref-row.tsx +20 -21
- package/src/components/story/schemas/story-create.ts +3 -5
- package/src/components/story/search-popover.tsx +5 -6
- package/src/components/story/story-list-table.tsx +3 -4
- package/src/components/story/story-list-view.tsx +9 -10
- package/src/components/story/story-panel-header.tsx +27 -28
- package/src/components/story/story-toolbar.tsx +11 -12
- package/src/components/story/transfer-story-popover.tsx +15 -16
- package/src/components/story/views/calendar-view.tsx +12 -14
- package/src/components/story/views/create-view-dialog.tsx +19 -52
- package/src/components/story/views/kanban-board.tsx +9 -12
- package/src/components/story/views/kanban-card.tsx +1 -3
- package/src/components/story/views/story-list/__tests__/batch-toolbar.test.tsx +9 -2
- package/src/components/story/views/story-list/__tests__/group-header.test.tsx +15 -17
- package/src/components/story/views/story-list/batch-preview-dialog.tsx +26 -28
- package/src/components/story/views/story-list/batch-toolbar.tsx +12 -13
- package/src/components/story/views/story-list/group.tsx +9 -11
- package/src/components/story/views/story-list/index.tsx +13 -14
- package/src/components/story/views/story-list/inline-story-creator.tsx +6 -7
- package/src/components/story/views/story-list/row.tsx +6 -7
- package/src/components/story/views/timeline-view.tsx +7 -8
- package/src/components/story/views/view-list-section.tsx +14 -16
- package/src/components/story/views/view-selector-button.tsx +6 -7
- package/src/components/story/views/view-switcher.tsx +9 -10
- package/src/components/story/views/view-types.ts +15 -15
- package/src/components/tiptap/extension/code-block-ellipsis-input-extension.ts +0 -1
- package/src/components/tiptap/hooks/use-composed-ref.ts +0 -1
- package/src/components/tiptap/hooks/use-cursor-visibility.ts +0 -1
- package/src/components/tiptap/hooks/use-floating-element.ts +0 -1
- package/src/components/tiptap/hooks/use-is-breakpoint.ts +0 -1
- package/src/components/tiptap/hooks/use-isomorphic-layout-effect.ts +0 -1
- package/src/components/tiptap/hooks/use-menu-navigation.ts +0 -1
- package/src/components/tiptap/hooks/use-on-click-outside.ts +0 -1
- package/src/components/tiptap/hooks/use-tiptap-editor.ts +0 -1
- package/src/components/tiptap/hooks/use-ui-editor-state.ts +0 -1
- package/src/components/tiptap/mindmap/lib/__tests__/default-mindmap-data.test.ts +3 -2
- package/src/components/tiptap/mindmap/lib/default-mindmap-data.ts +2 -2
- package/src/components/tiptap/mindmap/mind-map.tsx +36 -39
- package/src/components/tiptap/mindmap/mindmap-fullscreen-dialog.tsx +2 -3
- package/src/components/tiptap/node/annotation-node/annotation-node-view.tsx +11 -12
- package/src/components/tiptap/node/doc-card-extension.tsx +8 -10
- package/src/components/tiptap/node/image-node/image-node-floating.tsx +2 -3
- package/src/components/tiptap/node/image-upload-node/image-upload-node.tsx +0 -1
- package/src/components/tiptap/node/mention-extension.ts +5 -5
- package/src/components/tiptap/node/table-node/hooks/use-table-handle-state.ts +0 -1
- package/src/components/tiptap/node/table-node/ui/table-add-row-column-button/table-add-row-column-button.tsx +0 -1
- package/src/components/tiptap/node/table-node/ui/table-add-row-column-button/use-table-add-row-column.ts +5 -6
- package/src/components/tiptap/node/table-node/ui/table-align-cell-button/table-align-cell-button.tsx +0 -1
- package/src/components/tiptap/node/table-node/ui/table-align-cell-button/use-table-align-cell.ts +8 -9
- package/src/components/tiptap/node/table-node/ui/table-alignment-menu/table-alignment-menu.tsx +2 -4
- package/src/components/tiptap/node/table-node/ui/table-cell-handle-menu/table-cell-handle-menu.tsx +2 -5
- package/src/components/tiptap/node/table-node/ui/table-clear-row-column-content-button/table-clear-row-column-content-button.tsx +0 -1
- package/src/components/tiptap/node/table-node/ui/table-clear-row-column-content-button/use-table-clear-row-column-content.ts +4 -5
- package/src/components/tiptap/node/table-node/ui/table-delete-row-column-button/table-delete-row-column-button.tsx +0 -1
- package/src/components/tiptap/node/table-node/ui/table-delete-row-column-button/use-table-delete-row-column.ts +3 -4
- package/src/components/tiptap/node/table-node/ui/table-duplicate-row-column-button/table-duplicate-row-column-button.tsx +0 -1
- package/src/components/tiptap/node/table-node/ui/table-duplicate-row-column-button/use-table-duplicate-row-column.ts +3 -4
- package/src/components/tiptap/node/table-node/ui/table-extend-row-column-button/table-extend-row-column-button.tsx +2 -4
- package/src/components/tiptap/node/table-node/ui/table-fit-to-width-button/table-fit-to-width-button.tsx +0 -1
- package/src/components/tiptap/node/table-node/ui/table-fit-to-width-button/use-table-fit-to-width.ts +3 -4
- package/src/components/tiptap/node/table-node/ui/table-handle/table-handle.tsx +0 -1
- package/src/components/tiptap/node/table-node/ui/table-handle-menu/table-handle-menu.tsx +3 -5
- package/src/components/tiptap/node/table-node/ui/table-header-row-column-button/table-header-row-column-button.tsx +0 -1
- package/src/components/tiptap/node/table-node/ui/table-header-row-column-button/use-table-header-row-column.ts +3 -4
- package/src/components/tiptap/node/table-node/ui/table-merge-split-cell-button/table-merge-split-cell-button.tsx +0 -1
- package/src/components/tiptap/node/table-node/ui/table-merge-split-cell-button/use-table-merge-split-cell.ts +3 -4
- package/src/components/tiptap/node/table-node/ui/table-move-row-column-button/table-move-row-column-button.tsx +0 -1
- package/src/components/tiptap/node/table-node/ui/table-move-row-column-button/use-table-move-row-column.ts +9 -10
- package/src/components/tiptap/node/table-node/ui/table-selection-overlay/table-selection-overlay.tsx +0 -1
- package/src/components/tiptap/node/table-node/ui/table-selection-overlay/use-resize-overlay.ts +0 -1
- package/src/components/tiptap/node/table-node/ui/table-sort-row-column-button/table-sort-row-column-button.tsx +0 -1
- package/src/components/tiptap/node/table-node/ui/table-sort-row-column-button/use-table-sort-row-column.ts +5 -6
- package/src/components/tiptap/node/table-node/ui/table-trigger-button/table-grid-selector.tsx +2 -3
- package/src/components/tiptap/node/table-node/ui/table-trigger-button/table-trigger-button.tsx +0 -1
- package/src/components/tiptap/node/table-node/ui/table-trigger-button/use-table-trigger.ts +3 -4
- package/src/components/tiptap/node/toc-node/toc-node.tsx +2 -4
- package/src/components/tiptap/node/toc-node/ui/toc-show-title-button/toc-show-title-button.tsx +0 -1
- package/src/components/tiptap/node/toc-node/ui/toc-show-title-button/toc-show-title.ts +2 -3
- package/src/components/tiptap/node/toc-node/ui/toc-sidebar/toc-sidebar.tsx +2 -5
- package/src/components/tiptap/notion-like/notion-like-editor-header.tsx +2 -4
- package/src/components/tiptap/notion-like/notion-like-editor-mobile-toolbar.tsx +17 -23
- package/src/components/tiptap/notion-like/notion-like-editor-theme-toggle.tsx +2 -5
- package/src/components/tiptap/notion-like/notion-like-editor-toolbar-floating.tsx +16 -12
- package/src/components/tiptap/notion-like/notion-like-editor.tsx +2 -7
- package/src/components/tiptap/notion-like/setup-error-message/setup-error-message.tsx +0 -1
- package/src/components/tiptap/ui/ai-ask-button/ai-ask-button.tsx +0 -1
- package/src/components/tiptap/ui/ai-ask-button/use-ai-ask.ts +2 -3
- package/src/components/tiptap/ui/ai-menu/ai-menu-actions/ai-menu-actions.tsx +4 -6
- package/src/components/tiptap/ui/ai-menu/ai-menu-input/ai-menu-input.tsx +6 -10
- package/src/components/tiptap/ui/ai-menu/ai-menu-items/ai-menu-items-constants.ts +36 -36
- package/src/components/tiptap/ui/ai-menu/ai-menu-items/ai-menu-items.tsx +13 -16
- package/src/components/tiptap/ui/ai-menu/ai-menu-items/language-selection-submenu.tsx +3 -4
- package/src/components/tiptap/ui/ai-menu/ai-menu-items/tone-selection-submenu.tsx +2 -3
- package/src/components/tiptap/ui/ai-menu/ai-menu-utils.ts +3 -3
- package/src/components/tiptap/ui/ai-menu/ai-menu.tsx +3 -5
- package/src/components/tiptap/ui/blockquote-button/blockquote-button.tsx +2 -6
- package/src/components/tiptap/ui/blockquote-button/use-blockquote.ts +2 -3
- package/src/components/tiptap/ui/code-block-button/code-block-button.tsx +2 -6
- package/src/components/tiptap/ui/code-block-button/use-code-block.ts +2 -3
- package/src/components/tiptap/ui/color-highlight-button/color-highlight-button.tsx +0 -1
- package/src/components/tiptap/ui/color-highlight-button/use-color-highlight.ts +14 -14
- package/src/components/tiptap/ui/color-highlight-popover/color-highlight-popover.tsx +9 -11
- package/src/components/tiptap/ui/color-menu/color-menu.tsx +5 -11
- package/src/components/tiptap/ui/color-text-button/color-text-button.tsx +2 -3
- package/src/components/tiptap/ui/color-text-button/use-color-text.ts +12 -13
- package/src/components/tiptap/ui/color-text-popover/color-text-popover.tsx +6 -10
- package/src/components/tiptap/ui/color-text-popover/use-color-text-popover.ts +2 -3
- package/src/components/tiptap/ui/copy-anchor-link-button/copy-anchor-link-button.tsx +2 -6
- package/src/components/tiptap/ui/copy-anchor-link-button/use-copy-anchor-link.ts +2 -3
- package/src/components/tiptap/ui/copy-anchor-link-button/use-scroll-to-hash.ts +0 -1
- package/src/components/tiptap/ui/copy-to-clipboard-button/copy-to-clipboard-button.tsx +2 -6
- package/src/components/tiptap/ui/copy-to-clipboard-button/use-copy-to-clipboard.ts +2 -3
- package/src/components/tiptap/ui/delete-node-button/delete-node-button.tsx +2 -6
- package/src/components/tiptap/ui/delete-node-button/use-delete-node.ts +2 -3
- package/src/components/tiptap/ui/doc-reference-floating/doc-reference-floating.tsx +10 -11
- package/src/components/tiptap/ui/doc-reference-interaction/doc-reference-interaction.tsx +10 -11
- package/src/components/tiptap/ui/drag-context-menu/drag-context-menu.tsx +7 -9
- package/src/components/tiptap/ui/duplicate-button/duplicate-button.tsx +2 -6
- package/src/components/tiptap/ui/duplicate-button/use-duplicate.ts +2 -3
- package/src/components/tiptap/ui/emoji-dropdown-menu/emoji-dropdown-menu.tsx +0 -1
- package/src/components/tiptap/ui/emoji-menu/emoji-menu.tsx +2 -5
- package/src/components/tiptap/ui/emoji-trigger-button/emoji-trigger-button.tsx +2 -6
- package/src/components/tiptap/ui/emoji-trigger-button/use-emoji-trigger.ts +2 -3
- package/src/components/tiptap/ui/heading-button/heading-button.tsx +0 -1
- package/src/components/tiptap/ui/heading-button/use-heading.ts +7 -8
- package/src/components/tiptap/ui/image-align-button/image-align-button.tsx +0 -1
- package/src/components/tiptap/ui/image-align-button/use-image-align.ts +4 -5
- package/src/components/tiptap/ui/image-caption-button/image-caption-button.tsx +0 -1
- package/src/components/tiptap/ui/image-caption-button/use-image-caption.ts +2 -3
- package/src/components/tiptap/ui/image-download-button/image-download-button.tsx +0 -1
- package/src/components/tiptap/ui/image-download-button/use-image-download.ts +2 -3
- package/src/components/tiptap/ui/image-upload-button/image-upload-button.tsx +0 -1
- package/src/components/tiptap/ui/image-upload-button/use-image-upload.ts +2 -3
- package/src/components/tiptap/ui/improve-dropdown/improve-dropdown.tsx +14 -17
- package/src/components/tiptap/ui/improve-dropdown/use-improve-dropdown.ts +2 -3
- package/src/components/tiptap/ui/indent-button/indent-button.tsx +0 -1
- package/src/components/tiptap/ui/indent-button/use-indent.ts +3 -4
- package/src/components/tiptap/ui/link-popover/link-popover.tsx +7 -12
- package/src/components/tiptap/ui/link-popover/use-link-popover.ts +2 -3
- package/src/components/tiptap/ui/list-button/list-button.tsx +0 -1
- package/src/components/tiptap/ui/list-button/use-list.ts +4 -5
- package/src/components/tiptap/ui/mark-button/mark-button.tsx +0 -1
- package/src/components/tiptap/ui/mark-button/use-mark.ts +8 -9
- package/src/components/tiptap/ui/mention-dropdown-menu/mention-dropdown-menu.tsx +0 -2
- package/src/components/tiptap/ui/mention-trigger-button/mention-trigger-button.tsx +0 -1
- package/src/components/tiptap/ui/mention-trigger-button/use-mention-trigger.ts +2 -3
- package/src/components/tiptap/ui/move-node-button/move-node-button.tsx +2 -6
- package/src/components/tiptap/ui/move-node-button/use-move-node.ts +2 -3
- package/src/components/tiptap/ui/reference-dropdown-menu/reference-dropdown-menu.tsx +6 -10
- package/src/components/tiptap/ui/reset-all-formatting-button/reset-all-formatting-button.tsx +2 -6
- package/src/components/tiptap/ui/reset-all-formatting-button/use-reset-all-formatting.ts +2 -3
- package/src/components/tiptap/ui/slash-command-trigger-button/slash-command-trigger-button.tsx +0 -1
- package/src/components/tiptap/ui/slash-command-trigger-button/use-slash-command-trigger.ts +2 -3
- package/src/components/tiptap/ui/slash-dropdown-menu/slash-dropdown-menu.tsx +2 -5
- package/src/components/tiptap/ui/slash-dropdown-menu/use-slash-dropdown-menu.ts +78 -79
- package/src/components/tiptap/ui/text-align-button/text-align-button.tsx +0 -1
- package/src/components/tiptap/ui/text-align-button/use-text-align.ts +5 -6
- package/src/components/tiptap/ui/text-button/text-button.tsx +2 -6
- package/src/components/tiptap/ui/text-button/use-text.ts +2 -3
- package/src/components/tiptap/ui/turn-into-dropdown/turn-into-dropdown.tsx +4 -7
- package/src/components/tiptap/ui/turn-into-dropdown/use-turn-into-dropdown.ts +11 -12
- package/src/components/tiptap/ui/undo-redo-button/undo-redo-button.tsx +0 -1
- package/src/components/tiptap/ui/undo-redo-button/use-undo-redo.ts +3 -4
- package/src/components/tiptap/ui-primitive/avatar/avatar.tsx +0 -1
- package/src/components/tiptap/ui-primitive/badge/badge.tsx +0 -1
- package/src/components/tiptap/ui-primitive/button/button.tsx +0 -1
- package/src/components/tiptap/ui-primitive/card/card.tsx +0 -1
- package/src/components/tiptap/ui-primitive/combobox/combobox.tsx +0 -1
- package/src/components/tiptap/ui-primitive/dropdown-menu/dropdown-menu.tsx +0 -1
- package/src/components/tiptap/ui-primitive/input/input.tsx +0 -1
- package/src/components/tiptap/ui-primitive/input-group/input-group.tsx +0 -1
- package/src/components/tiptap/ui-primitive/label/label.tsx +0 -1
- package/src/components/tiptap/ui-primitive/menu/menu-context.ts +0 -1
- package/src/components/tiptap/ui-primitive/menu/menu-hooks.ts +0 -1
- package/src/components/tiptap/ui-primitive/menu/menu-types.ts +0 -1
- package/src/components/tiptap/ui-primitive/menu/menu-utils.ts +0 -1
- package/src/components/tiptap/ui-primitive/menu/menu.tsx +0 -1
- package/src/components/tiptap/ui-primitive/popover/popover.tsx +0 -1
- package/src/components/tiptap/ui-primitive/separator/separator.tsx +0 -1
- package/src/components/tiptap/ui-primitive/sidebar/sidebar.tsx +0 -1
- package/src/components/tiptap/ui-primitive/spacer/spacer.tsx +0 -1
- package/src/components/tiptap/ui-primitive/textarea/textarea.tsx +0 -1
- package/src/components/tiptap/ui-primitive/textarea-autosize/textarea-autosize.tsx +0 -1
- package/src/components/tiptap/ui-primitive/toolbar/toolbar.tsx +0 -1
- package/src/components/tiptap/ui-primitive/tooltip/tooltip.tsx +0 -1
- package/src/components/tiptap/ui-utils/floating-element/floating-element.tsx +0 -1
- package/src/components/tiptap/ui-utils/suggestion-menu/suggestion-menu.tsx +0 -1
- package/src/components/ui/field.tsx +1 -1
- package/src/components/ui/radio-group.tsx +2 -3
- package/src/components/ui/spinner.tsx +2 -2
- package/src/components/workspace/create-workspace-dialog.tsx +12 -13
- package/src/components/workspace/delete-workspace-options.tsx +177 -0
- package/src/components/workspace/edit-workspace-dialog.tsx +153 -0
- package/src/components/workspace/schemas/create-workspace.ts +2 -2
- package/src/components/workspace/workspace-activity-card.tsx +60 -0
- package/src/components/workspace/workspace-contribution-card.tsx +37 -0
- package/src/components/workspace/workspace-header.tsx +100 -0
- package/src/components/workspace/workspace-kb-card.tsx +31 -0
- package/src/components/workspace/workspace-member-item.tsx +80 -0
- package/src/components/workspace/workspace-members-manager.tsx +291 -0
- package/src/components/workspace/workspace-project-list.tsx +129 -0
- package/src/config/sidebar-routes.tsx +25 -24
- package/src/config/sidebar-teams.ts +4 -4
- package/src/hooks/__tests__/use-commands.test.tsx +0 -10
- package/src/hooks/use-commands.ts +3 -7
- package/src/hooks/use-entity-subscription.ts +0 -1
- package/src/hooks/use-notifications.ts +5 -6
- package/src/hooks/useTranslator.ts +0 -1
- package/src/lib/__tests__/edition.test.ts +9 -0
- package/src/lib/analytics.ts +0 -1
- package/src/lib/anyhub/anyhub-message-bridge.ts +1 -1
- package/src/lib/auth/__tests__/anonymous-safe.test.ts +89 -0
- package/src/lib/auth/__tests__/page-gate.test.ts +29 -0
- package/src/lib/auth/anonymous-safe.ts +39 -0
- package/src/lib/auth/page-gate.ts +18 -0
- package/src/lib/changelog/sdk-versions.ts +19 -19
- package/src/lib/collections/knowledge/knowledge-bases-collection.ts +1 -1
- package/src/lib/collections/reference/bookmark-categories-collection.ts +1 -1
- package/src/lib/collections/reference/labels-collection.ts +1 -1
- package/src/lib/collections/reference/projects-collection.ts +1 -1
- package/src/lib/collections/reference/users-brief-collection.ts +1 -1
- package/src/lib/collections/reference/workspaces-collection.ts +3 -3
- package/src/lib/commands/__tests__/registry.test.ts +3 -3
- package/src/lib/commands/registry.ts +22 -21
- package/src/lib/commands/types.ts +1 -1
- package/src/lib/edition.ts +7 -0
- package/src/lib/router-context.ts +1 -2
- package/src/plugins/.gen-manifest.json +13 -0
- package/src/plugins/core/inspiration/pages/inspiration-page.tsx +2 -3
- package/src/plugins/core/inspiration/ui.tsx +2 -3
- package/src/plugins/core/prd/components/agent-input.tsx +7 -8
- package/src/plugins/core/prd/components/component-editor/content-section.tsx +3 -3
- package/src/plugins/core/prd/components/component-editor/position-section.tsx +3 -4
- package/src/plugins/core/prd/components/component-editor/style-fields.tsx +13 -16
- package/src/plugins/core/prd/components/dialog/create-prd-dialog.tsx +11 -12
- package/src/plugins/core/prd/components/dialog/prd-detail-client.tsx +7 -9
- package/src/plugins/core/prd/components/page-version-panel/components/create-version-dialog.tsx +7 -8
- package/src/plugins/core/prd/components/page-version-panel/components/delete-version-dialog.tsx +5 -6
- package/src/plugins/core/prd/components/page-version-panel/components/edit-version-dialog.tsx +7 -8
- package/src/plugins/core/prd/components/page-version-panel/constants.tsx +3 -2
- package/src/plugins/core/prd/components/page-version-panel.tsx +43 -45
- package/src/plugins/core/prd/components/page-version-tree.tsx +6 -8
- package/src/plugins/core/prd/components/prd-agent-panel.tsx +29 -23
- package/src/plugins/core/prd/components/prd-comment-review-panel.tsx +21 -23
- package/src/plugins/core/prd/components/prd-component-editor-content.tsx +6 -7
- package/src/plugins/core/prd/components/prd-dashboard.tsx +28 -23
- package/src/plugins/core/prd/components/prd-doc-panel.tsx +6 -9
- package/src/plugins/core/prd/components/prd-editor-layout.tsx +11 -13
- package/src/plugins/core/prd/components/prd-filter-bar.tsx +2 -3
- package/src/plugins/core/prd/components/prd-left-sidebar.tsx +19 -20
- package/src/plugins/core/prd/components/prd-navigation.tsx +12 -14
- package/src/plugins/core/prd/components/prd-outline-tab.tsx +3 -4
- package/src/plugins/core/prd/components/prd-prototype-panel.tsx +8 -10
- package/src/plugins/core/prd/components/prd-right-sidebar.tsx +10 -12
- package/src/plugins/core/prd/components/prd-share-panel/components/single-version-share-card.tsx +13 -14
- package/src/plugins/core/prd/components/prd-share-panel/constants.ts +5 -3
- package/src/plugins/core/prd/components/prd-share-panel.tsx +58 -60
- package/src/plugins/core/prd/components/prd-tree-page-tab.tsx +20 -22
- package/src/plugins/core/prd/components/prototype/PrototypeCanvas.tsx +2 -4
- package/src/plugins/core/prd/components/prototype/PrototypeElement.tsx +3 -5
- package/src/plugins/core/prd/components/prototype/ResizeHandles.tsx +0 -1
- package/src/plugins/core/prd/components/prototype/icon-components.ts +19 -21
- package/src/plugins/core/prd/components/prototype/index.ts +3 -0
- package/src/plugins/core/prd/components/restore-version-dialog.tsx +5 -7
- package/src/plugins/core/prd/components/share/prd-share-client.tsx +7 -9
- package/src/plugins/core/prd/components/share/share-annotation-overlay.tsx +0 -1
- package/src/plugins/core/prd/components/share/share-comment-panel.tsx +15 -16
- package/src/plugins/core/prd/components/share/share-comment-review-panel.tsx +7 -9
- package/src/plugins/core/prd/components/share/share-directory-tree.tsx +3 -5
- package/src/plugins/core/prd/components/share/share-doc-view.tsx +3 -5
- package/src/plugins/core/prd/components/share/share-layout.tsx +3 -5
- package/src/plugins/core/prd/components/share/share-nav-bar.tsx +3 -5
- package/src/plugins/core/prd/components/share/share-password-gate.tsx +8 -9
- package/src/plugins/core/prd/components/share/share-prototype-view.tsx +3 -5
- package/src/plugins/core/prd/components/share/share-review-panel.tsx +9 -11
- package/src/plugins/core/prd/components/share/share-sse-listener.tsx +0 -1
- package/src/plugins/core/prd/components/share/version-share-client.tsx +3 -5
- package/src/plugins/core/prd/pages/prd-detail-page.tsx +9 -21
- package/src/plugins/core/prd/pages/share-prd-page.tsx +6 -16
- package/src/plugins/core/prd/prd-nav.tsx +2 -3
- package/src/plugins/core/tags/nav-tag.tsx +14 -15
- package/src/plugins/core/tags/pages/tag-detail-page.tsx +3 -5
- package/src/plugins/core/tags/pages/tag-settings-page.tsx +3 -5
- package/src/plugins/core/tags/pages/tags-index-page.tsx +3 -5
- package/src/plugins/core/tags/tag-badge.tsx +2 -3
- package/src/plugins/core/tags/tag-color-picker.tsx +2 -4
- package/src/plugins/core/tags/tag-manager.tsx +23 -25
- package/src/plugins/core/tags/tag-selector.tsx +4 -5
- package/src/plugins/modules.gen.ts +21 -0
- package/src/plugins/plugins.gen.ts +20 -0
- package/src/plugins/ui.gen.ts +8 -0
- package/src/providers/index.tsx +3 -14
- package/src/routeTree.gen.ts +27 -0
- package/src/router.tsx +16 -6
- package/src/routes/__desktop/onboarding/route.lazy.tsx +22 -23
- package/src/routes/__root.tsx +13 -36
- package/src/routes/__tests__/-edition-routing.test.tsx +151 -0
- package/src/routes/_login/forgot-password/route.lazy.tsx +14 -15
- package/src/routes/_login/login/route.lazy.tsx +26 -25
- package/src/routes/_login/register/route.lazy.tsx +23 -24
- package/src/routes/_login/reset-password/route.lazy.tsx +16 -17
- package/src/routes/_login/schemas/-auth.ts +11 -13
- package/src/routes/_nav/acceptance-criteria/route.tsx +2 -3
- package/src/routes/_nav/apps/anyhub/$id/route.tsx +2 -3
- package/src/routes/_nav/chat/route.lazy.tsx +9 -10
- package/src/routes/_nav/dashboard/-components/activity-feed.tsx +3 -4
- package/src/routes/_nav/dashboard/-components/quick-actions.tsx +3 -4
- package/src/routes/_nav/dashboard/-components/stats-grid.tsx +5 -6
- package/src/routes/_nav/dashboard/route.lazy.tsx +7 -8
- package/src/routes/_nav/design/$projectId/$artboardId/route.lazy.tsx +7 -9
- package/src/routes/_nav/design/$projectId/route.lazy.tsx +3 -5
- package/src/routes/_nav/design/index.lazy.tsx +26 -27
- package/src/routes/_nav/inspiration/route.tsx +8 -0
- package/src/routes/_nav/knowledge/$kbId/doc/$docId/route.lazy.tsx +4 -5
- package/src/routes/_nav/knowledge/$kbId/route.lazy.tsx +3 -4
- package/src/routes/_nav/knowledge/bookmarks/$id.lazy.tsx +29 -30
- package/src/routes/_nav/knowledge/bookmarks/index.lazy.tsx +12 -13
- package/src/routes/_nav/knowledge/compliance/$id.lazy.tsx +22 -23
- package/src/routes/_nav/knowledge/compliance/index.lazy.tsx +18 -19
- package/src/routes/_nav/knowledge/dictionaries/$id.lazy.tsx +5 -6
- package/src/routes/_nav/knowledge/dictionaries/index.lazy.tsx +17 -18
- package/src/routes/_nav/knowledge/index.lazy.tsx +248 -40
- package/src/routes/_nav/knowledge/laws/$id.lazy.tsx +22 -23
- package/src/routes/_nav/knowledge/laws/index.lazy.tsx +14 -15
- package/src/routes/_nav/knowledge/summary/index.lazy.tsx +31 -32
- package/src/routes/_nav/notifications/route.lazy.tsx +3 -4
- package/src/routes/_nav/notifications/route.tsx +2 -0
- package/src/routes/_nav/notion-like/route.tsx +2 -3
- package/src/routes/_nav/prd/$id/route.tsx +9 -0
- package/src/routes/_nav/prd/index.tsx +9 -0
- package/src/routes/_nav/prd/route.tsx +8 -0
- package/src/routes/_nav/pricing-02/route.tsx +2 -3
- package/src/routes/_nav/projects/$projectId/$storyId/route.lazy.tsx +23 -24
- package/src/routes/_nav/projects/$projectId/index.lazy.tsx +54 -74
- package/src/routes/_nav/projects/$projectId/iterations/$iterationId/route.lazy.tsx +27 -30
- package/src/routes/_nav/projects/$projectId/iterations/index.lazy.tsx +9 -10
- package/src/routes/_nav/projects/$projectId/route.tsx +4 -2
- package/src/routes/_nav/projects/$projectId/settings/route.lazy.tsx +40 -41
- package/src/routes/_nav/route.tsx +13 -16
- package/src/routes/_nav/settings/-settings-tabs.tsx +24 -51
- package/src/routes/_nav/settings/account/route.lazy.tsx +1 -9
- package/src/routes/_nav/settings/ai/index/route.lazy.tsx +5 -6
- package/src/routes/_nav/settings/billing/route.lazy.tsx +4 -5
- package/src/routes/_nav/settings/connection/route.lazy.tsx +14 -10
- package/src/routes/_nav/settings/design/route.lazy.tsx +21 -22
- package/src/routes/_nav/settings/general/route.lazy.tsx +10 -11
- package/src/routes/_nav/settings/notifications/route.lazy.tsx +3 -5
- package/src/routes/_nav/settings/privacy/route.lazy.tsx +15 -16
- package/src/routes/_nav/settings/route.lazy.tsx +2 -3
- package/src/routes/_nav/settings/route.tsx +10 -15
- package/src/routes/_nav/settings/team/route.lazy.tsx +1 -9
- package/src/routes/_nav/tags/$id/route.tsx +8 -0
- package/src/routes/_nav/tags/index.tsx +8 -0
- package/src/routes/_nav/tags/route.tsx +8 -0
- package/src/routes/_nav/tags/settings/route.tsx +9 -0
- package/src/routes/_nav/test-cases/route.tsx +2 -3
- package/src/routes/_nav/workspaces/$workspaceId/activities/route.lazy.tsx +69 -0
- package/src/routes/_nav/workspaces/$workspaceId/activities/route.tsx +28 -0
- package/src/routes/_nav/workspaces/$workspaceId/route.lazy.tsx +194 -99
- package/src/routes/_nav/workspaces/$workspaceId/route.tsx +12 -3
- package/src/routes/_nav/workspaces/$workspaceId/settings/route.lazy.tsx +75 -61
- package/src/routes/_nav/workspaces/index.lazy.tsx +196 -22
- package/src/routes/_nav/workspaces/route.tsx +2 -0
- package/src/routes/_public/index/route.tsx +5 -1
- package/src/routes/invite/$token/route.lazy.tsx +36 -37
- package/src/routes/share/$versionId/route.lazy.tsx +4 -11
- package/src/routes/share/compliance/$id/route.lazy.tsx +6 -8
- package/src/routes/share/law/$id/route.lazy.tsx +6 -8
- package/src/routes/share/prd/$prdId/route.tsx +10 -0
- package/src/server/__tests__/agent-client-graph.test.ts +4 -8
- package/src/server/ai-ports.ts +7 -6
- package/src/server/builtin-project.ts +43 -0
- package/src/server/design/sketch/file-storage.ts +1 -1
- package/src/server/pro-services.ts +1 -1
- package/src/server/serverFns/__tests__/workspace.test.ts +101 -0
- package/src/server/serverFns/activity.ts +15 -9
- package/src/server/serverFns/knowledge-public/bookmarks/list.ts +1 -1
- package/src/server/serverFns/knowledge-public/bookmarks/share.ts +3 -3
- package/src/server/serverFns/knowledge-public/compliance/share.ts +3 -3
- package/src/server/serverFns/knowledge-public/dictionary/share.ts +3 -3
- package/src/server/serverFns/knowledge-public/legal/share.ts +3 -3
- package/src/server/serverFns/knowledge.ts +27 -2
- package/src/server/serverFns/notifications.ts +3 -0
- package/src/server/serverFns/project.ts +48 -35
- package/src/server/serverFns/story/story-crud/bulk.ts +2 -2
- package/src/server/serverFns/story/story-crud.ts +9 -7
- package/src/server/serverFns/story/story-groups.ts +6 -6
- package/src/server/serverFns/workspace.ts +334 -13
- package/src/server-entry.ts +29 -0
- package/vite.shared.ts +4 -1
- package/src/components/layout/sidebar-03/logo.tsx +0 -41
- package/src/i18n/__tests__/detect.test.ts +0 -48
- package/src/i18n/__tests__/integration.test.tsx +0 -32
- package/src/i18n/__tests__/server.test.ts +0 -33
- package/src/i18n/client.ts +0 -32
- package/src/i18n/config.ts +0 -116
- package/src/i18n/detect.ts +0 -43
- package/src/i18n/locales/en/agents.json +0 -134
- package/src/i18n/locales/en/apps.json +0 -6
- package/src/i18n/locales/en/auth.json +0 -90
- package/src/i18n/locales/en/billing.json +0 -78
- package/src/i18n/locales/en/chat.json +0 -194
- package/src/i18n/locales/en/common.json +0 -242
- package/src/i18n/locales/en/dashboard.json +0 -38
- package/src/i18n/locales/en/design.json +0 -70
- package/src/i18n/locales/en/desktop.json +0 -35
- package/src/i18n/locales/en/display.json +0 -37
- package/src/i18n/locales/en/editor.json +0 -304
- package/src/i18n/locales/en/enterprise.json +0 -1
- package/src/i18n/locales/en/invite.json +0 -56
- package/src/i18n/locales/en/iterations.json +0 -92
- package/src/i18n/locales/en/knowledge.json +0 -462
- package/src/i18n/locales/en/mindmap.json +0 -28
- package/src/i18n/locales/en/notifications.json +0 -79
- package/src/i18n/locales/en/prd.json +0 -51
- package/src/i18n/locales/en/projects.json +0 -140
- package/src/i18n/locales/en/settings.json +0 -428
- package/src/i18n/locales/en/share.json +0 -20
- package/src/i18n/locales/en/story.json +0 -923
- package/src/i18n/locales/en/tags.json +0 -42
- package/src/i18n/locales/en/workspace.json +0 -90
- package/src/i18n/locales/zh/agents.json +0 -134
- package/src/i18n/locales/zh/apps.json +0 -6
- package/src/i18n/locales/zh/auth.json +0 -90
- package/src/i18n/locales/zh/billing.json +0 -78
- package/src/i18n/locales/zh/chat.json +0 -194
- package/src/i18n/locales/zh/common.json +0 -242
- package/src/i18n/locales/zh/dashboard.json +0 -38
- package/src/i18n/locales/zh/design.json +0 -70
- package/src/i18n/locales/zh/desktop.json +0 -35
- package/src/i18n/locales/zh/display.json +0 -37
- package/src/i18n/locales/zh/editor.json +0 -304
- package/src/i18n/locales/zh/enterprise.json +0 -1
- package/src/i18n/locales/zh/invite.json +0 -56
- package/src/i18n/locales/zh/iterations.json +0 -92
- package/src/i18n/locales/zh/knowledge.json +0 -462
- package/src/i18n/locales/zh/mindmap.json +0 -28
- package/src/i18n/locales/zh/notifications.json +0 -79
- package/src/i18n/locales/zh/prd.json +0 -51
- package/src/i18n/locales/zh/projects.json +0 -140
- package/src/i18n/locales/zh/settings.json +0 -428
- package/src/i18n/locales/zh/share.json +0 -20
- package/src/i18n/locales/zh/story.json +0 -923
- package/src/i18n/locales/zh/tags.json +0 -42
- package/src/i18n/locales/zh/workspace.json +0 -90
- package/src/i18n/server.ts +0 -18
- package/src/i18n/types.ts +0 -5
- package/src/server/serverFns/locale.ts +0 -20
|
@@ -15,8 +15,9 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
import { useState, useCallback } from 'react'
|
|
18
|
+
import { useState, useMemo, useCallback, type ReactNode } from 'react'
|
|
19
19
|
import { cn } from '@/lib/utils'
|
|
20
|
+
import { m } from '@/paraglide/messages.js'
|
|
20
21
|
import {
|
|
21
22
|
ContributionGraph,
|
|
22
23
|
ContributionGraphCalendar,
|
|
@@ -25,28 +26,107 @@ import {
|
|
|
25
26
|
ContributionGraphTotalCount,
|
|
26
27
|
ContributionGraphLegend,
|
|
27
28
|
type Labels,
|
|
29
|
+
type Activity,
|
|
28
30
|
} from '@/components/kibo-ui/contribution-graph'
|
|
29
|
-
import
|
|
30
|
-
import {
|
|
31
|
+
import { format, parseISO, getMonth, getYear, startOfDay, startOfMonth, subMonths, eachDayOfInterval } from 'date-fns'
|
|
32
|
+
import {
|
|
33
|
+
Select,
|
|
34
|
+
SelectContent,
|
|
35
|
+
SelectItem,
|
|
36
|
+
SelectTrigger,
|
|
37
|
+
SelectValue,
|
|
38
|
+
} from '@/components/ui/select'
|
|
31
39
|
|
|
32
40
|
type ContributionGraphWithTooltipProps = {
|
|
33
41
|
data: Activity[]
|
|
42
|
+
title?: string
|
|
43
|
+
icon?: ReactNode
|
|
34
44
|
className?: string
|
|
35
|
-
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const MONTH_NUMBERS = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']
|
|
48
|
+
|
|
49
|
+
function generateFullYearData(year: number, existingData: Activity[]): Activity[] {
|
|
50
|
+
const dataMap = new Map(existingData.map(a => [a.date, a]))
|
|
51
|
+
const result: Activity[] = []
|
|
52
|
+
for (let month = 0; month < 12; month++) {
|
|
53
|
+
const dim = new Date(year, month + 1, 0).getDate()
|
|
54
|
+
for (let day = 1; day <= dim; day++) {
|
|
55
|
+
const date = `${year}-${String(month + 1).padStart(2, '0')}-${String(day).padStart(2, '0')}`
|
|
56
|
+
result.push(dataMap.get(date) ?? { date, count: 0, level: 0 })
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return result
|
|
36
60
|
}
|
|
37
61
|
|
|
38
62
|
export function ContributionGraphWithTooltip({
|
|
39
63
|
data,
|
|
64
|
+
title,
|
|
65
|
+
icon,
|
|
40
66
|
className,
|
|
41
|
-
t = (k) => k,
|
|
42
67
|
}: ContributionGraphWithTooltipProps) {
|
|
43
68
|
const [tooltip, setTooltip] = useState<{ activity: Activity; x: number; y: number } | null>(null)
|
|
69
|
+
const [selectedFilter, setSelectedFilter] = useState<string>('recent12')
|
|
44
70
|
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
71
|
+
const years = useMemo(() => {
|
|
72
|
+
const set = new Set<number>()
|
|
73
|
+
if (data.length === 0) {
|
|
74
|
+
set.add(new Date().getFullYear())
|
|
75
|
+
}
|
|
76
|
+
for (const a of data) {
|
|
77
|
+
const y = parseInt(a.date.slice(0, 4), 10)
|
|
78
|
+
if (!Number.isNaN(y)) set.add(y)
|
|
79
|
+
}
|
|
80
|
+
return Array.from(set).sort((a, b) => b - a)
|
|
81
|
+
}, [data])
|
|
82
|
+
|
|
83
|
+
const filteredData = useMemo(() => {
|
|
84
|
+
if (selectedFilter === 'recent12') {
|
|
85
|
+
if (data.length === 0) {
|
|
86
|
+
const now = new Date()
|
|
87
|
+
const end = startOfDay(now)
|
|
88
|
+
const start = startOfMonth(subMonths(end, 11))
|
|
89
|
+
const result: Activity[] = []
|
|
90
|
+
for (const d of eachDayOfInterval({ start, end })) {
|
|
91
|
+
const date = format(d, 'yyyy-MM-dd')
|
|
92
|
+
result.push({ date, count: 0, level: 0 })
|
|
93
|
+
}
|
|
94
|
+
return result
|
|
95
|
+
}
|
|
96
|
+
return data
|
|
97
|
+
}
|
|
98
|
+
const year = parseInt(selectedFilter, 10)
|
|
99
|
+
const yearData = data.filter(a => parseInt(a.date.slice(0, 4), 10) === year)
|
|
100
|
+
return generateFullYearData(year, yearData)
|
|
101
|
+
}, [data, selectedFilter])
|
|
102
|
+
|
|
103
|
+
const labels: Labels = useMemo(() => {
|
|
104
|
+
const suffix = m.common_contributionGraph_monthSuffix()
|
|
105
|
+
let months: string[] | ((date: Date, prevDate: Date | null) => string)
|
|
106
|
+
|
|
107
|
+
if (selectedFilter === 'recent12') {
|
|
108
|
+
months = (date: Date, prevDate: Date | null) => {
|
|
109
|
+
const monthNum = getMonth(date) + 1
|
|
110
|
+
const baseLabel = `${monthNum}${suffix}`
|
|
111
|
+
if (prevDate && getYear(date) !== getYear(prevDate) && getMonth(date) === 0) {
|
|
112
|
+
return `${m.common_contributionGraph_yearPrefix({ year: getYear(date) })}${baseLabel}`
|
|
113
|
+
}
|
|
114
|
+
return baseLabel
|
|
115
|
+
}
|
|
116
|
+
} else {
|
|
117
|
+
months = MONTH_NUMBERS.map(n => `${n}${suffix}`)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return {
|
|
121
|
+
months,
|
|
122
|
+
title: m.common_contributionGraph_title(),
|
|
123
|
+
level: (level) => m.common_contributionGraph_level({ count: level }),
|
|
124
|
+
legend: {
|
|
125
|
+
less: m.common_contributionGraph_legendLess(),
|
|
126
|
+
more: m.common_contributionGraph_legendMore(),
|
|
127
|
+
},
|
|
128
|
+
}
|
|
129
|
+
}, [selectedFilter])
|
|
50
130
|
|
|
51
131
|
const handleMouseEnter = useCallback((activity: Activity, e: React.MouseEvent) => {
|
|
52
132
|
const rect = (e.currentTarget as SVGRectElement).getBoundingClientRect()
|
|
@@ -57,9 +137,38 @@ export function ContributionGraphWithTooltip({
|
|
|
57
137
|
setTooltip(null)
|
|
58
138
|
}, [])
|
|
59
139
|
|
|
140
|
+
const showFilter = years.length > 1 || data.length === 0
|
|
141
|
+
|
|
60
142
|
return (
|
|
61
|
-
<div className={cn("relative", className)}>
|
|
62
|
-
|
|
143
|
+
<div className={cn("relative w-full overflow-hidden", className)}>
|
|
144
|
+
{(title || showFilter) && (
|
|
145
|
+
<div className="mb-3 flex items-center justify-between">
|
|
146
|
+
{title && (
|
|
147
|
+
<div className="flex items-center gap-2">
|
|
148
|
+
{icon}
|
|
149
|
+
<h2 className="text-base font-semibold">{title}</h2>
|
|
150
|
+
</div>
|
|
151
|
+
)}
|
|
152
|
+
{showFilter && (
|
|
153
|
+
<Select value={selectedFilter} onValueChange={setSelectedFilter}>
|
|
154
|
+
<SelectTrigger className="h-8 w-28">
|
|
155
|
+
<SelectValue />
|
|
156
|
+
</SelectTrigger>
|
|
157
|
+
<SelectContent>
|
|
158
|
+
<SelectItem value="recent12">
|
|
159
|
+
{m.common_contributionGraph_recent12()}
|
|
160
|
+
</SelectItem>
|
|
161
|
+
{years.map((y) => (
|
|
162
|
+
<SelectItem key={y} value={String(y)}>
|
|
163
|
+
{y}
|
|
164
|
+
</SelectItem>
|
|
165
|
+
))}
|
|
166
|
+
</SelectContent>
|
|
167
|
+
</Select>
|
|
168
|
+
)}
|
|
169
|
+
</div>
|
|
170
|
+
)}
|
|
171
|
+
<ContributionGraph data={filteredData} labels={labels}>
|
|
63
172
|
<ContributionGraphCalendar>
|
|
64
173
|
{({ activity, dayIndex, weekIndex }) => (
|
|
65
174
|
<g
|
|
@@ -77,7 +186,11 @@ export function ContributionGraphWithTooltip({
|
|
|
77
186
|
)}
|
|
78
187
|
</ContributionGraphCalendar>
|
|
79
188
|
<ContributionGraphFooter>
|
|
80
|
-
<ContributionGraphTotalCount
|
|
189
|
+
<ContributionGraphTotalCount>
|
|
190
|
+
{({ totalCount }) => (
|
|
191
|
+
<>{m.common_contributionGraph_totalCount({ count: totalCount })}</>
|
|
192
|
+
)}
|
|
193
|
+
</ContributionGraphTotalCount>
|
|
81
194
|
<ContributionGraphLegend />
|
|
82
195
|
</ContributionGraphFooter>
|
|
83
196
|
</ContributionGraph>
|
|
@@ -92,7 +205,7 @@ export function ContributionGraphWithTooltip({
|
|
|
92
205
|
}}
|
|
93
206
|
>
|
|
94
207
|
<p className="font-medium">
|
|
95
|
-
{tooltip.activity.count} {
|
|
208
|
+
{tooltip.activity.count} {m.common_contributionGraph_operations()}
|
|
96
209
|
</p>
|
|
97
210
|
<p className="text-background/70">
|
|
98
211
|
{format(parseISO(tooltip.activity.date), 'yyyy-MM-dd')}
|
|
@@ -101,4 +214,4 @@ export function ContributionGraphWithTooltip({
|
|
|
101
214
|
)}
|
|
102
215
|
</div>
|
|
103
216
|
)
|
|
104
|
-
}
|
|
217
|
+
}
|
|
@@ -15,12 +15,10 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
import { useState } from "react";
|
|
20
19
|
import * as React from "react";
|
|
21
20
|
import type { ReactNode } from "react";
|
|
22
21
|
import { toast } from "sonner";
|
|
23
|
-
import { useTranslation } from "react-i18next";
|
|
24
22
|
import { Button } from "@/components/ui/button";
|
|
25
23
|
import { Input } from "@/components/ui/input";
|
|
26
24
|
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
|
|
@@ -32,6 +30,7 @@ import {
|
|
|
32
30
|
DialogHeader,
|
|
33
31
|
DialogTitle,
|
|
34
32
|
} from "@/components/ui/dialog";
|
|
33
|
+
import { m } from "@/paraglide/messages.js";
|
|
35
34
|
|
|
36
35
|
interface NameConfirmDialogProps {
|
|
37
36
|
open: boolean;
|
|
@@ -42,6 +41,7 @@ interface NameConfirmDialogProps {
|
|
|
42
41
|
expectedName: string;
|
|
43
42
|
onConfirm: () => Promise<void>;
|
|
44
43
|
children?: ReactNode;
|
|
44
|
+
titleClassName?: string;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
export function NameConfirmDialog({
|
|
@@ -53,8 +53,8 @@ export function NameConfirmDialog({
|
|
|
53
53
|
expectedName,
|
|
54
54
|
onConfirm,
|
|
55
55
|
children,
|
|
56
|
+
titleClassName,
|
|
56
57
|
}: NameConfirmDialogProps) {
|
|
57
|
-
const { t } = useTranslation('common')
|
|
58
58
|
const [inputValue, setInputValue] = useState("");
|
|
59
59
|
const [loading, setLoading] = useState(false);
|
|
60
60
|
const [error, setError] = useState("");
|
|
@@ -63,7 +63,7 @@ export function NameConfirmDialog({
|
|
|
63
63
|
|
|
64
64
|
const handleConfirm = async () => {
|
|
65
65
|
if (!isValid) {
|
|
66
|
-
setError(
|
|
66
|
+
setError(m.common_nameConfirm_invalidName());
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -75,7 +75,7 @@ export function NameConfirmDialog({
|
|
|
75
75
|
setInputValue("");
|
|
76
76
|
onOpenChange(false);
|
|
77
77
|
} catch (err) {
|
|
78
|
-
setError(err instanceof Error ? err.message :
|
|
78
|
+
setError(err instanceof Error ? err.message : m.common_nameConfirm_operationFailed());
|
|
79
79
|
} finally {
|
|
80
80
|
setLoading(false);
|
|
81
81
|
}
|
|
@@ -91,16 +91,17 @@ export function NameConfirmDialog({
|
|
|
91
91
|
|
|
92
92
|
return (
|
|
93
93
|
<Dialog open={open} onOpenChange={handleOpenChange}>
|
|
94
|
-
<DialogContent>
|
|
94
|
+
<DialogContent className="sm:max-w-110">
|
|
95
95
|
<DialogHeader>
|
|
96
|
-
<DialogTitle>{title}</DialogTitle>
|
|
96
|
+
<DialogTitle className={`${titleClassName} text-xl mt-2`}>{title}</DialogTitle>
|
|
97
97
|
<DialogDescription>{description}</DialogDescription>
|
|
98
98
|
</DialogHeader>
|
|
99
99
|
|
|
100
|
-
<div className="space-y-4 py-
|
|
100
|
+
<div className="space-y-3 overflow-y-auto px-4 py-2 max-h-[60vh]">
|
|
101
|
+
{children}
|
|
101
102
|
<div className="space-y-2">
|
|
102
103
|
<p className="text-sm text-muted-foreground">
|
|
103
|
-
{
|
|
104
|
+
{m.common_nameConfirm_inputInstruction()} <Tooltip>
|
|
104
105
|
<TooltipTrigger asChild>
|
|
105
106
|
<button
|
|
106
107
|
type="button"
|
|
@@ -108,16 +109,16 @@ export function NameConfirmDialog({
|
|
|
108
109
|
onClick={(e) => {
|
|
109
110
|
e.stopPropagation();
|
|
110
111
|
void navigator.clipboard.writeText(expectedName);
|
|
111
|
-
toast.success(
|
|
112
|
+
toast.success(m.common_nameConfirm_copied());
|
|
112
113
|
}}
|
|
113
114
|
>
|
|
114
115
|
{expectedName}
|
|
115
116
|
</button>
|
|
116
117
|
</TooltipTrigger>
|
|
117
118
|
<TooltipContent side="top" className="text-xs">
|
|
118
|
-
{
|
|
119
|
+
{m.common_nameConfirm_clickToCopy()}
|
|
119
120
|
</TooltipContent>
|
|
120
|
-
</Tooltip> {
|
|
121
|
+
</Tooltip> {m.common_nameConfirm_confirmDelete()}
|
|
121
122
|
</p>
|
|
122
123
|
<Input
|
|
123
124
|
value={inputValue}
|
|
@@ -125,7 +126,7 @@ export function NameConfirmDialog({
|
|
|
125
126
|
setInputValue(e.target.value);
|
|
126
127
|
setError("");
|
|
127
128
|
}}
|
|
128
|
-
placeholder={
|
|
129
|
+
placeholder={m.common_nameConfirm_inputPlaceholder({ expectedName })}
|
|
129
130
|
/>
|
|
130
131
|
</div>
|
|
131
132
|
|
|
@@ -133,19 +134,18 @@ export function NameConfirmDialog({
|
|
|
133
134
|
<p className="text-sm text-destructive">{error}</p>
|
|
134
135
|
)}
|
|
135
136
|
|
|
136
|
-
{children}
|
|
137
137
|
</div>
|
|
138
138
|
|
|
139
139
|
<DialogFooter>
|
|
140
140
|
<Button variant="outline" onClick={() => handleOpenChange(false)}>
|
|
141
|
-
{
|
|
141
|
+
{m.common_nameConfirm_cancel()}
|
|
142
142
|
</Button>
|
|
143
143
|
<Button
|
|
144
144
|
variant="destructive"
|
|
145
145
|
onClick={handleConfirm}
|
|
146
146
|
disabled={!isValid || loading}
|
|
147
147
|
>
|
|
148
|
-
{loading ?
|
|
148
|
+
{loading ? m.common_nameConfirm_deleting() : confirmText}
|
|
149
149
|
</Button>
|
|
150
150
|
</DialogFooter>
|
|
151
151
|
</DialogContent>
|
|
@@ -15,9 +15,7 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
import { useRouter, useLocation } from "@tanstack/react-router";
|
|
20
|
-
import { useTranslation } from "react-i18next";
|
|
21
19
|
import { Button } from "@/components/ui/button";
|
|
22
20
|
import {
|
|
23
21
|
DropdownMenu,
|
|
@@ -26,16 +24,15 @@ import {
|
|
|
26
24
|
DropdownMenuTrigger,
|
|
27
25
|
} from "@/components/ui/dropdown-menu";
|
|
28
26
|
import { Globe } from "lucide-react";
|
|
29
|
-
import {
|
|
27
|
+
import { m } from "@/paraglide/messages.js";
|
|
30
28
|
|
|
31
29
|
export function LanguageSwitcher() {
|
|
32
|
-
const { t } = useTranslation('common')
|
|
33
30
|
const router = useRouter();
|
|
34
31
|
const { pathname } = useLocation();
|
|
35
32
|
|
|
36
|
-
const currentLocale = pathname.split("/")[1] as
|
|
33
|
+
const currentLocale = pathname.split("/")[1] as string;
|
|
37
34
|
|
|
38
|
-
const switchLocale = async (locale:
|
|
35
|
+
const switchLocale = async (locale: string) => {
|
|
39
36
|
if (!pathname.startsWith("/" + currentLocale)) {
|
|
40
37
|
await router.navigate({ to: "/" + locale + pathname });
|
|
41
38
|
} else {
|
|
@@ -48,17 +45,17 @@ export function LanguageSwitcher() {
|
|
|
48
45
|
<DropdownMenuTrigger asChild>
|
|
49
46
|
<Button variant="ghost" size="icon" className="h-8 w-8">
|
|
50
47
|
<Globe className="h-4 w-4" />
|
|
51
|
-
<span className="sr-only">{
|
|
48
|
+
<span className="sr-only">{m.common_languageSwitcher_switch()}</span>
|
|
52
49
|
</Button>
|
|
53
50
|
</DropdownMenuTrigger>
|
|
54
51
|
<DropdownMenuContent align="end">
|
|
55
|
-
{
|
|
52
|
+
{["zh", "en"].map((locale) => (
|
|
56
53
|
<DropdownMenuItem
|
|
57
54
|
key={locale}
|
|
58
55
|
onClick={() => switchLocale(locale)}
|
|
59
56
|
className={currentLocale === locale ? "bg-primary/10" : ""}
|
|
60
57
|
>
|
|
61
|
-
{locale === "zh" ?
|
|
58
|
+
{locale === "zh" ? m.common_languageSwitcher_zh() : m.common_languageSwitcher_en()}
|
|
62
59
|
</DropdownMenuItem>
|
|
63
60
|
))}
|
|
64
61
|
</DropdownMenuContent>
|
|
@@ -15,11 +15,10 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
import { useState, useEffect } from "react";
|
|
20
|
-
import { useTranslation } from "react-i18next";
|
|
21
19
|
import { useTranslator } from "@/hooks/useTranslator";
|
|
22
20
|
import { Loader2 } from "lucide-react";
|
|
21
|
+
import { m } from "@/paraglide/messages.js";
|
|
23
22
|
|
|
24
23
|
interface TranslatorTextProps {
|
|
25
24
|
text: string;
|
|
@@ -28,7 +27,6 @@ interface TranslatorTextProps {
|
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
export function TranslatorText({ text, className = "", speed = 30 }: TranslatorTextProps) {
|
|
31
|
-
const { t } = useTranslation('common')
|
|
32
30
|
const { translatedText, isTranslating, error } = useTranslator(text);
|
|
33
31
|
const [displayText, setDisplayText] = useState("");
|
|
34
32
|
|
|
@@ -61,7 +59,7 @@ export function TranslatorText({ text, className = "", speed = 30 }: TranslatorT
|
|
|
61
59
|
{isTranslating ? (
|
|
62
60
|
<div className="flex items-center gap-2 text-muted-foreground">
|
|
63
61
|
<Loader2 className="h-3 w-3 animate-spin" />
|
|
64
|
-
<span>{
|
|
62
|
+
<span>{m.common_translator_translating()}</span>
|
|
65
63
|
</div>
|
|
66
64
|
) : displayText ? (
|
|
67
65
|
<p className="text-sm break-words whitespace-normal">{displayText}</p>
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
18
|
import { useEffect, useMemo, useRef, useState, type ReactNode } from "react";
|
|
19
|
-
import { useTranslation } from "react-i18next";
|
|
20
19
|
import { Search } from "lucide-react";
|
|
21
20
|
import { cn } from "@/lib/utils";
|
|
22
21
|
import { Input } from "@/components/ui/input";
|
|
@@ -28,6 +27,7 @@ import {
|
|
|
28
27
|
pruneRecentIcons,
|
|
29
28
|
type IconSearchEntry,
|
|
30
29
|
} from "./icon-data";
|
|
30
|
+
import { m } from "@/paraglide/messages.js";
|
|
31
31
|
|
|
32
32
|
const SEARCH_INDEX = buildSearchIndex(CURATED_ICONS);
|
|
33
33
|
|
|
@@ -79,7 +79,6 @@ function SectionTitle({ children, className }: { children: ReactNode; className?
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
export function IconPickerPanel({ value, onPick }: IconPickerPanelProps) {
|
|
82
|
-
const { t } = useTranslation("common");
|
|
83
82
|
const [query, setQuery] = useState("");
|
|
84
83
|
const searchRef = useRef<HTMLInputElement>(null);
|
|
85
84
|
|
|
@@ -120,8 +119,8 @@ export function IconPickerPanel({ value, onPick }: IconPickerPanelProps) {
|
|
|
120
119
|
onPick(firstVisible.name);
|
|
121
120
|
}
|
|
122
121
|
}}
|
|
123
|
-
aria-label={
|
|
124
|
-
placeholder={
|
|
122
|
+
aria-label={m.common_iconPicker_searchPlaceholder()}
|
|
123
|
+
placeholder={m.common_iconPicker_searchPlaceholder()}
|
|
125
124
|
className="h-8 pl-8 text-xs"
|
|
126
125
|
/>
|
|
127
126
|
</div>
|
|
@@ -129,11 +128,11 @@ export function IconPickerPanel({ value, onPick }: IconPickerPanelProps) {
|
|
|
129
128
|
{searching ? (
|
|
130
129
|
<>
|
|
131
130
|
<div className="shrink-0 px-3 pb-1 text-xs text-muted-foreground">
|
|
132
|
-
{
|
|
131
|
+
{m.common_iconPicker_resultCount({ count: results.length })}
|
|
133
132
|
</div>
|
|
134
133
|
{results.length === 0 ? (
|
|
135
134
|
<div className="flex flex-1 items-center justify-center px-6 text-center text-xs text-muted-foreground">
|
|
136
|
-
{
|
|
135
|
+
{m.common_iconPicker_noResults()}
|
|
137
136
|
</div>
|
|
138
137
|
) : (
|
|
139
138
|
<IconGrid items={results} value={value} onPick={onPick} />
|
|
@@ -144,13 +143,13 @@ export function IconPickerPanel({ value, onPick }: IconPickerPanelProps) {
|
|
|
144
143
|
{/* 最近使用:仅在有记录时显示,与全部图标同页上下排列 */}
|
|
145
144
|
{recent.length > 0 && (
|
|
146
145
|
<section>
|
|
147
|
-
<SectionTitle>{
|
|
146
|
+
<SectionTitle>{m.common_iconPicker_recent()}</SectionTitle>
|
|
148
147
|
<IconGrid items={recent} value={value} onPick={onPick} />
|
|
149
148
|
</section>
|
|
150
149
|
)}
|
|
151
150
|
<section>
|
|
152
151
|
<SectionTitle className={cn(recent.length === 0 && "pt-1")}>
|
|
153
|
-
{
|
|
152
|
+
{m.common_iconPicker_all()}
|
|
154
153
|
</SectionTitle>
|
|
155
154
|
<IconGrid items={SEARCH_INDEX} value={value} onPick={onPick} />
|
|
156
155
|
</section>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// This program is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU Affero General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
import type { SVGProps } from "react";
|
|
19
|
+
|
|
20
|
+
const PATH_0 = "M912.82 421.43C912.92 423.04 913.03 424.64 913.13 426.24C913.41 436.02 913.68 445.8 913.96 455.57C913.82 457.16 913.67 458.75 913.53 460.34C913.39 464.09 913.25 467.85 913.11 471.61C913.01 475.69 912.9 479.76 912.8 483.84C905.03 614.78 836.48 739.86 721.87 806.58C713.75 811.31 705.22 814.88 696.81 818.82C681.84 825.84 666.92 832.57 651.26 838.16C619.75 849.42 586.6 854.7 553.54 858.44C552.2 858.57 550.85 858.7 549.51 858.83C545.18 858.97 540.85 859.11 536.52 859.25C533.01 859.29 529.5 859.33 525.98 859.38C520.6 859.19 515.22 859 509.83 858.81C507.65 858.71 505.47 858.6 503.29 858.49C501.39 858.34 499.48 858.18 497.58 858.02C496.24 857.91 494.9 857.8 493.57 857.69C461.02 854.33 429.45 847.25 399.28 834.59C396.56 833.45 393.57 832.92 390.9 831.7C389.25 830.95 388.09 829.59 386.42 828.83C375.89 824.08 364.9 820.07 354.95 814.1C348.49 810.22 340.67 802.9 334.06 800.22C327.67 797.62 320.09 797.29 313.41 795.58C302.7 792.84 291.97 788.87 281.95 784.16C218.81 754.5 165.31 704.82 137.47 640.13C125.41 612.09 117.59 582.91 112.22 552.9C105.08 513.03 104.34 471.16 86.98 433.78C80.1 418.98 71.48 405.92 59 395.26C43.31 381.86 27.91 375.15 13.87 358.51C8.99 352.73 4.81 346.43 2.3 339.24C1.43 336.74 1.16 333.94 0.14 331.58C0.14 326.94 0.14 322.31 0.14 317.67C1.35 314.89 1.52 311.38 2.36 308.37C4.36 301.27 6.96 294.29 10.08 287.6C22.74 260.44 38.53 234.64 55.66 210.06C139.44 89.85 287.99 10.93 433.59 2.96C435.46 2.86 437.32 2.77 439.19 2.68C470.99 -0.23 503.07 3.72 534.54 7.84C556.37 10.7 577.66 15.99 598.74 22.39C618.17 28.3 637.25 34.9 655.82 43.23C745.71 83.53 819.5 157.02 863.49 244.8C879.78 277.29 893.81 312.84 901.66 348.38C907 372.56 910.26 396.87 912.82 421.43ZM493.57 182.93C494.93 182.82 496.3 182.72 497.66 182.61C505.74 182.61 513.82 182.61 521.9 182.61C524.07 182.72 526.24 182.82 528.41 182.92C561.81 185.44 594.93 192.49 625.58 206.35C635.18 210.69 644.79 215.62 653.81 221.07C658.57 223.94 663.03 228.33 668.22 230.26C673.63 226.68 683.25 209.59 686.8 203.36C703.34 174.33 713.07 141.46 709.77 107.79C709.63 106.48 709.5 105.18 709.37 103.87C709.14 100.94 709.21 96.23 707.38 93.76C704.78 90.25 698.39 87.71 694.72 85.35C685.43 79.4 676.09 73.48 666.3 68.38C624.09 46.36 577.59 31.74 530.61 24.81C522.06 23.54 513.55 22.01 504.89 21.63C503.54 21.51 502.2 21.38 500.86 21.25C493.3 20.83 485.75 20.42 478.2 20C476.56 19.89 474.93 19.78 473.3 19.68C450.82 17.58 427.93 20.22 405.63 22.9C371.88 26.95 341.56 33.48 309.14 43.67C296.56 47.62 283.89 52.16 271.81 57.45C268.64 58.83 261.75 60.48 260.51 63.62C264.92 66.44 271.7 66.57 276.75 68.08C286.8 71.09 296.71 75.83 305.56 81.45C336.54 101.12 361.81 126.41 378.02 159.73C382.31 168.53 386.57 177.57 389.71 186.86C391.66 192.64 392.43 199.06 394.6 204.64C398.04 204.62 401.67 202.32 404.95 201.13C413.17 198.15 421.55 195.3 430 193.03C450.85 187.43 472.07 184.53 493.57 182.93ZM187.04 542.19C186.91 540.33 186.78 538.46 186.65 536.59C186.84 532.9 186.2 529.26 186.27 525.58C186.54 511.2 187.22 496.43 189.24 482.19C199.47 410.09 228.1 344.53 276.74 290.11C281.56 284.72 286.16 278.95 291.42 273.99C309.99 256.47 329.78 240.3 351.93 227.51C359.31 223.25 366.61 218.8 374.29 215.08C378.39 213.1 384.07 211.94 386.99 208.33C387.19 198.94 377.68 178.18 373.32 169.26C355.91 133.67 330.18 103.03 294.94 83.94C284.52 78.3 273.61 73.83 262.29 70.33C258.28 69.09 252.68 66.98 248.55 68.23C244.02 69.6 239.34 72.89 235.11 75.04C221.9 81.75 209.46 89.66 197.15 97.86C189.2 103.16 180.88 107.88 173.15 113.55C122.61 150.58 78.65 197.8 47.79 252.38C40.47 265.32 33.02 277.98 27.12 291.68C22.72 301.89 16.43 318.01 18.24 329.1C21.06 346.46 41.16 360.45 54.63 369.63C72.08 381.53 88.02 396.33 98.55 414.87C122.95 457.88 122.14 510.27 131.72 557.48C135.8 577.54 139.77 597.71 146.98 616.95C164.32 663.26 195.1 705.41 234.93 734.76C247.38 743.94 259.84 752.27 273.72 759.2C277.82 761.24 284.79 766.61 289.13 765.47C287.16 761.37 278.25 754.14 274.66 750.17C263.65 737.97 252.77 725.18 243.61 711.49C207.97 658.28 192.06 605.7 187.04 542.19ZM718.15 117.52C718.18 120.49 718.2 123.46 718.22 126.43C717.46 136.86 716.88 147.28 714.61 157.54C710.82 174.7 702.85 191 694.8 206.49C691.82 212.22 688.37 217.72 684.34 222.76C681.34 226.51 676.68 230.85 675.33 235.44C680.4 240.92 687.28 245.04 692.79 250.16C704.7 261.25 715.61 273.36 725.75 286.09C749.66 316.1 767.03 353.54 774.82 391.04C777.72 404.95 778.9 418.75 780.67 432.78C780.72 438.18 780.77 443.59 780.83 448.99C780.62 451.46 780.42 453.92 780.22 456.39C780.1 458.52 779.98 460.64 779.87 462.77C779.99 464.5 779.95 464.53 781.34 465.43C784.02 465.54 786.7 465.66 789.38 465.77C801.15 466.66 813.28 466.98 825.04 465.79C826.96 465.68 828.88 465.57 830.79 465.47C850.7 465.45 874.53 460.05 892.99 452.64C895.33 445.14 893.36 435.28 893.03 427.51C892.24 408.85 890.32 389.91 886.51 371.61C875.06 316.67 855.45 263.3 825.31 215.75C812.61 195.72 799.1 175.14 782.34 158.19C767.47 143.15 752.77 128.48 736.46 114.95C732.34 111.54 721.34 101.22 716.84 100.67C717.28 106.29 717.72 111.9 718.15 117.52ZM514.64 364.49C519.5 364.49 524.36 364.48 529.22 364.48C563.64 368.65 596.33 384.31 611.49 417.37C616.99 429.35 619.78 441.71 621.78 454.66C621.9 456.05 622.03 457.44 622.16 458.83C622.17 460.94 622.18 463.05 622.18 465.17C622.04 466.8 621.9 468.43 621.76 470.06C618.66 503.22 595.23 538.24 560.43 543.86C552.87 545.08 544.33 545.22 536.87 543.15C509.15 535.43 492.16 506.74 509.02 480.29C512.66 474.57 519.84 467.6 527.17 471.71C528.62 472.52 530.07 473.94 530.56 475.58C531.59 479.06 528.57 481.57 526.76 484.19C523.83 488.43 521.98 492.45 521.68 497.65C521.68 499.83 521.67 502.01 521.67 504.19C523.6 527.88 550.02 530.06 567.56 522.56C587.94 513.84 600.08 489.72 601.61 468.48C601.62 464.39 601.62 460.29 601.62 456.2C601.57 450.19 600.01 444.32 598.49 438.54C594.42 423.05 585.53 407.69 572.6 397.9C550.9 381.46 518.84 377.57 493.2 385.06C450.3 397.59 419.32 435.92 407.95 477.96C403.48 494.49 401.61 512.55 402.5 529.63C403.14 541.91 406.11 554.6 409.85 566.28C432.39 636.77 500.5 676.66 572.99 670.86C574.32 670.73 575.66 670.61 576.99 670.48C585.6 670.28 594.5 667.86 602.79 665.69C619.35 661.34 634.41 655.75 649.35 647.3C718.36 608.26 757.1 538.55 759.19 459.93C759.4 452.24 760.69 444.53 759.98 436.83C759.86 433.88 759.75 430.92 759.64 427.96C759.49 425.25 759.34 422.53 759.2 419.81C759.08 418.45 758.96 417.09 758.84 415.73C757.72 395.27 751.43 375.82 744.23 356.82C719.23 290.85 664.95 240.51 599.81 215.16C592.66 212.38 585.11 210.77 577.73 208.75C562.15 204.48 545.42 201.03 529.18 200.74C527.3 200.61 525.43 200.47 523.55 200.34C508.74 198.48 493.06 200 478.27 201.41C432.35 205.78 387.73 222.74 349.49 248.57C337.91 256.39 326.64 265.14 316.44 274.71C313.21 277.74 308.64 280.6 306.1 284.06C309.51 288.45 323.4 292.81 329.01 296.26C346.82 307.23 364.64 318.41 380.18 332.61C395 346.15 408.61 361.07 421.19 376.68C424.81 381.17 427.82 386.38 430.99 391.21C432.51 393.54 433.34 396.53 435.62 397.97C438.8 396.11 441.43 392.85 444.37 390.49C448.2 387.42 452.75 384.46 457.07 382.13C476.8 371.52 492.29 366.73 514.64 364.49ZM206.07 543.81C206.18 545.13 206.3 546.45 206.42 547.77C206.56 549.42 206.7 551.08 206.84 552.73C206.97 554.09 207.1 555.46 207.22 556.82C208.75 587.42 217.32 618.74 229.86 646.59C233.67 655.06 237.48 668.35 244.3 674.7C248.5 674.4 253.61 670.6 257.46 668.8C267.12 664.28 277.07 660.52 286.69 655.88C304.27 647.41 321.86 638.41 338.62 628.38C346.33 623.76 353.75 618.59 361.45 613.92C373.55 606.58 386.27 599.78 397.53 591.17C396.7 584.09 392.15 576.86 390.09 569.96C386.6 558.27 385.08 546.09 383.12 534.09C383.01 532.7 382.91 531.32 382.8 529.93C382.8 525.39 382.8 520.85 382.8 516.31C382.92 514.13 383.03 511.95 383.15 509.77C383.3 507.85 383.44 505.92 383.59 503.99C383.72 502.68 383.86 501.36 383.99 500.05C387.62 476.41 393.83 452.71 406.6 432.14C410.26 426.24 414.34 420.51 418.96 415.31C422.09 411.79 426.6 408.12 428.75 404.01C423.15 392.59 414.55 382.49 406.58 372.65C386.28 347.58 361.41 325.17 333.7 308.56C325.97 303.92 307.5 291.43 299.46 290.31C293.08 294.95 288.07 302.54 283.01 308.55C272.5 321.03 262.6 333.83 254.46 348.01C227.76 394.48 212.55 439.71 207.31 493.16C205.65 510.12 204.84 526.78 206.07 543.81ZM816.94 474.28C810.72 474.33 804.51 474.38 798.29 474.42C794.01 474.23 789.72 474.04 785.44 473.85C783.65 473.78 781.85 473.71 780.06 473.65C779.98 473.8 779.9 473.96 779.82 474.11C778.27 480.1 778.41 486.95 777.39 493.16C775.21 506.55 771.82 519.48 767.88 532.43C764.89 542.25 760.29 551.72 755.84 560.94C739.05 595.71 716.36 625.15 684.87 647.99C672.14 657.21 658.79 665.87 644.45 672.36C640.55 674.12 636.43 675.95 632.35 677.25C629.55 678.14 626.58 678.11 624.02 679.56C624.13 683.59 626.94 686.68 628.68 690.3C631.87 696.92 634.91 703.67 637.71 710.45C646.43 731.52 653.6 753.15 658.57 775.43C660.45 783.85 661.15 792.48 662.45 800.99C662.98 804.48 662.8 808.75 664.98 811.45C672.92 809.52 679.75 804.41 687.05 800.92C704.15 792.76 720.13 783.37 735.63 772.49C806.65 722.63 859.72 644.07 880.43 559.79C886.19 536.35 891.08 512.51 891.99 488.3C892.24 481.78 894.47 467.13 892.62 461.55C888.62 461.6 884.42 464.05 880.53 465.2C875.2 466.79 869.75 467.99 864.32 469.2C848.64 472.68 832.81 472.65 816.94 474.28ZM517.98 839.83C521.68 839.84 525.39 839.86 529.1 839.87C570.52 840.69 615.92 830.57 654.44 815.48C656.78 805.45 652.44 794.04 650.83 784.11C646.7 758.8 638.19 733.8 628.28 710.2C625.69 704.03 622.06 698.44 619.35 692.36C617.98 689.3 617.09 685.12 614.73 682.76C605.25 683.65 595.84 686.76 586.36 688.03C574.03 689.68 561.94 689.08 549.6 689.43C547.67 689.29 545.74 689.15 543.81 689.01C501.53 683.39 462.28 669.63 431.63 638.56C422.63 629.44 415.77 619.45 408.57 608.93C406.16 605.41 404.3 601.27 401.58 598.04C394.71 599.37 378.41 613 371.47 617.46C347.08 633.15 322.05 647.46 296.12 660.41C286.68 665.13 276.85 669.6 267.03 673.45C261.1 675.77 253.05 677.55 248.4 682.08C249.64 688.81 255.93 696.23 259.72 701.88C270.21 717.54 282.56 731.83 295.93 745.1C345.45 794.22 410.48 826.76 479.4 837C492.01 838.87 505.24 839.34 517.98 839.83Z";
|
|
21
|
+
const PATH_1 = "M439.19 2.68C437.32 2.77 435.46 2.86 433.59 2.96C433.73 2.78 433.86 2.61 434 2.43C435.73 2.51 437.46 2.6 439.19 2.68ZM473.3 19.68C474.93 19.78 476.56 19.89 478.2 20C476.7 20.09 475.2 20.17 473.71 20.26C473.57 20.07 473.44 19.87 473.3 19.68ZM500.86 21.25C502.2 21.38 503.54 21.51 504.89 21.63C503.68 21.72 502.47 21.8 501.26 21.88C501.13 21.67 500.99 21.46 500.86 21.25ZM709.37 103.87C709.5 105.18 709.63 106.48 709.77 107.79C709.56 107.66 709.35 107.52 709.15 107.38C709.22 106.21 709.29 105.04 709.37 103.87ZM718.15 117.52C718.39 117.65 718.63 117.79 718.87 117.92C718.87 120.62 718.87 123.32 718.87 126.03C718.65 126.16 718.44 126.3 718.22 126.43C718.2 123.46 718.18 120.49 718.15 117.52ZM497.66 182.61C496.3 182.72 494.93 182.82 493.57 182.93C493.7 182.73 493.84 182.54 493.97 182.35C495.2 182.44 496.43 182.53 497.66 182.61ZM521.9 182.61C523.94 182.53 525.97 182.44 528.01 182.35C528.14 182.54 528.28 182.73 528.41 182.92C526.24 182.82 524.07 182.72 521.9 182.61ZM523.55 200.34C525.43 200.47 527.3 200.61 529.18 200.74C527.44 200.82 525.7 200.91 523.96 200.99C523.82 200.77 523.69 200.56 523.55 200.34ZM529.22 364.48C524.36 364.48 519.5 364.49 514.64 364.49C514.77 364.29 514.91 364.09 515.04 363.89C519.63 363.89 524.23 363.89 528.82 363.89C528.95 364.09 529.09 364.28 529.22 364.48ZM758.84 415.73C758.96 417.09 759.08 418.45 759.2 419.81C758.99 419.68 758.79 419.54 758.58 419.41C758.67 418.18 758.75 416.96 758.84 415.73ZM912.82 421.43C913.01 421.57 913.19 421.71 913.38 421.84C913.3 423.31 913.21 424.77 913.13 426.24C913.03 424.64 912.92 423.04 912.82 421.43ZM759.64 427.96C759.75 430.92 759.86 433.88 759.98 436.83C759.78 436.7 759.59 436.56 759.39 436.43C759.47 433.61 759.56 430.78 759.64 427.96ZM780.67 432.78C780.72 438.18 780.77 443.59 780.83 448.99C780.77 443.59 780.72 438.18 780.67 432.78ZM621.78 454.66C621.99 454.8 622.21 454.93 622.43 455.07C622.34 456.32 622.25 457.57 622.16 458.83C622.03 457.44 621.9 456.05 621.78 454.66ZM913.96 455.57C914.04 457.03 914.11 458.48 914.19 459.93C913.97 460.07 913.75 460.2 913.53 460.34C913.67 458.75 913.82 457.16 913.96 455.57ZM601.62 456.2C601.62 460.29 601.62 464.39 601.61 468.48C601.62 464.39 601.62 460.29 601.62 456.2ZM780.22 456.39C780.3 458.38 780.38 460.37 780.47 462.36C780.27 462.5 780.07 462.63 779.87 462.77C779.98 460.64 780.1 458.52 780.22 456.39ZM622.18 465.17C622.26 466.66 622.35 468.16 622.43 469.66C622.2 469.79 621.98 469.93 621.76 470.06C621.9 468.43 622.04 466.8 622.18 465.17ZM781.34 465.43C783.89 465.35 786.43 465.28 788.97 465.2C789.11 465.39 789.24 465.58 789.38 465.77C786.7 465.66 784.02 465.54 781.34 465.43ZM830.79 465.47C828.88 465.57 826.96 465.68 825.04 465.79C825.17 465.59 825.31 465.4 825.45 465.2C827.23 465.29 829.01 465.38 830.79 465.47ZM913.11 471.61C913.2 475.55 913.29 479.49 913.38 483.43C913.19 483.57 912.99 483.7 912.8 483.84C912.9 479.76 913.01 475.69 913.11 471.61ZM785.44 473.85C783.57 473.94 781.69 474.02 779.82 474.11C779.9 473.96 779.98 473.8 780.06 473.65C781.85 473.71 783.65 473.78 785.44 473.85ZM798.29 474.42C804.51 474.38 810.72 474.33 816.94 474.28C814.3 475.59 801.18 475.53 798.29 474.42ZM521.68 497.65C521.68 499.83 521.67 502.01 521.67 504.19C521.67 502.01 521.68 499.83 521.68 497.65ZM383.99 500.05C383.86 501.36 383.72 502.68 383.59 503.99C383.5 502.81 383.42 501.63 383.34 500.45C383.56 500.32 383.78 500.18 383.99 500.05ZM383.15 509.77C383.03 511.95 382.92 514.13 382.8 516.31C382.71 514.27 382.62 512.22 382.53 510.18C382.74 510.04 382.95 509.91 383.15 509.77ZM382.8 529.93C382.91 531.32 383.01 532.7 383.12 534.09C382.92 533.95 382.73 533.82 382.53 533.68C382.62 532.43 382.71 531.18 382.8 529.93ZM186.65 536.59C186.78 538.46 186.91 540.33 187.04 542.19C186.82 542.06 186.61 541.92 186.4 541.79C186.49 540.06 186.57 538.33 186.65 536.59ZM206.07 543.81C206.27 543.95 206.47 544.08 206.67 544.22C206.58 545.4 206.5 546.59 206.42 547.77C206.3 546.45 206.18 545.13 206.07 543.81ZM206.84 552.73C207.05 552.86 207.26 553 207.48 553.13C207.39 554.36 207.31 555.59 207.22 556.82C207.1 555.46 206.97 554.09 206.84 552.73ZM576.99 670.48C575.66 670.61 574.32 670.73 572.99 670.86C573.12 670.66 573.26 670.45 573.39 670.24C574.59 670.32 575.79 670.4 576.99 670.48ZM543.81 689.01C545.74 689.15 547.67 689.29 549.6 689.43C547.81 689.52 546.01 689.6 544.22 689.69C544.08 689.47 543.95 689.24 543.81 689.01ZM517.98 839.83C521.68 839.84 525.39 839.86 529.1 839.87C525.39 839.86 521.68 839.84 517.98 839.83ZM493.57 857.69C494.9 857.8 496.24 857.91 497.58 858.02C496.37 858.1 495.17 858.19 493.97 858.27C493.84 858.08 493.7 857.88 493.57 857.69ZM503.29 858.49C505.47 858.6 507.65 858.71 509.83 858.81C507.79 858.9 505.74 858.99 503.7 859.08C503.56 858.88 503.43 858.69 503.29 858.49ZM553.54 858.44C553.4 858.66 553.27 858.87 553.13 859.08C551.93 858.99 550.72 858.91 549.51 858.83C550.85 858.7 552.2 858.57 553.54 858.44ZM525.98 859.38C529.5 859.33 533.01 859.29 536.52 859.25C536.38 859.46 536.25 859.67 536.11 859.89C532.87 859.89 529.63 859.89 526.39 859.89C526.25 859.72 526.12 859.55 525.98 859.38Z";
|
|
22
|
+
|
|
23
|
+
const CONTENT_BOUNDS = { minX: 0.14, minY: -0.23, maxX: 914.19, maxY: 859.89 };
|
|
24
|
+
|
|
25
|
+
interface LogoIconProps extends SVGProps<SVGSVGElement> {
|
|
26
|
+
/** 描边宽度,视口单位。用于粗描边时自动扩展 viewBox。默认 70 */
|
|
27
|
+
strokeWidth?: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const LogoIcon = ({ strokeWidth = 60, ...props }: LogoIconProps) => {
|
|
31
|
+
const hs = strokeWidth / 2;
|
|
32
|
+
const vbX = CONTENT_BOUNDS.minX - hs;
|
|
33
|
+
const vbY = CONTENT_BOUNDS.minY - hs;
|
|
34
|
+
const vbW = CONTENT_BOUNDS.maxX - CONTENT_BOUNDS.minX + strokeWidth;
|
|
35
|
+
const vbH = CONTENT_BOUNDS.maxY - CONTENT_BOUNDS.minY + strokeWidth;
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<svg
|
|
39
|
+
fill="currentColor"
|
|
40
|
+
height="48"
|
|
41
|
+
viewBox={`${vbX} ${vbY} ${vbW} ${vbH}`}
|
|
42
|
+
width="48"
|
|
43
|
+
{...props}
|
|
44
|
+
>
|
|
45
|
+
<title>Logo</title>
|
|
46
|
+
<path
|
|
47
|
+
d={PATH_0}
|
|
48
|
+
fill="currentColor"
|
|
49
|
+
fillRule="evenodd"
|
|
50
|
+
stroke="currentColor"
|
|
51
|
+
strokeWidth={strokeWidth}
|
|
52
|
+
strokeLinejoin="round"
|
|
53
|
+
/>
|
|
54
|
+
<path
|
|
55
|
+
d={PATH_1}
|
|
56
|
+
fill="currentColor"
|
|
57
|
+
fillRule="evenodd"
|
|
58
|
+
stroke="currentColor"
|
|
59
|
+
strokeWidth={strokeWidth}
|
|
60
|
+
strokeLinejoin="round"
|
|
61
|
+
/>
|
|
62
|
+
</svg>
|
|
63
|
+
);
|
|
64
|
+
};
|
|
@@ -15,9 +15,7 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
import React, { useRef, useState, useCallback, useEffect } from "react";
|
|
20
|
-
import { useTranslation } from "react-i18next";
|
|
21
19
|
import { Button } from "@/components/ui/button";
|
|
22
20
|
import { Minimize2, ArrowDownToLine } from "lucide-react";
|
|
23
21
|
import {
|
|
@@ -26,6 +24,7 @@ import {
|
|
|
26
24
|
TooltipProvider,
|
|
27
25
|
TooltipTrigger,
|
|
28
26
|
} from "@/components/ui/tooltip";
|
|
27
|
+
import { m } from "@/paraglide/messages.js";
|
|
29
28
|
|
|
30
29
|
type Corner = "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
31
30
|
|
|
@@ -98,7 +97,6 @@ export function NavFloatButton({
|
|
|
98
97
|
onExitFullscreen,
|
|
99
98
|
onExpandHeader,
|
|
100
99
|
}: NavFloatButtonProps) {
|
|
101
|
-
const { t } = useTranslation('common')
|
|
102
100
|
const buttonRef = useRef<HTMLDivElement>(null);
|
|
103
101
|
const containerRef = externalContainerRef as React.RefObject<HTMLDivElement | null> | undefined;
|
|
104
102
|
|
|
@@ -271,7 +269,7 @@ export function NavFloatButton({
|
|
|
271
269
|
</Button>
|
|
272
270
|
</TooltipTrigger>
|
|
273
271
|
<TooltipContent side="bottom" className="z-[9999]">
|
|
274
|
-
<p>{
|
|
272
|
+
<p>{m.common_navFloat_exitFullscreen()}</p>
|
|
275
273
|
</TooltipContent>
|
|
276
274
|
</Tooltip>
|
|
277
275
|
)}
|
|
@@ -290,7 +288,7 @@ export function NavFloatButton({
|
|
|
290
288
|
</Button>
|
|
291
289
|
</TooltipTrigger>
|
|
292
290
|
<TooltipContent side="bottom" className="z-[9999]">
|
|
293
|
-
<p>{
|
|
291
|
+
<p>{m.common_navFloat_showHeader()}</p>
|
|
294
292
|
</TooltipContent>
|
|
295
293
|
</Tooltip>
|
|
296
294
|
)}
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
//
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
-
|
|
18
|
-
import { useTranslation } from "react-i18next";
|
|
19
17
|
import type { LucideIcon } from "lucide-react";
|
|
18
|
+
import { m } from "@/paraglide/messages.js";
|
|
20
19
|
|
|
21
20
|
type PlaceholderPageProps = {
|
|
22
21
|
title: string;
|
|
@@ -25,7 +24,6 @@ type PlaceholderPageProps = {
|
|
|
25
24
|
};
|
|
26
25
|
|
|
27
26
|
export function PlaceholderPage({ title, description, icon: Icon }: PlaceholderPageProps) {
|
|
28
|
-
const { t } = useTranslation('common')
|
|
29
27
|
return (
|
|
30
28
|
<div className="flex h-full min-h-[60vh] items-center justify-center">
|
|
31
29
|
<div className="flex flex-col items-center gap-4 rounded-xl border bg-card p-12 text-center shadow-sm">
|
|
@@ -34,7 +32,7 @@ export function PlaceholderPage({ title, description, icon: Icon }: PlaceholderP
|
|
|
34
32
|
</div>
|
|
35
33
|
<h1 className="text-xl font-semibold">{title}</h1>
|
|
36
34
|
<p className="text-sm text-muted-foreground">
|
|
37
|
-
{description ??
|
|
35
|
+
{description ?? m.common_placeholder_developing()}
|
|
38
36
|
</p>
|
|
39
37
|
</div>
|
|
40
38
|
</div>
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
import { useCallback, useEffect, useRef, useState } from "react"
|
|
20
19
|
import { Moon, Sun } from "lucide-react"
|
|
21
20
|
import { flushSync } from "react-dom"
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
import { useTheme } from "next-themes";
|
|
20
19
|
import { Moon, Sun } from "lucide-react";
|
|
21
20
|
import { Button } from "@/components/ui/button";
|