Skip to content

Commit f95ba6a

Browse files
committed
feat: Gist 备份默认为 Base64 编码方式
1 parent 77942a3 commit f95ba6a

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sub-store-front-end",
3-
"version": "2.15.50",
3+
"version": "2.15.51",
44
"private": true,
55
"scripts": {
66
"dev": "vite --host",

src/api/settings/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function useSettingsApi() {
1616
data,
1717
});
1818
},
19-
syncSettings: (query: 'download' | 'upload', options?: { keep?: string[], encode?: 'base64' | 'plain' }): AxiosPromise<MyAxiosRes> => {
19+
syncSettings: (query: 'download' | 'upload', options?: { keep?: string[], encode?: 'base64' | 'plaintext' }): AxiosPromise<MyAxiosRes> => {
2020
return request({
2121
url: `/api/utils/backup`,
2222
method: 'get',

src/views/My.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ const upload = async() => {
473473
}
474474
}
475475
476-
const sync = async (query: "download" | "upload", options?: { keep?: string[], encode?: 'base64' | 'plain' }) => {
476+
const sync = async (query: "download" | "upload", options?: { keep?: string[], encode?: 'base64' | 'plaintext' }) => {
477477
switch (query) {
478478
case "download":
479479
downloadIsLoading.value = true;
@@ -513,7 +513,9 @@ const uploadBtn = () => {
513513
content: '若选择明文, 将不会保留 GitHub Token. 若选择 Base64 编码, 将完整保留数据(后端版本必须 >= 2.19.85)',
514514
footerDirection: 'vertical',
515515
onCancel: () => {
516-
sync('upload');
516+
sync('upload', {
517+
encode: 'plaintext'
518+
});
517519
},
518520
cancelText: '明文(将不会保留 GitHub Token)',
519521
okText: 'Base64 编码上传',

0 commit comments

Comments
 (0)