Skip to content

Commit

Permalink
(version) Update version [pre-upload]
Browse files Browse the repository at this point in the history
  • Loading branch information
violet-dev committed Sep 8, 2021
1 parent 124139b commit 8554987
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 12 deletions.
3 changes: 2 additions & 1 deletion android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }
-dontwarn io.flutter.embedding.**
-dontwarn io.flutter.embedding.**
-keep class de.prosiebensat1digital.** { *; }
9 changes: 8 additions & 1 deletion lib/pages/main/patchnote/patchnote_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,16 @@ class PatchModel {
}

final patches = [
PatchModel(
dateTime: DateTime(2021, 9, 8),
version: '1.14.1 Patch Update <== Latest',
contents: [
'change some uis',
],
),
PatchModel(
dateTime: DateTime(2021, 8, 21),
version: '1.14 Minor Update <== Latest',
version: '1.14 Minor Update',
isMinor: true,
contents: [
'add hitomi image route script',
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/settings/version_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class VersionViewPage extends StatelessWidget {
style: TextStyle(fontSize: 30),
),
Text(
'1.14.0',
'1.14.1',
style: TextStyle(fontSize: 20),
),
Text(''),
Expand Down
22 changes: 17 additions & 5 deletions lib/script/script_manager.dart
Original file line number Diff line number Diff line change
@@ -1,34 +1,46 @@
// This source code is a part of Project Violet.
// Copyright (C) 2020-2021.violet-team. Licensed under the Apache-2.0 License.

import 'package:flutter_js/flutter_js.dart';
import 'package:tuple/tuple.dart';
import 'package:violet/log/log.dart';
import 'package:violet/network/wrapper.dart' as http;
import 'package:violet/script/script_runner.dart';
import 'package:violet/thread/semaphore.dart';

class ScriptManager {
static Map<String, ScriptCache> _caches;
static Map<String, String> _caches;

static Map<String, String> _codeUrls = {
'hitomi_get_image_list':
'https://raw.githubusercontent.com/project-violet/scripts/main/hitomi_get_image_list.py',
};

static Future<void> init() async {
_caches = Map<String, ScriptCache>();
_caches = Map<String, String>();

for (var kv in _codeUrls.entries) {
var code = await http.get(kv.value);
_caches[kv.key] = ScriptCache(code.body);
_caches[kv.key] = code.body;
}
}

static Future<Tuple3<List<String>, List<String>, List<String>>>
runHitomiGetImageList(int id) async {
if (_caches == null) return null;
JavascriptRuntime flutterJs;
flutterJs = getJavascriptRuntime();
flutterJs.evaluate(_caches['hitomi_get_image_list']);
var downloadUrl =
flutterJs.evaluate("create_download_url($id)").rawResult as String;
//var galleryInfo = await http.get("https://ltn.hitomi.la/galleries/$id.js");
var galleryInfo = await http.get(downloadUrl);
final jResult = flutterJs.evaluate("hitomi_get_image_list($galleryInfo)");

var isolate = ScriptIsolate(_caches['hitomi_get_image_list']);
return null;
//jResult.

/*var isolate = ScriptIsolate(_caches['hitomi_get_image_list']);
var isRelease = false;
try {
Expand All @@ -53,6 +65,6 @@ class ScriptManager {
'\n' +
st.toString());
}
return null;
return null;*/
}
}
2 changes: 1 addition & 1 deletion lib/version/update_sync.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class UpdateSyncManager {
// Current version
static const int majorVersion = 1;
static const int minorVersion = 14;
static const int patchVersion = 0;
static const int patchVersion = 1;

static String get currentVersion =>
'$majorVersion.$minorVersion.$patchVersion';
Expand Down
18 changes: 16 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
flutter_js:
dependency: "direct main"
description:
name: flutter_js
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.0+3"
flutter_localizations:
dependency: "direct main"
description: flutter
Expand Down Expand Up @@ -792,7 +799,7 @@ packages:
name: nested
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4"
version: "1.0.0"
node_interop:
dependency: transitive
description:
Expand Down Expand Up @@ -974,7 +981,7 @@ packages:
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "4.3.1"
version: "5.0.0"
pub_semver:
dependency: transitive
description:
Expand Down Expand Up @@ -1148,6 +1155,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
sync_http:
dependency: transitive
description:
name: sync_http
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
synchronized:
dependency: "direct main"
description:
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: Open Source Hentai Viewer App
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.14.0+0
version: 1.14.1+0

publish_to: none

Expand Down Expand Up @@ -69,6 +69,7 @@ dependencies:
flutter_speed_dial:
flutter_staggered_animations: ^1.0.0
flutter_svg: ^0.21.0+1
flutter_js:
fluttertoast:
freezed_annotation:
get: ^4.1.4
Expand Down

0 comments on commit 8554987

Please sign in to comment.