): LabelMap => ({
+ local: {
+ value: t['com.affine.settings.workspace.state.local'](),
+ background: 'var(--affine-tag-orange)',
+ },
+ syncCloud: {
+ value: t['com.affine.settings.workspace.state.sync-affine-cloud'](),
+ background: 'var(--affine-tag-blue)',
+ },
+ syncDocker: {
+ value: t['com.affine.settings.workspace.state.sync-affine-docker'](),
+ background: 'var(--affine-tag-green)',
+ },
+ selfHosted: {
+ value: t['com.affine.settings.workspace.state.self-hosted'](),
+ background: 'var(--affine-tag-purple)',
+ },
+ joinedWorkspace: {
+ value: t['com.affine.settings.workspace.state.joined'](),
+ background: 'var(--affine-tag-yellow)',
+ },
+ availableOffline: {
+ value: t['com.affine.settings.workspace.state.available-offline'](),
+ background: 'var(--affine-tag-green)',
+ },
+ publishedToWeb: {
+ value: t['com.affine.settings.workspace.state.published'](),
+ background: 'var(--affine-tag-blue)',
+ },
+});
+
+export const LabelsPanel = () => {
+ const workspace = useService(WorkspaceService).workspace;
+ const permissionService = useService(WorkspacePermissionService);
+ const isOwner = useLiveData(permissionService.permission.isOwner$);
+ const t = useI18n();
+
+ useEffect(() => {
+ permissionService.permission.revalidate();
+ }, [permissionService]);
+
+ const labelMap = useMemo(() => getLabelMap(t), [t]);
+
+ const labelConditions = useMemo(
+ () => getConditions(isOwner, workspace),
+ [isOwner, workspace]
+ );
return (
diff --git a/packages/frontend/i18n/src/resources/en.json b/packages/frontend/i18n/src/resources/en.json
index 7538b0e779..6945ed34e9 100644
--- a/packages/frontend/i18n/src/resources/en.json
+++ b/packages/frontend/i18n/src/resources/en.json
@@ -202,6 +202,10 @@
"com.affine.appearanceSettings.clientBorder.title": "Client border style",
"com.affine.appearanceSettings.color.description": "Choose your colour mode",
"com.affine.appearanceSettings.color.title": "Colour mode",
+ "com.affine.appearanceSettings.customize-theme.description": "Edit all AFFiNE theme variables here",
+ "com.affine.appearanceSettings.customize-theme.title": "Customize Theme",
+ "com.affine.appearanceSettings.customize-theme.reset": "Reset all",
+ "com.affine.appearanceSettings.customize-theme.open": "Open Theme Editor",
"com.affine.appearanceSettings.font.description": "Choose your font style",
"com.affine.appearanceSettings.font.title": "Font style",
"com.affine.appearanceSettings.fontStyle.mono": "Mono",
@@ -1185,8 +1189,57 @@
"com.affine.settings.workspace.experimental-features.prompt-header": "Do you want to use the plugin system that is in an experimental stage?",
"com.affine.settings.workspace.experimental-features.prompt-warning": "You are about to enable an experimental feature. This feature is still in development and may contain errors or behave unpredictably. Please proceed with caution and at your own risk.",
"com.affine.settings.workspace.experimental-features.prompt-warning-title": "WARNING MESSAGE",
+ "com.affine.settings.workspace.experimental-features.enable-ai.name": "Enable AI",
+ "com.affine.settings.workspace.experimental-features.enable-ai.description": "Enable or disable ALL AI features.",
+ "com.affine.settings.workspace.experimental-features.enable-database-full-width.name": "Database Full Width",
+ "com.affine.settings.workspace.experimental-features.enable-database-full-width.description": "The database will be displayed in full-width mode.",
+ "com.affine.settings.workspace.experimental-features.enable-database-attachment-note.name": "Database Attachment Note",
+ "com.affine.settings.workspace.experimental-features.enable-database-attachment-note.description": "Allows adding notes to database attachments.",
+ "com.affine.settings.workspace.experimental-features.enable-block-query.name": "Todo Block Query",
+ "com.affine.settings.workspace.experimental-features.enable-block-query.description": "Enables querying of todo blocks.",
+ "com.affine.settings.workspace.experimental-features.enable-synced-doc-block.name": "Synced Doc Block",
+ "com.affine.settings.workspace.experimental-features.enable-synced-doc-block.description": "Enables syncing of doc blocks.",
+ "com.affine.settings.workspace.experimental-features.enable-edgeless-text.name": "Edgeless Text",
+ "com.affine.settings.workspace.experimental-features.enable-edgeless-text.description": "Enables edgeless text blocks.",
+ "com.affine.settings.workspace.experimental-features.enable-color-picker.name": "Color Picker",
+ "com.affine.settings.workspace.experimental-features.enable-color-picker.description": "Enables color picker blocks.",
+ "com.affine.settings.workspace.experimental-features.enable-ai-chat-block.name": "AI Chat Block",
+ "com.affine.settings.workspace.experimental-features.enable-ai-chat-block.description": "Enables AI chat blocks.",
+ "com.affine.settings.workspace.experimental-features.enable-ai-onboarding.name": "AI Onboarding",
+ "com.affine.settings.workspace.experimental-features.enable-ai-onboarding.description": "Enables AI onboarding.",
+ "com.affine.settings.workspace.experimental-features.enable-mind-map-import.name": "Mind Map Import",
+ "com.affine.settings.workspace.experimental-features.enable-mind-map-import.description": "Enables mind map import.",
+ "com.affine.settings.workspace.experimental-features.enable-multi-view.name": "Split View",
+ "com.affine.settings.workspace.experimental-features.enable-multi-view.description": "The Split View feature enables you to divide your tab into multiple sections for simultaneous viewing and editing of different documents.",
+ "com.affine.settings.workspace.experimental-features.enable-emoji-folder-icon.name": "Emoji Folder Icon",
+ "com.affine.settings.workspace.experimental-features.enable-emoji-folder-icon.description": "Once enabled, you can use an emoji as the folder icon. When the first character of the folder name is an emoji, it will be extracted and used as its icon.",
+ "com.affine.settings.workspace.experimental-features.enable-emoji-doc-icon.name": "Emoji Doc Icon",
+ "com.affine.settings.workspace.experimental-features.enable-emoji-doc-icon.description": "Once enabled, you can use an emoji as the page icon. When the first character of the folder name is an emoji, it will be extracted and used as its icon.",
+ "com.affine.settings.workspace.experimental-features.enable-editor-settings.name": "Editor Settings",
+ "com.affine.settings.workspace.experimental-features.enable-editor-settings.description": "Enables editor settings.",
+ "com.affine.settings.workspace.experimental-features.enable-offline-mode.name": "Offline Mode",
+ "com.affine.settings.workspace.experimental-features.enable-offline-mode.description": "Stop Connecting to the Internet. Even with AFFiNE Cloud, enabling this toggle stops internet connection and keeps everything local, but syncing will be disabled.",
+ "com.affine.settings.workspace.experimental-features.enable-theme-editor.name": "Theme Editor",
+ "com.affine.settings.workspace.experimental-features.enable-theme-editor.description": "Enables theme editor.",
+ "com.affine.settings.workspace.experimental-features.enable-local-workspace.name": "Allow create local workspace",
+ "com.affine.settings.workspace.experimental-features.enable-local-workspace.description": "Allow create local workspace",
+ "com.affine.settings.workspace.experimental-features.enable-advanced-block-visibility.name": "Advanced block visibility control",
+ "com.affine.settings.workspace.experimental-features.enable-advanced-block-visibility.description": "To provide detailed control over which edgeless blocks are visible in page mode.",
+ "com.affine.settings.workspace.experimental-features.enable-mobile-keyboard-toolbar.name": "Mobile Keyboard Toolbar",
+ "com.affine.settings.workspace.experimental-features.enable-mobile-keyboard-toolbar.description": "Enables the mobile keyboard toolbar.",
+ "com.affine.settings.workspace.experimental-features.enable-mobile-linked-doc-menu.name": "Mobile Linked Doc Widget",
+ "com.affine.settings.workspace.experimental-features.enable-mobile-linked-doc-menu.description": "Enables the mobile linked doc menu.",
+ "com.affine.settings.workspace.experimental-features.enable-snapshot-import-export.name": "Enable Snapshot Import Export",
+ "com.affine.settings.workspace.experimental-features.enable-snapshot-import-export.description": "Once enabled, users can import and export blocksuite snapshots.",
"com.affine.settings.workspace.not-owner": "Only an owner can edit the workspace avatar and name. Changes will be shown for everyone.",
"com.affine.settings.workspace.preferences": "Preference",
+ "com.affine.settings.workspace.state.local": "Local",
+ "com.affine.settings.workspace.state.sync-affine-cloud": "Sync with AFFiNE Cloud",
+ "com.affine.settings.workspace.state.sync-affine-docker": "Sync with AFFiNE Docker",
+ "com.affine.settings.workspace.state.self-hosted": "Self-Hosted Server",
+ "com.affine.settings.workspace.state.joined": "Joined Workspace",
+ "com.affine.settings.workspace.state.available-offline": "Available Offline",
+ "com.affine.settings.workspace.state.published": "Published to Web",
"com.affine.settings.workspace.properties": "Properties",
"com.affine.settings.workspace.properties.add_property": "Add property",
"com.affine.settings.workspace.properties.all": "All",