From a5b3067cc7da259843021f922cde48f3e7732730 Mon Sep 17 00:00:00 2001
From: ssongliu <73214554+ssongliu@users.noreply.github.com>
Date: Wed, 20 Sep 2023 22:16:20 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=A8=E5=B1=8F=E6=8C=89=E9=92=AE?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F=E7=BB=9F=E4=B8=80=E8=B0=83=E6=95=B4=20(#2366?=
=?UTF-8?q?)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/lang/modules/en.ts | 2 ++
frontend/src/lang/modules/tw.ts | 2 ++
frontend/src/lang/modules/zh.ts | 2 ++
frontend/src/views/container/container/log/index.vue | 8 +++++++-
frontend/src/views/host/terminal/terminal/index.vue | 10 +++++++++-
5 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts
index 8c4cad3c8..ec380a47f 100644
--- a/frontend/src/lang/modules/en.ts
+++ b/frontend/src/lang/modules/en.ts
@@ -49,6 +49,8 @@ const message = {
copy: 'Copy',
random: 'Random',
uninstall: 'Uninstall',
+ fullscreen: 'Fullscreen',
+ quitFullscreen: 'Quit Fullscreen',
},
search: {
timeStart: 'Time start',
diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts
index 8bd066b6c..c491d4d6d 100644
--- a/frontend/src/lang/modules/tw.ts
+++ b/frontend/src/lang/modules/tw.ts
@@ -49,6 +49,8 @@ const message = {
copy: '復製',
random: '隨機密碼',
uninstall: '卸載',
+ fullscreen: '全屏',
+ quitFullscreen: '退出全屏',
},
search: {
timeStart: '開始時間',
diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts
index d80a24619..c28794110 100644
--- a/frontend/src/lang/modules/zh.ts
+++ b/frontend/src/lang/modules/zh.ts
@@ -49,6 +49,8 @@ const message = {
copy: '复制',
random: '随机密码',
uninstall: '卸载',
+ fullscreen: '全屏',
+ quitFullscreen: '退出全屏',
},
search: {
timeStart: '开始时间',
diff --git a/frontend/src/views/container/container/log/index.vue b/frontend/src/views/container/container/log/index.vue
index 7be13d7cf..bf2891a16 100644
--- a/frontend/src/views/container/container/log/index.vue
+++ b/frontend/src/views/container/container/log/index.vue
@@ -9,7 +9,9 @@
-
+
+
+
@@ -124,6 +126,10 @@ function toggleFullscreen() {
screenfull.toggle();
}
}
+
+const loadTooltip = () => {
+ return i18n.global.t('commons.button.' + (screenfull.isFullscreen ? 'quitFullscreen' : 'fullscreen'));
+};
const handleClose = async () => {
logVisiable.value = false;
terminalSocket.value.close();
diff --git a/frontend/src/views/host/terminal/terminal/index.vue b/frontend/src/views/host/terminal/terminal/index.vue
index 1abd683d2..dd78eed45 100644
--- a/frontend/src/views/host/terminal/terminal/index.vue
+++ b/frontend/src/views/host/terminal/terminal/index.vue
@@ -119,7 +119,9 @@
>
-
+
+
+
@@ -149,7 +151,11 @@ function toggleFullscreen() {
if (screenfull.isEnabled) {
screenfull.toggle();
}
+ globalStore.isFullScreen = !screenfull.isFullscreen;
}
+const loadTooltip = () => {
+ return i18n.global.t('commons.button.' + (globalStore.isFullScreen ? 'quitFullscreen' : 'fullscreen'));
+};
const localHostID = ref();
@@ -409,6 +415,8 @@ defineExpose({
font-weight: 600;
}
.fullScreen {
+ background-color: #efefef;
+ border: none;
position: absolute;
right: 50px;
top: 90px;