mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de1f419d63 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.19.77",
|
"version": "2.19.78",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -120,8 +120,10 @@ async function gistBackupAction(action) {
|
|||||||
switch (action) {
|
switch (action) {
|
||||||
case 'upload':
|
case 'upload':
|
||||||
try {
|
try {
|
||||||
content = $.read('#sub-store');
|
content = JSON.parse($.read('#sub-store'));
|
||||||
if ($.env.isNode) content = JSON.stringify($.cache, null, ` `);
|
if ($.env.isNode) content = { ...$.cache };
|
||||||
|
content.settings.gistToken = '恢复后请重新设置 GitHub Token';
|
||||||
|
content = JSON.stringify(content, null, ` `);
|
||||||
$.info(`下载备份, 与本地内容对比...`);
|
$.info(`下载备份, 与本地内容对比...`);
|
||||||
const onlineContent = await gist.download(
|
const onlineContent = await gist.download(
|
||||||
GIST_BACKUP_FILE_NAME,
|
GIST_BACKUP_FILE_NAME,
|
||||||
@@ -137,8 +139,10 @@ async function gistBackupAction(action) {
|
|||||||
// update syncTime
|
// update syncTime
|
||||||
settings.syncTime = new Date().getTime();
|
settings.syncTime = new Date().getTime();
|
||||||
$.write(settings, SETTINGS_KEY);
|
$.write(settings, SETTINGS_KEY);
|
||||||
content = $.read('#sub-store');
|
content = JSON.parse($.read('#sub-store'));
|
||||||
if ($.env.isNode) content = JSON.stringify($.cache, null, ` `);
|
if ($.env.isNode) content = { ...$.cache };
|
||||||
|
content.settings.gistToken = '恢复后请重新设置 GitHub Token';
|
||||||
|
content = JSON.stringify(content, null, ` `);
|
||||||
$.info(`上传备份中...`);
|
$.info(`上传备份中...`);
|
||||||
try {
|
try {
|
||||||
await gist.upload({
|
await gist.upload({
|
||||||
|
|||||||
Reference in New Issue
Block a user