mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
环境变量增加更新时间显示
This commit is contained in:
23
lib/module/env/env_page.dart
vendored
23
lib/module/env/env_page.dart
vendored
@@ -11,6 +11,7 @@ import 'package:qinglong_app/base/ui/empty_widget.dart';
|
||||
import 'package:qinglong_app/module/env/env_bean.dart';
|
||||
import 'package:qinglong_app/module/env/env_viewmodel.dart';
|
||||
import 'package:qinglong_app/utils/extension.dart';
|
||||
import 'package:qinglong_app/utils/utils.dart';
|
||||
|
||||
class EnvPage extends StatefulWidget {
|
||||
const EnvPage({Key? key}) : super(key: key);
|
||||
@@ -200,10 +201,13 @@ class EnvItemCell extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
bean.status == 1
|
||||
? const Icon(
|
||||
Icons.dnd_forwardslash,
|
||||
size: 12,
|
||||
size: 16,
|
||||
color: Colors.red,
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
@@ -217,7 +221,7 @@ class EnvItemCell extends StatelessWidget {
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
child: Text(
|
||||
bean.remarks ?? "-",
|
||||
Utils.formatGMTTime(bean.timestamp ?? ""),
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -228,6 +232,21 @@ class EnvItemCell extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: Text(
|
||||
bean.remarks ?? "-",
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
color: ref.watch(themeProvider).themeColor.descColor(),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
|
||||
@@ -244,6 +244,8 @@ class _LoginPageState extends ConsumerState<LoginPage> {
|
||||
setState(() {});
|
||||
HttpResponse<LoginBean> response = await Api.login(userName, password);
|
||||
if (response.success) {
|
||||
getIt<UserInfoViewModel>().updateToken(response.bean?.token ?? "");
|
||||
|
||||
HttpResponse<UserBean> userResponse = await Api.user();
|
||||
if (userResponse.success) {
|
||||
if (userResponse.bean != null && userResponse.bean!.twoFactorActivated != null && userResponse.bean!.twoFactorActivated!) {
|
||||
@@ -251,7 +253,6 @@ class _LoginPageState extends ConsumerState<LoginPage> {
|
||||
isLoading = false;
|
||||
setState(() {});
|
||||
} else {
|
||||
getIt<UserInfoViewModel>().updateToken(response.bean?.token ?? "");
|
||||
Navigator.of(context).pushReplacementNamed(Routes.routeHomePage);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -30,9 +30,6 @@ class TaskViewModel extends BaseViewModel {
|
||||
}
|
||||
|
||||
void sortList() {
|
||||
list.sort((a, b) {
|
||||
return b.created!.compareTo(a.created!);
|
||||
});
|
||||
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
if (list[i].isPinned == 1) {
|
||||
|
||||
Reference in New Issue
Block a user