Skip to content

Commit

Permalink
feat(plugin/changelog): 在「帮助」菜单下增加「更新日志」页面
Browse files Browse the repository at this point in the history
链接到 Github 上仓库 master 分支的 CHANGELOG.md 文件。

resolve #25
  • Loading branch information
frederick-wang committed Jan 30, 2021
1 parent cea3e69 commit 2283500
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 1 deletion.
28 changes: 28 additions & 0 deletions src/plugins/changelog/Changelog.vue
@@ -0,0 +1,28 @@
<template lang="pug">
.sua-container-changelog.typo
h2 更新日志
p.indent
span 完整更新日志可以参考 Github 上此仓库的
|
|
a(
target='_blank',
href='//github.com/frederick-wang/scu-urp-assistant/blob/master/CHANGELOG.md'
) CHANGELOG.md
|
|
span 文件。
</template>

<script lang="ts">
import { Vue, Component } from 'vue-property-decorator'
@Component
export default class Changelog extends Vue {}
</script>

<style lang="scss" scoped>
p.indent {
text-indent: 2em;
}
</style>
Binary file added src/plugins/changelog/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions src/plugins/changelog/index.ts
@@ -0,0 +1,26 @@
import App from './Changelog.vue'
import { getPluginIcon } from '@/helper/getter'
import { SUAPlugin } from '@/core/types'

export const Changelog: SUAPlugin = {
name: 'changelog',
displayName: '更新日志',
icon: getPluginIcon('changelog'),
isNecessary: true,
defaultEnabledState: true,
brief: '更新日志页面,是助手界面的一部分,不可关闭。',
route: {
path: 'help/changelog',
component: App
},
menu: {
rootMenuId: 'sua-menu-list',
rootMenuName: 'SCU URP 助手',
id: 'menu-help',
name: '帮助',
item: {
name: '更新日志',
route: 'help/changelog'
}
}
}
4 changes: 3 additions & 1 deletion src/plugins/list.ts
Expand Up @@ -10,6 +10,7 @@ import { UserExperienceImprovementProgram } from '@/plugins/user-experience-impr
import { DataAnalysis } from '@/plugins/data-analysis'
import { About } from '@/plugins/about'
import { Feedback } from '@/plugins/feedback'
import { Changelog } from '@/plugins/changelog'
import { Donate } from '@/plugins/donate'
import { BachelorDegree } from '@/plugins/bachelor-degree'
import { ScuUietp } from '@/plugins/scu-uietp'
Expand All @@ -35,8 +36,9 @@ const optionalPluginsLogined = [
UserExperienceImprovementProgram,
Setting,
About,
Donate,
Feedback,
Donate
Changelog
]

function getAllPlugins(): SUAPlugin[] {
Expand Down

0 comments on commit 2283500

Please sign in to comment.