diff --git a/ui/components.d.ts b/ui/components.d.ts index be56d98e..19b92108 100644 --- a/ui/components.d.ts +++ b/ui/components.d.ts @@ -13,12 +13,16 @@ declare module 'vue' { Main: typeof import('./src/components/Kubernetes/MainContent/main.vue')['default'] MainContent: typeof import('./src/components/Kubernetes/MainContent/index.vue')['default'] NButton: typeof import('naive-ui')['NButton'] + NButtonGroup: typeof import('naive-ui')['NButtonGroup'] + NCard: typeof import('naive-ui')['NCard'] NCollapse: typeof import('naive-ui')['NCollapse'] NCollapseItem: typeof import('naive-ui')['NCollapseItem'] NConfigProvider: typeof import('naive-ui')['NConfigProvider'] + NDataTable: typeof import('naive-ui')['NDataTable'] NDescriptions: typeof import('naive-ui')['NDescriptions'] NDescriptionsItem: typeof import('naive-ui')['NDescriptionsItem'] NDialogProvider: typeof import('naive-ui')['NDialogProvider'] + NDivider: typeof import('naive-ui')['NDivider'] NDrawer: typeof import('naive-ui')['NDrawer'] NDrawerContent: typeof import('naive-ui')['NDrawerContent'] NDropdown: typeof import('naive-ui')['NDropdown'] @@ -51,6 +55,8 @@ declare module 'vue' { NTree: typeof import('naive-ui')['NTree'] NUpload: typeof import('naive-ui')['NUpload'] NUploadDragger: typeof import('naive-ui')['NUploadDragger'] + NUploadFileList: typeof import('naive-ui')['NUploadFileList'] + NUploadTrigger: typeof import('naive-ui')['NUploadTrigger'] NWatermark: typeof import('naive-ui')['NWatermark'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] diff --git a/ui/src/hooks/useKubernetes.ts b/ui/src/hooks/useKubernetes.ts index 3942d8e6..9ebc0f20 100644 --- a/ui/src/hooks/useKubernetes.ts +++ b/ui/src/hooks/useKubernetes.ts @@ -601,18 +601,18 @@ export const initElEvent = ( text = await readText(); } catch (e) { if (terminalStore.termSelectionText !== '') text = terminalStore.termSelectionText; + } finally { + socket.send( + JSON.stringify({ + id: kubernetesStore.globalTerminalId, + k8s_id: terminalStore.currentTab, + type: 'TERMINAL_K8S_DATA', + data: text + }) + ); } e.preventDefault(); - - socket.send( - JSON.stringify({ - id: kubernetesStore.globalTerminalId, - k8s_id: terminalStore.currentTab, - type: 'TERMINAL_K8S_DATA', - data: text - }) - ); }, false );