opt.: server item onTap when err occurs (#310)
This commit is contained in:
@@ -41,7 +41,6 @@ class Disk {
|
||||
}
|
||||
try {
|
||||
final dev = vals[0];
|
||||
// Some NAS may have mounted path like this `//192.168.1.2/`
|
||||
if (!_shouldCalc(dev)) continue;
|
||||
list.add(Disk(
|
||||
dev: dev,
|
||||
@@ -172,6 +171,7 @@ class DiskUsage {
|
||||
}
|
||||
}
|
||||
|
||||
// Some NAS may have mounted path like this `//192.168.1.2/`
|
||||
bool _shouldCalc(String dev) {
|
||||
if (dev.startsWith('/dev')) return true;
|
||||
if (dev.startsWith('//')) return true;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 802;
|
||||
static const int build = 811;
|
||||
static const String engine = "3.19.3";
|
||||
static const String buildAt = "2024-03-12 15:02:14";
|
||||
static const int modifications = 2;
|
||||
static const int script = 40;
|
||||
static const String buildAt = "2024-03-16 16:31:54";
|
||||
static const int modifications = 6;
|
||||
static const int script = 41;
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ class SettingStore extends PersistentStore {
|
||||
/// 0: follow app theme, 1: light, 2: dark
|
||||
late final termTheme = property('termTheme', 0);
|
||||
|
||||
/// Compatiablity for Chinese Android.
|
||||
/// Compatiablity for Chinese Android.
|
||||
/// Set it to true, if you use Safe Keyboard on Chinese Android
|
||||
late final cnKeyboardComp = property('cnKeyboardComp', false);
|
||||
|
||||
|
||||
@@ -176,8 +176,8 @@ class _ServerPageState extends State<ServerPage>
|
||||
onTap: () {
|
||||
if (srv.canViewDetails) {
|
||||
AppRoute.serverDetail(spi: srv.spi).go(context);
|
||||
} else if (srv.status.err != null) {
|
||||
_showFailReason(srv.status);
|
||||
} else {
|
||||
AppRoute.serverEdit(spi: srv.spi).go(context);
|
||||
}
|
||||
},
|
||||
onLongPress: () {
|
||||
|
||||
@@ -16,12 +16,12 @@ class ChoiceChipX<T> extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ChoiceChip(
|
||||
label: Text(label),
|
||||
side: BorderSide.none,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 1),
|
||||
labelPadding: const EdgeInsets.symmetric(horizontal: 5),
|
||||
selected: state.selected(value),
|
||||
onSelected: state.onSelected(value),
|
||||
);
|
||||
label: Text(label),
|
||||
side: BorderSide.none,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 1),
|
||||
labelPadding: const EdgeInsets.symmetric(horizontal: 5),
|
||||
selected: state.selected(value),
|
||||
onSelected: state.onSelected(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user