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

perf: Add Translate #1465

Merged
merged 1 commit into from
Sep 9, 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
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
Loading