Skip to content

Commit

Permalink
fixed: Fixed an issue where the right click paste was empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoJiSen committed Nov 15, 2024
1 parent 8363970 commit 82b1008
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
6 changes: 6 additions & 0 deletions ui/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -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']
Expand Down
18 changes: 9 additions & 9 deletions ui/src/hooks/useKubernetes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down

0 comments on commit 82b1008

Please sign in to comment.