@tano.page/workbench 0.14.0 → 0.16.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 +50 -16
- package/src/App.vue +82 -752
- package/src/appearance/appearance.ts +14 -4
- package/src/appearance/components/ThemePresetPreview.vue +52 -8
- package/src/appearance/interface-font.ts +99 -0
- package/src/appearance/theme.ts +26 -10
- package/src/appearance/use-interface-font.ts +30 -0
- package/src/assets/mail-provider-icons/NOTICE.txt +27 -0
- package/src/assets/mail-provider-icons/aliyun-mail.svg +3 -0
- package/src/assets/mail-provider-icons/gmail.svg +1 -0
- package/src/assets/mail-provider-icons/icloud.svg +12 -0
- package/src/assets/mail-provider-icons/netease-126.svg +5 -0
- package/src/assets/mail-provider-icons/netease-163.svg +5 -0
- package/src/assets/mail-provider-icons/qq.svg +9 -0
- package/src/assets/mail-provider-icons/tencent-exmail.svg +4 -0
- package/src/assistant/agent-identities.ts +1 -97
- package/src/assistant/agent-task-context.ts +1 -54
- package/src/assistant/attachments.ts +1 -1
- package/src/assistant/completion.ts +1 -61
- package/src/assistant/components/AssistantChangeList.vue +98 -21
- package/src/assistant/components/AssistantPanel.vue +425 -8
- package/src/assistant/components/PluginToolProposalCard.vue +235 -0
- package/src/assistant/connection-actions.ts +237 -0
- package/src/assistant/document-mentions.ts +1 -33
- package/src/assistant/engine.ts +1 -532
- package/src/assistant/execution.ts +6 -33
- package/src/assistant/files.ts +5 -13
- package/src/assistant/hash.ts +1 -4
- package/src/assistant/inbox.ts +1 -148
- package/src/assistant/language.ts +10 -37
- package/src/assistant/mention-autocomplete.ts +69 -0
- package/src/assistant/plugin-bridge-builder.ts +146 -0
- package/src/assistant/prompts.ts +1 -58
- package/src/assistant/proposal-actions.ts +336 -0
- package/src/assistant/results.ts +20 -86
- package/src/assistant/store.ts +167 -327
- package/src/assistant/structures.ts +1 -155
- package/src/assistant/tasks.ts +8 -96
- package/src/assistant/tool-rules.ts +1 -7
- package/src/assistant/workspace-bridge.ts +1 -1
- package/src/composables/use-document-actions.ts +38 -20
- package/src/composables/use-file-tree-controller.ts +7 -12
- package/src/composables/use-workbench-help.ts +177 -0
- package/src/composables/use-workbench-history.ts +2 -4
- package/src/composables/use-workbench-lifecycle.ts +249 -0
- package/src/composables/use-workbench-modals.ts +6 -1
- package/src/composables/use-workbench-outline.ts +0 -5
- package/src/composables/use-workbench-settings.ts +185 -0
- package/src/composables/use-workbench-shortcuts.ts +40 -1021
- package/src/composables/use-workbench-views.ts +325 -0
- package/src/data-tables/data-tables.ts +1 -2
- package/src/documents/components/DocumentActionMenu.vue +279 -0
- package/src/documents/components/DocumentHistoryPanel.vue +3 -1
- package/src/documents/components/DocumentInspector.vue +168 -0
- package/src/documents/components/DocumentPane.vue +482 -0
- package/src/documents/description-merge.ts +1 -9
- package/src/features.ts +1 -0
- package/src/files/components/FileMetadataPanel.vue +49 -15
- package/src/fonts/Inter-Latin-Italic.woff2 +0 -0
- package/src/fonts/Inter-Latin.woff2 +0 -0
- package/src/fonts/TanoUISansSC-Bold.woff2 +0 -0
- package/src/fonts/TanoUISansSC-Medium.woff2 +0 -0
- package/src/fonts/TanoUISansSC-Regular.woff2 +0 -0
- package/src/help/help-milestones.ts +3 -5
- package/src/i18n/locale-catalogs.ts +7 -6
- package/src/i18n/locale-registry.ts +8 -6
- package/src/i18n/locales/de-DE.json +371 -3
- package/src/i18n/locales/en-US.json +371 -2
- package/src/i18n/locales/es-ES.json +371 -3
- package/src/i18n/locales/ja-JP.json +370 -2
- package/src/i18n/locales/zh-TW.json +370 -2
- package/src/mail/components/MailAccountDialog.vue +450 -0
- package/src/mail/components/MailComposerDialog.vue +326 -0
- package/src/mail/components/MailProviderIcon.vue +30 -0
- package/src/mail/components/MailWorkspaceView.vue +821 -0
- package/src/mail/components/SidebarMail.vue +134 -0
- package/src/mail/mail-avatar.ts +17 -0
- package/src/mail/mail-bridge.ts +68 -0
- package/src/mail/mail-calendar.ts +208 -0
- package/src/mail/mail-markdown.ts +195 -0
- package/src/mail/types.ts +226 -0
- package/src/objects/components/ObjectDetailModal.vue +1001 -0
- package/src/objects/content-references.ts +6 -56
- package/src/objects/wiki-links.ts +1 -48
- package/src/objects/workspace-objects.ts +3 -4
- package/src/plan-sync/types.ts +6 -3
- package/src/plans/calendar-interaction.ts +194 -0
- package/src/plans/calendar.ts +65 -9
- package/src/plans/components/CalendarAgendaView.vue +165 -0
- package/src/plans/components/CalendarDayPopover.vue +172 -39
- package/src/plans/components/CalendarFilterBar.vue +128 -0
- package/src/plans/components/CalendarMonthView.vue +224 -0
- package/src/plans/components/CalendarQuickCreateDialog.vue +269 -0
- package/src/plans/components/CalendarTimelineView.vue +517 -0
- package/src/plans/components/CalendarTopbarControls.vue +101 -0
- package/src/plans/components/CalendarView.vue +264 -748
- package/src/plans/components/CalendarYearView.vue +138 -0
- package/src/plans/components/PlanArchiveDialog.vue +295 -0
- package/src/plans/components/PlanConnectionsDialog.vue +1 -1
- package/src/plans/components/PlanDateField.vue +6 -4
- package/src/plans/components/PlanDetailPanel.vue +227 -32
- package/src/plans/components/PlanEventList.vue +16 -4
- package/src/plans/components/SidebarPlan.vue +22 -15
- package/src/plans/components/TaskRepeatControls.vue +169 -30
- package/src/plans/components/calendar-shared.css +192 -0
- package/src/plans/composables/use-calendar-interactions.ts +396 -0
- package/src/plans/composables/use-calendar-scroll.ts +420 -0
- package/src/plans/local-reminders.ts +149 -0
- package/src/plans/personal-plans.ts +10 -1
- package/src/plans/plan-date.ts +8 -1
- package/src/plans/plan-migration.ts +95 -0
- package/src/plans/recurrence.ts +95 -0
- package/src/plans/task-repeat.ts +8 -8
- package/src/plans/timeline-layout.ts +92 -0
- package/src/plugins/assistant-bridge.ts +520 -0
- package/src/plugins/attachment-reader.ts +3 -1
- package/src/plugins/cache-storage.ts +42 -2
- package/src/plugins/components/PluginAutomations.vue +3 -3
- package/src/plugins/components/PluginCatalogBrowser.vue +17 -8
- package/src/plugins/components/PluginChangeSummary.vue +16 -3
- package/src/plugins/components/PluginConnections.vue +1 -1
- package/src/plugins/components/PluginCustomView.vue +2 -2
- package/src/plugins/components/PluginDetailPage.vue +136 -57
- package/src/plugins/components/PluginDeveloperArea.vue +192 -0
- package/src/plugins/components/PluginDocumentSlot.vue +63 -0
- package/src/plugins/components/PluginExplorer.vue +21 -25
- package/src/plugins/components/PluginImportDialog.vue +410 -0
- package/src/plugins/components/PluginInstaller.vue +273 -288
- package/src/plugins/components/PluginListItem.vue +3 -0
- package/src/plugins/components/PluginMaintenance.vue +37 -34
- package/src/plugins/components/PluginRepositoryStorage.vue +4 -2
- package/src/plugins/components/PluginRuntimePanel.vue +3 -3
- package/src/plugins/components/PluginSettingsForm.vue +112 -0
- package/src/plugins/components/PluginStatusBar.vue +161 -0
- package/src/plugins/components/PluginSurface.vue +18 -6
- package/src/plugins/components/PluginUiDialog.vue +452 -0
- package/src/plugins/components/PluginsTabPage.vue +61 -0
- package/src/plugins/components/plugin-center.css +5 -0
- package/src/plugins/data.ts +9 -86
- package/src/plugins/editor-plugin-adapters.ts +169 -0
- package/src/plugins/excalidraw/bundle.tano-plugin.json +1 -1
- package/src/plugins/excalidraw/manifest.json +12 -1
- package/src/plugins/host.ts +662 -43
- package/src/plugins/native.ts +2 -10
- package/src/plugins/overlay-mapping.ts +125 -0
- package/src/plugins/packages.ts +73 -1
- package/src/plugins/plugin-data.ts +2 -3
- package/src/plugins/plugin-permissions.ts +57 -0
- package/src/plugins/plugin-rpc-router.ts +558 -0
- package/src/plugins/plugin-sdk.ts +1 -94
- package/src/plugins/plugin-ui-dialogs.ts +167 -0
- package/src/plugins/policy.ts +53 -3
- package/src/plugins/presentation-preview/bundle.tano-plugin.json +1 -1
- package/src/plugins/presentation-preview/manifest.json +2 -1
- package/src/plugins/queries.ts +1 -73
- package/src/plugins/sandbox.ts +15 -1
- package/src/plugins/use-plugin-actions.ts +67 -20
- package/src/plugins/user-plugins.ts +254 -0
- package/src/plugins/view-header.ts +2 -7
- package/src/plugins/word-preview/bundle.tano-plugin.json +1 -1
- package/src/plugins/word-preview/manifest.json +13 -1
- package/src/plugins/workbench.ts +175 -2
- package/src/plugins/worker.js +105 -8
- package/src/plugins/workspace-plugin-runtime.ts +23 -7
- package/src/plugins/workspace-plugins.ts +212 -21
- package/src/runtime.ts +103 -4
- package/src/settings/components/SettingsAppearancePage.vue +46 -0
- package/src/settings/components/SettingsDocumentsPage.vue +0 -1
- package/src/settings/components/SettingsPanel.vue +8 -3
- package/src/settings/components/WorkbenchSettings.vue +20 -7
- package/src/settings/components/settings-context.ts +1 -1
- package/src/settings/components/settings-search.ts +2 -3
- package/src/settings/settings-tab.ts +1 -0
- package/src/shell/command-palette.ts +3 -3
- package/src/shell/components/EditorToolbar.vue +8 -9
- package/src/shell/components/EditorTools.vue +1 -5
- package/src/shell/components/PaneTopbar.vue +393 -0
- package/src/shell/components/SelectionToolbar.vue +0 -2
- package/src/shell/components/SidebarNavigation.vue +22 -2
- package/src/shell/components/WorkbenchContextMenus.vue +58 -34
- package/src/shell/components/WorkbenchModals.vue +47 -62
- package/src/shell/components/WorkbenchPanes.vue +371 -1342
- package/src/shell/components/WorkbenchSidebar.vue +486 -0
- package/src/shell/components/WorkspaceBreadcrumb.vue +6 -14
- package/src/shell/components/WorkspaceViewSwitcher.vue +12 -7
- package/src/shell/pane-registry.ts +69 -0
- package/src/shell/use-surface-dismissal.ts +219 -0
- package/src/shell/use-workbench-commands.ts +599 -0
- package/src/shell/use-workbench-keybindings.ts +337 -0
- package/src/shell/use-workbench.ts +531 -1153
- package/src/shell/workbench-async-components.ts +14 -5
- package/src/shell/workbench-context.ts +30 -3
- package/src/stores/mail.ts +414 -0
- package/src/stores/plan-sync.ts +2 -1
- package/src/stores/plans.ts +2 -9
- package/src/stores/workspace-document-io.ts +807 -0
- package/src/stores/workspace-file-ops.ts +1 -1
- package/src/stores/workspace-knowledge.ts +2 -114
- package/src/stores/workspace-lifecycle.ts +459 -0
- package/src/stores/workspace-plugins-state.ts +254 -259
- package/src/stores/workspace-session.ts +287 -0
- package/src/stores/workspace-tabs-layout.ts +6 -44
- package/src/stores/workspace-types.ts +50 -0
- package/src/stores/workspace.ts +184 -1363
- package/src/styles/agent-diff-modals.css +0 -7
- package/src/styles/dark-theme.css +3 -3
- package/src/styles/inspector.css +0 -59
- package/src/styles/layout-themes.css +346 -0
- package/src/styles/mail.css +1568 -0
- package/src/styles/mobile.css +2 -2
- package/src/styles/recent-and-media.css +0 -17
- package/src/styles/theme-contract.css +3 -3
- package/src/styles/workbench-shell.css +110 -17
- package/src/styles/workspace-states.css +9 -33
- package/src/styles.css +0 -1
- package/src/tabs/components/DesktopTabs.vue +19 -14
- package/src/tabs/components/NewTabPicker.vue +10 -4
- package/src/tabs/tab-label.ts +0 -1
- package/src/windows/AuxiliaryWindows.vue +2 -2
- package/src/windows/use-window-event-bridge.ts +152 -0
- package/src/workspace/components/TemplateLibrary.vue +1 -1
- package/src/workspace/components/WorkspaceGeneralSettings.vue +0 -13
- package/src/workspace/components/WorkspaceIconPicker.vue +30 -7
- package/src/workspace/components/WorkspacePickerMenu.vue +317 -0
- package/src/workspace/workspace-comments.ts +11 -151
- package/src/workspace/workspace-welcome.ts +1 -1
- package/src/assistant/locales/de-DE.json +0 -126
- package/src/assistant/locales/en-US.json +0 -126
- package/src/assistant/locales/es-ES.json +0 -126
- package/src/assistant/locales/ja-JP.json +0 -126
- package/src/assistant/locales/zh-CN.json +0 -126
- package/src/assistant/locales/zh-TW.json +0 -126
- package/src/assistant/task-prompts.json +0 -39
- package/src/documents/components/FormulaMenu.vue +0 -50
- package/src/files/components/FileDatabasePage.vue +0 -152
- package/src/files/components/FolderHomeIcon.vue +0 -12
- package/src/objects/components/ObjectDatabasePage.vue +0 -100
- package/src/objects/components/ObjectPanel.vue +0 -554
- package/src/plans/components/PersonalPlanDialog.vue +0 -105
- package/src/shell/components/WorkspaceViewPage.vue +0 -127
- package/src/shell/components/WorkspaceViewTab.vue +0 -24
- package/src/styles/object-panel.css +0 -163
- package/src/workspace/components/GitInspectionPanel.vue +0 -35
- package/src/workspace/components/WorkspaceSyncPanel.vue +0 -50
- package/src/workspace/welcome-slogans.ts +0 -11
- package/src/workspace/workspace-git.ts +0 -35
- package/src/workspace/workspace-sync.ts +0 -46
- package/src/workspace/workspace-views.ts +0 -48
|
@@ -3,7 +3,6 @@ import { inject, toRefs } from 'vue';
|
|
|
3
3
|
import {
|
|
4
4
|
AppWindow,
|
|
5
5
|
ArrowDownToLine,
|
|
6
|
-
Blocks,
|
|
7
6
|
Check,
|
|
8
7
|
CopyPlus,
|
|
9
8
|
Eye,
|
|
@@ -29,39 +28,58 @@ import {
|
|
|
29
28
|
} from 'lucide-vue-next';
|
|
30
29
|
import ShortcutHint from '@tano/editor/shortcut-hint';
|
|
31
30
|
import { vSurfaceMotion } from '@tano/editor/surface-motion';
|
|
32
|
-
import {
|
|
31
|
+
import { isDataTableFilePath, isMarkdown, isWorkspaceInternalPath } from '@tano/protocol';
|
|
32
|
+
import { t } from '../../i18n/i18n';
|
|
33
|
+
import { mobile } from '../../platform/platform';
|
|
34
|
+
import {
|
|
35
|
+
workbenchDocumentsKey,
|
|
36
|
+
workbenchPrefsKey,
|
|
37
|
+
workbenchShellKey,
|
|
38
|
+
workbenchTreeMenusKey,
|
|
39
|
+
} from '../workbench-context';
|
|
33
40
|
import PageDisplayOptions from './PageDisplayOptions.vue';
|
|
34
41
|
import PluginMenu from '../../plugins/components/PluginMenu.vue';
|
|
35
42
|
|
|
36
|
-
const
|
|
37
|
-
|
|
43
|
+
const shell = inject(workbenchShellKey);
|
|
44
|
+
const prefs = inject(workbenchPrefsKey);
|
|
45
|
+
const documents = inject(workbenchDocumentsKey);
|
|
46
|
+
const treeMenus = inject(workbenchTreeMenusKey);
|
|
47
|
+
if (!shell || !prefs || !documents || !treeMenus) throw new Error('Workbench context is required');
|
|
48
|
+
|
|
38
49
|
const {
|
|
39
50
|
activeWindow,
|
|
40
51
|
workspace,
|
|
41
52
|
isAuxiliaryWindow,
|
|
42
|
-
t,
|
|
43
53
|
store,
|
|
44
|
-
mobile,
|
|
45
54
|
localNative,
|
|
46
55
|
busy,
|
|
47
56
|
switchingWorkspace,
|
|
57
|
+
attachments,
|
|
58
|
+
} = toRefs(shell);
|
|
59
|
+
const {
|
|
60
|
+
shortcutHint,
|
|
61
|
+
tabsEnabled,
|
|
62
|
+
workspaceLocked,
|
|
63
|
+
editorPreferences,
|
|
64
|
+
showPageTitle,
|
|
65
|
+
showDocumentProperties,
|
|
66
|
+
showAllLineNumbers,
|
|
67
|
+
toggleWorkspaceLock,
|
|
68
|
+
} = toRefs(prefs);
|
|
69
|
+
const { showOutline, paneSource, togglePageOption, outlineOnLeft, toggleOutlineSide } =
|
|
70
|
+
toRefs(documents);
|
|
71
|
+
const {
|
|
48
72
|
fileContextMenu,
|
|
49
73
|
multipleContextEntries,
|
|
50
74
|
contextEntries,
|
|
51
75
|
fileContextKeydown,
|
|
52
76
|
selectionDeleteDisabled,
|
|
53
77
|
fileContextAction,
|
|
54
|
-
shortcutHint,
|
|
55
78
|
contextFolderHome,
|
|
56
79
|
folderHomeContextAction,
|
|
57
80
|
fileMutationDisabled,
|
|
58
81
|
directoryHasManagedFile,
|
|
59
|
-
isMarkdown,
|
|
60
|
-
isDataTableFilePath,
|
|
61
|
-
attachments,
|
|
62
|
-
tabsEnabled,
|
|
63
82
|
canDuplicateEntry,
|
|
64
|
-
isWorkspaceInternalPath,
|
|
65
83
|
folderConversionIssue,
|
|
66
84
|
convertDocumentStructure,
|
|
67
85
|
revealedHomeId,
|
|
@@ -73,24 +91,16 @@ const {
|
|
|
73
91
|
directoryContextRenameDisabled,
|
|
74
92
|
directoryContextDeleteDisabled,
|
|
75
93
|
workspaceEntryContextMenu,
|
|
94
|
+
setWorkspaceEntryContextMenuElement,
|
|
76
95
|
workspaceEntryContextKeydown,
|
|
77
96
|
workspaceEntryContextAction,
|
|
78
97
|
pageContextMenu,
|
|
98
|
+
setPageContextMenuElement,
|
|
79
99
|
pageContextKeydown,
|
|
80
|
-
workspaceLocked,
|
|
81
|
-
editorPreferences,
|
|
82
|
-
showPageTitle,
|
|
83
|
-
showDocumentProperties,
|
|
84
|
-
showOutline,
|
|
85
|
-
showAllLineNumbers,
|
|
86
|
-
paneSource,
|
|
87
|
-
togglePageOption,
|
|
88
|
-
toggleWorkspaceLock,
|
|
89
100
|
outlineContextMenu,
|
|
101
|
+
setOutlineContextMenuElement,
|
|
90
102
|
outlineContextKeydown,
|
|
91
|
-
|
|
92
|
-
toggleOutlineSide,
|
|
93
|
-
} = toRefs(context);
|
|
103
|
+
} = toRefs(treeMenus);
|
|
94
104
|
</script>
|
|
95
105
|
|
|
96
106
|
<template>
|
|
@@ -174,6 +184,13 @@ const {
|
|
|
174
184
|
>
|
|
175
185
|
<FolderPlus :size="15" />{{ t('在此新建文件夹') }}
|
|
176
186
|
</button>
|
|
187
|
+
<button
|
|
188
|
+
role="menuitem"
|
|
189
|
+
:disabled="fileMutationDisabled(fileContextMenu.file)"
|
|
190
|
+
@click="fileContextAction('table')"
|
|
191
|
+
>
|
|
192
|
+
<Table2 :size="15" />{{ t('在此新建数据表') }}
|
|
193
|
+
</button>
|
|
177
194
|
<button
|
|
178
195
|
role="menuitem"
|
|
179
196
|
:disabled="
|
|
@@ -219,6 +236,13 @@ const {
|
|
|
219
236
|
>
|
|
220
237
|
<PanelsTopLeft :size="15" />{{ t('在新标签页中打开') }}
|
|
221
238
|
</button>
|
|
239
|
+
<button
|
|
240
|
+
v-if="store.hasMarkdownFileHandler(fileContextMenu.file)"
|
|
241
|
+
role="menuitem"
|
|
242
|
+
@click="fileContextAction('open-markdown-source')"
|
|
243
|
+
>
|
|
244
|
+
<FileText :size="15" />{{ t('用 Markdown 源码打开') }}
|
|
245
|
+
</button>
|
|
222
246
|
<div
|
|
223
247
|
v-if="
|
|
224
248
|
isMarkdown(fileContextMenu.file.path) ||
|
|
@@ -358,13 +382,6 @@ const {
|
|
|
358
382
|
>
|
|
359
383
|
<FileSliders :size="15" />{{ t('文件属性') }}
|
|
360
384
|
</button>
|
|
361
|
-
<button
|
|
362
|
-
v-if="!isWorkspaceInternalPath(fileContextMenu.file.path)"
|
|
363
|
-
role="menuitem"
|
|
364
|
-
@click="fileContextAction('object')"
|
|
365
|
-
>
|
|
366
|
-
<Blocks :size="15" />{{ t('查看文件对象') }}
|
|
367
|
-
</button>
|
|
368
385
|
</template>
|
|
369
386
|
<PluginMenu
|
|
370
387
|
v-if="fileContextMenu.file.kind === 'file'"
|
|
@@ -423,6 +440,13 @@ const {
|
|
|
423
440
|
>
|
|
424
441
|
<FolderPlus :size="15" />{{ t('新建文件夹') }}
|
|
425
442
|
</button>
|
|
443
|
+
<button
|
|
444
|
+
role="menuitem"
|
|
445
|
+
:disabled="!workspace || workspace.readOnly || busy"
|
|
446
|
+
@click="directoryContextAction('table')"
|
|
447
|
+
>
|
|
448
|
+
<Table2 :size="15" />{{ t('新建数据表') }}
|
|
449
|
+
</button>
|
|
426
450
|
<button
|
|
427
451
|
v-if="!directoryContextMenu.parent"
|
|
428
452
|
role="menuitem"
|
|
@@ -478,7 +502,7 @@ const {
|
|
|
478
502
|
<div
|
|
479
503
|
v-surface-motion="'App:2'"
|
|
480
504
|
v-if="workspaceEntryContextMenu"
|
|
481
|
-
:ref="
|
|
505
|
+
:ref="setWorkspaceEntryContextMenuElement"
|
|
482
506
|
class="dropdown compact-action-menu file-context-menu workspace-entry-context-menu"
|
|
483
507
|
role="menu"
|
|
484
508
|
tabindex="-1"
|
|
@@ -511,7 +535,7 @@ const {
|
|
|
511
535
|
<div
|
|
512
536
|
v-surface-motion="'App:6'"
|
|
513
537
|
v-if="pageContextMenu && !switchingWorkspace"
|
|
514
|
-
:ref="
|
|
538
|
+
:ref="setPageContextMenuElement"
|
|
515
539
|
class="dropdown compact-action-menu page-context-menu workspace-options-menu"
|
|
516
540
|
role="menu"
|
|
517
541
|
:aria-label="t('页面显示选项')"
|
|
@@ -539,7 +563,7 @@ const {
|
|
|
539
563
|
<div
|
|
540
564
|
v-surface-motion="'App:7'"
|
|
541
565
|
v-if="outlineContextMenu && !switchingWorkspace"
|
|
542
|
-
:ref="
|
|
566
|
+
:ref="setOutlineContextMenuElement"
|
|
543
567
|
class="dropdown compact-action-menu page-context-menu outline-context-menu"
|
|
544
568
|
role="menu"
|
|
545
569
|
:aria-label="t('目录显示选项')"
|
|
@@ -9,64 +9,60 @@ import {
|
|
|
9
9
|
DocumentHistoryPanel,
|
|
10
10
|
ImportPanel,
|
|
11
11
|
MobileRecycle,
|
|
12
|
-
|
|
12
|
+
ObjectDetailModal,
|
|
13
|
+
PlanArchiveDialog,
|
|
13
14
|
PlanDetailPanel,
|
|
14
15
|
SelectionTodoDialog,
|
|
15
16
|
} from '../workbench-async-components';
|
|
16
|
-
import {
|
|
17
|
+
import { t } from '../../i18n/i18n';
|
|
18
|
+
import { mobile } from '../../platform/platform';
|
|
19
|
+
import { workbenchModalsKey, workbenchShellKey } from '../workbench-context';
|
|
17
20
|
import CommandPalette from './CommandPalette.vue';
|
|
18
21
|
import NewTabPicker from '../../tabs/components/NewTabPicker.vue';
|
|
22
|
+
import PluginUiDialog from '../../plugins/components/PluginUiDialog.vue';
|
|
19
23
|
import WorkbenchSettings from '../../settings/components/WorkbenchSettings.vue';
|
|
20
|
-
import WorkspaceSyncPanel from '../../workspace/components/WorkspaceSyncPanel.vue';
|
|
21
24
|
|
|
22
|
-
const
|
|
23
|
-
|
|
25
|
+
const shell = inject(workbenchShellKey);
|
|
26
|
+
const modals = inject(workbenchModalsKey);
|
|
27
|
+
if (!shell || !modals) throw new Error('Workbench context is required');
|
|
28
|
+
|
|
24
29
|
const {
|
|
25
30
|
activeWindow,
|
|
26
31
|
workspace,
|
|
27
|
-
mobile,
|
|
28
|
-
t,
|
|
29
32
|
store,
|
|
30
|
-
importPanel,
|
|
31
33
|
attachments,
|
|
32
|
-
importRecords,
|
|
33
|
-
systemSyncPanel,
|
|
34
|
-
workspaceSync,
|
|
35
34
|
extensions,
|
|
36
35
|
extensionActions,
|
|
36
|
+
active,
|
|
37
|
+
activities,
|
|
38
|
+
calendarScope,
|
|
39
|
+
createNewDocument,
|
|
40
|
+
createNewEntry,
|
|
41
|
+
showPlanEvent,
|
|
42
|
+
extensionViews,
|
|
43
|
+
viewActions,
|
|
44
|
+
workbenchCommands,
|
|
45
|
+
updateLock,
|
|
46
|
+
} = toRefs(shell);
|
|
47
|
+
const {
|
|
48
|
+
importPanel,
|
|
49
|
+
importRecords,
|
|
37
50
|
recyclePanel,
|
|
38
51
|
agentPanel,
|
|
39
52
|
selectedDiff,
|
|
40
53
|
historyPanel,
|
|
41
|
-
active,
|
|
42
|
-
activities,
|
|
43
54
|
historyPage,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
objectPanel,
|
|
47
|
-
selectedObjectId,
|
|
48
|
-
selectedResourceIdentity,
|
|
49
|
-
selectedPersonal,
|
|
50
|
-
plans,
|
|
51
|
-
assetImportBusy,
|
|
52
|
-
assetPreview,
|
|
53
|
-
openObjectResource,
|
|
55
|
+
objectDetail,
|
|
56
|
+
planArchiveOpen,
|
|
54
57
|
openObjectReference,
|
|
55
|
-
createNewDocument,
|
|
56
|
-
assetInput,
|
|
57
58
|
planDetail,
|
|
58
59
|
openPlanReference,
|
|
59
60
|
selectionTodo,
|
|
60
|
-
showPlanEvent,
|
|
61
|
-
extensionViews,
|
|
62
|
-
viewActions,
|
|
63
61
|
commandPaletteOpened,
|
|
64
|
-
workbenchCommands,
|
|
65
62
|
settingsPanel,
|
|
66
63
|
fatal,
|
|
67
64
|
modal,
|
|
68
65
|
modalBusy,
|
|
69
|
-
updateLock,
|
|
70
66
|
modalTitle,
|
|
71
67
|
input,
|
|
72
68
|
searchResults,
|
|
@@ -80,7 +76,7 @@ const {
|
|
|
80
76
|
modalTarget,
|
|
81
77
|
modalError,
|
|
82
78
|
setModalInputElement,
|
|
83
|
-
} = toRefs(
|
|
79
|
+
} = toRefs(modals);
|
|
84
80
|
</script>
|
|
85
81
|
|
|
86
82
|
<template>
|
|
@@ -94,13 +90,6 @@ const {
|
|
|
94
90
|
@close="importPanel = false"
|
|
95
91
|
@completed="importRecords.unshift($event)"
|
|
96
92
|
/>
|
|
97
|
-
<WorkspaceSyncPanel
|
|
98
|
-
v-if="systemSyncPanel && workspace"
|
|
99
|
-
:workspace-id="workspace.id"
|
|
100
|
-
:controller="workspaceSync"
|
|
101
|
-
:cloud="extensions.sync"
|
|
102
|
-
@close="systemSyncPanel = false"
|
|
103
|
-
/>
|
|
104
93
|
<component
|
|
105
94
|
:is="extensions.regions['sync-dialog']"
|
|
106
95
|
v-if="extensions.regions['sync-dialog']"
|
|
@@ -137,31 +126,20 @@ const {
|
|
|
137
126
|
selectedDiff = $event;
|
|
138
127
|
"
|
|
139
128
|
/>
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
@
|
|
146
|
-
/>
|
|
147
|
-
<ObjectPanel
|
|
148
|
-
v-if="objectPanelMounted"
|
|
149
|
-
v-show="objectPanel"
|
|
150
|
-
:open="objectPanel"
|
|
151
|
-
:selected-id="selectedObjectId"
|
|
152
|
-
:selected-identity="selectedResourceIdentity"
|
|
153
|
-
:personal="selectedPersonal ? plans.panel : undefined"
|
|
154
|
-
:can-open-asset="!!attachments"
|
|
155
|
-
:can-import-asset="!!attachments && !assetImportBusy"
|
|
156
|
-
:preview-asset="assetPreview"
|
|
157
|
-
@close="objectPanel = false"
|
|
158
|
-
@open-resource="openObjectResource"
|
|
129
|
+
<ObjectDetailModal
|
|
130
|
+
v-if="objectDetail && workspace"
|
|
131
|
+
:key="`${workspace.id}:${objectDetail.record?.object.id ?? `new:${objectDetail.initialType ?? ''}`}`"
|
|
132
|
+
:record="objectDetail.record"
|
|
133
|
+
:initial-type="objectDetail.initialType"
|
|
134
|
+
@close="objectDetail = undefined"
|
|
159
135
|
@open-reference="openObjectReference"
|
|
160
|
-
@
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
"
|
|
164
|
-
|
|
136
|
+
@saved="objectDetail = { record: $event }"
|
|
137
|
+
/>
|
|
138
|
+
<PlanArchiveDialog
|
|
139
|
+
v-if="planArchiveOpen"
|
|
140
|
+
:scope="calendarScope"
|
|
141
|
+
@close="planArchiveOpen = false"
|
|
142
|
+
@select-event="showPlanEvent"
|
|
165
143
|
/>
|
|
166
144
|
<PlanDetailPanel
|
|
167
145
|
v-if="planDetail"
|
|
@@ -207,6 +185,7 @@ const {
|
|
|
207
185
|
v-if="modal === 'newTab'"
|
|
208
186
|
@close="modal = ''"
|
|
209
187
|
@new-document="createNewDocument"
|
|
188
|
+
@new-table="createNewEntry('table')"
|
|
210
189
|
/>
|
|
211
190
|
<div
|
|
212
191
|
v-surface-motion="'App:8'"
|
|
@@ -369,6 +348,12 @@ const {
|
|
|
369
348
|
</form>
|
|
370
349
|
</section>
|
|
371
350
|
</div>
|
|
351
|
+
<PluginUiDialog
|
|
352
|
+
:dialog="store.activePluginDialog"
|
|
353
|
+
:toasts="store.pluginToasts"
|
|
354
|
+
@resolve="store.resolvePluginDialog"
|
|
355
|
+
@dismiss-toast="store.dismissPluginToast"
|
|
356
|
+
/>
|
|
372
357
|
</WindowScope>
|
|
373
358
|
</Teleport>
|
|
374
359
|
</template>
|