Skip to content

Commit

Permalink
feat: update update page view
Browse files Browse the repository at this point in the history
  • Loading branch information
terasum committed Sep 24, 2023
1 parent 13b9026 commit 82247e5
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 5 deletions.
9 changes: 6 additions & 3 deletions frontend/src/components/setting/SettingItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defineProps(['title', 'value']);
padding: 10px 0;
.setting-item {
width: calc(100% - 40px);
max-width: calc(100% - 40px);
display: flex;
flex-direction: column;
justify-content: space-between;
Expand All @@ -43,12 +43,15 @@ defineProps(['title', 'value']);
.setting-item-label {
display: flex;
flex-direction: row;
flex-direction: column;
min-width: 80px;
font-weight: bold;
justify-content: center;
}
.setting-item-data {
color: #666;
line-break: loose;
padding-left: 20px;;
}
}
.setting-item-desc {
Expand All @@ -57,7 +60,7 @@ defineProps(['title', 'value']);
}
}
.setting-item-action {
width: 40px;
min-width: 40px;
}
}
</style>
2 changes: 2 additions & 0 deletions frontend/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import SettingDict from "@/view/setting/SettingDict.vue";
import SettingSoftware from "@/view/setting/SettingSoftware.vue";
import SettingTheme from "@/view/setting/SettingTheme.vue";
import SettingPlugin from "@/view/setting/SettingPlugin.vue";
import SettingUpdater from "@/view/setting/SettingUpdate.vue";

export default [
{ path: '/', component: MainWindow },
Expand All @@ -46,6 +47,7 @@ export default [
{ path: 'terms', component: terms_and_service },
{ path: 'license', component: license_md },
{ path: 'about', component: about_md },
{ path: 'update', component: SettingUpdater },

]},
{
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/view/about/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<template>
<div class="container about-view">
<div class="about-title">
<h1>About</h1>
<!-- <h1>About</h1> -->
</div>
<div class="about-body">
<section class="about-section">
Expand Down
65 changes: 65 additions & 0 deletions frontend/src/view/setting/SettingUpdate.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<template>
<div class="setting-main-container" ref="containerRef">
<div class="setting-main-container-header">
<h3>检查更新</h3>
</div>

<div class="setting-main-container-content">
<n-card class="setting-section">
<SettingItem title="最新版本" :value="latestVersion">
<template #action>
<button class="btn btn-default" @click="checkLatestVersion">检查新版本</button>
</template>
</SettingItem>

</n-card>
</div>
</div>
</template>
<script lang="ts" setup>
import { NCard, NAffix, NTag } from 'naive-ui';
import { ref,onMounted } from 'vue';
import SettingItem from "@/components/setting/SettingItem.vue";
const containerRef = ref<any>();
const latestVersion = ref("3.0.1-alpha");
function checkLatestVersion() {
}
onMounted(()=>{
})
</script>

<style lang="scss" scoped>
@import '@/style/variables.scss';
@import '@/style/photon/photon.scss';
.setting-main-container {
height: 100%;
width: 100%;
overflow-y: auto;
margin: 0;
padding: 0;
.setting-main-container-header {
display: flex;
z-index: 99;
background: #fff;
padding-left: 10px;
}
.setting-main-container-content {
padding: 10px;
.setting-section{
margin: 6px auto;
}
}
}
</style>

6 changes: 5 additions & 1 deletion frontend/src/view/setting/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,17 @@
<router-link to="/docs"> 使用说明</router-link>
</span>
<span class="nav-group-item">
<span class="icon icon-alert"></span>
<span class="icon icon-feather"></span>
<router-link to="/setting/terms"> 隐私声明</router-link>
</span>
<span class="nav-group-item">
<span class="icon icon-info-circled"></span>
<router-link to="/setting/about"> 关于信息</router-link>
</span>
<span class="nav-group-item">
<span class="icon icon-arrows-ccw"></span>
<router-link to="/setting/update"> 版本更新</router-link>
</span>
<span class="nav-group-item">
<span class="icon icon-cc"></span>
<router-link to="/setting/license"> 开源协议</router-link>
Expand Down

0 comments on commit 82247e5

Please sign in to comment.