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

feat: 优化关于页面的版本信息

This commit is contained in:
wangdan 2023-03-14 19:05:57 +08:00 committed by wangdan-fit2cloud
parent ed11c0a4a6
commit 24b3501f38
4 changed files with 28 additions and 11 deletions

View File

@ -7,18 +7,18 @@
<el-tag v-else round style="margin-left: 10px">{{ $t('setting.upgrading') }}</el-tag>
</div>
<el-drawer :close-on-click-modal="false" :key="refresh" v-model="drawerVisiable" size="50%">
<el-drawer :close-on-click-modal="false" :key="refresh" v-model="drawerVisiable" size="50%" append-to-body>
<template #header>
<DrawerHeader :header="$t('setting.upgrade')" :back="handleClose" />
</template>
<el-form label-width="120px">
<el-form-item :label="$t('setting.newVersion')">
<el-tag>{{ upgradeInfo.newVersion }}</el-tag>
</el-form-item>
<el-form-item :label="$t('setting.upgradeNotes')">
<MdEditor style="height: calc(100vh - 330px)" v-model="upgradeInfo.releaseNote" previewOnly />
</el-form-item>
</el-form>
<div class="panel-MdEditor">
<div class="default-theme">
<h2 class="inline-block">{{ $t('setting.newVersion') }}</h2>
<el-tag class="inline-block tag">{{ upgradeInfo.newVersion }}</el-tag>
</div>
<MdEditor v-model="upgradeInfo.releaseNote" previewOnly />
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="drawerVisiable = false">{{ $t('commons.button.cancel') }}</el-button>
@ -29,6 +29,7 @@
</template>
<script setup lang="ts">
import { getSettingInfo, loadUpgradeInfo, upgrade } from '@/api/modules/setting';
import MdEditor from 'md-editor-v3';
import i18n from '@/lang';
import { MsgSuccess } from '@/utils/message';
import { onMounted, ref } from 'vue';
@ -98,4 +99,21 @@ onMounted(() => {
text-decoration: none;
letter-spacing: 0.5px;
}
.panel-MdEditor {
height: calc(100vh - 330px);
margin-left: 70px;
.tag {
margin-left: 20px;
margin-top: -6px;
vertical-align: middle;
}
:deep(.md-editor-preview) {
font-size: 14px;
}
:deep(.default-theme h2) {
margin: 13px 0;
padding: 0;
font-size: 16px;
}
}
</style>

View File

@ -3,3 +3,4 @@
@use './element-dark.scss';
@use './reset.scss';
@use './var.scss';
@use 'md-editor-v3/lib/style.css';

View File

@ -94,7 +94,6 @@
import { GetApp, GetAppDetail } from '@/api/modules/app';
import LayoutContent from '@/layout/layout-content.vue';
import MdEditor from 'md-editor-v3';
import 'md-editor-v3/lib/style.css';
import { onMounted, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import Install from './install/index.vue';

View File

@ -38,7 +38,6 @@
import LayoutContent from '@/layout/layout-content.vue';
import { getSettingInfo, getSystemAvailable } from '@/api/modules/setting';
import { onMounted, ref } from 'vue';
import 'md-editor-v3/lib/style.css';
import SystemUpgrade from '@/components/system-upgrade/index.vue';
const version = ref();