Skip to content

Commit

Permalink
Merge pull request #1465 from jumpserver/pr@dev@fix_translate
Browse files Browse the repository at this point in the history
perf: Add Translate
  • Loading branch information
ZhaoJiSen authored Sep 9, 2024
2 parents 82f066e + 00d4194 commit 5fec5b3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 32 deletions.
48 changes: 23 additions & 25 deletions ui/src/components/Kubernetes/MainContent/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ import { updateIcon } from '@/components/CustomTerminal/helper';
import { computed, h, markRaw, nextTick, onBeforeUnmount, onMounted, reactive, ref } from 'vue';
import {
Stop,
Home,
Paste,
Insert,
NotSent,
Activity,
Keyboard,
Expand All @@ -79,7 +77,7 @@ import mittBus from '@/utils/mittBus.ts';
// import { useDraggable, type UseDraggableReturn } from 'vue-draggable-plus';
// import Tip from './components/Tip/index.vue';
import Tip from './components/Tip/index.vue';
import Share from '@/components/Share/index.vue';
import Settings from '@/components/Settings/index.vue';
import ThemeConfig from '@/components/ThemeConfig/index.vue';
Expand Down Expand Up @@ -221,13 +219,13 @@ const settings = computed((): ISettingProp[] => {
},
{
label: 'Keyboard',
title: t('Keyboard shortcuts'),
title: t('Hotkeys'),
icon: Keyboard,
content: [
{
name: 'Ctrl + C',
icon: Stop,
tip: t('Stop'),
tip: t('Cancel'),
click: () => {
handleWriteData('Stop');
}
Expand All @@ -240,50 +238,50 @@ const settings = computed((): ISettingProp[] => {
handleWriteData('Paste');
}
},
{
name: 'Home',
icon: Home,
tip: t('Home'),
click: () => {
handleWriteData('Home');
}
},
{
name: 'Insert',
icon: Insert,
tip: t('Insert'),
click: () => {
handleWriteData('Insert');
}
},
// {
// name: 'Home',
// icon: Home,
// tip: t('Home'),
// click: () => {
// handleWriteData('Home');
// }
// },
// {
// name: 'Insert',
// icon: Insert,
// tip: t('Insert'),
// click: () => {
// handleWriteData('Insert');
// }
// },
{
name: 'Arrow Up',
icon: ArrowUp,
tip: t('ArrowUp'),
tip: t('UpArrow'),
click: () => {
handleWriteData('ArrowUp');
}
},
{
name: 'Arrow Down',
icon: ArrowDown,
tip: t('ArrowDown'),
tip: t('DownArrow'),
click: () => {
handleWriteData('ArrowDown');
}
},
{
name: 'Arrow Left',
icon: ArrowBack,
tip: t('ArrowBack'),
tip: t('LeftArrow'),
click: () => {
handleWriteData('ArrowLeft');
}
},
{
name: 'Arrow Right',
icon: ArrowForward,
tip: t('ArrowForward'),
tip: t('RightArrow'),
click: () => {
handleWriteData('ArrowRight');
}
Expand Down
12 changes: 5 additions & 7 deletions ui/src/components/Kubernetes/Tree/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,36 +129,34 @@ const dropdownOptions = ref<DropdownOption[]>([]);
const allOptions = [
{
label: '展开',
label: t('Expand'),
key: 'expand',
// disabled: true,
icon: () => h(NIcon, { size: 15 }, { default: () => h(ExpandCategories) })
},
{
label: '连接',
label: t('Connect'),
key: 'connect',
// disabled: true,
icon: () => h(NIcon, { size: 15 }, { default: () => h(Terminal2) })
}
];
const buttonGroups = [
{
label: t('connect'),
label: t('Connect'),
icon: Terminal2,
click: (e: Event) => {
handleRootLink(e);
}
},
{
label: t('search'),
label: t('Search'),
icon: Search,
click: (e: Event) => {
e.stopPropagation();
showSearch.value = !showSearch.value;
}
},
{
label: t('refresh'),
label: t('Refresh'),
icon: RefreshRound,
click: (e: Event) => {
e.stopPropagation();
Expand Down

0 comments on commit 5fec5b3

Please sign in to comment.