Compare commits
8 Commits
copilot/fi
...
feat/termi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c758d1400 | ||
|
|
a4b19f7650 | ||
|
|
97b3608786 | ||
|
|
793625d009 | ||
|
|
00ee90a857 | ||
|
|
1200f9973c | ||
|
|
4f107e9305 | ||
|
|
eaf4bd18a3 |
1093
docs/terminal-implementation.md
Normal file
1093
docs/terminal-implementation.md
Normal file
File diff suppressed because it is too large
Load Diff
@@ -229,6 +229,7 @@
|
||||
"@vitest/web-worker": "^3.2.4",
|
||||
"@viz-js/lang-dot": "^1.0.5",
|
||||
"@viz-js/viz": "^3.14.0",
|
||||
"@xterm/xterm": "^5.5.0",
|
||||
"@xyflow/react": "^12.4.4",
|
||||
"ai": "^5.0.76",
|
||||
"antd": "patch:antd@npm%3A5.27.0#~/.yarn/patches/antd-npm-5.27.0-aa91c36546.patch",
|
||||
|
||||
@@ -20,6 +20,7 @@ import NotesPage from './pages/notes/NotesPage'
|
||||
import PaintingsRoutePage from './pages/paintings/PaintingsRoutePage'
|
||||
import SettingsPage from './pages/settings/SettingsPage'
|
||||
import AssistantPresetsPage from './pages/store/assistants/presets/AssistantPresetsPage'
|
||||
import { TerminalPage } from './pages/terminal/TerminalPage'
|
||||
import TranslatePage from './pages/translate/TranslatePage'
|
||||
|
||||
const Router: FC = () => {
|
||||
@@ -40,6 +41,7 @@ const Router: FC = () => {
|
||||
<Route path="/apps" element={<MinAppsPage />} />
|
||||
<Route path="/code" element={<CodeToolsPage />} />
|
||||
<Route path="/settings/*" element={<SettingsPage />} />
|
||||
<Route path="/terminal" element={<TerminalPage />} />
|
||||
<Route path="/launchpad" element={<LaunchpadPage />} />
|
||||
</Routes>
|
||||
</ErrorBoundary>
|
||||
|
||||
@@ -19,6 +19,7 @@ import { classNames } from '@renderer/utils'
|
||||
import { ThemeMode } from '@shared/data/preference/preferenceTypes'
|
||||
import type { LRUCache } from 'lru-cache'
|
||||
import {
|
||||
Code,
|
||||
FileSearch,
|
||||
Folder,
|
||||
Hammer,
|
||||
@@ -106,6 +107,8 @@ const getTabIcon = (
|
||||
case 'settings':
|
||||
return <Settings size={14} />
|
||||
case 'code':
|
||||
return <Code size={14} />
|
||||
case 'terminal':
|
||||
return <Terminal size={14} />
|
||||
default:
|
||||
return null
|
||||
|
||||
@@ -143,7 +143,8 @@ const titleKeyMap = {
|
||||
notes: 'title.notes',
|
||||
paintings: 'title.paintings',
|
||||
settings: 'title.settings',
|
||||
translate: 'title.translate'
|
||||
translate: 'title.translate',
|
||||
terminal: 'title.terminal'
|
||||
} as const
|
||||
|
||||
export const getTitleLabel = (key: string): string => {
|
||||
|
||||
@@ -4615,6 +4615,7 @@
|
||||
"paintings": "Paintings",
|
||||
"settings": "Settings",
|
||||
"store": "Assistant Library",
|
||||
"terminal": "Terminal",
|
||||
"translate": "Translate"
|
||||
},
|
||||
"trace": {
|
||||
|
||||
@@ -4615,6 +4615,7 @@
|
||||
"paintings": "绘画",
|
||||
"settings": "设置",
|
||||
"store": "助手库",
|
||||
"terminal": "终端",
|
||||
"translate": "翻译"
|
||||
},
|
||||
"trace": {
|
||||
|
||||
@@ -4615,6 +4615,7 @@
|
||||
"paintings": "繪畫",
|
||||
"settings": "設定",
|
||||
"store": "助手庫",
|
||||
"terminal": "終端機",
|
||||
"translate": "翻譯"
|
||||
},
|
||||
"trace": {
|
||||
|
||||
@@ -4615,6 +4615,7 @@
|
||||
"paintings": "Zeichnen",
|
||||
"settings": "Einstellungen",
|
||||
"store": "Assistenten-Bibliothek",
|
||||
"terminal": "Terminal",
|
||||
"translate": "Übersetzen"
|
||||
},
|
||||
"trace": {
|
||||
|
||||
@@ -4615,6 +4615,7 @@
|
||||
"paintings": "Ζωγραφική",
|
||||
"settings": "Ρυθμίσεις",
|
||||
"store": "Βιβλιοθήκη βοηθών",
|
||||
"terminal": "Τερματικό",
|
||||
"translate": "Μετάφραση"
|
||||
},
|
||||
"trace": {
|
||||
|
||||
@@ -4615,6 +4615,7 @@
|
||||
"paintings": "Pinturas",
|
||||
"settings": "Configuración",
|
||||
"store": "Biblioteca de asistentes",
|
||||
"terminal": "Terminal",
|
||||
"translate": "Traducir"
|
||||
},
|
||||
"trace": {
|
||||
|
||||
@@ -4615,6 +4615,7 @@
|
||||
"paintings": "Peintures",
|
||||
"settings": "Paramètres",
|
||||
"store": "Bibliothèque d'assistants",
|
||||
"terminal": "Terminal",
|
||||
"translate": "Traduire"
|
||||
},
|
||||
"trace": {
|
||||
|
||||
@@ -4615,6 +4615,7 @@
|
||||
"paintings": "ペインティング",
|
||||
"settings": "設定",
|
||||
"store": "アシスタントライブラリ",
|
||||
"terminal": "ターミナル",
|
||||
"translate": "翻訳"
|
||||
},
|
||||
"trace": {
|
||||
|
||||
@@ -4615,6 +4615,7 @@
|
||||
"paintings": "Pinturas",
|
||||
"settings": "Configurações",
|
||||
"store": "Biblioteca de assistentes",
|
||||
"terminal": "Terminal",
|
||||
"translate": "Traduzir"
|
||||
},
|
||||
"trace": {
|
||||
|
||||
@@ -4615,6 +4615,7 @@
|
||||
"paintings": "Рисунки",
|
||||
"settings": "Настройки",
|
||||
"store": "Библиотека помощников",
|
||||
"terminal": "Терминал",
|
||||
"translate": "Перевод"
|
||||
},
|
||||
"trace": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import App from '@renderer/components/MinApp/MinApp'
|
||||
import { useMinapps } from '@renderer/hooks/useMinapps'
|
||||
import { useSettings } from '@renderer/hooks/useSettings'
|
||||
import { Code, FileSearch, Folder, Languages, LayoutGrid, NotepadText, Palette, Sparkle } from 'lucide-react'
|
||||
import { Code, FileSearch, Folder, Languages, LayoutGrid, NotepadText, Palette, Sparkle, Terminal } from 'lucide-react'
|
||||
import type { FC } from 'react'
|
||||
import { useMemo } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
@@ -57,6 +57,12 @@ const LaunchpadPage: FC = () => {
|
||||
path: '/code',
|
||||
bgColor: 'linear-gradient(135deg, #1F2937, #374151)' // Code CLI:高级暗黑色,代表专业和技术
|
||||
},
|
||||
{
|
||||
icon: <Terminal size={32} className="icon" />,
|
||||
text: t('title.terminal'),
|
||||
path: '/terminal',
|
||||
bgColor: 'linear-gradient(135deg, #000000, #1F2937)' // Terminal:纯黑渐变,代表命令行界面
|
||||
},
|
||||
{
|
||||
icon: <NotepadText size={32} className="icon" />,
|
||||
text: t('title.notes'),
|
||||
|
||||
19
src/renderer/src/pages/terminal/TerminalPage.tsx
Normal file
19
src/renderer/src/pages/terminal/TerminalPage.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Navbar, NavbarCenter } from '@renderer/components/app/Navbar'
|
||||
import { FC } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
export const TerminalPage: FC = () => {
|
||||
// const { pathname } = useLocation()
|
||||
const { t } = useTranslation()
|
||||
|
||||
// const isRoute = (path: string): string => (pathname.startsWith(path) ? 'active' : '')
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Navbar>
|
||||
<NavbarCenter style={{ borderRight: 'none' }}>{t('title.terminal')}</NavbarCenter>
|
||||
</Navbar>
|
||||
<div>🥲 Not Implemented</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -17123,6 +17123,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@xterm/xterm@npm:^5.5.0":
|
||||
version: 5.5.0
|
||||
resolution: "@xterm/xterm@npm:5.5.0"
|
||||
checksum: 10c0/358801feece58617d777b2783bec68dac1f52f736da3b0317f71a34f4e25431fb0b1920244f678b8d673f797145b4858c2a5ccb463a4a6df7c10c9093f1c9267
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@xyflow/react@npm:^12.4.4":
|
||||
version: 12.5.6
|
||||
resolution: "@xyflow/react@npm:12.5.6"
|
||||
@@ -17303,6 +17310,7 @@ __metadata:
|
||||
"@vitest/web-worker": "npm:^3.2.4"
|
||||
"@viz-js/lang-dot": "npm:^1.0.5"
|
||||
"@viz-js/viz": "npm:^3.14.0"
|
||||
"@xterm/xterm": "npm:^5.5.0"
|
||||
"@xyflow/react": "npm:^12.4.4"
|
||||
ai: "npm:^5.0.76"
|
||||
antd: "patch:antd@npm%3A5.27.0#~/.yarn/patches/antd-npm-5.27.0-aa91c36546.patch"
|
||||
|
||||
Reference in New Issue
Block a user