refactor: 组件按功能分组到子目录
components/ 拆分为 5 个子目录: - layout/ TitleBar, StatusBar, Sidebar, MainArea - connection/ ConnectionList, ConnectionCard, NewConnectionDialog - key/ KeyBrowser, KeyList, KeyDetail, DbSelector - editors/ String/Hash/List/Set/Zset/Stream/ReJson Editor - views/ StatusView, CliView, SlowLogView, MemoryAnalysis, CommandLog, SettingsView 更新 4 个文件的跨目录引用 (App.vue, Sidebar, MainArea, KeyDetail) AGENTS.md 架构树同步更新
This commit is contained in:
@@ -68,30 +68,35 @@ Renderer (src/renderer/)
|
|||||||
│ ├── connection.ts # connections CRUD, connect/disconnect, health check
|
│ ├── connection.ts # connections CRUD, connect/disconnect, health check
|
||||||
│ └── key.ts # key list, scan, tree view, selected key data
|
│ └── key.ts # key list, scan, tree view, selected key data
|
||||||
├── components/
|
├── components/
|
||||||
│ ├── TitleBar.vue # window controls
|
│ ├── layout/ # App shell
|
||||||
│ ├── StatusBar.vue # connection status, DB selector
|
│ │ ├── TitleBar.vue # window controls
|
||||||
│ ├── Sidebar.vue # keyboard shortcuts, dialog host
|
│ │ ├── StatusBar.vue # connection status
|
||||||
│ ├── ConnectionList.vue # search, import/export, new button
|
│ │ ├── Sidebar.vue # connection list host, keyboard shortcuts
|
||||||
│ ├── ConnectionCard.vue # single connection card
|
│ │ └── MainArea.vue # tab host (Status/Keys/CLI/SlowLog/Settings)
|
||||||
│ ├── NewConnectionDialog.vue # create/edit/test connection
|
│ ├── connection/ # Connection management
|
||||||
│ ├── DbSelector.vue # database 0-15 dropdown
|
│ │ ├── ConnectionList.vue # search, import/export, context menu
|
||||||
│ ├── MainArea.vue # tab host (Status/Keys/CLI/SlowLog/Settings)
|
│ │ ├── ConnectionCard.vue # single connection card
|
||||||
|
│ │ └── NewConnectionDialog.vue # create/edit/test connection
|
||||||
|
│ ├── key/ # Key browsing
|
||||||
|
│ │ ├── KeyBrowser.vue # split pane (KeyList + KeyDetail)
|
||||||
|
│ │ ├── KeyList.vue # tree view, SCAN, filter, multi-select
|
||||||
|
│ │ ├── KeyDetail.vue # type dispatch, TTL, rename, copy
|
||||||
|
│ │ └── DbSelector.vue # database 0-15 dropdown
|
||||||
|
│ ├── editors/ # Type-specific value editors
|
||||||
|
│ │ ├── StringEditor.vue # view/edit with JSON format
|
||||||
|
│ │ ├── HashEditor.vue # field table CRUD
|
||||||
|
│ │ ├── ListEditor.vue # paginated elements
|
||||||
|
│ │ ├── SetEditor.vue # member list
|
||||||
|
│ │ ├── ZsetEditor.vue # sorted set with scores
|
||||||
|
│ │ ├── StreamEditor.vue # stream entries
|
||||||
|
│ │ └── ReJsonEditor.vue # JSON.GET / JSON.SET editing
|
||||||
|
│ └── views/ # Tab content views
|
||||||
│ ├── StatusView.vue # INFO dashboard with stat cards
|
│ ├── StatusView.vue # INFO dashboard with stat cards
|
||||||
│ ├── KeyBrowser.vue # split pane (KeyList + KeyDetail)
|
|
||||||
│ ├── KeyList.vue # pattern search, filter, SCAN, multi-select
|
|
||||||
│ ├── KeyDetail.vue # type dispatch, TTL, rename, copy
|
|
||||||
│ ├── StringEditor.vue # view/edit with JSON format
|
|
||||||
│ ├── HashEditor.vue # field table CRUD
|
|
||||||
│ ├── ListEditor.vue # paginated elements
|
|
||||||
│ ├── SetEditor.vue # member list
|
|
||||||
│ ├── ZsetEditor.vue # sorted set with scores
|
|
||||||
│ ├── StreamEditor.vue # stream entries
|
|
||||||
│ ├── CliView.vue # interactive terminal
|
│ ├── CliView.vue # interactive terminal
|
||||||
│ ├── SlowLogView.vue # slow log table
|
│ ├── SlowLogView.vue # slow log table
|
||||||
│ ├── SettingsView.vue # theme, language, scan count
|
|
||||||
│ ├── MemoryAnalysis.vue # MEMORY USAGE scan & sort
|
│ ├── MemoryAnalysis.vue # MEMORY USAGE scan & sort
|
||||||
│ ├── CommandLog.vue # command execution history
|
│ ├── CommandLog.vue # command execution history
|
||||||
│ └── ReJsonEditor.vue # JSON.GET / JSON.SET editing
|
│ └── SettingsView.vue # theme, language, font
|
||||||
├── i18n/
|
├── i18n/
|
||||||
│ ├── index.ts # useI18n composable
|
│ ├── index.ts # useI18n composable
|
||||||
│ └── locales/
|
│ └── locales/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import TitleBar from './components/TitleBar.vue'
|
import TitleBar from './components/layout/TitleBar.vue'
|
||||||
import Sidebar from './components/Sidebar.vue'
|
import Sidebar from './components/layout/Sidebar.vue'
|
||||||
import MainArea from './components/MainArea.vue'
|
import MainArea from './components/layout/MainArea.vue'
|
||||||
import StatusBar from './components/StatusBar.vue'
|
import StatusBar from './components/layout/StatusBar.vue'
|
||||||
import { useConnectionStore } from '@renderer/stores/connection'
|
import { useConnectionStore } from '@renderer/stores/connection'
|
||||||
|
|
||||||
const connStore = useConnectionStore()
|
const connStore = useConnectionStore()
|
||||||
|
|||||||
+7
-7
@@ -5,13 +5,13 @@ import { useConnectionStore } from '@renderer/stores/connection'
|
|||||||
import { useI18n } from '@renderer/i18n'
|
import { useI18n } from '@renderer/i18n'
|
||||||
import { formatKeyName, isBinaryKey } from '@renderer/utils/binary'
|
import { formatKeyName, isBinaryKey } from '@renderer/utils/binary'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import StringEditor from './StringEditor.vue'
|
import StringEditor from '../editors/StringEditor.vue'
|
||||||
import HashEditor from './HashEditor.vue'
|
import HashEditor from '../editors/HashEditor.vue'
|
||||||
import ListEditor from './ListEditor.vue'
|
import ListEditor from '../editors/ListEditor.vue'
|
||||||
import SetEditor from './SetEditor.vue'
|
import SetEditor from '../editors/SetEditor.vue'
|
||||||
import ZsetEditor from './ZsetEditor.vue'
|
import ZsetEditor from '../editors/ZsetEditor.vue'
|
||||||
import StreamEditor from './StreamEditor.vue'
|
import StreamEditor from '../editors/StreamEditor.vue'
|
||||||
import ReJsonEditor from './ReJsonEditor.vue'
|
import ReJsonEditor from '../editors/ReJsonEditor.vue'
|
||||||
|
|
||||||
const keyStore = useKeyStore()
|
const keyStore = useKeyStore()
|
||||||
const connStore = useConnectionStore()
|
const connStore = useConnectionStore()
|
||||||
+7
-7
@@ -2,13 +2,13 @@
|
|||||||
import { ref, watch, computed, nextTick, onMounted, onUnmounted } from 'vue'
|
import { ref, watch, computed, nextTick, onMounted, onUnmounted } from 'vue'
|
||||||
import { useConnectionStore } from '@renderer/stores/connection'
|
import { useConnectionStore } from '@renderer/stores/connection'
|
||||||
import { useI18n } from '@renderer/i18n'
|
import { useI18n } from '@renderer/i18n'
|
||||||
import StatusView from './StatusView.vue'
|
import StatusView from '../views/StatusView.vue'
|
||||||
import KeyBrowser from './KeyBrowser.vue'
|
import KeyBrowser from '../key/KeyBrowser.vue'
|
||||||
import CliView from './CliView.vue'
|
import CliView from '../views/CliView.vue'
|
||||||
import SlowLogView from './SlowLogView.vue'
|
import SlowLogView from '../views/SlowLogView.vue'
|
||||||
import MemoryAnalysis from './MemoryAnalysis.vue'
|
import MemoryAnalysis from '../views/MemoryAnalysis.vue'
|
||||||
import SettingsView from './SettingsView.vue'
|
import SettingsView from '../views/SettingsView.vue'
|
||||||
import DbSelector from './DbSelector.vue'
|
import DbSelector from '../key/DbSelector.vue'
|
||||||
|
|
||||||
const connStore = useConnectionStore()
|
const connStore = useConnectionStore()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, onUnmounted } from 'vue'
|
import { ref, onMounted, onUnmounted } from 'vue'
|
||||||
import ConnectionList from './ConnectionList.vue'
|
import ConnectionList from '../connection/ConnectionList.vue'
|
||||||
import NewConnectionDialog from './NewConnectionDialog.vue'
|
import NewConnectionDialog from '../connection/NewConnectionDialog.vue'
|
||||||
import CommandLog from './CommandLog.vue'
|
import CommandLog from '../views/CommandLog.vue'
|
||||||
import { useConnectionStore } from '@renderer/stores/connection'
|
import { useConnectionStore } from '@renderer/stores/connection'
|
||||||
import { useKeyStore } from '@renderer/stores/key'
|
import { useKeyStore } from '@renderer/stores/key'
|
||||||
import { useI18n } from '@renderer/i18n'
|
import { useI18n } from '@renderer/i18n'
|
||||||
Reference in New Issue
Block a user