From 791802332218f7eb006a23cc70772ffd2d0245fa Mon Sep 17 00:00:00 2001
From: ssongliu <73214554+ssongliu@users.noreply.github.com>
Date: Thu, 15 Jun 2023 18:00:17 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=AE=B9=E5=99=A8?=
=?UTF-8?q?=E3=80=81=E7=BB=88=E7=AB=AF=E7=95=8C=E9=9D=A2=20ios=20=E9=80=82?=
=?UTF-8?q?=E9=85=8D=E7=9A=84=E9=97=AE=E9=A2=98=20(#1385)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../views/container/container/log/index.vue | 19 ++++++++++++-------
.../views/host/terminal/terminal/index.vue | 16 +++++++++++-----
2 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/frontend/src/views/container/container/log/index.vue b/frontend/src/views/container/container/log/index.vue
index 1b36c93b8..376b3abaf 100644
--- a/frontend/src/views/container/container/log/index.vue
+++ b/frontend/src/views/container/container/log/index.vue
@@ -8,7 +8,7 @@
>
-
+
@@ -69,7 +69,7 @@
import { cleanContainerLog } from '@/api/modules/container';
import i18n from '@/lang';
import { dateFormatForName } from '@/utils/util';
-import { onBeforeUnmount, reactive, ref, shallowRef, watch } from 'vue';
+import { computed, onBeforeUnmount, reactive, ref, shallowRef, watch } from 'vue';
import { Codemirror } from 'vue-codemirror';
import { javascript } from '@codemirror/lang-javascript';
import { oneDark } from '@codemirror/theme-one-dark';
@@ -80,8 +80,10 @@ import screenfull from 'screenfull';
import { GlobalStore } from '@/store';
const extensions = [javascript(), oneDark];
-
const logVisiable = ref(false);
+const mobile = computed(() => {
+ return globalStore.isMobile();
+});
const logInfo = ref('');
const view = shallowRef();
@@ -124,15 +126,12 @@ function toggleFullscreen() {
screenfull.toggle();
}
}
-screenfull.on('change', () => {
- globalStore.isFullScreen = screenfull.isFullscreen;
-});
const handleClose = async () => {
logVisiable.value = false;
terminalSocket.value.close();
};
watch(logVisiable, (val) => {
- if (screenfull.isEnabled && !val) screenfull.exit();
+ if (screenfull.isEnabled && !val && !mobile.value) screenfull.exit();
});
const searchLogs = async () => {
if (!Number(logSearch.tail) || Number(logSearch.tail) <= 0) {
@@ -192,6 +191,12 @@ const acceptParams = (props: DialogProps): void => {
logSearch.isWatch = false;
logSearch.container = props.container;
searchLogs();
+
+ if (!mobile.value) {
+ screenfull.on('change', () => {
+ globalStore.isFullScreen = screenfull.isFullscreen;
+ });
+ }
};
onBeforeUnmount(() => {
diff --git a/frontend/src/views/host/terminal/terminal/index.vue b/frontend/src/views/host/terminal/terminal/index.vue
index 83a5b2dc7..2ddfc53fb 100644
--- a/frontend/src/views/host/terminal/terminal/index.vue
+++ b/frontend/src/views/host/terminal/terminal/index.vue
@@ -123,14 +123,14 @@
>
-
+