-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[+*]fix load & better icon & frpc utils(unfinished)
- Loading branch information
Showing
8 changed files
with
83 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import 'dart:convert'; | ||
import 'dart:io'; | ||
|
||
import 'package:nyalcf/util/FileIO.dart'; | ||
|
||
class FrpcManagerStorage { | ||
static final _s_path = FileIO.support_path; | ||
static Future<String> get _path async { | ||
return '${await _s_path}/frpc'; | ||
} | ||
|
||
static init() { | ||
Map<String, dynamic> json = Map(); | ||
json['versions'] = <String>[]; | ||
} | ||
|
||
/// 获取Frpc文件 | ||
static Future<File> getFile(String version) async { | ||
final name; | ||
if (Platform.isWindows) name = 'frpc.exe'; else name = 'frpc'; | ||
return File('${_path}/${version}/${name}'); | ||
} | ||
|
||
/// 获取已安装版本列表 | ||
static Future<List<String>> get versionList async { | ||
final infoString = File('${await _path}/info.json').readAsString(); | ||
final infoJson = jsonDecode(await infoString); | ||
final versions = infoJson['versions']; | ||
print(versions); | ||
return versions; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class SettingStorage { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters