M android/app/src/main/AndroidManifest.xml => android/app/src/main/AndroidManifest.xml +1 -1
@@ 10,7 10,7 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:name="io.flutter.app.FlutterApplication"
- android:label="fluent_reader_lite"
+ android:label="Fluent Reader"
android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true">
<activity
A android/app/src/main/ic_launcher-playstore.png => android/app/src/main/ic_launcher-playstore.png +0 -0
M android/app/src/main/res/drawable/launch_background.xml => android/app/src/main/res/drawable/launch_background.xml +3 -4
@@ 3,10 3,9 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
- <!-- You can insert your own image assets here -->
- <!-- <item>
+ <item>
<bitmap
android:gravity="center"
- android:src="@mipmap/launch_image" />
- </item> -->
+ android:src="@mipmap/logo" />
+ </item>
</layer-list>
A android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml => android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
@@ 0,0 1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@color/ic_launcher_background"/>
+ <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
+</adaptive-icon><
\ No newline at end of file
A android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml => android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
@@ 0,0 1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@color/ic_launcher_background"/>
+ <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
+</adaptive-icon><
\ No newline at end of file
M android/app/src/main/res/mipmap-hdpi/ic_launcher.png => android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
A android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png => android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
A android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png => android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
M android/app/src/main/res/mipmap-mdpi/ic_launcher.png => android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
A android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png => android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
A android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png => android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
M android/app/src/main/res/mipmap-xhdpi/ic_launcher.png => android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
A android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png => android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
A android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png => android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
M android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png => android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
A android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png => android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
A android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png => android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
M android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png => android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
A android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png => android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
A android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png => android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
A android/app/src/main/res/mipmap-xxxhdpi/logo.png => android/app/src/main/res/mipmap-xxxhdpi/logo.png +0 -0
A android/app/src/main/res/values/ic_launcher_background.xml => android/app/src/main/res/values/ic_launcher_background.xml +4 -0
@@ 0,0 1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="ic_launcher_background">#FFFFFF</color>
+</resources><
\ No newline at end of file
M ios/Podfile.lock => ios/Podfile.lock +6 -6
@@ 1,5 1,7 @@
PODS:
- Flutter (1.0.0)
+ - flutter_inappwebview (0.0.1):
+ - Flutter
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
@@ 16,18 18,16 @@ PODS:
- FMDB (>= 2.7.5)
- url_launcher (0.0.1):
- Flutter
- - webview_flutter (0.0.1):
- - Flutter
DEPENDENCIES:
- Flutter (from `Flutter`)
+ - flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
- package_info (from `.symlinks/plugins/package_info/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- share (from `.symlinks/plugins/share/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
- - webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
SPEC REPOS:
trunk:
@@ 36,6 36,8 @@ SPEC REPOS:
EXTERNAL SOURCES:
Flutter:
:path: Flutter
+ flutter_inappwebview:
+ :path: ".symlinks/plugins/flutter_inappwebview/ios"
package_info:
:path: ".symlinks/plugins/package_info/ios"
path_provider:
@@ 48,11 50,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/sqflite/ios"
url_launcher:
:path: ".symlinks/plugins/url_launcher/ios"
- webview_flutter:
- :path: ".symlinks/plugins/webview_flutter/ios"
SPEC CHECKSUMS:
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
+ flutter_inappwebview: 69dfbac46157b336ffbec19ca6dfd4638c7bf189
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
@@ 60,7 61,6 @@ SPEC CHECKSUMS:
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
- webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
A ios/Runner/Assets.xcassets/LaunchImage.imageset/128x128.png => ios/Runner/Assets.xcassets/LaunchImage.imageset/128x128.png +0 -0
A ios/Runner/Assets.xcassets/LaunchImage.imageset/256x256.png => ios/Runner/Assets.xcassets/LaunchImage.imageset/256x256.png +0 -0
A ios/Runner/Assets.xcassets/LaunchImage.imageset/512x512.png => ios/Runner/Assets.xcassets/LaunchImage.imageset/512x512.png +0 -0
M ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json => ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +5 -5
@@ 1,23 1,23 @@
{
"images" : [
{
+ "filename" : "128x128.png",
"idiom" : "universal",
- "filename" : "LaunchImage.png",
"scale" : "1x"
},
{
+ "filename" : "256x256.png",
"idiom" : "universal",
- "filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
+ "filename" : "512x512.png",
"idiom" : "universal",
- "filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
- "version" : 1,
- "author" : "xcode"
+ "author" : "xcode",
+ "version" : 1
}
}
D ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png => ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
D ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png => ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
D ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png => ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
M ios/Runner/Base.lproj/LaunchScreen.storyboard => ios/Runner/Base.lproj/LaunchScreen.storyboard +14 -6
@@ 1,8 1,11 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+ <device id="retina5_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17505"/>
+ <capability name="System colors in document resources" minToolsVersion="11.0"/>
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
@@ 14,12 17,14 @@
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+ <rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
+ <rect key="frame" x="102.33333333333333" y="320.66666666666669" width="170.66666666666669" height="170.66666666666669"/>
</imageView>
</subviews>
- <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
@@ 28,10 33,13 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="53" y="375"/>
+ <point key="canvasLocation" x="76.811594202898561" y="251.11607142857142"/>
</scene>
</scenes>
<resources>
- <image name="LaunchImage" width="168" height="185"/>
+ <image name="LaunchImage" width="170.66667175292969" height="170.66667175292969"/>
+ <systemColor name="systemBackgroundColor">
+ <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ </systemColor>
</resources>
</document>
M lib/pages/article_page.dart => lib/pages/article_page.dart +7 -3
@@ 66,7 66,7 @@ class ArticlePageState extends State<ArticlePage> {
}
Future<ShouldOverrideUrlLoadingAction> _onNavigate(_, ShouldOverrideUrlLoadingRequest request) async {
- if (loaded && request.isForMainFrame) {
+ if (navigated && request.isForMainFrame) {
await launch(request.url);
return ShouldOverrideUrlLoadingAction.CANCEL;
}
@@ 105,8 105,11 @@ class ArticlePageState extends State<ArticlePage> {
void _onPageReady(_, String url) async {
if (url != "about:blank") {
- _controller.evaluateJavascript(source: 'r("$localParams")');
- setState(() { loaded = true; });
+ if (localParams != null) {
+ _controller.evaluateJavascript(source: 'r("$localParams")');
+ setState(() { loaded = true; });
+ }
+ navigated = true;
}
}
@@ 133,6 136,7 @@ class ArticlePageState extends State<ArticlePage> {
case SourceOpenTarget.External:
localParams = null;
_controller.loadUrl(url: item.link);
+ setState(() { loaded = true; });
break;
}
}
M lib/pages/settings/services/feedbin_page.dart => lib/pages/settings/services/feedbin_page.dart +11 -6
@@ 9,6 9,7 @@ import 'package:fluent_reader_lite/utils/global.dart';
import 'package:fluent_reader_lite/utils/store.dart';
import 'package:fluent_reader_lite/utils/utils.dart';
import 'package:flutter/cupertino.dart';
+import 'package:overlay_dialog/overlay_dialog.dart';
import 'package:provider/provider.dart';
class FeedbinPage extends StatefulWidget {
@@ 72,6 73,10 @@ class _FeedbinPageState extends State<FeedbinPage> {
_fetchLimit,
);
setState(() { _validating = true; });
+ DialogHelper().show(
+ context,
+ DialogWidget.progress(style: DialogStyle.cupertino),
+ );
final isValid = await handler.validate();
if (!mounted) return;
if (isValid) {
@@ 82,6 87,7 @@ class _FeedbinPageState extends State<FeedbinPage> {
if (mounted) Navigator.of(context).pop();
} else {
setState(() { _validating = false; });
+ DialogHelper().hide(context);
Utils.showServiceFailureDialog(context);
}
}
@@ 111,8 117,11 @@ class _FeedbinPageState extends State<FeedbinPage> {
);
if (confirmed != null) {
setState(() { _validating = true; });
+ DialogHelper().show(
+ context,
+ DialogWidget.progress(style: DialogStyle.cupertino),
+ );
await Global.syncModel.removeService();
- setState(() { _validating = false; });
final navigator = Navigator.of(context);
while (navigator.canPop()) navigator.pop();
}
@@ 211,7 220,7 @@ class _FeedbinPageState extends State<FeedbinPage> {
], title: "");
},
);
- final page = CupertinoPageScaffold(
+ return CupertinoPageScaffold(
backgroundColor: MyColors.background,
navigationBar: CupertinoNavigationBar(
middle: Text("Feedbin"),
@@ 223,9 232,5 @@ class _FeedbinPageState extends State<FeedbinPage> {
if (Global.service != null) logOutButton,
]),
);
- return WillPopScope(
- child: page,
- onWillPop: () async => !_validating,
- );
}
}
M lib/pages/settings/services/fever_page.dart => lib/pages/settings/services/fever_page.dart +15 -12
@@ 12,6 12,7 @@ import 'package:fluent_reader_lite/utils/global.dart';
import 'package:fluent_reader_lite/utils/store.dart';
import 'package:fluent_reader_lite/utils/utils.dart';
import 'package:flutter/cupertino.dart';
+import 'package:overlay_dialog/overlay_dialog.dart';
import 'package:provider/provider.dart';
class FeverPage extends StatefulWidget {
@@ 75,6 76,10 @@ class _FeverPageState extends State<FeverPage> {
_fetchLimit
);
setState(() { _validating = true; });
+ DialogHelper().show(
+ context,
+ DialogWidget.progress(style: DialogStyle.cupertino),
+ );
final isValid = await handler.validate();
if (!mounted) return;
if (isValid) {
@@ 85,6 90,7 @@ class _FeverPageState extends State<FeverPage> {
if (mounted) Navigator.of(context).pop();
} else {
setState(() { _validating = false; });
+ DialogHelper().hide(context);
Utils.showServiceFailureDialog(context);
}
}
@@ 114,8 120,11 @@ class _FeverPageState extends State<FeverPage> {
);
if (confirmed != null) {
setState(() { _validating = true; });
+ DialogHelper().show(
+ context,
+ DialogWidget.progress(style: DialogStyle.cupertino),
+ );
await Global.syncModel.removeService();
- setState(() { _validating = false; });
final navigator = Navigator.of(context);
while (navigator.canPop()) navigator.pop();
}
@@ 178,12 187,10 @@ class _FeverPageState extends State<FeverPage> {
return ListTileGroup([
MyListTile(
title: Expanded(child: Center(
- child: _validating
- ? CupertinoActivityIndicator()
- : Text(
- S.of(context).save,
- style: saveStyle,
- )
+ child: Text(
+ S.of(context).save,
+ style: saveStyle,
+ )
)),
onTap: canSave ? _save : null,
trailingChevron: false,
@@ 214,7 221,7 @@ class _FeverPageState extends State<FeverPage> {
], title: "");
},
);
- final page = CupertinoPageScaffold(
+ return CupertinoPageScaffold(
backgroundColor: MyColors.background,
navigationBar: CupertinoNavigationBar(
middle: Text("Fever API"),
@@ 226,9 233,5 @@ class _FeverPageState extends State<FeverPage> {
if (Global.service != null) logOutButton,
]),
);
- return WillPopScope(
- child: page,
- onWillPop: () async => !_validating,
- );
}
}
M pubspec.lock => pubspec.lock +7 -0
@@ 238,6 238,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.0"
+ overlay_dialog:
+ dependency: "direct main"
+ description:
+ name: overlay_dialog
+ url: "https://pub.flutter-io.cn"
+ source: hosted
+ version: "0.0.3"
package_info:
dependency: "direct main"
description:
M pubspec.yaml => pubspec.yaml +1 -0
@@ 42,6 42,7 @@ dependencies:
cached_network_image: ^2.5.0
flutter_cache_manager: ^2.1.0
modal_bottom_sheet: ^1.0.0+1
+ overlay_dialog: ^0.0.3
# The following adds the Cupertino Icons font to your application.