File tree 2 files changed +7
-8
lines changed
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
export const ExtVersion = "0.10.2" ;
2
2
3
- export const ExtServer =
4
- process . env . NODE_ENV === "development"
5
- ? "http://localhost:8080/"
6
- : "https://ext.scriptcat.org/" ;
3
+ export const ExtServer = "https://ext.scriptcat.org/" ;
7
4
8
5
export const ExternalWhitelist = [
9
6
"greasyfork.org" ,
Original file line number Diff line number Diff line change @@ -131,10 +131,10 @@ function Tools() {
131
131
) ;
132
132
try {
133
133
fs = await fs . openDir ( "ScriptCat" ) ;
134
- const list = await fs . list ( ) ;
134
+ let list = await fs . list ( ) ;
135
135
list . sort ( ( a , b ) => b . updatetime - a . updatetime ) ;
136
136
// 过滤掉非zip文件
137
- list . filter ( ( file ) => file . name . endsWith ( ".zip" ) ) ;
137
+ list = list . filter ( ( file ) => file . name . endsWith ( ".zip" ) ) ;
138
138
if ( list . length === 0 ) {
139
139
Message . info ( "没有备份文件" ) ;
140
140
return ;
@@ -177,13 +177,14 @@ function Tools() {
177
177
size = "small"
178
178
onClick = { async ( ) => {
179
179
Message . info ( "正在从云端拉取数据" ) ;
180
- const fs = await FileSystemFactory . create (
180
+ let fs = await FileSystemFactory . create (
181
181
fileSystemType ,
182
182
fileSystemParams
183
183
) ;
184
184
let file : FileReader ;
185
185
let data : Blob ;
186
186
try {
187
+ fs = await fs . openDir ( "ScriptCat" ) ;
187
188
file = await fs . open ( item ) ;
188
189
data = ( await file . read ( "blob" ) ) as Blob ;
189
190
} catch ( e ) {
@@ -215,11 +216,12 @@ function Tools() {
215
216
title : "确认删除" ,
216
217
content : `确认删除备份文件${ item . name } ?` ,
217
218
onOk : async ( ) => {
218
- const fs = await FileSystemFactory . create (
219
+ let fs = await FileSystemFactory . create (
219
220
fileSystemType ,
220
221
fileSystemParams
221
222
) ;
222
223
try {
224
+ fs = await fs . openDir ( "ScriptCat" ) ;
223
225
await fs . delete ( item . name ) ;
224
226
setBackupFileList (
225
227
backupFileList . filter (
You can’t perform that action at this time.
0 commit comments