#73 fix & opt.

- fix: reorder list default drag
- opt.: android home widget grey text
This commit is contained in:
lollipopkit
2023-07-20 18:26:17 +08:00
parent 7f8fbfead3
commit 5a5e2fd1d1
16 changed files with 41 additions and 37 deletions

View File

@@ -29,12 +29,12 @@ class ServerPrivateInfo {
required this.pwd,
this.pubKeyId,
this.tags,
}) : id = '$user@$ip:$port';
}) : id = '$name<$user@$ip:$port>';
ServerPrivateInfo.fromJson(Map<String, dynamic> json) {
name = json["name"].toString();
ip = json["ip"].toString();
port = json["port"].toInt();
port = int.tryParse(json["port"]) ?? 22;
user = json["user"].toString();
pwd = json["authorization"].toString();
pubKeyId = json["pubKeyId"]?.toString();
@@ -55,6 +55,6 @@ class ServerPrivateInfo {
}
bool shouldReconnect(ServerPrivateInfo old) {
return id != id || pwd != old.pwd || pubKeyId != old.pubKeyId;
return id != old.id || pwd != old.pwd || pubKeyId != old.pubKeyId;
}
}

View File

@@ -2,8 +2,8 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 379;
static const int build = 380;
static const String engine = "3.10.6";
static const String buildAt = "2023-07-19 19:18:31.520465";
static const int modifications = 7;
static const String buildAt = "2023-07-20 18:08:32.806339";
static const int modifications = 14;
}

View File

@@ -33,7 +33,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
with SingleTickerProviderStateMixin {
late MediaQueryData _media;
late S _s;
final Order _cardsOrder = [];
final Order<String> _cardsOrder = [];
final _setting = locator<SettingStore>();
@override
@@ -81,6 +81,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
);
});
},
buildDefaultDragHandles: false,
footer: height13,
children: _buildMainList(si.status),
),

View File

@@ -117,6 +117,7 @@ class _ServerPageState extends State<ServerPage>
all: _s.all,
),
padding: const EdgeInsets.fromLTRB(7, 10, 7, 7),
buildDefaultDragHandles: false,
onReorder: (oldIndex, newIndex) => setState(() {
pro.serverOrder.moveByItem(
filtered,

View File

@@ -71,6 +71,7 @@ class _SnippetListPageState extends State<SnippetListPage> {
return ReorderableListView.builder(
padding: const EdgeInsets.all(13),
itemCount: filtered.length,
buildDefaultDragHandles: false,
onReorder: (oldIdx, newIdx) => setState(() {
provider.snippets.moveByItem(
filtered,

View File

@@ -43,6 +43,7 @@ class _SSHVirtKeySettingPageState extends State<SSHVirtKeySettingPage> {
final allKeys = [...keys, ...disabled];
return ReorderableListView.builder(
padding: const EdgeInsets.fromLTRB(11, 3, 0, 3),
buildDefaultDragHandles: false,
itemBuilder: (_, idx) {
final key = allKeys[idx];
return ListTile(