Skip to content

Commit

Permalink
upgrage
Browse files Browse the repository at this point in the history
  • Loading branch information
niuhuan committed Sep 16, 2022
1 parent 1d22a62 commit 700da82
Show file tree
Hide file tree
Showing 22 changed files with 327 additions and 74 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,32 +58,32 @@ jobs:
config:
- target: linux
host: ubuntu-latest
flutter_version: '3.3.0'
flutter_channel: 'beta'
flutter_version: '3.3.2'
flutter_channel: 'stable'
- target: windows
host: windows-latest
flutter_version: '3.3.0'
flutter_version: '3.3.2'
flutter_channel: 'stable'
- target: macos
host: macos-latest
flutter_version: '3.3.0'
flutter_version: '3.3.2'
flutter_channel: 'stable'
- target: ios
host: macos-latest
flutter_version: '3.3.0'
flutter_version: '3.3.2'
flutter_channel: 'stable'
- target: android-arm32
host: ubuntu-latest
flutter_version: '3.3.0'
flutter_channel: 'beta'
flutter_version: '3.3.2'
flutter_channel: 'stable'
- target: android-arm64
host: ubuntu-latest
flutter_version: '3.3.0'
flutter_channel: 'beta'
flutter_version: '3.3.2'
flutter_channel: 'stable'
- target: android-x86_64
host: ubuntu-latest
flutter_version: '3.3.0'
flutter_channel: 'beta'
flutter_version: '3.3.2'
flutter_channel: 'stable'
- target: android-arm32
host: ubuntu-latest
flutter_version: '2.10.5'
Expand Down
20 changes: 0 additions & 20 deletions LICENSE

This file was deleted.

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Jasmine Comic
=============
[![license](https://img.shields.io/github/license/niuhuan/jasmine)](https://raw.githubusercontent.com/niuhuan/jasmine/master/LICENSE)
[![releases](https://img.shields.io/github/v/release/niuhuan/jasmine)](https://github.com/niuhuan/jasmine/releases)
[![downloads](https://img.shields.io/github/downloads/niuhuan/jasmine/total)](https://github.com/niuhuan/jasmine/releases)

一个简单易用的漫画二次元客户端,同时支持支持 Android / iOS / MacOS / Windows.

Expand Down Expand Up @@ -38,7 +36,7 @@ Jasmine Comic
- [x] 用户
- [x] 登录/注册
- [x] 设备优化
- [x] 安卓的120Hz或更高评率屏幕的支持
- [x] 安卓的高刷新率屏幕的支持

## 技术架构

Expand Down
2 changes: 1 addition & 1 deletion ci/version.code.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.3.1
v1.3.2
12 changes: 3 additions & 9 deletions ci/version.info.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
v1.3.1
v1.3.2

- [x] 🚀代理设置(包括初始化)
- [x] 🚀鼠标侧键返回
- [x] 🚀使得导出的zip可预览
- [x] 🚀登录成功后自动同步发电时间
- [x] 🚀分离设置和关于
- [x] 🐛安卓12文件权限
- [x] 🐛修复收藏夹分类
- [x] 🐛夜间主题看不清楚输入框的字
- [x] 🐛修复登录不成功的问题
- [x] 🚀WebDav同步
10 changes: 5 additions & 5 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ PODS:
- DKImagePickerController/PhotoGallery
- Flutter
- Flutter (1.0.0)
- "permission_handler (5.1.0+2)":
- permission_handler_apple (9.0.4):
- Flutter
- SDWebImage (5.12.5):
- SDWebImage/Core (= 5.12.5)
Expand All @@ -46,7 +46,7 @@ PODS:
DEPENDENCIES:
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- Flutter (from `Flutter`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)

SPEC REPOS:
Expand All @@ -61,8 +61,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/file_picker/ios"
Flutter:
:path: Flutter
permission_handler:
:path: ".symlinks/plugins/permission_handler/ios"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"

Expand All @@ -71,7 +71,7 @@ SPEC CHECKSUMS:
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: 817ab1d8cd2da9d2da412a417162deee3500fc95
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
SDWebImage: 0905f1b7760fc8ac4198cae0036600d67478751e
SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
Expand Down
17 changes: 13 additions & 4 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down Expand Up @@ -364,7 +364,7 @@
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -373,11 +373,14 @@
"$(inherited)",
"$(PROJECT_DIR)",
);
MACOSX_DEPLOYMENT_TARGET = 11.3;
PRODUCT_BUNDLE_IDENTIFIER = niuhuan.jasmine;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 11.1;
VERSIONING_SYSTEM = "apple-generic";
WATCHOS_DEPLOYMENT_TARGET = 8.1;
};
name = Profile;
};
Expand Down Expand Up @@ -498,7 +501,7 @@
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -507,12 +510,15 @@
"$(inherited)",
"$(PROJECT_DIR)",
);
MACOSX_DEPLOYMENT_TARGET = 11.3;
PRODUCT_BUNDLE_IDENTIFIER = niuhuan.jasmine;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 11.1;
VERSIONING_SYSTEM = "apple-generic";
WATCHOS_DEPLOYMENT_TARGET = 8.1;
};
name = Debug;
};
Expand All @@ -526,7 +532,7 @@
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -535,11 +541,14 @@
"$(inherited)",
"$(PROJECT_DIR)",
);
MACOSX_DEPLOYMENT_TARGET = 11.3;
PRODUCT_BUNDLE_IDENTIFIER = niuhuan.jasmine;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 11.1;
VERSIONING_SYSTEM = "apple-generic";
WATCHOS_DEPLOYMENT_TARGET = 8.1;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion lib/basic/entities.dart
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ class SelfInfo {
late final String fname;
late final String gender;
late final String message;
late final String coin;
late final int coin;
late final int albumFavorites;
late final String s;
late final String levelName;
Expand Down
4 changes: 4 additions & 0 deletions lib/basic/methods.dart
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,10 @@ class Methods {
return _invoke("get_proxy", "");
}

Future webDavSync(dynamic params) {
return _invoke("sync_webdav", params);
}

}

