Skip to content

Commit f0767d2

Browse files
committed
update login tip
1 parent 406326b commit f0767d2

File tree

5 files changed

+16
-2
lines changed

5 files changed

+16
-2
lines changed

lib/common/localization/gsy_string_base.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ abstract class GSYStringBase {
4747

4848
String get Login_out;
4949

50+
String get Login_deprecated;
51+
5052
String get home_reply;
5153

5254
String get home_change_language;

lib/common/localization/gsy_string_en.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ class GSYStringEn extends GSYStringBase {
5959
@override
6060
String Login_out = "Logout";
6161

62+
@override
63+
String Login_deprecated = "The API via password authentication will remove on November 13, 2020 by Github";
64+
6265
@override
6366
String home_reply = "Feedback";
6467
@override

lib/common/localization/gsy_string_zh.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ class GSYStringZh extends GSYStringBase {
5858
@override
5959
String Login_out = "退出登录";
6060

61+
@override
62+
String Login_deprecated = "账号密码登陆的 API 将被 Github 弃用,建议使用尝试使用授权登陆。";
63+
6164
@override
6265
String home_reply = "问题反馈";
6366
@override

lib/page/login/login_page.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'dart:async';
22

33
import 'package:flutter/material.dart';
44
import 'package:flutter_redux/flutter_redux.dart';
5+
import 'package:fluttertoast/fluttertoast.dart';
56
import 'package:gsy_github_app_flutter/common/config/config.dart';
67
import 'package:gsy_github_app_flutter/common/config/ignoreConfig.dart';
78
import 'package:gsy_github_app_flutter/common/local/local_storage.dart';
@@ -184,6 +185,11 @@ mixin LoginBLoC on State<LoginPage> {
184185
}
185186

186187
loginIn() async {
188+
Fluttertoast.showToast(
189+
msg: GSYLocalizations.i18n(context).Login_deprecated,
190+
gravity: ToastGravity.CENTER,
191+
toastLength: Toast.LENGTH_LONG);
192+
187193
if (_userName == null || _userName.isEmpty) {
188194
return;
189195
}

pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ packages:
154154
name: collection
155155
url: "https://pub.flutter-io.cn"
156156
source: hosted
157-
version: "1.14.12"
157+
version: "1.14.11"
158158
connectivity:
159159
dependency: "direct main"
160160
description:
@@ -400,7 +400,7 @@ packages:
400400
name: intl
401401
url: "https://pub.flutter-io.cn"
402402
source: hosted
403-
version: "0.16.1"
403+
version: "0.16.0"
404404
io:
405405
dependency: transitive
406406
description:

0 commit comments

Comments
 (0)