feat: store critical data in secure store (#821)

This commit is contained in:
lollipopkit🏳️‍⚧️
2025-07-17 18:26:34 +08:00
committed by GitHub
parent c6439673b8
commit 263d4eabb4
15 changed files with 93 additions and 45 deletions

View File

@@ -2,42 +2,12 @@ part of 'tab.dart';
extension on _ServerPageState {
Widget _buildServerCardTitle(Server s) {
const width = 16.0, height = 16.0;
final logoUrl = s.getLogoUrl(context);
if (logoUrl == null) {
return const SizedBox(width: width, height: height);
}
return Padding(
padding: const EdgeInsets.only(left: 7, right: 13),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
width: width,
height: height,
child: ExtendedImage.network(
logoUrl,
cache: true,
fit: BoxFit.contain,
loadStateChanged: (state) {
if (state.extendedImageLoadState == LoadState.failed) {
return const SizedBox(width: width, height: height);
}
return null;
},
),
),
const SizedBox(width: 6),
Flexible(
child: Text(s.spi.name, style: UIs.text13Bold, maxLines: 1, overflow: TextOverflow.ellipsis),
),
],
),
Text(s.spi.name, style: UIs.text13Bold, maxLines: 1, overflow: TextOverflow.ellipsis),
const Icon(Icons.keyboard_arrow_right, size: 17, color: Colors.grey),
const Spacer(),
_buildTopRightText(s),

View File

@@ -3,7 +3,6 @@
import 'dart:async';
import 'dart:math' as math;
import 'package:extended_image/extended_image.dart';
import 'package:fl_lib/fl_lib.dart';
import 'package:flutter/material.dart';
import 'package:icons_plus/icons_plus.dart';
@@ -21,7 +20,6 @@ import 'package:server_box/data/res/build_data.dart';
import 'package:server_box/data/res/store.dart';
import 'package:server_box/view/page/server/detail/view.dart';
import 'package:server_box/view/page/server/edit.dart';
import 'package:server_box/view/page/server/logo.dart';
import 'package:server_box/view/page/setting/entry.dart';
import 'package:server_box/view/widget/percent_circle.dart';
import 'package:server_box/view/widget/server_func_btns.dart';