diff --git a/lib/pages/main/faq/faq_page.dart b/lib/pages/main/faq/faq_page.dart index 4eed960ff..248a4e219 100644 --- a/lib/pages/main/faq/faq_page.dart +++ b/lib/pages/main/faq/faq_page.dart @@ -1,16 +1,271 @@ // This source code is a part of Project Violet. // Copyright (C) 2020. violet-team. Licensed under the Apache-2.0 License. +import 'package:expandable/expandable.dart'; import 'package:flutter/material.dart'; +import 'package:url_launcher/url_launcher.dart'; +import 'package:violet/settings/settings.dart'; -class FAQPage extends StatefulWidget { - @override - _FAQPageState createState() => _FAQPageState(); -} - -class _FAQPageState extends State { +class FAQPageKorean extends StatelessWidget { @override Widget build(BuildContext context) { - return Container(); + return Scaffold( + appBar: AppBar( + backgroundColor: Settings.majorColor, + title: Text('FAQ'), + ), + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + children: [ + ExpandableNotifier( + child: Padding( + padding: EdgeInsets.symmetric(vertical: 4.0), + child: ScrollOnExpand( + child: ExpandablePanel( + theme: ExpandableThemeData( + iconColor: + Settings.themeWhat ? Colors.white : Colors.grey, + animationDuration: const Duration(milliseconds: 500)), + header: Padding( + padding: EdgeInsets.fromLTRB(12, 12, 0, 0), + child: Text('하단 메뉴바가 안보입니다.'), + ), + expanded: Padding( + padding: EdgeInsets.fromLTRB(16, 4, 16, 4), + child: Column( + children: [ + Text( + '설정에서 Drawer 옵션이 켜져있는지 확인해주세요. Drawer 메뉴는 메인 화면에서 화면 왼쪽 끝에서 오른쪽으로 밀면 열 수 있습니다.', + style: TextStyle(fontSize: 12)), + ], + ), + ), + ), + ), + ), + ), + Container( + width: double.infinity, + height: 0.5, + color: Settings.themeWhat + ? Colors.grey.shade600 + : Colors.grey.shade400, + ), + ExpandableNotifier( + child: Padding( + padding: EdgeInsets.symmetric(vertical: 4.0), + child: ScrollOnExpand( + child: ExpandablePanel( + theme: ExpandableThemeData( + iconColor: + Settings.themeWhat ? Colors.white : Colors.grey, + animationDuration: const Duration(milliseconds: 500)), + header: Padding( + padding: EdgeInsets.fromLTRB(12, 12, 0, 0), + child: Text('썸네일들이 로딩이 안됩니다.'), + ), + expanded: Padding( + padding: EdgeInsets.fromLTRB(16, 4, 16, 4), + child: Column( + children: [ + Text( + 'VPN이나 DPI 우회 프로그램(1.1.1.1 또는 Intra 등)이 실행 중인지 확인해주세요.', + style: TextStyle(fontSize: 12)), + ], + ), + ), + ), + ), + ), + ), + Container( + width: double.infinity, + height: 0.5, + color: Settings.themeWhat + ? Colors.grey.shade600 + : Colors.grey.shade400, + ), + ExpandableNotifier( + child: Padding( + padding: EdgeInsets.symmetric(vertical: 4.0), + child: ScrollOnExpand( + child: ExpandablePanel( + theme: ExpandableThemeData( + iconColor: + Settings.themeWhat ? Colors.white : Colors.grey, + animationDuration: const Duration(milliseconds: 500)), + header: Padding( + padding: EdgeInsets.fromLTRB(12, 12, 0, 0), + child: Text('최신 작품들이 안보입니다.'), + ), + expanded: Padding( + padding: EdgeInsets.fromLTRB(16, 4, 16, 4), + child: Column( + children: [ + Text( + '데이터베이스를 동기화하거나 웹검색을 사용해주세요. 자세한건 하단 메뉴얼을 참고해주세요.', + style: TextStyle(fontSize: 12)), + ], + ), + ), + ), + ), + ), + ), + Container( + width: double.infinity, + height: 0.5, + color: Settings.themeWhat + ? Colors.grey.shade600 + : Colors.grey.shade400, + ), + ExpandableNotifier( + child: Padding( + padding: EdgeInsets.symmetric(vertical: 4.0), + child: ScrollOnExpand( + child: ExpandablePanel( + theme: ExpandableThemeData( + iconColor: + Settings.themeWhat ? Colors.white : Colors.grey, + animationDuration: const Duration(milliseconds: 500)), + header: Padding( + padding: EdgeInsets.fromLTRB(12, 12, 0, 0), + child: Text('북마크를 백업하고 싶어요.'), + ), + expanded: Padding( + padding: EdgeInsets.fromLTRB(16, 4, 16, 4), + child: Column( + children: [ + Text( + '설정 => 북마크 => 북마크 내보내기를 통해 북마크를 외부 저장소로 내보내고, /Android/data/xyz.project.violet/files/bookmark.db를 다른 안전한 장소에 백업해주세요. ' + '북마크를 안전한 장소에 백업하지않고 앱을 삭제하면 모든 정보가 삭제되니 주의해주세요.', + style: TextStyle(fontSize: 12)), + ], + ), + ), + ), + ), + ), + ), + Container( + width: double.infinity, + height: 0.5, + color: Settings.themeWhat + ? Colors.grey.shade600 + : Colors.grey.shade400, + ), + ExpandableNotifier( + child: Padding( + padding: EdgeInsets.symmetric(vertical: 4.0), + child: ScrollOnExpand( + child: ExpandablePanel( + theme: ExpandableThemeData( + iconColor: + Settings.themeWhat ? Colors.white : Colors.grey, + animationDuration: const Duration(milliseconds: 500)), + header: Padding( + padding: EdgeInsets.fromLTRB(12, 12, 0, 0), + child: Text('다운로드가 너무 느립니다.'), + ), + expanded: Padding( + padding: EdgeInsets.fromLTRB(16, 4, 16, 4), + child: Column( + children: [ + Text( + 'DPI Bypass 툴(Intra, 유니콘 등)이 실행중이라면 종료하고 재시도해보세요. 그래도 느리고, 느린이유가 앱 문제라고 생각한다면 오류 및 버그 항목으로 문의주세요.', + style: TextStyle(fontSize: 12)), + ], + ), + ), + ), + ), + ), + ), + Container( + width: double.infinity, + height: 0.5, + color: Settings.themeWhat + ? Colors.grey.shade600 + : Colors.grey.shade400, + ), + ExpandableNotifier( + child: Padding( + padding: EdgeInsets.symmetric(vertical: 4.0), + child: ScrollOnExpand( + child: ExpandablePanel( + theme: ExpandableThemeData( + iconColor: + Settings.themeWhat ? Colors.white : Colors.grey, + animationDuration: const Duration(milliseconds: 500)), + header: Padding( + padding: EdgeInsets.fromLTRB(12, 12, 0, 0), + child: Text('다운로드된 파일은 어디에 저장되나요?'), + ), + expanded: Padding( + padding: EdgeInsets.fromLTRB(16, 4, 16, 4), + child: Column( + children: [ + Text('기본적으로 외부 저장소의 Violet 폴더에 저장됩니다.', + style: TextStyle(fontSize: 12)), + ], + ), + ), + ), + ), + ), + ), + Container( + width: double.infinity, + height: 0.5, + color: Settings.themeWhat + ? Colors.grey.shade600 + : Colors.grey.shade400, + ), + ExpandableNotifier( + child: Padding( + padding: EdgeInsets.symmetric(vertical: 4.0), + child: ScrollOnExpand( + child: ExpandablePanel( + theme: ExpandableThemeData( + iconColor: + Settings.themeWhat ? Colors.white : Colors.grey, + animationDuration: const Duration(milliseconds: 500)), + header: Padding( + padding: EdgeInsets.fromLTRB(12, 12, 0, 0), + child: Text('앱에 바이러스나 해킹기능, 백도어가 포함되어있나요?'), + ), + expanded: Padding( + padding: EdgeInsets.fromLTRB(16, 4, 16, 4), + child: Column( + children: [ + Text('해당 기능은 포함되어있지 않습니다.', + style: TextStyle(fontSize: 12)), + ], + ), + ), + ), + ), + ), + ), + Container( + height: 50, + ), + RaisedButton( + color: Settings.majorColor.withAlpha(200), + textColor: Colors.white, + child: Text('사용자 메뉴얼'), + onPressed: () async { + const url = + 'https://github.com/project-violet/violet/blob/dev/manual/ko.md'; + if (await canLaunch(url)) { + await launch(url); + } + }, + ), + ], + ), + ), + ); } } diff --git a/lib/pages/main/main_page2.dart b/lib/pages/main/main_page2.dart index 028a1f0e4..8a6f44d82 100644 --- a/lib/pages/main/main_page2.dart +++ b/lib/pages/main/main_page2.dart @@ -9,6 +9,7 @@ import 'dart:ui'; import 'package:badges/badges.dart'; import 'package:carousel_slider/carousel_slider.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_downloader/flutter_downloader.dart'; import 'package:fluttertoast/fluttertoast.dart'; @@ -36,6 +37,7 @@ import 'package:violet/pages/main/card/github_card.dart'; import 'package:violet/pages/main/card/update_card.dart'; import 'package:violet/pages/main/card/update_log_card.dart'; import 'package:violet/pages/main/card/views_card.dart'; +import 'package:violet/pages/main/faq/faq_page.dart'; import 'package:violet/pages/splash/splash_page.dart'; import 'package:violet/settings/settings.dart'; import 'package:violet/variables.dart'; @@ -396,7 +398,7 @@ class _MainPage2State extends State onPressed: Variables.databaseDecompressed ? null : () { - Navigator.of(context).push(MaterialPageRoute( + Navigator.of(context).pushReplacement(MaterialPageRoute( builder: (context) => SplashPage( switching: true, ))); @@ -410,12 +412,12 @@ class _MainPage2State extends State badgeContent: Text('N', style: TextStyle(color: Colors.white, fontSize: 12.0)), // badgeColor: Settings.majorAccentColor, - child: Variables.databaseDecompressed - ? null - : RaisedButton( - color: Settings.majorColor.withAlpha(220), - textColor: Colors.white, - onPressed: () async { + child: RaisedButton( + color: Settings.majorColor.withAlpha(220), + textColor: Colors.white, + onPressed: Variables.databaseDecompressed + ? null + : () async { var latestDB = UpdateSyncManager .rawlangDB[Settings.databaseType].item1; var lastDB = (await SharedPreferences.getInstance()) @@ -475,10 +477,9 @@ class _MainPage2State extends State ); }); }, - child: Text( - ' ${Translations.of(context).trans('sync')} '), - elevation: 3.0, - ), + child: Text(' ${Translations.of(context).trans('sync')} '), + elevation: 3.0, + ), ), ], ) @@ -486,6 +487,7 @@ class _MainPage2State extends State } _serviceArea() { + final double width = MediaQuery.of(context).size.width; return [ Row( mainAxisAlignment: MainAxisAlignment.spaceAround, @@ -501,7 +503,31 @@ class _MainPage2State extends State width: 150, ), ], - ) + ), + Container(height: 8), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Container( + child: RaisedButton( + color: Settings.majorColor.withAlpha(220), + textColor: Colors.white, + onPressed: () { + Navigator.of(context) + .push(CupertinoPageRoute(builder: (_) => FAQPageKorean())); + }, + child: Text('자주 묻는 질문들'), + elevation: 3.0, + ), + height: 40, + width: 145, + ), + Container( + height: 40, + width: 145, + ), + ], + ), ]; } diff --git a/lib/pages/main/patchnote/patchnote_page.dart b/lib/pages/main/patchnote/patchnote_page.dart index 47c8a9595..863614581 100644 --- a/lib/pages/main/patchnote/patchnote_page.dart +++ b/lib/pages/main/patchnote/patchnote_page.dart @@ -23,6 +23,22 @@ class PatchModel { } final patches = [ + PatchModel( + dateTime: DateTime(2020, 10, 5), + version: '1.6 Minor Update', + isMinor: true, + contents: [ + 'enhance viewer, article info page', + 'enhance tag filter, auto complete list', + 'redesign main page', + 'add database switcher', + 'add faq page', + 'add throttle manager for exhentai.org host', + 'fix loading screen is displayed while zooming thumbnails', + 'fix toast bottom padding', + 'remove search page grid animation (for performance)', + ], + ), PatchModel( dateTime: DateTime(2020, 10, 2), version: '1.5.1 Patch <<= Latest', diff --git a/lib/pages/settings/settings_page.dart b/lib/pages/settings/settings_page.dart index 389098638..07f5eb08c 100644 --- a/lib/pages/settings/settings_page.dart +++ b/lib/pages/settings/settings_page.dart @@ -541,10 +541,11 @@ class _SettingsPageState extends State onTap: Variables.databaseDecompressed ? null : () async { - Navigator.of(context).push(MaterialPageRoute( - builder: (context) => SplashPage( - switching: true, - ))); + Navigator.of(context) + .pushReplacement(MaterialPageRoute( + builder: (context) => SplashPage( + switching: true, + ))); }, ), _buildDivider(), diff --git a/lib/pages/settings/version_page.dart b/lib/pages/settings/version_page.dart index e193430a2..682da7695 100644 --- a/lib/pages/settings/version_page.dart +++ b/lib/pages/settings/version_page.dart @@ -29,7 +29,7 @@ class VersionViewPage extends StatelessWidget { style: TextStyle(fontSize: 30), ), Text( - '1.5.1', + '1.6.0', style: TextStyle(fontSize: 20), ), Text(''), diff --git a/lib/pages/splash/splash_page.dart b/lib/pages/splash/splash_page.dart index 942173403..dfc1711bb 100644 --- a/lib/pages/splash/splash_page.dart +++ b/lib/pages/splash/splash_page.dart @@ -66,7 +66,7 @@ class _SplashPageState extends State { !widget.switching) Navigator.of(context).pushReplacementNamed('/AfterLoading'); else { - await Future.delayed(Duration(milliseconds: 1400)); + if (!widget.switching) await Future.delayed(Duration(milliseconds: 1400)); setState(() { showFirst = true; }); diff --git a/lib/version/update_sync.dart b/lib/version/update_sync.dart index 42d120d24..680bd55b0 100644 --- a/lib/version/update_sync.dart +++ b/lib/version/update_sync.dart @@ -15,8 +15,8 @@ class UpdateSyncManager { // Current version static const int majorVersion = 1; - static const int minorVersion = 5; - static const int patchVersion = 1; + static const int minorVersion = 6; + static const int patchVersion = 0; static bool updateRequire = false; static String latestVersion = ""; diff --git a/pubspec.yaml b/pubspec.yaml index ae6c18312..ee85549c7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: A new Flutter project. # 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.5.1+0 +version: 1.6.0+0 environment: sdk: ">=2.2.0 <3.0.0"