Skip to content

Commit

Permalink
v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangtian616 committed Jul 8, 2022
1 parent 6b09ae5 commit dbe4538
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/src/l18n/en_US.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class en_US {
'youHaveLoggedInAs': 'Hello: ',
'cookieIsBlack': 'Cookie is Black',
'cookieFormatError': 'Cookie Format Error',
'invalidCookie': 'Invalid Cookie',
'invalidCookie': 'Login failed or invalid cookie',
'loginFail': 'Login Failed',
'userName': 'UserName',
'EHUser': 'EH User',
Expand Down
2 changes: 1 addition & 1 deletion lib/src/l18n/zh_CN.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class zh_CN {
'youHaveLoggedInAs': '您已登录: ',
'cookieIsBlack': 'cookie为空',
'cookieFormatError': 'cookie格式错误',
'invalidCookie': '无效的cookie',
'invalidCookie': '登陆失败或Cookie无效',
'loginFail': '登陆失败',
'userName': '用户名',
'EHUser': 'E站用户',
Expand Down
4 changes: 1 addition & 3 deletions lib/src/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ Future<void> init() async {
}

await PathSetting.init();

await GetStorage.init(StorageService.storageFileName);
StorageService.init();
await StorageService.init();

await AdvancedSetting.init();
await SecuritySetting.init();
Expand Down
4 changes: 0 additions & 4 deletions lib/src/pages/home/home_page_logic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ class HomePageLogic extends GetxController {
if (AdvancedSetting.enableCheckUpdate.isFalse) {
return;
}
/// todo: https://github.com/fluttercommunity/plus_plugins/issues/929
if (GetPlatform.isWindows) {
return;
}

String url = 'https://api.github.com/repos/jiangtian616/JHenTai/releases';
String latestVersion;
Expand Down
6 changes: 4 additions & 2 deletions lib/src/service/storage_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ class StorageService extends GetxService {

final GetStorage _storage = GetStorage(storageFileName, PathSetting.appSupportDir.path);

static void init() {
Get.put(StorageService());
static Future<void> init() async {
StorageService storageService = StorageService();
Get.put(storageService);
await storageService._storage.initStorage;
Log.verbose('init StorageService success', false);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/src/setting/path_setting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ class PathSetting {
/// visible on ios&windows
static Directory? appDocDir;

/// visible on ios&android&windows
/// visible on windows
static late Directory appSupportDir;

/// visible only on android
/// visible on android
static Directory? externalStorageDir;

static Future<void> init() async {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: jhentai
description: A flutter app for E-Hentai/EXHentai

publish_to: 'none'
version: 1.7.1+42
version: 2.0.0+43

environment:
sdk: ">=2.16.1 <3.0.0"
Expand Down
7 changes: 7 additions & 0 deletions windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version=$(head -n 5 pubspec.yaml | tail -n 1 | cut -d ' ' -f 2)

flutter build windows -t lib/src/main.dart \
&& cp -r build/windows/runner/Release/ ~/Desktop/JHenTai_${version}_windows/ \
&& cd ~/Desktop \
&& zip -ro JHenTai_${version}_windows.zip JHenTai_${version}_windows \
&& rm -rf JHenTai_${version}_windows
4 changes: 2 additions & 2 deletions windows/runner/Runner.rc
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ IDI_APP_ICON ICON "resources\\app_icon.ico"
#ifdef FLUTTER_BUILD_NUMBER
#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER
#else
#define VERSION_AS_NUMBER 1,0,0
#define VERSION_AS_NUMBER 2,0,0
#endif

#ifdef FLUTTER_BUILD_NAME
#define VERSION_AS_STRING #FLUTTER_BUILD_NAME
#else
#define VERSION_AS_STRING "1.0.0"
#define VERSION_AS_STRING "2.0.0"
#endif

VS_VERSION_INFO VERSIONINFO
Expand Down

0 comments on commit dbe4538

Please sign in to comment.