-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(setting): add setting page and adjust some codes and update readme
- Loading branch information
1 parent
75ed87e
commit e706e77
Showing
17 changed files
with
173 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,20 @@ | ||
# manhuagui_flutter | ||
|
||
+ An unofficial application for manhuagui (https://www.manhuagui.com/) written in flutter | ||
+ Backend see [Aoi-hosizora/manhuagui-backend](https://github.com/Aoi-hosizora/manhuagui-backend) | ||
+ An unofficial application for manhuagui (https://www.manhuagui.com/) written in flutter. | ||
+ Backend see [Aoi-hosizora/manhuagui-backend](https://github.com/Aoi-hosizora/manhuagui-backend) (private). | ||
|
||
### Dependencies | ||
|
||
+ See [pubspec.yaml](./pubspec.yaml). | ||
+ You may be unable to build the project successfully, because [flutter_ahlib](https://github.com/Aoi-hosizora/flutter_ahlib) is a local library yet. | ||
Please wait for the release of `flutter_ahlib v1.2` and refactoring. | ||
|
||
### Install | ||
|
||
+ See [Release](https://github.com/Aoi-hosizora/manhuagui_flutter/releases). | ||
|
||
### Screenshots | ||
|
||
|![screenshot1](./assets/screenshot1.png)|![screenshot2](./assets/screenshot2.png)|![screenshot3](./assets/screenshot3.png)| | ||
|---|---|---| | ||
|![screenshot4](./assets/screenshot4.png)|![screenshot5](./assets/screenshot5.png)|![screenshot6](./assets/screenshot6.png)| |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,27 @@ | ||
const DEBUG = true; | ||
const APP_NAME = 'manhuagui'; | ||
const APP_NAME = 'Manhuagui'; | ||
const APP_VERSION = '1.0.2'; | ||
const APP_DESCRIPTIONS = [ | ||
'非官方的漫画柜 (manhuagui) 安卓客户端,Flutter 开发', | ||
'作者: Github Aoi-hosizora <[email protected]>', | ||
'', | ||
'该客户端仅供学习研究使用,请勿用于商业用途。', | ||
'本应用与内容提供方无任何联系,若有任何问题,请发邮件或 Issue 联系。', | ||
]; | ||
const DB_NAME = 'db_manhuagui'; | ||
|
||
const WEB_HOMEPAGE_URL = 'https://www.manhuagui.com/'; | ||
const APP_HOMEPAGE_URL = 'https://github.com/Aoi-hosizora/manhuagui_flutter'; | ||
const CONTACT = ''; | ||
const FEEDBACK_URL = 'https://github.com/Aoi-hosizora/manhuagui_flutter/issues/new'; | ||
const RELEASE_URL = 'https://github.com/Aoi-hosizora/manhuagui_flutter/releases'; | ||
|
||
const CONNECT_TIMEOUT = 10000; // 10s | ||
const SEND_TIMEOUT = 5000; // 5s | ||
const RECEIVE_TIMEOUT = 5000; // 5s | ||
|
||
// const BASE_API_URL = 'http://10.0.3.2:10018/v1/'; | ||
const BASE_API_URL = 'http://api.manhuagui.aoihosizora.top/v1/'; | ||
const BASE_WEB_URL = 'https://www.manhuagui.com/'; | ||
const REGISTER_URL = 'https://www.manhuagui.com/user/register'; | ||
|
||
const USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:manhuagui_flutter/config.dart'; | ||
import 'package:manhuagui_flutter/service/natives/browser.dart'; | ||
|
||
/// 设置页 | ||
class SettingPage extends StatefulWidget { | ||
@override | ||
_SettingPageState createState() => _SettingPageState(); | ||
} | ||
|
||
class _SettingPageState extends State<SettingPage> { | ||
Widget _item({@required String title, Function action}) { | ||
return Container( | ||
color: Colors.white, | ||
child: Material( | ||
color: Colors.transparent, | ||
child: InkWell( | ||
child: Container( | ||
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 12), | ||
child: Text( | ||
title, | ||
style: Theme.of(context).textTheme.subtitle1, | ||
), | ||
), | ||
onTap: action ?? () {}, | ||
), | ||
), | ||
); | ||
} | ||
|
||
Widget _divider() { | ||
return Container( | ||
color: Colors.white, | ||
padding: EdgeInsets.only(left: 10, right: 10), | ||
child: Divider(height: 1, thickness: 1), | ||
); | ||
} | ||
|
||
Widget _spacer() { | ||
return SizedBox(height: 15); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar( | ||
centerTitle: true, | ||
toolbarHeight: 45, | ||
title: Text('设置'), | ||
), | ||
body: ListView( | ||
children: [ | ||
_spacer(), | ||
// ******************************************************* | ||
_item( | ||
title: '漫画官网', | ||
action: () => launchInBrowser( | ||
context: context, | ||
url: WEB_HOMEPAGE_URL, | ||
), | ||
), | ||
_divider(), | ||
_item( | ||
title: '客户端源码', | ||
action: () => launchInBrowser( | ||
context: context, | ||
url: APP_HOMEPAGE_URL, | ||
), | ||
), | ||
_spacer(), | ||
// ******************************************************* | ||
_item( | ||
title: '反馈及联系作者', | ||
action: () => launchInBrowser( | ||
context: context, | ||
url: FEEDBACK_URL, | ||
), | ||
), | ||
_divider(), | ||
_item( | ||
title: '检查更新', | ||
action: () => launchInBrowser( | ||
context: context, | ||
url: RELEASE_URL, | ||
), | ||
), | ||
_divider(), | ||
_item( | ||
title: '关于', | ||
action: () => showAboutDialog( | ||
context: context, | ||
useRootNavigator: false, | ||
applicationName: APP_NAME, | ||
applicationVersion: APP_VERSION, | ||
applicationIcon: SizedBox( | ||
height: 50, | ||
width: 50, | ||
child: Image.asset('lib/assets/ic_launcher_h.png'), | ||
), | ||
applicationLegalese: '© 2020-2021 Aoi-hosizora', | ||
children: [ | ||
SizedBox(height: 20), | ||
for (var r in APP_DESCRIPTIONS) | ||
Text( | ||
r, | ||
style: Theme.of(context).textTheme.subtitle1, | ||
), | ||
], | ||
), | ||
), | ||
_spacer(), | ||
// ******************************************************* | ||
Align( | ||
alignment: Alignment.center, | ||
child: Text( | ||
'© 2020-2021 Aoi-hosizora', | ||
style: TextStyle(color: Colors.grey), | ||
), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters