diff --git a/src/lang/enUS.ts b/src/lang/enUS.ts
index 12c3a26..2f61204 100644
--- a/src/lang/enUS.ts
+++ b/src/lang/enUS.ts
@@ -54,4 +54,11 @@ export const enUS = {
empty: 'No history yet',
emptyDesc: 'History of queries will appear here as you execute Scans and Queries',
},
+ secret: {
+ new: 'New Secret',
+ name: 'Key Name',
+ type: 'Key Type',
+ priKey: 'Private Key',
+ pubKey: 'Public Key',
+ },
};
diff --git a/src/lang/zhCN.ts b/src/lang/zhCN.ts
index 590de35..cedc681 100644
--- a/src/lang/zhCN.ts
+++ b/src/lang/zhCN.ts
@@ -54,4 +54,11 @@ export const zhCN = {
empty: '无历史记录',
emptyDesc: '执行扫描和查询时,查询历史记录将显示在此处',
},
+ secret: {
+ new: '新建密钥',
+ name: '名称',
+ type: '类型',
+ priKey: '私钥',
+ pubKey: '公钥',
+ },
};
diff --git a/src/layout/components/the-aside.vue b/src/layout/components/the-aside.vue
index 1a385bc..66fdff2 100644
--- a/src/layout/components/the-aside.vue
+++ b/src/layout/components/the-aside.vue
@@ -30,9 +30,7 @@
}"
@click="navClick(item)"
>
-
-
-
+
@@ -63,6 +61,13 @@ const mainNavList = ref([
icon: 'co-folder',
isLink: false,
},
+ {
+ id: 'secret',
+ path: '/secret',
+ name: 'Secret',
+ icon: 'gi-house-keys',
+ isLink: false,
+ },
{
id: 'history',
path: '/history',
@@ -90,7 +95,7 @@ const samllNavList = ref([
{
path: '/setting',
id: 'setting',
- icon: 'io-settings-outline',
+ icon: 'co-settings',
name: 'setting',
isLink: false,
},
diff --git a/src/main.ts b/src/main.ts
index 452f1b8..50c3f95 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -10,16 +10,17 @@ import {
MdAdd,
RiMore2Fill,
IoCloseOutline,
- CoCheckCircle,
RiFileSearchLine,
OiDatabase,
BiFolder2Open,
BiGithub,
- IoSettingsOutline,
+ CoSettings,
FaRegularUserCircle,
CoHistory,
BiHddStackFill,
CoFolder,
+ BiCheckLg,
+ GiHouseKeys,
} from 'oh-vue-icons/icons';
const app = createApp(App);
@@ -27,16 +28,17 @@ addIcons(
MdAdd,
RiMore2Fill,
IoCloseOutline,
- CoCheckCircle,
+ BiCheckLg,
RiFileSearchLine,
OiDatabase,
BiFolder2Open,
BiGithub,
- IoSettingsOutline,
+ CoSettings,
FaRegularUserCircle,
CoHistory,
BiHddStackFill,
CoFolder,
+ GiHouseKeys,
);
app.component('VIcon', OhVueIcon);
diff --git a/src/router/index.ts b/src/router/index.ts
index 2dc53dd..269e609 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -21,6 +21,14 @@ const router = createRouter({
},
component: () => import('../views/connect/index.vue'),
},
+ {
+ name: 'Secret',
+ path: '/secret',
+ meta: {
+ keepAlive: false,
+ },
+ component: () => import('../views/secret/index.vue'),
+ },
{
name: 'History',
path: '/history',
diff --git a/src/store/index.ts b/src/store/index.ts
index 85d87eb..7668026 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -10,3 +10,4 @@ export * from './appStore';
export * from './userStore';
export * from './connectionStore';
export * from './sourceFileStore';
+export * from './secretStore';
diff --git a/src/store/secretStore.ts b/src/store/secretStore.ts
new file mode 100644
index 0000000..cbd52af
--- /dev/null
+++ b/src/store/secretStore.ts
@@ -0,0 +1,26 @@
+import { defineStore } from 'pinia';
+
+export enum SecretType {
+ SSH_KEY = 'SSH_KEY',
+ PASSWORD = 'PASSWORD',
+}
+export type Secret = {
+ id?: number;
+ name: string;
+ type: SecretType;
+ priKey?: string;
+ pubKey?: string;
+ username?: string;
+ password?: string;
+};
+export const useSecretStore = defineStore('secretStore', {
+ state(): {
+ secrets: Secret[];
+ } {
+ return {
+ secrets: [],
+ };
+ },
+ getters: {},
+ actions: {},
+});
diff --git a/src/views/secret/components/new-key-dialog.vue b/src/views/secret/components/new-key-dialog.vue
new file mode 100644
index 0000000..9c6d07e
--- /dev/null
+++ b/src/views/secret/components/new-key-dialog.vue
@@ -0,0 +1,202 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/secret/components/tool-bar.vue b/src/views/secret/components/tool-bar.vue
new file mode 100644
index 0000000..9899a6f
--- /dev/null
+++ b/src/views/secret/components/tool-bar.vue
@@ -0,0 +1,40 @@
+
+
+ {{ $t('secret.new') }}
+
+
+
+
+
+
diff --git a/src/views/secret/index.vue b/src/views/secret/index.vue
new file mode 100644
index 0000000..78e26df
--- /dev/null
+++ b/src/views/secret/index.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/setting/components/basic.vue b/src/views/setting/components/basic.vue
index acdbf8e..a34b926 100644
--- a/src/views/setting/components/basic.vue
+++ b/src/views/setting/components/basic.vue
@@ -19,7 +19,7 @@
{{ $t(`setting.${item.name}`) }}
-
+