1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00

feat: 全屏按钮样式统一调整 (#2366)

This commit is contained in:
ssongliu 2023-09-20 22:16:20 +08:00 committed by GitHub
parent 12d6c2c3df
commit a5b3067cc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 2 deletions

View File

@ -49,6 +49,8 @@ const message = {
copy: 'Copy',
random: 'Random',
uninstall: 'Uninstall',
fullscreen: 'Fullscreen',
quitFullscreen: 'Quit Fullscreen',
},
search: {
timeStart: 'Time start',

View File

@ -49,6 +49,8 @@ const message = {
copy: '復製',
random: '隨機密碼',
uninstall: '卸載',
fullscreen: '全屏',
quitFullscreen: '退出全屏',
},
search: {
timeStart: '開始時間',

View File

@ -49,6 +49,8 @@ const message = {
copy: '复制',
random: '随机密码',
uninstall: '卸载',
fullscreen: '全屏',
quitFullscreen: '退出全屏',
},
search: {
timeStart: '开始时间',

View File

@ -9,7 +9,9 @@
<template #header>
<DrawerHeader :header="$t('commons.button.log')" :resource="logSearch.container" :back="handleClose">
<template #extra v-if="!mobile">
<el-button @click="toggleFullscreen" class="fullScreen" icon="FullScreen" plain></el-button>
<el-tooltip :content="loadTooltip()" placement="top">
<el-button @click="toggleFullscreen" class="fullScreen" icon="FullScreen" plain></el-button>
</el-tooltip>
</template>
</DrawerHeader>
</template>
@ -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();

View File

@ -119,7 +119,9 @@
></el-empty>
</div>
</el-tabs>
<el-button @click="toggleFullscreen" v-if="!mobile" class="fullScreen" icon="FullScreen"></el-button>
<el-tooltip :content="loadTooltip()" placement="top">
<el-button @click="toggleFullscreen" v-if="!mobile" class="fullScreen" icon="FullScreen"></el-button>
</el-tooltip>
<HostDialog ref="dialogRef" @on-conn-terminal="onConnTerminal" @load-host-tree="loadHostTree" />
</div>
@ -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;