Skip to content

Commit

Permalink
feat: how to update app version
Browse files Browse the repository at this point in the history
  • Loading branch information
lastsunday committed Jul 15, 2024
1 parent c044de6 commit f88c424
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

1. (SidePanel)为首页,设置页面添加漫游式引导。
2. (SidePanel)添加版本说明,许可证。
3. (SidePanel)新版本检查,查看新版本更新历史,下载新版本安装文件。
3. (SidePanel)新版本检查,查看新版本更新历史,下载新版本安装文件,如何更新程序版本

### 🐛 Fixed

Expand Down
4 changes: 3 additions & 1 deletion src/common/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ export const GITHUB_APP_REPO = "lastsunday/job-hunting-github-app";
export const URL_POST_ISSUES = "https://api.github.com/repos/lastsunday/job-hunting-github-app/issues";
export const COMMENT_PAGE_SIZE = 20;

export const APP_URL_LATEST_VERSION = "https://api.github.com/repos/lastsunday/job-hunting/releases/latest";
export const APP_URL_LATEST_VERSION = "https://api.github.com/repos/lastsunday/job-hunting/releases/latest";

export const APP_ID = "boibmngajpgmamamchfhahehbkdfilam";
24 changes: 22 additions & 2 deletions src/sidepanel/views/SettingView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@
</span>
</el-col>
<el-col class="appInfoOperation">
<el-button @click="updateAppDialogVisible = true">
如何更新程序版本<el-icon class="el-icon--right">
<Icon icon="ph:question" />
</el-icon>
</el-button>
<el-button @click="changelogDialogVisible = true">
版本说明
</el-button>
Expand Down Expand Up @@ -218,7 +223,7 @@
</el-dialog>
<el-dialog v-model="reloadDialogVisible" title="数据恢复成功" width="500" :close-on-click-modal="false"
:close-on-press-escape="false" :show-close="false">
<span>点击确定按钮重启插件</span>
<span>点击确定按钮重启程序</span>
<template #footer>
<el-row class="dialog_menu">
<el-button type="primary" @click="reloadExtension"> 确定 </el-button>
Expand Down Expand Up @@ -265,6 +270,20 @@
</div>
</template>
</el-dialog>
<el-dialog v-model="updateAppDialogVisible" title="如何更新程序版本" width="800">
<div>
<el-text>1.下载新版本程序安装文件(zip格式文件)</el-text>
</div>
<div>
<el-text>2.解压程序安装文件</el-text>
</div>
<div>
<el-text>3.访问 chrome://extensions/ 地址,点击加载已解压的扩展程序,选择解压后 manifest.json 文件所在的目录</el-text>
</div>
<div>
<el-text>4.ID为【{{APP_ID}}】的程序版本为新版本,即更新成功</el-text>
</div>
</el-dialog>
<el-dialog v-model="changelogDialogVisible" title="版本说明" width="800">
<div v-html="changelogContentHtml"></div>
</el-dialog>
Expand All @@ -291,7 +310,7 @@ import { CompanyBO } from "../../common/data/bo/companyBO";
import { genIdFromText, convertDateStringToDateObject } from "../../common/utils";
import { Icon } from '@iconify/vue';
import { marked } from "marked";
import { APP_URL_LATEST_VERSION } from "../../common/config";
import { APP_URL_LATEST_VERSION,APP_ID } from "../../common/config";
import semver from "semver";
const activeName = ref("export");
Expand Down Expand Up @@ -722,6 +741,7 @@ const latestVersionCreatedAt = ref();
const checkingVersionText = ref("正检查新版本");
const latestChangelogDialogVisible = ref(false);
const latestChangelogContent = ref();
const updateAppDialogVisible = ref(false);
onMounted(async () => {
await checkLoginStatus()
Expand Down

0 comments on commit f88c424

Please sign in to comment.