fix: ssh page

This commit is contained in:
lollipopkit
2024-01-30 11:29:00 +08:00
parent 5168995ed9
commit a117e5fd77
5 changed files with 44 additions and 38 deletions

View File

@@ -2,9 +2,9 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 730;
static const int build = 731;
static const String engine = "3.16.8";
static const String buildAt = "2024-01-29 10:56:10";
static const int modifications = 2;
static const String buildAt = "2024-01-30 10:56:43";
static const int modifications = 4;
static const int script = 36;
}

View File

@@ -317,10 +317,16 @@ class _SSHPageState extends State<SSHPage> with AutomaticKeepAliveClientMixin {
}
void _initVirtKeys() {
final virtKeys = Stores.setting.sshVirtKeys
.fetch()
.map((e) => VirtKey.values[e])
.toList();
final virtKeys = () {
try {
return Stores.setting.sshVirtKeys
.fetch()
.map((e) => VirtKey.values[e])
.toList();
} catch (_) {
return VirtKey.values;
}
}();
for (int len = 0; len < virtKeys.length; len += 7) {
if (len + 7 > virtKeys.length) {