Former-commit-id: 1f5fb4a5ab475fe7dd56856584fb707a4d3e592c [formerly 42022ffdfb79f64e99138580e2beed163901c564] [formerly 1f5fb4a5ab475fe7dd56856584fb707a4d3e592c [formerly 42022ffdfb79f64e99138580e2beed163901c564] [formerly 1f5fb4a5ab475fe7dd56856584fb707a4d3e592c [formerly 42022ffdfb79f64e99138580e2beed163901c564] [formerly 42022ffdfb79f64e99138580e2beed163901c564 [formerly e91f0f80d6ae8812daafccb9894d16802b4ec84a [formerly ad0ac5553bc253c6ca0c2fdd56763c41780c08b5]]]]] Former-commit-id: 0f71add838f001bb9577585ec13fb587e3b1f8c7 Former-commit-id: 3b78c5f0e9802244e08acaffe53bafb8560bed0a Former-commit-id: 3177c463b7500a1369f5bafb33407d3b9f0aceec [formerly 6f766445766d6a3f90a483d94385e853a70e7c26] Former-commit-id: 359167b65e9ee6ae60c8e0c4a24cc763d6e61405 Former-commit-id: bb02e75c6ca35089ddf5fc5fa2ee3ccfb28162a8 Former-commit-id: 1586321951fb1f2ad9052f52557e45fbdf75a3fa Former-commit-id: 5738fcbf97f9f50c5e12c576a9719873fbc44cb0 Former-commit-id: 032247d5689d80e0d7c16ae75b2e16e0dea6b73b
74 lines
1.8 KiB
Vue
74 lines
1.8 KiB
Vue
<template>
|
|
<d2-container type="full" class="page">
|
|
<template slot="header">D2Admin 版本检查</template>
|
|
<div class="banner">
|
|
<img :src="`${$assetsPublicPath}static/image/icon/500/d2admin.png`">
|
|
</div>
|
|
<div v-if="update" class="releases">
|
|
<h1>有新版本 {{releases.tag_name}}</h1>
|
|
<p>更新日期 {{dayjs(releases.created_at).format('YYYY年M月D日')}}</p>
|
|
<a :href="releases.html_url" class="el-button el-button--primary d2-mb">{{releases.html_url}}</a>
|
|
<d2-markdown key="update" :source="releases.body"/>
|
|
</div>
|
|
<div v-else class="up2date">
|
|
<d2-markdown key="noupdate" :source="up2date"/>
|
|
</div>
|
|
<template slot="footer">
|
|
<el-button
|
|
:type="updateNotify ? 'primary' : 'default'"
|
|
size="mini"
|
|
@click="d2adminUpdateNotifySet(!updateNotify)">
|
|
{{updateNotify ? '关闭更新提醒 (当前:打开)' : '打开更新提醒 (当前:关闭)'}}
|
|
</el-button>
|
|
</template>
|
|
</d2-container>
|
|
</template>
|
|
|
|
<script>
|
|
import up2date from './md/up-to-date.md'
|
|
import dayjs from 'dayjs'
|
|
import { mapState, mapMutations } from 'vuex'
|
|
export default {
|
|
data () {
|
|
return {
|
|
dayjs,
|
|
up2date
|
|
}
|
|
},
|
|
computed: {
|
|
...mapState({
|
|
version: state => state.d2admin.version,
|
|
releases: state => state.d2admin.releases,
|
|
update: state => state.d2admin.update,
|
|
updateNotify: state => state.d2admin.updateNotify
|
|
})
|
|
},
|
|
methods: {
|
|
...mapMutations([
|
|
'd2adminUpdateNotifySet'
|
|
])
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
@import '~@/assets/style/public.scss';
|
|
.page {
|
|
.banner {
|
|
text-align: center;
|
|
img {
|
|
width: 250px;
|
|
}
|
|
}
|
|
.releases {
|
|
padding: 20px;
|
|
border-radius: 4px;
|
|
background-color: $color-bg;
|
|
}
|
|
.up2date {
|
|
padding: 20px;
|
|
border-radius: 4px;
|
|
background-color: $color-bg;
|
|
}
|
|
}
|
|
</style> |