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:hotkey change and terminal style #1475

Merged
merged 1 commit into from
Sep 10, 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
3 changes: 1 addition & 2 deletions ui/src/components/CustomTerminal/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ onUnmounted(() => {
<style lang="scss" scoped>
:deep(.terminal-container) {
.xterm {
padding-left: 10px;
padding-top: 10px;
padding: 10px 0 10px 10px;
}
}
</style>
6 changes: 1 addition & 5 deletions ui/src/components/Kubernetes/MainContent/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ $--el-main-bg-color: #1e1e1e;

:deep(.xterm-screen) {
width: 100% !important;
height: calc(100vh - 75px) !important;

.xterm-rows {
//padding: 10px 0 0 10px;
}
height: calc(100vh - 90px) !important;
}
}
6 changes: 4 additions & 2 deletions ui/src/hooks/helper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,14 @@ export const handleCustomKey = (e: KeyboardEvent, terminal: Terminal): boolean =
if (e.altKey && e.shiftKey && (e.key === 'ArrowRight' || e.key === 'ArrowLeft')) {
switch (e.key) {
case 'ArrowRight':
sendEventToLuna('KEYEVENT', 'alt+right');
window.parent.postMessage({ name: 'KEYEVENT', data: 'alt+shift+right' });
break;
case 'ArrowLeft':
sendEventToLuna('KEYEVENT', 'alt+left');
window.parent.postMessage({ name: 'KEYEVENT', data: 'alt+shift+left' });
break;
}

return false;
}

if (e.ctrlKey && e.key === 'c' && terminal.hasSelection()) {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/views/Connection/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ const onEvent = (event: string, data: any) => {
}

.xterm-screen {
height: 100vh !important;
height: calc(100vh - 20px) !important;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/views/ShareTerminal/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ dialog.warning({
}

.xterm-screen {
height: 100vh !important;
height: calc(100vh - 20px) !important;
}
}
}
Expand Down
Loading