@vibe-forge/client 0.11.3 → 1.0.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/cli.cjs +6 -11
- package/dist/assets/{arc-h39NrT24.js → arc-CbOXL0l9.js} +1 -1
- package/dist/assets/{blockDiagram-c4efeb88-CaDg46I6.js → blockDiagram-c4efeb88-CqxINvsS.js} +1 -1
- package/dist/assets/{c4Diagram-c83219d4-CDqjcF9U.js → c4Diagram-c83219d4-BKazU0hb.js} +1 -1
- package/dist/assets/channel-Dnopc5A6.js +1 -0
- package/dist/assets/{classDiagram-beda092f-BDnZm8nO.js → classDiagram-beda092f-fAFX5BpB.js} +1 -1
- package/dist/assets/{classDiagram-v2-2358418a-BUi85KJW.js → classDiagram-v2-2358418a-w1VkNGJj.js} +1 -1
- package/dist/assets/clone-sQthahUA.js +1 -0
- package/dist/assets/{createText-1719965b-Ca5dEwfo.js → createText-1719965b-CEinakVP.js} +1 -1
- package/dist/assets/{cssMode-Ysz7NfYo.js → cssMode-DPqRki4y.js} +1 -1
- package/dist/assets/{edges-96097737-CdSKqxZt.js → edges-96097737-Cb0F1_3K.js} +1 -1
- package/dist/assets/{erDiagram-0228fc6a-B-veAUv_.js → erDiagram-0228fc6a-C-N2fx-J.js} +1 -1
- package/dist/assets/{flowDb-c6c81e3f-DD8Cx7_9.js → flowDb-c6c81e3f-D1Xz_8Gf.js} +1 -1
- package/dist/assets/{flowDiagram-50d868cf-9f-_x1ET.js → flowDiagram-50d868cf-DyPSZyAj.js} +1 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-OazrdWQO.js +1 -0
- package/dist/assets/{flowchart-elk-definition-6af322e1-5RhpQM4M.js → flowchart-elk-definition-6af322e1-Dr1DDXwE.js} +1 -1
- package/dist/assets/{freemarker2-SgMdIXw4.js → freemarker2-C3DvPFaK.js} +1 -1
- package/dist/assets/{ganttDiagram-a2739b55-DnxNghZA.js → ganttDiagram-a2739b55-DmvY1GRj.js} +1 -1
- package/dist/assets/{gitGraphDiagram-82fe8481-CBvS3Tf9.js → gitGraphDiagram-82fe8481-CoXfPYYi.js} +1 -1
- package/dist/assets/{graph-CkHF299-.js → graph-BkDQy7Qt.js} +1 -1
- package/dist/assets/{handlebars-C57IyLUe.js → handlebars-BcTFdqjl.js} +1 -1
- package/dist/assets/{html-YsDy5wvW.js → html-Dg-O6XFr.js} +1 -1
- package/dist/assets/{htmlMode-7o_VDODD.js → htmlMode-B_wqYWvn.js} +1 -1
- package/dist/assets/{index-5325376f-BzOVQPu-.js → index-5325376f-kxPTR3_e.js} +1 -1
- package/dist/assets/index-o93dlo92.css +32 -0
- package/dist/assets/{index-BHFpctk6.js → index-wkhI4dr6.js} +357 -337
- package/dist/assets/{infoDiagram-8eee0895-DJ-UI1h4.js → infoDiagram-8eee0895-BEvqkwPI.js} +1 -1
- package/dist/assets/{javascript-BHQ9NEZr.js → javascript-DhlOH8_z.js} +1 -1
- package/dist/assets/{journeyDiagram-c64418c1-DwfykcG9.js → journeyDiagram-c64418c1-gKtLYmmp.js} +1 -1
- package/dist/assets/{jsonMode-3QjftkMM.js → jsonMode-DxTbF9OD.js} +1 -1
- package/dist/assets/{layout-CbViRb_b.js → layout-CDaZEk6E.js} +1 -1
- package/dist/assets/{line-DBdBvv9D.js → line-DNRQu8iq.js} +1 -1
- package/dist/assets/{linear-BDAfhcjn.js → linear-Cph9Z6_j.js} +1 -1
- package/dist/assets/{liquid-B0cPPzIR.js → liquid-ByZ6JgRG.js} +1 -1
- package/dist/assets/{lspLanguageFeatures-IOxbobOz.js → lspLanguageFeatures-DzvhkgnM.js} +1 -1
- package/dist/assets/{mdx-Dma_RA8P.js → mdx-D8RGHTl6.js} +1 -1
- package/dist/assets/{mermaid.core-Cvn8Go4x.js → mermaid.core-BgcryF__.js} +4 -4
- package/dist/assets/{mindmap-definition-8da855dc-DEnYq0Lc.js → mindmap-definition-8da855dc-WrxK0FcB.js} +1 -1
- package/dist/assets/{pieDiagram-a8764435-ZC4j8sHU.js → pieDiagram-a8764435-VsZBsiQy.js} +1 -1
- package/dist/assets/{python-Be0WX4q5.js → python-CXVtk_cg.js} +1 -1
- package/dist/assets/{quadrantDiagram-1e28029f-DUaqHlIB.js → quadrantDiagram-1e28029f-BVlgwOvU.js} +1 -1
- package/dist/assets/{razor-Tjhny-uT.js → razor-0tind7h2.js} +1 -1
- package/dist/assets/{requirementDiagram-08caed73-DjSal3es.js → requirementDiagram-08caed73-CpPMPoYp.js} +1 -1
- package/dist/assets/{sankeyDiagram-a04cb91d-BMDXMrMz.js → sankeyDiagram-a04cb91d-Cm5nnRmc.js} +1 -1
- package/dist/assets/{sequenceDiagram-c5b8d532-CQl9YUlH.js → sequenceDiagram-c5b8d532-DpMlJvJB.js} +1 -1
- package/dist/assets/{stateDiagram-1ecb1508-DG7mU9jD.js → stateDiagram-1ecb1508-DU1zc7vq.js} +1 -1
- package/dist/assets/{stateDiagram-v2-c2b004d7-DTbR_azy.js → stateDiagram-v2-c2b004d7-D-0RgmAp.js} +1 -1
- package/dist/assets/{styles-b4e223ce-C9aS3zb8.js → styles-b4e223ce-BSO-yNWV.js} +1 -1
- package/dist/assets/{styles-ca3715f6-Bh3keVTZ.js → styles-ca3715f6-CHnsn2Ro.js} +1 -1
- package/dist/assets/{styles-d45a18b0-BDcLLa65.js → styles-d45a18b0-B-rVGjEq.js} +1 -1
- package/dist/assets/{svgDrawCommon-b86b1483-B9H5ZS_9.js → svgDrawCommon-b86b1483-CA3Pl89f.js} +1 -1
- package/dist/assets/{timeline-definition-faaaa080-DCMYCBhK.js → timeline-definition-faaaa080-BcihLR6s.js} +1 -1
- package/dist/assets/{tsMode-DVqLsn98.js → tsMode-D9GGa5Ur.js} +1 -1
- package/dist/assets/{typescript-wMVyXw7G.js → typescript-BT9CK_EL.js} +1 -1
- package/dist/assets/{xml-w0gzmn0c.js → xml-DNO75J-T.js} +1 -1
- package/dist/assets/{xychartDiagram-f5964ef8-CdxyD3K5.js → xychartDiagram-f5964ef8-DJTwe32X.js} +1 -1
- package/dist/assets/{yaml-C29TL1ed.js → yaml-7CVzhiP2.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +13 -10
- package/src/api/git.ts +12 -0
- package/src/api/sessions.ts +61 -3
- package/src/api.ts +8 -0
- package/src/components/ArchiveView.scss +143 -54
- package/src/components/ArchiveView.tsx +181 -167
- package/src/components/CodeBlock.scss +5 -0
- package/src/components/ConfigView.scss +142 -31
- package/src/components/ConfigView.tsx +161 -86
- package/src/components/MarkdownContent.tsx +7 -0
- package/src/components/NavRail.scss +248 -0
- package/src/components/NavRail.tsx +80 -107
- package/src/components/NavRailCompact.tsx +107 -0
- package/src/components/NavRailCompactMoreSheet.tsx +141 -0
- package/src/components/ShortcutTooltip.tsx +4 -2
- package/src/components/Sidebar.scss +51 -0
- package/src/components/Sidebar.tsx +43 -16
- package/src/components/automation-view/RuleFormPanel.scss +40 -13
- package/src/components/automation-view/RuleSidebar.scss +73 -47
- package/src/components/automation-view/RuleSidebar.tsx +9 -13
- package/src/components/automation-view/RunHistoryPanel.scss +141 -13
- package/src/components/automation-view/RunHistoryPanel.tsx +203 -161
- package/src/components/automation-view/TaskList.scss +44 -13
- package/src/components/automation-view/TriggerList.scss +46 -14
- package/src/components/automation-view/index.scss +82 -10
- package/src/components/automation-view/index.tsx +108 -55
- package/src/components/benchmark-view/BenchmarkCasePanel.scss +36 -16
- package/src/components/benchmark-view/BenchmarkSidebar.scss +44 -22
- package/src/components/benchmark-view/BenchmarkSidebar.tsx +0 -6
- package/src/components/benchmark-view/BenchmarkView.scss +63 -20
- package/src/components/benchmark-view/index.tsx +71 -34
- package/src/components/chat/ChatComposerCard.scss +4 -0
- package/src/components/chat/ChatHeader.scss +187 -0
- package/src/components/chat/ChatHeader.tsx +206 -56
- package/src/components/chat/ChatHistoryView.tsx +63 -2
- package/src/components/chat/ChatTimelineView.scss +94 -1
- package/src/components/chat/ChatTimelineView.tsx +42 -0
- package/src/components/chat/NewSessionGuide.scss +139 -1
- package/src/components/chat/NewSessionGuide.tsx +57 -100
- package/src/components/chat/NewSessionGuideCompactPanel.tsx +130 -0
- package/src/components/chat/NewSessionGuideGrid.tsx +141 -0
- package/src/components/chat/git-controls/BranchSwitcherDropdown.tsx +61 -56
- package/src/components/chat/git-controls/BranchSwitcherResults.tsx +167 -0
- package/src/components/chat/git-controls/BranchTreeEntries.tsx +99 -0
- package/src/components/chat/git-controls/ChatGitControls.scss +437 -5
- package/src/components/chat/git-controls/ChatGitControls.tsx +136 -109
- package/src/components/chat/git-controls/DraftGitControls.tsx +91 -0
- package/src/components/chat/git-controls/GitOperationsDropdown.tsx +10 -2
- package/src/components/chat/git-controls/GitWorktreeDropdown.tsx +301 -28
- package/src/components/chat/git-controls/git-branch-tree.ts +148 -0
- package/src/components/chat/git-controls/use-chat-draft-git-controls.ts +168 -0
- package/src/components/chat/git-controls/use-chat-git-controls.ts +76 -3
- package/src/components/chat/messages/MessageContextMenu.tsx +3 -1
- package/src/components/chat/messages/MessageItem.scss +78 -4
- package/src/components/chat/messages/MessageItem.tsx +47 -3
- package/src/components/chat/sender/@components/adapter-select/AdapterSelectControl.scss +15 -0
- package/src/components/chat/sender/@components/reference-actions/ReferenceActionsControl.scss +17 -0
- package/src/components/chat/sender/@components/reference-actions/ReferencePermissionActionsPopover.tsx +4 -1
- package/src/components/chat/sender/@components/sender-attachments/SenderAttachments.scss +15 -2
- package/src/components/chat/sender/@components/sender-body/SenderBody.tsx +3 -0
- package/src/components/chat/sender/@components/sender-monaco-editor/use-sender-monaco-theme.ts +52 -3
- package/src/components/chat/sender/@components/sender-submit-action/SenderSubmitAction.scss +12 -0
- package/src/components/chat/sender/@components/sender-toolbar/SenderSelectBase.scss +21 -0
- package/src/components/chat/sender/@components/sender-toolbar/SenderSelectShared.scss +21 -0
- package/src/components/chat/sender/@components/sender-toolbar/SenderToolbar.scss +63 -0
- package/src/components/chat/sender/@core/get-sender-runtime-state.ts +1 -1
- package/src/components/chat/sender/@hooks/use-model-select-browser.tsx +4 -2
- package/src/components/chat/sender/@types/sender-props.ts +1 -0
- package/src/components/chat/sender/Sender.scss +1 -1
- package/src/components/chat/sender/Sender.tsx +1 -0
- package/src/components/chat/session-timeline-panel/EventList.scss +88 -0
- package/src/components/chat/session-timeline-panel/EventList.tsx +99 -47
- package/src/components/chat/session-timeline-panel/gantt.ts +23 -7
- package/src/components/chat/session-timeline-panel/git-graph.ts +6 -1
- package/src/components/chat/session-timeline-panel/index.scss +14 -1
- package/src/components/chat/session-timeline-panel/index.tsx +86 -10
- package/src/components/chat/session-timeline-panel/types.ts +4 -0
- package/src/components/chat/status-bar/ChatStatusBar.scss +27 -0
- package/src/components/chat/status-bar/ChatStatusBar.tsx +39 -0
- package/src/components/chat/terminal/ChatTerminalView.tsx +6 -0
- package/src/components/chat/tools/core/ToolCallBox.scss +19 -0
- package/src/components/chat/tools/core/ToolGroup.scss +32 -0
- package/src/components/chat/tools/task/components/TaskToolCard.scss +59 -1
- package/src/components/config/ConfigEditors.scss +20 -6
- package/src/components/config/ConfigFieldRow.scss +57 -17
- package/src/components/config/ConfigSectionForm.scss +10 -4
- package/src/components/config/ConfigSectionPanel.tsx +18 -11
- package/src/components/config/configSchema.ts +1 -0
- package/src/components/config/record-editors/RecordEditors.scss +42 -9
- package/src/components/dock-panel/DockPanel.scss +6 -2
- package/src/components/dock-panel/DockPanel.tsx +12 -16
- package/src/components/knowledge-base/KnowledgeBaseView.scss +180 -6
- package/src/components/knowledge-base/KnowledgeBaseView.tsx +98 -26
- package/src/components/knowledge-base/components/ActionButton.scss +4 -0
- package/src/components/knowledge-base/components/EmptyState.scss +5 -8
- package/src/components/knowledge-base/components/EntitiesTab.tsx +8 -2
- package/src/components/knowledge-base/components/EntityItem.scss +10 -3
- package/src/components/knowledge-base/components/FilterBar.scss +13 -2
- package/src/components/knowledge-base/components/FlowsTab.tsx +8 -2
- package/src/components/knowledge-base/components/KnowledgeBaseHeader.scss +2 -23
- package/src/components/knowledge-base/components/KnowledgeBaseHeader.tsx +0 -5
- package/src/components/knowledge-base/components/KnowledgeList.scss +15 -6
- package/src/components/knowledge-base/components/LoadingState.scss +4 -0
- package/src/components/knowledge-base/components/RuleItem.scss +86 -0
- package/src/components/knowledge-base/components/RuleItem.tsx +2 -0
- package/src/components/knowledge-base/components/RulesTab.tsx +8 -2
- package/src/components/knowledge-base/components/SectionHeader.scss +3 -18
- package/src/components/knowledge-base/components/SectionHeader.tsx +3 -7
- package/src/components/knowledge-base/components/SkillsTab.tsx +8 -3
- package/src/components/knowledge-base/components/SpecItem.scss +16 -7
- package/src/components/layout/@hooks/use-mobile-sidebar-modal.ts +190 -0
- package/src/components/layout/AppShell.scss +106 -6
- package/src/components/layout/AppShell.tsx +118 -10
- package/src/components/layout/PageShell.scss +41 -0
- package/src/components/layout/PageShell.tsx +32 -0
- package/src/components/layout/mobile-sidebar-constants.ts +1 -0
- package/src/components/nav-rail-compact-config.ts +114 -0
- package/src/components/nav-rail-items.tsx +181 -0
- package/src/components/sidebar/SessionContextMenu.tsx +3 -1
- package/src/components/sidebar/SessionItem.scss +62 -0
- package/src/components/sidebar/SessionItem.tsx +97 -52
- package/src/components/sidebar/SessionList.tsx +6 -0
- package/src/components/sidebar/SidebarHeader.scss +49 -0
- package/src/components/sidebar/SidebarHeader.tsx +27 -5
- package/src/components/sidebar/SidebarHeaderBatchActions.tsx +8 -4
- package/src/components/sidebar/SidebarHeaderSearchActions.tsx +6 -3
- package/src/components/sidebar/SidebarUtilityFooter.tsx +69 -0
- package/src/components/workspace/ContextFilePicker.tsx +12 -4
- package/src/hooks/chat/chat-session-workspace-draft.ts +25 -0
- package/src/hooks/chat/use-chat-scroll.ts +24 -7
- package/src/hooks/chat/use-chat-session-actions.ts +19 -2
- package/src/hooks/use-responsive-layout.ts +115 -0
- package/src/resources/adapters.ts +15 -0
- package/src/resources/locales/en.json +52 -0
- package/src/resources/locales/zh.json +52 -0
- package/src/routes/ChatRoute.scss +113 -14
- package/src/routes/ChatRoute.tsx +29 -35
- package/src/store/index.ts +2 -0
- package/dist/assets/channel-CBULQbJz.js +0 -1
- package/dist/assets/clone-dkS7LczW.js +0 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-1miffU4x.js +0 -1
- package/dist/assets/index-D_XqxIvp.css +0 -32
|
@@ -333,6 +333,68 @@
|
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
+
.session-item--touch {
|
|
337
|
+
.session-header-side {
|
|
338
|
+
gap: 8px;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.time-display {
|
|
342
|
+
opacity: 1 !important;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.action-btn--more {
|
|
346
|
+
width: 40px;
|
|
347
|
+
min-width: 40px;
|
|
348
|
+
height: 40px;
|
|
349
|
+
border-radius: 8px;
|
|
350
|
+
color: var(--sub-text-color);
|
|
351
|
+
|
|
352
|
+
.material-symbols-rounded {
|
|
353
|
+
font-size: 18px;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.session-item--compact {
|
|
359
|
+
.session-info {
|
|
360
|
+
gap: 6px;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.session-header {
|
|
364
|
+
align-items: flex-start;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.session-header-side {
|
|
368
|
+
gap: 4px;
|
|
369
|
+
min-height: 0;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.time-display {
|
|
373
|
+
display: none;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.tags-container {
|
|
377
|
+
gap: 4px;
|
|
378
|
+
|
|
379
|
+
.session-tag {
|
|
380
|
+
max-width: 96px;
|
|
381
|
+
|
|
382
|
+
&--count {
|
|
383
|
+
padding: 0 5px;
|
|
384
|
+
color: var(--sub-text-color);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.session-item--compact.session-item--touch {
|
|
391
|
+
.action-btn--more {
|
|
392
|
+
width: 36px;
|
|
393
|
+
min-width: 36px;
|
|
394
|
+
height: 36px;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
336
398
|
@keyframes spin {
|
|
337
399
|
from {
|
|
338
400
|
transform: rotate(0deg);
|
|
@@ -17,7 +17,9 @@ interface SessionItemProps {
|
|
|
17
17
|
session: Session
|
|
18
18
|
isActive: boolean
|
|
19
19
|
isBatchMode: boolean
|
|
20
|
+
isCompactLayout: boolean
|
|
20
21
|
isSelected: boolean
|
|
22
|
+
isTouchInteraction: boolean
|
|
21
23
|
onSelect: (session: Session) => void
|
|
22
24
|
onArchive: (id: string) => void | Promise<void>
|
|
23
25
|
onDelete: (id: string) => void | Promise<void>
|
|
@@ -32,7 +34,9 @@ export function SessionItem({
|
|
|
32
34
|
session,
|
|
33
35
|
isActive,
|
|
34
36
|
isBatchMode,
|
|
37
|
+
isCompactLayout,
|
|
35
38
|
isSelected,
|
|
39
|
+
isTouchInteraction,
|
|
36
40
|
onSelect,
|
|
37
41
|
onArchive,
|
|
38
42
|
onDelete,
|
|
@@ -44,6 +48,8 @@ export function SessionItem({
|
|
|
44
48
|
const automationPrefix = 'automation:'
|
|
45
49
|
const itemContentRef = useRef<HTMLDivElement | null>(null)
|
|
46
50
|
const [pendingAction, setPendingAction] = useState<PendingSessionAction>(null)
|
|
51
|
+
const showCompactActionMenu = isCompactLayout || isTouchInteraction
|
|
52
|
+
const resolveTooltipTitle = (title: string) => isTouchInteraction ? undefined : title
|
|
47
53
|
|
|
48
54
|
useEffect(() => {
|
|
49
55
|
if (pendingAction == null) {
|
|
@@ -83,6 +89,9 @@ export function SessionItem({
|
|
|
83
89
|
|
|
84
90
|
const archiveActionLabel = session.isArchived ? t('common.restore') : t('common.archive')
|
|
85
91
|
const archiveConfirmLabel = t('common.confirmAction', { action: archiveActionLabel })
|
|
92
|
+
const sessionTags = session.tags ?? []
|
|
93
|
+
const visibleTags = isCompactLayout ? sessionTags.slice(0, 1) : sessionTags
|
|
94
|
+
const hiddenTagCount = Math.max(sessionTags.length - visibleTags.length, 0)
|
|
86
95
|
|
|
87
96
|
const displayTitle = (session.title != null && session.title !== '')
|
|
88
97
|
? session.title
|
|
@@ -138,7 +147,7 @@ export function SessionItem({
|
|
|
138
147
|
break
|
|
139
148
|
case 'waiting_input':
|
|
140
149
|
return (
|
|
141
|
-
<Tooltip title={title}>
|
|
150
|
+
<Tooltip title={resolveTooltipTitle(title)}>
|
|
142
151
|
<div className='waiting-input-indicator' />
|
|
143
152
|
</Tooltip>
|
|
144
153
|
)
|
|
@@ -147,7 +156,7 @@ export function SessionItem({
|
|
|
147
156
|
}
|
|
148
157
|
|
|
149
158
|
return (
|
|
150
|
-
<Tooltip title={title}>
|
|
159
|
+
<Tooltip title={resolveTooltipTitle(title)}>
|
|
151
160
|
<span
|
|
152
161
|
className={`material-symbols-rounded status-icon ${status === 'running' ? 'spin' : ''}`}
|
|
153
162
|
style={{
|
|
@@ -192,7 +201,7 @@ export function SessionItem({
|
|
|
192
201
|
}}
|
|
193
202
|
className={`session-item ${isActive ? 'active' : ''} ${isSelected ? 'selected' : ''} ${
|
|
194
203
|
session.isStarred ? 'starred' : ''
|
|
195
|
-
}`}
|
|
204
|
+
} ${isCompactLayout ? 'session-item--compact' : ''} ${showCompactActionMenu ? 'session-item--touch' : ''}`}
|
|
196
205
|
>
|
|
197
206
|
<div ref={itemContentRef} className='session-item-content'>
|
|
198
207
|
<div className={`session-leading ${adapterDisplay?.icon != null ? 'has-adapter' : ''}`}>
|
|
@@ -218,71 +227,102 @@ export function SessionItem({
|
|
|
218
227
|
<div className='session-header-side'>
|
|
219
228
|
{!isBatchMode && (
|
|
220
229
|
<>
|
|
221
|
-
|
|
222
|
-
<
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
<div className='session-item-actions'>
|
|
227
|
-
<Tooltip title={session.isStarred ? t('common.unstar') : t('common.star')}>
|
|
228
|
-
<Button
|
|
229
|
-
type='text'
|
|
230
|
-
size='small'
|
|
231
|
-
className={`action-btn star-btn ${session.isStarred ? 'starred' : ''}`}
|
|
232
|
-
onClick={(e) => {
|
|
233
|
-
e.stopPropagation()
|
|
234
|
-
setPendingAction(null)
|
|
235
|
-
void onStar(session.id, !session.isStarred)
|
|
236
|
-
}}
|
|
237
|
-
icon={
|
|
238
|
-
<span
|
|
239
|
-
className={`material-symbols-rounded ${session.isStarred ? 'filled' : ''}`}
|
|
240
|
-
>
|
|
241
|
-
star
|
|
242
|
-
</span>
|
|
243
|
-
}
|
|
244
|
-
/>
|
|
230
|
+
{!isCompactLayout && (
|
|
231
|
+
<Tooltip title={resolveTooltipTitle(timeDisplay.full)}>
|
|
232
|
+
<span className='time-display'>
|
|
233
|
+
{timeDisplay.relative}
|
|
234
|
+
</span>
|
|
245
235
|
</Tooltip>
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
<
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}}
|
|
236
|
+
)}
|
|
237
|
+
{showCompactActionMenu
|
|
238
|
+
? (
|
|
239
|
+
<SessionContextMenu
|
|
240
|
+
session={session}
|
|
241
|
+
trigger={['click']}
|
|
242
|
+
onArchive={onArchive}
|
|
243
|
+
onDelete={onDelete}
|
|
244
|
+
onRename={onRename}
|
|
245
|
+
onStar={onStar}
|
|
257
246
|
>
|
|
258
|
-
<
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
247
|
+
<Button
|
|
248
|
+
type='text'
|
|
249
|
+
size='small'
|
|
250
|
+
className='action-btn action-btn--more'
|
|
251
|
+
title={t('common.moreActions')}
|
|
252
|
+
aria-label={t('common.moreActions')}
|
|
253
|
+
onClick={(event) => {
|
|
254
|
+
event.stopPropagation()
|
|
255
|
+
}}
|
|
256
|
+
icon={<span className='material-symbols-rounded'>more_horiz</span>}
|
|
257
|
+
/>
|
|
258
|
+
</SessionContextMenu>
|
|
259
|
+
)
|
|
260
|
+
: (
|
|
261
|
+
<div className='session-item-actions'>
|
|
262
|
+
<Tooltip
|
|
263
|
+
title={resolveTooltipTitle(session.isStarred ? t('common.unstar') : t('common.star'))}
|
|
264
|
+
>
|
|
265
|
+
<Button
|
|
266
|
+
type='text'
|
|
267
|
+
size='small'
|
|
268
|
+
className={`action-btn star-btn ${session.isStarred ? 'starred' : ''}`}
|
|
269
|
+
onClick={(e) => {
|
|
270
|
+
e.stopPropagation()
|
|
271
|
+
setPendingAction(null)
|
|
272
|
+
void onStar(session.id, !session.isStarred)
|
|
273
|
+
}}
|
|
274
|
+
icon={
|
|
275
|
+
<span
|
|
276
|
+
className={`material-symbols-rounded ${session.isStarred ? 'filled' : ''}`}
|
|
277
|
+
>
|
|
278
|
+
star
|
|
279
|
+
</span>
|
|
280
|
+
}
|
|
281
|
+
/>
|
|
282
|
+
</Tooltip>
|
|
283
|
+
<Tooltip
|
|
284
|
+
title={resolveTooltipTitle(
|
|
285
|
+
pendingAction === 'archive' ? archiveConfirmLabel : archiveActionLabel
|
|
286
|
+
)}
|
|
287
|
+
>
|
|
288
|
+
<Button
|
|
289
|
+
type='text'
|
|
290
|
+
size='small'
|
|
291
|
+
className={`action-btn archive-btn ${pendingAction === 'archive' ? 'is-confirming' : ''}`}
|
|
292
|
+
onClick={(e) => {
|
|
293
|
+
e.stopPropagation()
|
|
294
|
+
handleConfirmableActionClick('archive')
|
|
295
|
+
}}
|
|
296
|
+
>
|
|
297
|
+
<span className='material-symbols-rounded'>
|
|
298
|
+
{session.isArchived ? 'unarchive' : 'archive'}
|
|
299
|
+
</span>
|
|
300
|
+
{pendingAction === 'archive' && (
|
|
301
|
+
<span className='action-btn__label'>{archiveConfirmLabel}</span>
|
|
302
|
+
)}
|
|
303
|
+
</Button>
|
|
304
|
+
</Tooltip>
|
|
305
|
+
</div>
|
|
306
|
+
)}
|
|
267
307
|
</>
|
|
268
308
|
)}
|
|
269
309
|
</div>
|
|
270
310
|
</div>
|
|
271
|
-
{lastMessageSnippet != null && (
|
|
311
|
+
{!isCompactLayout && lastMessageSnippet != null && (
|
|
272
312
|
<div className='last-message'>
|
|
273
313
|
{lastMessageSnippet}
|
|
274
314
|
</div>
|
|
275
315
|
)}
|
|
276
|
-
{
|
|
316
|
+
{visibleTags.length > 0 && (
|
|
277
317
|
<div className='tags-container'>
|
|
278
|
-
{
|
|
318
|
+
{visibleTags.map((tag: string) => {
|
|
279
319
|
const automationTag = parseAutomationTag(tag)
|
|
280
320
|
if (automationTag) {
|
|
281
321
|
const href = `/automation?rule=${encodeURIComponent(automationTag.ruleId)}`
|
|
282
322
|
return (
|
|
283
323
|
<Tooltip
|
|
284
324
|
key={tag}
|
|
285
|
-
title={automationTag.ruleTitle}
|
|
325
|
+
title={resolveTooltipTitle(automationTag.ruleTitle)}
|
|
286
326
|
>
|
|
287
327
|
<Tag
|
|
288
328
|
className='session-tag session-tag--automation'
|
|
@@ -302,7 +342,7 @@ export function SessionItem({
|
|
|
302
342
|
return (
|
|
303
343
|
<Tooltip
|
|
304
344
|
key={tag}
|
|
305
|
-
title={tag}
|
|
345
|
+
title={resolveTooltipTitle(tag)}
|
|
306
346
|
>
|
|
307
347
|
<Tag className='session-tag'>
|
|
308
348
|
<span className='session-tag__text'>
|
|
@@ -312,6 +352,11 @@ export function SessionItem({
|
|
|
312
352
|
</Tooltip>
|
|
313
353
|
)
|
|
314
354
|
})}
|
|
355
|
+
{hiddenTagCount > 0 && (
|
|
356
|
+
<Tag className='session-tag session-tag--count'>
|
|
357
|
+
+{hiddenTagCount}
|
|
358
|
+
</Tag>
|
|
359
|
+
)}
|
|
315
360
|
</div>
|
|
316
361
|
)}
|
|
317
362
|
</div>
|
|
@@ -11,7 +11,9 @@ interface SessionListProps {
|
|
|
11
11
|
activeId?: string
|
|
12
12
|
hasActiveFilters: boolean
|
|
13
13
|
isBatchMode: boolean
|
|
14
|
+
isCompactLayout: boolean
|
|
14
15
|
selectedIds: Set<string>
|
|
16
|
+
isTouchInteraction: boolean
|
|
15
17
|
searchQuery?: string
|
|
16
18
|
onSelectSession: (session: Session) => void
|
|
17
19
|
onArchiveSession: (id: string) => void | Promise<void>
|
|
@@ -26,7 +28,9 @@ export function SessionList({
|
|
|
26
28
|
activeId,
|
|
27
29
|
hasActiveFilters,
|
|
28
30
|
isBatchMode,
|
|
31
|
+
isCompactLayout,
|
|
29
32
|
selectedIds,
|
|
33
|
+
isTouchInteraction,
|
|
30
34
|
searchQuery,
|
|
31
35
|
onSelectSession,
|
|
32
36
|
onArchiveSession,
|
|
@@ -142,7 +146,9 @@ export function SessionList({
|
|
|
142
146
|
session={s}
|
|
143
147
|
isActive={activeId === s.id}
|
|
144
148
|
isBatchMode={isBatchMode}
|
|
149
|
+
isCompactLayout={isCompactLayout}
|
|
145
150
|
isSelected={selectedIds.has(s.id)}
|
|
151
|
+
isTouchInteraction={isTouchInteraction}
|
|
146
152
|
onSelect={onSelectSession}
|
|
147
153
|
onArchive={onArchiveSession}
|
|
148
154
|
onDelete={onDeleteSession}
|
|
@@ -357,3 +357,52 @@
|
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
+
|
|
361
|
+
.sidebar-header--compact {
|
|
362
|
+
padding-top: 12px;
|
|
363
|
+
|
|
364
|
+
.header-top {
|
|
365
|
+
align-items: stretch;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.new-chat-btn {
|
|
369
|
+
height: 40px;
|
|
370
|
+
min-height: 40px;
|
|
371
|
+
padding: 0 12px;
|
|
372
|
+
font-size: 13px;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.sidebar-collapse-btn,
|
|
376
|
+
.sidebar-new-chat-btn {
|
|
377
|
+
width: 40px;
|
|
378
|
+
min-width: 40px;
|
|
379
|
+
height: 40px;
|
|
380
|
+
min-height: 40px;
|
|
381
|
+
border-radius: 8px;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.header-search-row {
|
|
385
|
+
margin-top: 8px;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.search-input {
|
|
389
|
+
height: 40px;
|
|
390
|
+
min-height: 40px;
|
|
391
|
+
padding: 0 10px !important;
|
|
392
|
+
|
|
393
|
+
.ant-input {
|
|
394
|
+
font-size: 13px;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.search-toggle-button {
|
|
398
|
+
width: 24px;
|
|
399
|
+
height: 24px;
|
|
400
|
+
border-radius: 6px;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.toolbar-filter-select .ant-select-selector,
|
|
405
|
+
.batch-select-toggle {
|
|
406
|
+
min-height: 40px;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
@@ -4,6 +4,7 @@ import { Button, Tooltip } from 'antd'
|
|
|
4
4
|
import React, { useState } from 'react'
|
|
5
5
|
import { useTranslation } from 'react-i18next'
|
|
6
6
|
|
|
7
|
+
import { useResponsiveLayout } from '#~/hooks/use-responsive-layout'
|
|
7
8
|
import type { SidebarSessionSortOrder } from '#~/hooks/use-sidebar-query-state'
|
|
8
9
|
import { SidebarHeaderSearchActions } from './SidebarHeaderSearchActions'
|
|
9
10
|
|
|
@@ -14,6 +15,7 @@ interface SidebarHeaderProps {
|
|
|
14
15
|
createButtonRef: React.RefObject<HTMLButtonElement | null>
|
|
15
16
|
hasActiveSearchControls: boolean
|
|
16
17
|
isBatchMode: boolean
|
|
18
|
+
isCompactLayout: boolean
|
|
17
19
|
isCreatingSession: boolean
|
|
18
20
|
isSidebarCollapsed: boolean
|
|
19
21
|
searchQuery: string
|
|
@@ -27,6 +29,7 @@ interface SidebarHeaderProps {
|
|
|
27
29
|
onBatchDelete: () => void
|
|
28
30
|
onBatchStar: () => void
|
|
29
31
|
onAdapterFilterChange: (filters: string[]) => void
|
|
32
|
+
onCloseSidebar?: () => void
|
|
30
33
|
onCreateSession: () => void
|
|
31
34
|
onSearchChange: (query: string) => void
|
|
32
35
|
onSortOrderChange: (sort?: SidebarSessionSortOrder) => void
|
|
@@ -43,6 +46,7 @@ export function SidebarHeader({
|
|
|
43
46
|
createButtonRef,
|
|
44
47
|
hasActiveSearchControls,
|
|
45
48
|
isBatchMode,
|
|
49
|
+
isCompactLayout,
|
|
46
50
|
isCreatingSession,
|
|
47
51
|
isSidebarCollapsed,
|
|
48
52
|
searchQuery,
|
|
@@ -56,6 +60,7 @@ export function SidebarHeader({
|
|
|
56
60
|
onBatchDelete,
|
|
57
61
|
onBatchStar,
|
|
58
62
|
onAdapterFilterChange,
|
|
63
|
+
onCloseSidebar,
|
|
59
64
|
onCreateSession,
|
|
60
65
|
onSearchChange,
|
|
61
66
|
onSortOrderChange,
|
|
@@ -65,11 +70,12 @@ export function SidebarHeader({
|
|
|
65
70
|
onToggleSidebarCollapsed
|
|
66
71
|
}: SidebarHeaderProps) {
|
|
67
72
|
const { t } = useTranslation()
|
|
73
|
+
const { isTouchInteraction } = useResponsiveLayout()
|
|
68
74
|
const [isSearchActionsOpen, setIsSearchActionsOpen] = useState(false)
|
|
69
75
|
const shouldShowSearchActions = !isSidebarCollapsed && (isSearchActionsOpen || isBatchMode)
|
|
70
76
|
|
|
71
77
|
return (
|
|
72
|
-
<div className='sidebar-header'>
|
|
78
|
+
<div className={`sidebar-header ${isCompactLayout ? 'sidebar-header--compact' : ''}`.trim()}>
|
|
73
79
|
<div className='header-top'>
|
|
74
80
|
{!isSidebarCollapsed
|
|
75
81
|
? (
|
|
@@ -93,7 +99,12 @@ export function SidebarHeader({
|
|
|
93
99
|
</Button>
|
|
94
100
|
)
|
|
95
101
|
: (
|
|
96
|
-
<Tooltip
|
|
102
|
+
<Tooltip
|
|
103
|
+
title={isTouchInteraction
|
|
104
|
+
? undefined
|
|
105
|
+
: (isCreatingSession ? t('common.alreadyInNewChat') : t('common.newChat'))}
|
|
106
|
+
placement='right'
|
|
107
|
+
>
|
|
97
108
|
<Button
|
|
98
109
|
className={`sidebar-new-chat-btn ${isCreatingSession ? 'active' : ''}`}
|
|
99
110
|
type='text'
|
|
@@ -106,14 +117,25 @@ export function SidebarHeader({
|
|
|
106
117
|
</Button>
|
|
107
118
|
</Tooltip>
|
|
108
119
|
)}
|
|
109
|
-
<Tooltip
|
|
120
|
+
<Tooltip
|
|
121
|
+
title={isTouchInteraction ? undefined : (
|
|
122
|
+
isCompactLayout ? t('common.close') : (
|
|
123
|
+
isSidebarCollapsed ? t('common.expand') : t('common.collapse')
|
|
124
|
+
)
|
|
125
|
+
)}
|
|
126
|
+
>
|
|
110
127
|
<Button
|
|
111
128
|
className='sidebar-collapse-btn'
|
|
112
129
|
type='text'
|
|
113
|
-
|
|
130
|
+
aria-label={isCompactLayout ? t('common.close') : (
|
|
131
|
+
isSidebarCollapsed ? t('common.expand') : t('common.collapse')
|
|
132
|
+
)}
|
|
133
|
+
onClick={isCompactLayout
|
|
134
|
+
? onCloseSidebar
|
|
135
|
+
: onToggleSidebarCollapsed}
|
|
114
136
|
>
|
|
115
137
|
<span className='material-symbols-rounded'>
|
|
116
|
-
{isSidebarCollapsed ? 'dock_to_right' : 'left_panel_close'}
|
|
138
|
+
{isCompactLayout ? 'close' : isSidebarCollapsed ? 'dock_to_right' : 'left_panel_close'}
|
|
117
139
|
</span>
|
|
118
140
|
</Button>
|
|
119
141
|
</Tooltip>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Button, Checkbox, Popconfirm, Tooltip } from 'antd'
|
|
2
2
|
import { useTranslation } from 'react-i18next'
|
|
3
3
|
|
|
4
|
+
import { useResponsiveLayout } from '#~/hooks/use-responsive-layout'
|
|
5
|
+
|
|
4
6
|
interface SidebarHeaderBatchActionsProps {
|
|
5
7
|
isAllSelected: boolean
|
|
6
8
|
selectedCount: number
|
|
@@ -21,10 +23,12 @@ export function SidebarHeaderBatchActions({
|
|
|
21
23
|
onSelectAll
|
|
22
24
|
}: SidebarHeaderBatchActionsProps) {
|
|
23
25
|
const { t } = useTranslation()
|
|
26
|
+
const { isTouchInteraction } = useResponsiveLayout()
|
|
27
|
+
const resolveTooltipTitle = (title: string) => isTouchInteraction ? undefined : title
|
|
24
28
|
|
|
25
29
|
return (
|
|
26
30
|
<div className='header-batch-actions'>
|
|
27
|
-
<Tooltip title={isAllSelected ? t('common.deselectAll') : t('common.selectAll')}>
|
|
31
|
+
<Tooltip title={resolveTooltipTitle(isAllSelected ? t('common.deselectAll') : t('common.selectAll'))}>
|
|
28
32
|
<label className='batch-select-toggle'>
|
|
29
33
|
<Checkbox
|
|
30
34
|
checked={isAllSelected}
|
|
@@ -33,7 +37,7 @@ export function SidebarHeaderBatchActions({
|
|
|
33
37
|
/>
|
|
34
38
|
</label>
|
|
35
39
|
</Tooltip>
|
|
36
|
-
<Tooltip title={t('common.star')}>
|
|
40
|
+
<Tooltip title={resolveTooltipTitle(t('common.star'))}>
|
|
37
41
|
<Button
|
|
38
42
|
className='sidebar-tool-btn is-icon-only'
|
|
39
43
|
type='text'
|
|
@@ -50,7 +54,7 @@ export function SidebarHeaderBatchActions({
|
|
|
50
54
|
okButtonProps={{ danger: false }}
|
|
51
55
|
disabled={selectedCount === 0}
|
|
52
56
|
>
|
|
53
|
-
<Tooltip title={t('common.archive')}>
|
|
57
|
+
<Tooltip title={resolveTooltipTitle(t('common.archive'))}>
|
|
54
58
|
<Button
|
|
55
59
|
className='sidebar-tool-btn is-icon-only'
|
|
56
60
|
type='text'
|
|
@@ -67,7 +71,7 @@ export function SidebarHeaderBatchActions({
|
|
|
67
71
|
okButtonProps={{ danger: true }}
|
|
68
72
|
disabled={selectedCount === 0}
|
|
69
73
|
>
|
|
70
|
-
<Tooltip title={t('common.delete')}>
|
|
74
|
+
<Tooltip title={resolveTooltipTitle(t('common.delete'))}>
|
|
71
75
|
<Button
|
|
72
76
|
className='sidebar-tool-btn is-icon-only is-danger'
|
|
73
77
|
type='text'
|
|
@@ -2,6 +2,7 @@ import { Button, Input, Tooltip } from 'antd'
|
|
|
2
2
|
import { useMemo } from 'react'
|
|
3
3
|
import { useTranslation } from 'react-i18next'
|
|
4
4
|
|
|
5
|
+
import { useResponsiveLayout } from '#~/hooks/use-responsive-layout'
|
|
5
6
|
import type { SidebarSessionSortOrder } from '#~/hooks/use-sidebar-query-state'
|
|
6
7
|
import { SidebarHeaderBatchActions } from './SidebarHeaderBatchActions'
|
|
7
8
|
import { SidebarHeaderSelectField } from './SidebarHeaderSelectField'
|
|
@@ -56,9 +57,11 @@ export function SidebarHeaderSearchActions({
|
|
|
56
57
|
onToggleSearchActions
|
|
57
58
|
}: SidebarHeaderSearchActionsProps) {
|
|
58
59
|
const { t } = useTranslation()
|
|
60
|
+
const { isTouchInteraction } = useResponsiveLayout()
|
|
59
61
|
const isAllSelected = totalCount > 0 && selectedCount === totalCount
|
|
60
62
|
const toOptions = useMemo(() => (values: string[]) => values.map((value) => ({ label: value, value })), [])
|
|
61
63
|
const filterSuffixIcon = <span className='material-symbols-rounded toolbar-filter-chevron'>expand_more</span>
|
|
64
|
+
const resolveTooltipTitle = (title: string) => isTouchInteraction ? undefined : title
|
|
62
65
|
const sortOptions = useMemo(
|
|
63
66
|
() => [
|
|
64
67
|
{ label: t('automation.sortDesc'), value: 'desc' },
|
|
@@ -78,7 +81,7 @@ export function SidebarHeaderSearchActions({
|
|
|
78
81
|
onChange={(e) => onSearchChange(e.target.value)}
|
|
79
82
|
prefix={<span className='material-symbols-rounded search-icon'>search</span>}
|
|
80
83
|
suffix={
|
|
81
|
-
<Tooltip title={t('common.searchActions')}>
|
|
84
|
+
<Tooltip title={resolveTooltipTitle(t('common.searchActions'))}>
|
|
82
85
|
<button
|
|
83
86
|
type='button'
|
|
84
87
|
className={`search-toggle-button ${shouldShowSearchActions ? 'is-open' : ''} ${
|
|
@@ -102,7 +105,7 @@ export function SidebarHeaderSearchActions({
|
|
|
102
105
|
<div className='header-toolbar-leading'>
|
|
103
106
|
{isBatchMode
|
|
104
107
|
? (
|
|
105
|
-
<Tooltip title={t('common.cancelBatch')}>
|
|
108
|
+
<Tooltip title={resolveTooltipTitle(t('common.cancelBatch'))}>
|
|
106
109
|
<Button
|
|
107
110
|
className='sidebar-tool-btn is-icon-only'
|
|
108
111
|
type='text'
|
|
@@ -112,7 +115,7 @@ export function SidebarHeaderSearchActions({
|
|
|
112
115
|
</Tooltip>
|
|
113
116
|
)
|
|
114
117
|
: (
|
|
115
|
-
<Tooltip title={t('common.batchMode')}>
|
|
118
|
+
<Tooltip title={resolveTooltipTitle(t('common.batchMode'))}>
|
|
116
119
|
<Button
|
|
117
120
|
className='sidebar-tool-btn is-icon-only'
|
|
118
121
|
type='text'
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Button, Dropdown } from 'antd'
|
|
2
|
+
import type { MenuProps } from 'antd'
|
|
3
|
+
import { useAtom } from 'jotai'
|
|
4
|
+
import { useMemo } from 'react'
|
|
5
|
+
import { useTranslation } from 'react-i18next'
|
|
6
|
+
import { useNavigate } from 'react-router-dom'
|
|
7
|
+
|
|
8
|
+
import { themeAtom } from '#~/store'
|
|
9
|
+
import { buildLanguageItems, buildThemeItems } from '../nav-rail-items'
|
|
10
|
+
|
|
11
|
+
export function SidebarUtilityFooter() {
|
|
12
|
+
const { t, i18n } = useTranslation()
|
|
13
|
+
const [themeMode, setThemeMode] = useAtom(themeAtom)
|
|
14
|
+
const navigate = useNavigate()
|
|
15
|
+
|
|
16
|
+
const languageItems: MenuProps['items'] = useMemo(() =>
|
|
17
|
+
buildLanguageItems({
|
|
18
|
+
currentLanguage: i18n.language,
|
|
19
|
+
onChangeLanguage: (language) => i18n.changeLanguage(language)
|
|
20
|
+
}), [i18n.language])
|
|
21
|
+
|
|
22
|
+
const themeItems: MenuProps['items'] = useMemo(() =>
|
|
23
|
+
buildThemeItems({
|
|
24
|
+
setThemeMode,
|
|
25
|
+
t,
|
|
26
|
+
themeMode
|
|
27
|
+
}), [setThemeMode, t, themeMode])
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div className='sidebar-utility-footer'>
|
|
31
|
+
<Dropdown menu={{ items: themeItems, triggerSubMenuAction: 'click' }} placement='topLeft' trigger={['click']}>
|
|
32
|
+
<Button
|
|
33
|
+
type='text'
|
|
34
|
+
className='sidebar-utility-footer__action'
|
|
35
|
+
icon={
|
|
36
|
+
<span className='material-symbols-rounded'>
|
|
37
|
+
{themeMode === 'light' ? 'light_mode' : themeMode === 'dark' ? 'dark_mode' : 'desktop_windows'}
|
|
38
|
+
</span>
|
|
39
|
+
}
|
|
40
|
+
>
|
|
41
|
+
<span>{t('common.theme')}</span>
|
|
42
|
+
</Button>
|
|
43
|
+
</Dropdown>
|
|
44
|
+
|
|
45
|
+
<Dropdown
|
|
46
|
+
menu={{ items: languageItems, triggerSubMenuAction: 'click' }}
|
|
47
|
+
placement='topLeft'
|
|
48
|
+
trigger={['click']}
|
|
49
|
+
>
|
|
50
|
+
<Button
|
|
51
|
+
type='text'
|
|
52
|
+
className='sidebar-utility-footer__action'
|
|
53
|
+
icon={<span className='material-symbols-rounded'>language</span>}
|
|
54
|
+
>
|
|
55
|
+
<span>{t('common.language')}</span>
|
|
56
|
+
</Button>
|
|
57
|
+
</Dropdown>
|
|
58
|
+
|
|
59
|
+
<Button
|
|
60
|
+
type='text'
|
|
61
|
+
className='sidebar-utility-footer__action'
|
|
62
|
+
icon={<span className='material-symbols-rounded'>settings</span>}
|
|
63
|
+
onClick={() => void navigate('/config')}
|
|
64
|
+
>
|
|
65
|
+
<span>{t('common.settings')}</span>
|
|
66
|
+
</Button>
|
|
67
|
+
</div>
|
|
68
|
+
)
|
|
69
|
+
}
|