diff --git a/frontend/src/views/host/file-management/code-editor/index.vue b/frontend/src/views/host/file-management/code-editor/index.vue index 187f68032..e855868c3 100644 --- a/frontend/src/views/host/file-management/code-editor/index.vue +++ b/frontend/src/views/host/file-management/code-editor/index.vue @@ -7,8 +7,12 @@ width="70%" @opened="onOpen" :top="'5vh'" + :fullscreen="isFullscreen" > + + + @@ -98,6 +102,8 @@ const warpKey = 'code-warp'; type WordWrapOptions = 'off' | 'on' | 'wordWrapColumn' | 'bounded'; +const isFullscreen = ref(false); + const config = reactive({ theme: 'vs-dark', language: 'plaintext', @@ -145,6 +151,13 @@ const handleClose = () => { } em('close', open.value); }; + +const loadTooltip = () => { + return i18n.global.t('commons.button.' + (isFullscreen.value ? 'quitFullscreen' : 'fullscreen')); +}; +function toggleFullscreen() { + isFullscreen.value = !isFullscreen.value; +} const changeLanguage = () => { monaco.editor.setModelLanguage(editor.getModel(), config.language); }; @@ -244,4 +257,12 @@ defineExpose({ acceptParams }); .dialog-top { top: 0; } +.fullScreen { + background-color: transparent; + border: none; + position: absolute; + right: 50px; + font-weight: 600; + font-size: 14px; +}