class _Response {
Expand Down
47 changes: 47 additions & 0 deletions lib/basic/web_dav_sync.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import 'package:flutter/material.dart';
import 'package:jasmine/basic/methods.dart';
import 'package:jasmine/configs/web_dav_url.dart';

import '../configs/is_pro.dart';
import '../configs/web_dav_password.dart';
import '../configs/web_dav_sync_switch.dart';
import '../configs/web_dav_username.dart';
import 'commons.dart';

Future webDavSync(BuildContext context) async {
try {
await methods.webDavSync({
"url": currentWebDavUrl,
"username": currentWebUserName,
"password": currentWebDavPassword,
"direction": "Merge",
});
defaultToast(context, "WebDav 同步成功");
} catch (e, s) {
print("$e\n$s");
defaultToast(context, "WebDav 同步失败 : $e");
}
}

Future webDavSyncAuto(BuildContext context) async {
if (currentWebDavSyncSwitch() && isPro) {
await webDavSync(context);
}
}

var syncing = false;

Widget webDavSyncClick(BuildContext context) {
return ListTile(
title: const Text("立即同步"),
onTap: () async {
if (syncing) return;
syncing = true;
try {
await webDavSync(context);
} finally {
syncing = false;
}
},
);
}
8 changes: 8 additions & 0 deletions lib/configs/configs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import 'package:jasmine/configs/pager_cover_rate.dart';
import 'package:jasmine/configs/proxy.dart';
import 'package:jasmine/configs/theme.dart';
import 'package:jasmine/configs/using_right_click_pop.dart';
import 'package:jasmine/configs/web_dav_password.dart';
import 'package:jasmine/configs/web_dav_sync_switch.dart';
import 'package:jasmine/configs/web_dav_url.dart';
import 'package:jasmine/configs/web_dav_username.dart';

import 'auto_clean.dart';
import 'is_pro.dart';
Expand Down Expand Up @@ -41,5 +45,9 @@ Future initConfigs() async {
await initDownloadThreadCount();
await initProxy();
await initUsingRightClickPop();
await initWebDavSyncSwitch();
await initWebDavUrl();
await initWebDavUserName();
await initWebDavPassword();
initLogin();
}
47 changes: 47 additions & 0 deletions lib/configs/web_dav_password.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

import 'package:flutter/material.dart';

import '../basic/commons.dart';
import '../basic/methods.dart';

late String _currentWebDavPassword;
const _propertyName = "WebDavPassword";

String get currentWebDavPassword => _currentWebDavPassword;

Future<String?> initWebDavPassword() async {
_currentWebDavPassword = await methods.loadProperty(_propertyName);
return null;
}

String currentWebDavPasswordName() {
return _currentWebDavPassword == "" ? "未设置" : _currentWebDavPassword;
}

Future<dynamic> inputWebDavPassword(BuildContext context) async {
String? input = await displayTextInputDialog(
context,
src: _currentWebDavPassword,
title: 'WebDAV密码',
hint: '请输入WebDAV密码',
);
if (input != null) {
await methods.saveProperty(_propertyName, input);
_currentWebDavPassword = input;
}
}

Widget webDavPasswordSetting() {
return StatefulBuilder(
builder: (BuildContext context, void Function(void Function()) setState) {
return ListTile(
title: const Text("WebDAV密码"),
subtitle: Text(currentWebDavPasswordName()),
onTap: () async {
await inputWebDavPassword(context);
setState(() {});
},
);
},
);
}
Loading

0 comments on commit 700da82

Please sign in to comment.