Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed: Fixed an issue where the terminal could not write commands #1462

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ui/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ declare module 'vue' {
NResult: typeof import('naive-ui')['NResult']
NScrollbar: typeof import('naive-ui')['NScrollbar']
NSelect: typeof import('naive-ui')['NSelect']
NSpin: typeof import('naive-ui')['NSpin']
NTabPane: typeof import('naive-ui')['NTabPane']
NTabs: typeof import('naive-ui')['NTabs']
NTag: typeof import('naive-ui')['NTag']
Expand Down
3 changes: 1 addition & 2 deletions ui/src/components/Kubernetes/MainContent/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,12 @@ const handleClose = (name: string) => {

panels.value.splice(index, 1);

// nextTick(() => {});

const panelLength = panels.value.length;

if (panelLength >= 1) {
nameRef.value = panels.value[panelLength - 1].name as string;
findNodeById(nameRef.value);
terminalStore.setTerminalConfig('currentTab', nameRef.value);
}
};

Expand Down
14 changes: 8 additions & 6 deletions ui/src/components/Kubernetes/Sidebar/components/Logo/index.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<template>
<n-image
lazy
:src="logoImage"
alt="Logo 图片"
class="h-[30px] w-[30px] justify-center object-fill hover: cursor-pointer"
/>
<n-spin :show="!logoImage" size="small">
<n-image
lazy
:src="logoImage"
alt=""
class="h-[30px] w-[30px] justify-center object-fill hover: cursor-pointer"
/>
</n-spin>
</template>

<script setup lang="ts">
Expand Down
1 change: 1 addition & 0 deletions ui/src/hooks/useTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ export const useTerminal = async (el: HTMLElement, option: ICallbackOptions): Pr
case 'TERMINAL_K8S_BINARY': {
terminalId.value = socketData.id;
k8s_id.value = socketData.k8s_id;

sentry.consume(base64ToUint8Array(socketData.raw));

break;
Expand Down
Loading