rename
This commit is contained in:
parent
e694e7e706
commit
e9e875a4da
|
@ -53,3 +53,6 @@ app.*.map.json
|
||||||
/go/vendor/
|
/go/vendor/
|
||||||
|
|
||||||
ios/build/
|
ios/build/
|
||||||
|
|
||||||
|
# APP
|
||||||
|
/lib/assets/version.txt
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
PIKAPI - 漫画客户端
|
PIKAPI - 漫画客户端
|
||||||
========
|
========
|
||||||
[![license](https://img.shields.io/github/license/niuhuan/pikapi-flutter)](https://raw.githubusercontent.com/niuhuan/pikapi-flutter/master/LICENSE)
|
[![license](https://img.shields.io/github/license/niuhuan/pikapi)](https://raw.githubusercontent.com/niuhuan/pikapi/master/LICENSE)
|
||||||
[![releases](https://img.shields.io/github/v/release/niuhuan/pikapi-flutter)](https://github.com/niuhuan/pikapi-flutter/releases)
|
[![releases](https://img.shields.io/github/v/release/niuhuan/pikapi)](https://github.com/niuhuan/pikapi/releases)
|
||||||
[![downloads](https://img.shields.io/github/downloads/niuhuan/pikapi-flutter/total)](https://github.com/niuhuan/pikapi-flutter/releases)
|
[![downloads](https://img.shields.io/github/downloads/niuhuan/pikapi/total)](https://github.com/niuhuan/pikapi/releases)
|
||||||
|
|
||||||
- 美观易用且无广告的漫画客户端, 能运行在Windows/MacOS/Linux/Android/IOS中。
|
- 美观易用且无广告的漫画客户端, 能运行在Windows/MacOS/Linux/Android/IOS中。
|
||||||
- 本仓库仅作为学习交流使用, 请您遵守当地法律法规以及开源协议。
|
- 本仓库仅作为学习交流使用, 请您遵守当地法律法规以及开源协议。
|
||||||
- 您的star和issue是对开发者的莫大鼓励, 可以源仓库下载最新的源码/安装包, 表示支持/提出建议。
|
- 您的star和issue是对开发者的莫大鼓励, 可以源仓库下载最新的源码/安装包, 表示支持/提出建议。
|
||||||
- 源仓库地址 [https://github.com/niuhuan/pikapi-flutter](https://github.com/niuhuan/pikapi-flutter)
|
- 源仓库地址 [https://github.com/niuhuan/pikapi](https://github.com/niuhuan/pikapi)
|
||||||
|
|
||||||
## 界面 / 功能
|
## 界面 / 功能
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
import 'dart:async' show Future;
|
||||||
|
import 'package:flutter/services.dart' show rootBundle;
|
||||||
|
|
||||||
|
const _versionAssets = 'lib/assets/version.txt';
|
||||||
|
RegExp _versionExp = RegExp(r"^v\d+\.\d+.\d+$");
|
||||||
|
|
||||||
|
late String _version;
|
||||||
|
|
||||||
|
Future initVersion() async {
|
||||||
|
try {
|
||||||
|
_version = (await rootBundle.loadString(_versionAssets)).trim();
|
||||||
|
} catch (e) {
|
||||||
|
_version = "dirty";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future versionCheck() async {
|
||||||
|
if (_versionExp.hasMatch(_version)) {
|
||||||
|
} else {
|
||||||
|
// dirtyVersion
|
||||||
|
}
|
||||||
|
// String latestVersion = (await method.httpGet(_versionAddress)).trim();
|
||||||
|
}
|
|
@ -29,7 +29,7 @@ class AboutScreen extends StatelessWidget {
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.all(20),
|
padding: EdgeInsets.all(20),
|
||||||
child: Text(
|
child: Text(
|
||||||
'请从软件取得渠道获取更新\n本软件开源, 若您想提出改进建议或者获取源码, 请在开源社区搜索 pikapi-flutter',
|
'请从软件取得渠道获取更新\n本软件开源, 若您想提出改进建议或者获取源码, 请在开源社区搜索 pikapi',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
height: 1.3,
|
height: 1.3,
|
||||||
),
|
),
|
||||||
|
|
|
@ -23,6 +23,7 @@ import 'package:pikapi/basic/config/Themes.dart';
|
||||||
import 'package:pikapi/basic/Method.dart';
|
import 'package:pikapi/basic/Method.dart';
|
||||||
import 'package:pikapi/basic/config/ListLayout.dart';
|
import 'package:pikapi/basic/config/ListLayout.dart';
|
||||||
import 'package:pikapi/basic/config/TimeOffsetHour.dart';
|
import 'package:pikapi/basic/config/TimeOffsetHour.dart';
|
||||||
|
import 'package:pikapi/basic/config/Version.dart';
|
||||||
import 'package:pikapi/basic/config/VolumeController.dart';
|
import 'package:pikapi/basic/config/VolumeController.dart';
|
||||||
|
|
||||||
import 'AccountScreen.dart';
|
import 'AccountScreen.dart';
|
||||||
|
@ -69,6 +70,7 @@ class _InitScreenState extends State<InitScreen> {
|
||||||
await initAndroidSecureFlag();
|
await initAndroidSecureFlag();
|
||||||
await initDownloadThreadCount();
|
await initDownloadThreadCount();
|
||||||
await initConvertToPNG();
|
await initConvertToPNG();
|
||||||
|
await initVersion();
|
||||||
// 登录, 如果token失效重新登录, 网络不好的时候可能需要1分钟
|
// 登录, 如果token失效重新登录, 网络不好的时候可能需要1分钟
|
||||||
if (await method.preLogin()) {
|
if (await method.preLogin()) {
|
||||||
// 如果token或username+password有效则直接进入登录好的界面
|
// 如果token或username+password有效则直接进入登录好的界面
|
||||||
|
|
Loading…
Reference in New Issue