diff --git a/ui/package.json b/ui/package.json
index dc4f1f6d..7b7c9ffa 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -34,8 +34,10 @@
"devDependencies": {
"@types/node": "^20.14.11",
"@vicons/carbon": "^0.12.0",
+ "@vicons/fa": "^0.12.0",
"@vicons/fluent": "^0.12.0",
"@vicons/ionicons5": "^0.12.0",
+ "@vicons/material": "^0.12.0",
"@vitejs/plugin-vue": "^5.0.5",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.39",
diff --git a/ui/src/components/Kubernetes/ContentHeader/index.vue b/ui/src/components/Kubernetes/ContentHeader/index.vue
index ac5581ab..f4492b7e 100644
--- a/ui/src/components/Kubernetes/ContentHeader/index.vue
+++ b/ui/src/components/Kubernetes/ContentHeader/index.vue
@@ -1,40 +1,40 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -42,27 +42,27 @@
import { storeToRefs } from 'pinia';
import { useParamsStore } from '@/store/modules/params.ts';
-import { ArrowSortDown24Regular, ArrowSortUp24Regular, Search24Regular } from '@vicons/fluent';
+// import { ArrowSortDown24Regular, ArrowSortUp24Regular, Search24Regular } from '@vicons/fluent';
import Logo from '@/components/Kubernetes/Sidebar/components/Logo/index.vue';
-import mittBus from '@/utils/mittBus.ts';
-import { ref } from 'vue';
+// import mittBus from '@/utils/mittBus.ts';
+// import { ref } from 'vue';
const paramsStore = useParamsStore();
const { setting } = storeToRefs(paramsStore);
-const currentKeyWord = ref('');
-
-const handleSearch = (value: string) => {
- currentKeyWord.value = value;
- mittBus.emit('terminal-search', { keyword: value });
-};
-
-const findNext = () => {
- mittBus.emit('terminal-search', { keyword: currentKeyWord.value, type: 'next' });
-};
+// const currentKeyWord = ref('');
-const findPrev = () => {
- mittBus.emit('terminal-search', { keyword: currentKeyWord.value, type: 'prev' });
-};
+// const handleSearch = (value: string) => {
+// currentKeyWord.value = value;
+// mittBus.emit('terminal-search', { keyword: value });
+// };
+//
+// const findNext = () => {
+// mittBus.emit('terminal-search', { keyword: currentKeyWord.value, type: 'next' });
+// };
+//
+// const findPrev = () => {
+// mittBus.emit('terminal-search', { keyword: currentKeyWord.value, type: 'prev' });
+// };
diff --git a/ui/src/components/Kubernetes/Sidebar/components/Logo/index.vue b/ui/src/components/Kubernetes/Sidebar/components/Logo/index.vue
index a9b303f1..2b2654fd 100644
--- a/ui/src/components/Kubernetes/Sidebar/components/Logo/index.vue
+++ b/ui/src/components/Kubernetes/Sidebar/components/Logo/index.vue
@@ -3,7 +3,7 @@
lazy
:src="logoImage"
alt="Logo 图片"
- class="h-[35px] w-[35px] justify-center object-fill hover: cursor-pointer"
+ class="h-[30px] w-[30px] justify-center object-fill hover: cursor-pointer"
/>
diff --git a/ui/src/components/Kubernetes/Sidebar/components/Tree/index.scss b/ui/src/components/Kubernetes/Sidebar/components/Tree/index.scss
index 3794e6a5..b14114f9 100644
--- a/ui/src/components/Kubernetes/Sidebar/components/Tree/index.scss
+++ b/ui/src/components/Kubernetes/Sidebar/components/Tree/index.scss
@@ -17,8 +17,7 @@
width: 2px;
height: 100%;
content: '';
- //background-color: #1ab394;
- background-color: #ffffff;
+ background-color: #1ab394;
}
}
}
diff --git a/ui/src/components/Kubernetes/Sidebar/components/Tree/index.vue b/ui/src/components/Kubernetes/Sidebar/components/Tree/index.vue
index bac62516..389a4886 100644
--- a/ui/src/components/Kubernetes/Sidebar/components/Tree/index.vue
+++ b/ui/src/components/Kubernetes/Sidebar/components/Tree/index.vue
@@ -8,7 +8,7 @@
diff --git a/ui/src/components/Kubernetes/Sidebar/sideTop.vue b/ui/src/components/Kubernetes/Sidebar/sideTop.vue
index 0bd52f1d..3560b6a8 100644
--- a/ui/src/components/Kubernetes/Sidebar/sideTop.vue
+++ b/ui/src/components/Kubernetes/Sidebar/sideTop.vue
@@ -4,7 +4,7 @@
-
+
diff --git a/ui/src/components/Kubernetes/Tree/index.vue b/ui/src/components/Kubernetes/Tree/index.vue
index e195f8ff..6777ca72 100644
--- a/ui/src/components/Kubernetes/Tree/index.vue
+++ b/ui/src/components/Kubernetes/Tree/index.vue
@@ -8,8 +8,14 @@
-
-
+
+
+
+
+
+
+
+
{
expandedKeysRef.value = expandedKeys;
- if (!meta.node) return;
+
switch (meta.action) {
case 'expand':
- meta.node.prefix = () =>
- h(NIcon, null, {
- default: () => h(FolderOpenOutline)
- });
+ meta.node &&
+ (meta.node.prefix = () =>
+ h(NIcon, null, {
+ default: () => h(FolderOpen)
+ }));
break;
case 'collapse':
- meta.node.prefix = () =>
- h(NIcon, null, {
- default: () => h(Folder)
- });
+ meta.node &&
+ (meta.node.prefix = () =>
+ h(NIcon, null, {
+ default: () => h(Folder)
+ }));
break;
}
};
@@ -175,7 +184,8 @@ const handleOnLoad = (node: TreeOption) => {
if (!expandedKeysRef.value.includes(expendKey)) {
setTimeout(() => {
expandedKeysRef.value.push(expendKey);
- }, 300);
+ handleExpandCollapse(expandedKeysRef.value, [], { node, action: 'expand' });
+ }, 200);
}
}
diff --git a/ui/src/hooks/useK8s.ts b/ui/src/hooks/useK8s.ts
index 9b19ea93..d2a0d569 100644
--- a/ui/src/hooks/useK8s.ts
+++ b/ui/src/hooks/useK8s.ts
@@ -1,6 +1,6 @@
import { NIcon } from 'naive-ui';
import { v4 as uuid } from 'uuid';
-import { Folder } from '@vicons/ionicons5';
+import { Folder } from '@vicons/fa';
import { Kubernetes } from '@vicons/carbon';
import { ref, h } from 'vue';
@@ -80,6 +80,8 @@ export const useK8s = () => {
})
};
+ syncLoadNodes(treeRootNode);
+
treeStore.setTreeNodes(treeRootNode);
treeStore.setCurrentNode(treeRootNode);
};
diff --git a/ui/src/hooks/useTerminal.ts b/ui/src/hooks/useTerminal.ts
index c6ce68f9..4f7a51ba 100644
--- a/ui/src/hooks/useTerminal.ts
+++ b/ui/src/hooks/useTerminal.ts
@@ -273,6 +273,13 @@ export const useTerminal = async (el: HTMLElement, option: ICallbackOptions): Pr
terminal?.write(socketData.err);
break;
}
+ case 'K8S_CLOSE': {
+ terminal?.attachCustomKeyEventHandler(() => {
+ return false;
+ });
+
+ break;
+ }
default: {
break;
}
diff --git a/ui/yarn.lock b/ui/yarn.lock
index 55155d8b..e50a56b8 100644
--- a/ui/yarn.lock
+++ b/ui/yarn.lock
@@ -421,6 +421,11 @@
resolved "https://registry.yarnpkg.com/@vicons/carbon/-/carbon-0.12.0.tgz#dfcc5d6283662eccee55700b2d5c29e688a70f5a"
integrity sha512-kCOgr/ZOhZzoiFLJ8pwxMa2TMxrkCUOA22qExPabus35F4+USqzcsxaPoYtqRd9ROOYiHrSqwapak/ywF0D9bg==
+"@vicons/fa@^0.12.0":
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/@vicons/fa/-/fa-0.12.0.tgz#a5f92db45990f8a47b5eeedcdb9b673f0dababc8"
+ integrity sha512-g2PIeJLsTHUjt6bK63LxqC0uYQB7iu+xViJOxvp1s8b9/akpXVPVWjDTTsP980/0KYyMMe4U7F/aUo7wY+MsXA==
+
"@vicons/fluent@^0.12.0":
version "0.12.0"
resolved "https://registry.yarnpkg.com/@vicons/fluent/-/fluent-0.12.0.tgz#7e9a39190114f7cb682a71dd166e7efec35e5e9c"
@@ -431,6 +436,11 @@
resolved "https://registry.yarnpkg.com/@vicons/ionicons5/-/ionicons5-0.12.0.tgz#c39fda04420dfae3b58053faf8aaf3555253299d"
integrity sha512-Iy1EUVRpX0WWxeu1VIReR1zsZLMc4fqpt223czR+Rpnrwu7pt46nbnC2ycO7ItI/uqDLJxnbcMC7FujKs9IfFA==
+"@vicons/material@^0.12.0":
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/@vicons/material/-/material-0.12.0.tgz#068e72fa40bd7f780af5fc68011fb69010c8e0b5"
+ integrity sha512-chv1CYAl8P32P3Ycwgd5+vw/OFNc2mtkKdb1Rw4T5IJmKy6GVDsoUKV3N2l208HATn7CCQphZtuPDdsm7K2kmA==
+
"@vitejs/plugin-vue@^5.0.5":
version "5.1.2"
resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-5.1.2.tgz#f11091e0130eca6c1ca8cfb85ee71ea53b255d31"