mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 16:29:17 +08:00
feat: 页脚增加论坛、文档入口 (#792)
This commit is contained in:
parent
dd0ca4bcaf
commit
9f12a91f4a
@ -7,7 +7,7 @@
|
|||||||
<a href="https://fit2cloud.com/" target="_blank">Copyright © 2014-2023 FIT2CLOUD 飞致云</a>
|
<a href="https://fit2cloud.com/" target="_blank">Copyright © 2014-2023 FIT2CLOUD 飞致云</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-right">
|
<div class="footer-right">
|
||||||
<SystemUpgrade />
|
<SystemUpgrade :footer="true" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,9 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<span class="version">{{ version }}</span>
|
<span v-if="props.footer">
|
||||||
<el-badge is-dot class="item" v-if="version !== 'Waiting' && globalStore.hasNewVersion">
|
<el-button type="primary" link @click="toForum">
|
||||||
<el-button style="margin-top: -8px" type="primary" link @click="onLoadUpgradeInfo">
|
<span>{{ $t('setting.forum') }}</span>
|
||||||
{{ $t('setting.upgradeCheck') }}
|
</el-button>
|
||||||
|
<el-divider direction="vertical" />
|
||||||
|
<el-button type="primary" link @click="toDoc">
|
||||||
|
<span>{{ $t('setting.doc2') }}</span>
|
||||||
|
</el-button>
|
||||||
|
<el-divider direction="vertical" />
|
||||||
|
</span>
|
||||||
|
<span class="version">{{ $t('setting.currentVersion') + version }}</span>
|
||||||
|
<el-badge
|
||||||
|
is-dot
|
||||||
|
class="item"
|
||||||
|
v-if="version !== 'Waiting' && globalStore.hasNewVersion"
|
||||||
|
style="margin-top: -6px"
|
||||||
|
>
|
||||||
|
<el-button type="primary" link @click="onLoadUpgradeInfo">
|
||||||
|
<span style="font-size: 14px">({{ $t('setting.hasNewVersion') }})</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-badge>
|
</el-badge>
|
||||||
<el-button
|
<el-button
|
||||||
@ -13,11 +28,10 @@
|
|||||||
link
|
link
|
||||||
@click="onLoadUpgradeInfo"
|
@click="onLoadUpgradeInfo"
|
||||||
>
|
>
|
||||||
{{ $t('setting.upgradeCheck') }}
|
({{ $t('setting.upgradeCheck') }})
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-tag v-if="version === 'Waiting'" round style="margin-left: 10px">{{ $t('setting.upgrading') }}</el-tag>
|
<el-tag v-if="version === 'Waiting'" round style="margin-left: 10px">{{ $t('setting.upgrading') }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-drawer :close-on-click-modal="false" :key="refresh" v-model="drawerVisiable" size="50%" append-to-body>
|
<el-drawer :close-on-click-modal="false" :key="refresh" v-model="drawerVisiable" size="50%" append-to-body>
|
||||||
<template #header>
|
<template #header>
|
||||||
<DrawerHeader :header="$t('setting.upgrade')" :back="handleClose" />
|
<DrawerHeader :header="$t('setting.upgrade')" :back="handleClose" />
|
||||||
@ -50,6 +64,7 @@
|
|||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import DrawerHeader from '@/components/drawer-header/index.vue';
|
||||||
import { getSettingInfo, loadReleaseNotes, loadUpgradeInfo, upgrade } from '@/api/modules/setting';
|
import { getSettingInfo, loadReleaseNotes, loadUpgradeInfo, upgrade } from '@/api/modules/setting';
|
||||||
import MdEditor from 'md-editor-v3';
|
import MdEditor from 'md-editor-v3';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
@ -61,12 +76,17 @@ import { ElMessageBox } from 'element-plus';
|
|||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
|
|
||||||
const version = ref();
|
const version = ref();
|
||||||
let loading = ref(false);
|
const loading = ref(false);
|
||||||
const drawerVisiable = ref(false);
|
const drawerVisiable = ref(false);
|
||||||
const upgradeInfo = ref();
|
const upgradeInfo = ref();
|
||||||
const refresh = ref();
|
const refresh = ref();
|
||||||
|
|
||||||
const upgradeVersion = ref();
|
const upgradeVersion = ref();
|
||||||
|
const props = defineProps({
|
||||||
|
footer: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const search = async () => {
|
const search = async () => {
|
||||||
const res = await getSettingInfo();
|
const res = await getSettingInfo();
|
||||||
@ -77,6 +97,14 @@ const handleClose = () => {
|
|||||||
drawerVisiable.value = false;
|
drawerVisiable.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const toDoc = () => {
|
||||||
|
window.open('https://1panel.cn/docs/', '_blank');
|
||||||
|
};
|
||||||
|
|
||||||
|
const toForum = () => {
|
||||||
|
window.open('https://bbs.fit2cloud.com/c/1p/7', '_blank');
|
||||||
|
};
|
||||||
|
|
||||||
const onLoadUpgradeInfo = async () => {
|
const onLoadUpgradeInfo = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await loadUpgradeInfo()
|
await loadUpgradeInfo()
|
||||||
|
@ -918,6 +918,7 @@ const message = {
|
|||||||
upgradeNotes: 'Release note',
|
upgradeNotes: 'Release note',
|
||||||
upgradeNow: 'Upgrade now',
|
upgradeNow: 'Upgrade now',
|
||||||
source: 'Download source',
|
source: 'Download source',
|
||||||
|
hasNewVersion: 'New version Available',
|
||||||
|
|
||||||
monitor: 'Monitor',
|
monitor: 'Monitor',
|
||||||
enableMonitor: 'Enable',
|
enableMonitor: 'Enable',
|
||||||
@ -941,6 +942,9 @@ const message = {
|
|||||||
doc: 'Official document',
|
doc: 'Official document',
|
||||||
star: 'Star',
|
star: 'Star',
|
||||||
description: '1Panel, Modern, open source Linux server operation and maintenance management panel.',
|
description: '1Panel, Modern, open source Linux server operation and maintenance management panel.',
|
||||||
|
forum: 'Forum',
|
||||||
|
doc2: 'Document',
|
||||||
|
currentVersion: 'Version',
|
||||||
},
|
},
|
||||||
app: {
|
app: {
|
||||||
app: 'Application',
|
app: 'Application',
|
||||||
|
@ -904,6 +904,7 @@ const message = {
|
|||||||
upgradeNotes: '更新内容',
|
upgradeNotes: '更新内容',
|
||||||
upgradeNow: '立即更新',
|
upgradeNow: '立即更新',
|
||||||
source: '下载源',
|
source: '下载源',
|
||||||
|
hasNewVersion: '有新版本',
|
||||||
|
|
||||||
safe: '安全',
|
safe: '安全',
|
||||||
safeEntrance: '安全入口',
|
safeEntrance: '安全入口',
|
||||||
@ -947,6 +948,9 @@ const message = {
|
|||||||
doc: '官方文档',
|
doc: '官方文档',
|
||||||
star: '点亮 Star',
|
star: '点亮 Star',
|
||||||
description: '1Panel,现代化、开源的 Linux 服务器运维管理面板。',
|
description: '1Panel,现代化、开源的 Linux 服务器运维管理面板。',
|
||||||
|
forum: '论坛',
|
||||||
|
doc2: '文档',
|
||||||
|
currentVersion: '当前运行版本:',
|
||||||
},
|
},
|
||||||
app: {
|
app: {
|
||||||
app: '应用',
|
app: '应用',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user