Create management portal in Flutter #39
This commit is contained in:
parent
a0bf5ec3d2
commit
51ee46e279
@ -1 +1 @@
|
||||
const String appTitle = "Repertory Management Portal";
|
||||
const String appTitle = 'Repertory Management Portal';
|
||||
|
@ -1,15 +1,15 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
String formatMountName(String type, String name) {
|
||||
if (type == "remote") {
|
||||
return name.replaceAll("_", ":");
|
||||
if (type == 'remote') {
|
||||
return name.replaceAll('_', ':');
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
String getBaseUri() {
|
||||
if (kDebugMode) {
|
||||
return "http://127.0.0.1:30000";
|
||||
return 'http://127.0.0.1:30000';
|
||||
}
|
||||
return Uri.base.origin;
|
||||
}
|
||||
|
@ -77,16 +77,22 @@ class MyHomePage extends StatefulWidget {
|
||||
class _MyHomePageState extends State<MyHomePage> {
|
||||
bool _allowAdd = true;
|
||||
String? _apiAuth;
|
||||
String? _apiPort;
|
||||
String? _bucket;
|
||||
String _mountType = "Encrypt";
|
||||
String _mountName = "";
|
||||
String? _encryptionToken;
|
||||
String? _hostNameOrIp;
|
||||
String _mountType = 'Encrypt';
|
||||
String _mountName = '';
|
||||
String? _path;
|
||||
|
||||
void _resetData() {
|
||||
_apiAuth = null;
|
||||
_apiPort = null;
|
||||
_bucket = null;
|
||||
_mountType = "Encrypt";
|
||||
_mountName = "";
|
||||
_encryptionToken = null;
|
||||
_hostNameOrIp = null;
|
||||
_mountName = '';
|
||||
_mountType = 'Encrypt';
|
||||
_path = null;
|
||||
}
|
||||
|
||||
@ -113,12 +119,19 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
return AddMountWidget(
|
||||
mountType: _mountType,
|
||||
onApiAuthChanged: (apiAuth) => _apiAuth = apiAuth,
|
||||
onApiPortChanged: (apiPort) => _apiPort = apiPort,
|
||||
onBucketChanged: (bucket) => _bucket = bucket,
|
||||
onEncryptionTokenChanged:
|
||||
(encryptionToken) =>
|
||||
_encryptionToken = encryptionToken,
|
||||
onHostNameOrIpChanged:
|
||||
(hostNameOrIp) =>
|
||||
_hostNameOrIp = hostNameOrIp,
|
||||
onNameChanged:
|
||||
(mountName) => _mountName = mountName ?? "",
|
||||
(mountName) => _mountName = mountName ?? '',
|
||||
onPathChanged: (path) => _path = path,
|
||||
onTypeChanged:
|
||||
(mountType) => _mountType = mountType ?? "S3",
|
||||
(mountType) => _mountType = mountType ?? 'S3',
|
||||
);
|
||||
},
|
||||
),
|
||||
@ -140,7 +153,10 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
_mountType,
|
||||
_mountName,
|
||||
apiAuth: _apiAuth,
|
||||
apiPort: _apiPort,
|
||||
bucket: _bucket,
|
||||
encryptionToken: _encryptionToken,
|
||||
hostNameOrIp: _hostNameOrIp,
|
||||
path: _path,
|
||||
)
|
||||
.then((_) {
|
||||
|
@ -79,6 +79,18 @@ class Mount with ChangeNotifier {
|
||||
}
|
||||
|
||||
Future<String?> getMountLocation() async {
|
||||
return "~/mnt/encrypt";
|
||||
final response = await http.get(
|
||||
Uri.parse(
|
||||
Uri.encodeFull(
|
||||
'${getBaseUri()}/api/v1/get_mount_location?name=$name&type=$type',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return jsonDecode(response.body)['Location'] as String;
|
||||
}
|
||||
}
|
||||
|
@ -52,13 +52,18 @@ class MountList with ChangeNotifier {
|
||||
String type,
|
||||
String name, {
|
||||
String? apiAuth,
|
||||
String? apiPort,
|
||||
String? bucket,
|
||||
String? encryptionToken,
|
||||
String? hostNameOrIp,
|
||||
String? path,
|
||||
}) async {
|
||||
await http.post(
|
||||
Uri.parse(
|
||||
Uri.encodeFull(
|
||||
'${getBaseUri()}/api/v1/add_mount?name=$name&type=$type&bucket=$bucket&path=$path&apiAuth=$apiAuth',
|
||||
'${getBaseUri()}/api/v1/add_mount?name=$name&type=$type&bucket=$bucket'
|
||||
'&path=$path&apiAuth=$apiAuth&apiPort=$apiPort&hostNameOrIp=$hostNameOrIp'
|
||||
'&encryptionToken=$encryptionToken',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class MountConfig {
|
||||
final String _name;
|
||||
String _path = "";
|
||||
String _path = '';
|
||||
Map<String, dynamic> _settings = {};
|
||||
IconData _state = Icons.toggle_off;
|
||||
final String _type;
|
||||
@ -25,7 +25,7 @@ class MountConfig {
|
||||
}
|
||||
|
||||
void updateStatus(Map<String, dynamic> status) {
|
||||
_path = status["Location"] as String;
|
||||
_state = status["Active"] as bool ? Icons.toggle_on : Icons.toggle_off;
|
||||
_path = status['Location'] as String;
|
||||
_state = status['Active'] as bool ? Icons.toggle_on : Icons.toggle_off;
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,10 @@ import 'package:flutter/material.dart';
|
||||
class AddMountWidget extends StatefulWidget {
|
||||
final String mountType;
|
||||
final void Function(String? newApiAuth) onApiAuthChanged;
|
||||
final void Function(String? newApiPort) onApiPortChanged;
|
||||
final void Function(String? newBucket) onBucketChanged;
|
||||
final void Function(String? newEncryptionToken) onEncryptionTokenChanged;
|
||||
final void Function(String? newHostNameOrIp) onHostNameOrIpChanged;
|
||||
final void Function(String? newName) onNameChanged;
|
||||
final void Function(String? newPath) onPathChanged;
|
||||
final void Function(String? newType) onTypeChanged;
|
||||
@ -12,7 +15,10 @@ class AddMountWidget extends StatefulWidget {
|
||||
super.key,
|
||||
required this.mountType,
|
||||
required this.onApiAuthChanged,
|
||||
required this.onApiPortChanged,
|
||||
required this.onBucketChanged,
|
||||
required this.onEncryptionTokenChanged,
|
||||
required this.onHostNameOrIpChanged,
|
||||
required this.onNameChanged,
|
||||
required this.onPathChanged,
|
||||
required this.onTypeChanged,
|
||||
@ -23,7 +29,7 @@ class AddMountWidget extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _AddMountWidgetState extends State<AddMountWidget> {
|
||||
static const _items = <String>["Encrypt", "S3", "Sia"];
|
||||
static const _items = <String>['Encrypt', 'Remote', 'S3', 'Sia'];
|
||||
|
||||
String? _mountType;
|
||||
|
||||
@ -114,7 +120,7 @@ class _AddMountWidgetState extends State<AddMountWidget> {
|
||||
decoration: InputDecoration(),
|
||||
onChanged: widget.onApiAuthChanged,
|
||||
),
|
||||
if (mountTypeLower == 'sia' || mountTypeLower == 's3')
|
||||
if (mountTypeLower == 's3' || mountTypeLower == 'sia')
|
||||
Text(
|
||||
'Bucket',
|
||||
textAlign: TextAlign.left,
|
||||
@ -123,11 +129,53 @@ class _AddMountWidgetState extends State<AddMountWidget> {
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
if (mountTypeLower == 'sia' || mountTypeLower == 's3')
|
||||
if (mountTypeLower == 's3' || mountTypeLower == 'sia')
|
||||
TextField(
|
||||
decoration: InputDecoration(),
|
||||
onChanged: widget.onBucketChanged,
|
||||
),
|
||||
if (mountTypeLower == 'remote')
|
||||
Text(
|
||||
'HostNameOrIp',
|
||||
textAlign: TextAlign.left,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
if (mountTypeLower == 'remote')
|
||||
TextField(
|
||||
decoration: InputDecoration(),
|
||||
onChanged: widget.onHostNameOrIpChanged,
|
||||
),
|
||||
if (mountTypeLower == 'remote')
|
||||
Text(
|
||||
'ApiPort',
|
||||
textAlign: TextAlign.left,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
if (mountTypeLower == 'remote')
|
||||
TextField(
|
||||
decoration: InputDecoration(),
|
||||
onChanged: widget.onApiPortChanged,
|
||||
),
|
||||
if (mountTypeLower == 'remote')
|
||||
Text(
|
||||
'EncryptionToken',
|
||||
textAlign: TextAlign.left,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
if (mountTypeLower == 'remote')
|
||||
TextField(
|
||||
decoration: InputDecoration(),
|
||||
onChanged: widget.onEncryptionTokenChanged,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -200,70 +200,70 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
List<SettingsTile> siaConfigSettings = [];
|
||||
|
||||
_settings.forEach((key, value) {
|
||||
if (key == "ApiAuth") {
|
||||
if (key == 'ApiAuth') {
|
||||
_addPasswordSetting(commonSettings, _settings, key, value);
|
||||
} else if (key == "ApiPort") {
|
||||
} else if (key == 'ApiPort') {
|
||||
_addIntSetting(commonSettings, _settings, key, value);
|
||||
} else if (key == "ApiUser") {
|
||||
} else if (key == 'ApiUser') {
|
||||
_addStringSetting(commonSettings, _settings, key, value, Icons.person);
|
||||
} else if (key == "DatabaseType") {
|
||||
} else if (key == 'DatabaseType') {
|
||||
_addListSetting(commonSettings, _settings, key, value, [
|
||||
"rocksdb",
|
||||
"sqlite",
|
||||
'rocksdb',
|
||||
'sqlite',
|
||||
], Icons.dataset);
|
||||
} else if (key == "DownloadTimeoutSeconds") {
|
||||
} else if (key == 'DownloadTimeoutSeconds') {
|
||||
_addIntSetting(commonSettings, _settings, key, value);
|
||||
} else if (key == "EnableDownloadTimeout") {
|
||||
} else if (key == 'EnableDownloadTimeout') {
|
||||
_addBooleanSetting(commonSettings, _settings, key, value);
|
||||
} else if (key == "EnableDriveEvents") {
|
||||
} else if (key == 'EnableDriveEvents') {
|
||||
_addBooleanSetting(commonSettings, _settings, key, value);
|
||||
} else if (key == "EventLevel") {
|
||||
} else if (key == 'EventLevel') {
|
||||
_addListSetting(commonSettings, _settings, key, value, [
|
||||
"critical",
|
||||
"error",
|
||||
"warn",
|
||||
"info",
|
||||
"debug",
|
||||
"trace",
|
||||
'critical',
|
||||
'error',
|
||||
'warn',
|
||||
'info',
|
||||
'debug',
|
||||
'trace',
|
||||
], Icons.event);
|
||||
} else if (key == "EvictionDelayMinutes") {
|
||||
} else if (key == 'EvictionDelayMinutes') {
|
||||
_addIntSetting(commonSettings, _settings, key, value);
|
||||
} else if (key == "EvictionUseAccessedTime") {
|
||||
} else if (key == 'EvictionUseAccessedTime') {
|
||||
_addBooleanSetting(commonSettings, _settings, key, value);
|
||||
} else if (key == "MaxCacheSizeBytes") {
|
||||
} else if (key == 'MaxCacheSizeBytes') {
|
||||
_addIntSetting(commonSettings, _settings, key, value);
|
||||
} else if (key == "MaxUploadCount") {
|
||||
} else if (key == 'MaxUploadCount') {
|
||||
_addIntSetting(commonSettings, _settings, key, value);
|
||||
} else if (key == "OnlineCheckRetrySeconds") {
|
||||
} else if (key == 'OnlineCheckRetrySeconds') {
|
||||
_addIntSetting(commonSettings, _settings, key, value);
|
||||
} else if (key == "PreferredDownloadType") {
|
||||
} else if (key == 'PreferredDownloadType') {
|
||||
_addListSetting(commonSettings, _settings, key, value, [
|
||||
"default",
|
||||
"direct",
|
||||
"ring_buffer",
|
||||
'default',
|
||||
'direct',
|
||||
'ring_buffer',
|
||||
], Icons.download);
|
||||
} else if (key == "RetryReadCount") {
|
||||
} else if (key == 'RetryReadCount') {
|
||||
_addIntSetting(commonSettings, _settings, key, value);
|
||||
} else if (key == "RingBufferFileSize") {
|
||||
} else if (key == 'RingBufferFileSize') {
|
||||
_addIntListSetting(
|
||||
commonSettings,
|
||||
_settings,
|
||||
key,
|
||||
value,
|
||||
["128", "256", "512", "1024", "2048"],
|
||||
['128', '256', '512', '1024', '2048'],
|
||||
512,
|
||||
Icons.animation,
|
||||
);
|
||||
} else if (key == "EncryptConfig") {
|
||||
} else if (key == 'EncryptConfig') {
|
||||
value.forEach((subKey, subValue) {
|
||||
if (subKey == "EncryptionToken") {
|
||||
if (subKey == 'EncryptionToken') {
|
||||
_addPasswordSetting(
|
||||
encryptConfigSettings,
|
||||
_settings[key],
|
||||
subKey,
|
||||
subValue,
|
||||
);
|
||||
} else if (subKey == "Path") {
|
||||
} else if (subKey == 'Path') {
|
||||
_addStringSetting(
|
||||
encryptConfigSettings,
|
||||
_settings[key],
|
||||
@ -273,9 +273,9 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
);
|
||||
}
|
||||
});
|
||||
} else if (key == "HostConfig") {
|
||||
} else if (key == 'HostConfig') {
|
||||
value.forEach((subKey, subValue) {
|
||||
if (subKey == "AgentString") {
|
||||
if (subKey == 'AgentString') {
|
||||
_addStringSetting(
|
||||
hostConfigSettings,
|
||||
_settings[key],
|
||||
@ -283,21 +283,21 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
subValue,
|
||||
Icons.support_agent,
|
||||
);
|
||||
} else if (subKey == "ApiPassword") {
|
||||
} else if (subKey == 'ApiPassword') {
|
||||
_addPasswordSetting(
|
||||
hostConfigSettings,
|
||||
_settings[key],
|
||||
subKey,
|
||||
subValue,
|
||||
);
|
||||
} else if (subKey == "ApiPort") {
|
||||
} else if (subKey == 'ApiPort') {
|
||||
_addIntSetting(
|
||||
hostConfigSettings,
|
||||
_settings[key],
|
||||
subKey,
|
||||
subValue,
|
||||
);
|
||||
} else if (subKey == "ApiUser") {
|
||||
} else if (subKey == 'ApiUser') {
|
||||
_addStringSetting(
|
||||
hostConfigSettings,
|
||||
_settings[key],
|
||||
@ -305,7 +305,7 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
subValue,
|
||||
Icons.person,
|
||||
);
|
||||
} else if (subKey == "HostNameOrIp") {
|
||||
} else if (subKey == 'HostNameOrIp') {
|
||||
_addStringSetting(
|
||||
hostConfigSettings,
|
||||
_settings[key],
|
||||
@ -313,7 +313,7 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
subValue,
|
||||
Icons.computer,
|
||||
);
|
||||
} else if (subKey == "Path") {
|
||||
} else if (subKey == 'Path') {
|
||||
_addStringSetting(
|
||||
hostConfigSettings,
|
||||
_settings[key],
|
||||
@ -321,16 +321,16 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
subValue,
|
||||
Icons.route,
|
||||
);
|
||||
} else if (subKey == "Protocol") {
|
||||
} else if (subKey == 'Protocol') {
|
||||
_addListSetting(
|
||||
hostConfigSettings,
|
||||
_settings[key],
|
||||
subKey,
|
||||
subValue,
|
||||
["http", "https"],
|
||||
['http', 'https'],
|
||||
Icons.http,
|
||||
);
|
||||
} else if (subKey == "TimeoutMs") {
|
||||
} else if (subKey == 'TimeoutMs') {
|
||||
_addIntSetting(
|
||||
hostConfigSettings,
|
||||
_settings[key],
|
||||
@ -339,23 +339,23 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
);
|
||||
}
|
||||
});
|
||||
} else if (key == "RemoteConfig") {
|
||||
} else if (key == 'RemoteConfig') {
|
||||
value.forEach((subKey, subValue) {
|
||||
if (subKey == "ApiPort") {
|
||||
if (subKey == 'ApiPort') {
|
||||
_addIntSetting(
|
||||
remoteConfigSettings,
|
||||
_settings[key],
|
||||
subKey,
|
||||
subValue,
|
||||
);
|
||||
} else if (subKey == "EncryptionToken") {
|
||||
} else if (subKey == 'EncryptionToken') {
|
||||
_addPasswordSetting(
|
||||
remoteConfigSettings,
|
||||
_settings[key],
|
||||
subKey,
|
||||
subValue,
|
||||
);
|
||||
} else if (subKey == "HostNameOrIp") {
|
||||
} else if (subKey == 'HostNameOrIp') {
|
||||
_addStringSetting(
|
||||
remoteConfigSettings,
|
||||
_settings[key],
|
||||
@ -363,21 +363,21 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
subValue,
|
||||
Icons.computer,
|
||||
);
|
||||
} else if (subKey == "MaxConnections") {
|
||||
} else if (subKey == 'MaxConnections') {
|
||||
_addIntSetting(
|
||||
remoteConfigSettings,
|
||||
_settings[key],
|
||||
subKey,
|
||||
subValue,
|
||||
);
|
||||
} else if (subKey == "ReceiveTimeoutMs") {
|
||||
} else if (subKey == 'ReceiveTimeoutMs') {
|
||||
_addIntSetting(
|
||||
remoteConfigSettings,
|
||||
_settings[key],
|
||||
subKey,
|
||||
subValue,
|
||||
);
|
||||
} else if (subKey == "SendTimeoutMs") {
|
||||
} else if (subKey == 'SendTimeoutMs') {
|
||||
_addIntSetting(
|
||||
remoteConfigSettings,
|
||||
_settings[key],
|
||||
@ -386,27 +386,27 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
);
|
||||
}
|
||||
});
|
||||
} else if (key == "RemoteMount") {
|
||||
} else if (key == 'RemoteMount') {
|
||||
value.forEach((subKey, subValue) {
|
||||
if (subKey == "Enable") {
|
||||
if (subKey == 'Enable') {
|
||||
List<SettingsTile> tempSettings = [];
|
||||
_addBooleanSetting(tempSettings, _settings[key], subKey, subValue);
|
||||
remoteMountSettings.insertAll(0, tempSettings);
|
||||
} else if (subKey == "ApiPort") {
|
||||
} else if (subKey == 'ApiPort') {
|
||||
_addIntSetting(
|
||||
remoteMountSettings,
|
||||
_settings[key],
|
||||
subKey,
|
||||
subValue,
|
||||
);
|
||||
} else if (subKey == "ClientPoolSize") {
|
||||
} else if (subKey == 'ClientPoolSize') {
|
||||
_addIntSetting(
|
||||
remoteMountSettings,
|
||||
_settings[key],
|
||||
subKey,
|
||||
subValue,
|
||||
);
|
||||
} else if (subKey == "EncryptionToken") {
|
||||
} else if (subKey == 'EncryptionToken') {
|
||||
_addPasswordSetting(
|
||||
remoteMountSettings,
|
||||
_settings[key],
|
||||
@ -415,16 +415,16 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
);
|
||||
}
|
||||
});
|
||||
} else if (key == "S3Config") {
|
||||
} else if (key == 'S3Config') {
|
||||
value.forEach((subKey, subValue) {
|
||||
if (subKey == "AccessKey") {
|
||||
if (subKey == 'AccessKey') {
|
||||
_addPasswordSetting(
|
||||
s3ConfigSettings,
|
||||
_settings[key],
|
||||
subKey,
|
||||
subValue,
|
||||
);
|
||||
} else if (subKey == "Bucket") {
|
||||
} else if (subKey == 'Bucket') {
|
||||
_addStringSetting(
|
||||
s3ConfigSettings,
|
||||
_settings[key],
|
||||
@ -432,14 +432,14 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
subValue,
|
||||
Icons.folder,
|
||||
);
|
||||
} else if (subKey == "EncryptionToken") {
|
||||
} else if (subKey == 'EncryptionToken') {
|
||||
_addPasswordSetting(
|
||||
s3ConfigSettings,
|
||||
_settings[key],
|
||||
subKey,
|
||||
subValue,
|
||||
);
|
||||
} else if (subKey == "Region") {
|
||||
} else if (subKey == 'Region') {
|
||||
_addStringSetting(
|
||||
s3ConfigSettings,
|
||||
_settings[key],
|
||||
@ -447,16 +447,16 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
subValue,
|
||||
Icons.map,
|
||||
);
|
||||
} else if (subKey == "SecretKey") {
|
||||
} else if (subKey == 'SecretKey') {
|
||||
_addPasswordSetting(
|
||||
s3ConfigSettings,
|
||||
_settings[key],
|
||||
subKey,
|
||||
subValue,
|
||||
);
|
||||
} else if (subKey == "TimeoutMs") {
|
||||
} else if (subKey == 'TimeoutMs') {
|
||||
_addIntSetting(s3ConfigSettings, _settings[key], subKey, subValue);
|
||||
} else if (subKey == "URL") {
|
||||
} else if (subKey == 'URL') {
|
||||
_addStringSetting(
|
||||
s3ConfigSettings,
|
||||
_settings[key],
|
||||
@ -464,14 +464,14 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
subValue,
|
||||
Icons.http,
|
||||
);
|
||||
} else if (subKey == "UsePathStyle") {
|
||||
} else if (subKey == 'UsePathStyle') {
|
||||
_addBooleanSetting(
|
||||
s3ConfigSettings,
|
||||
_settings[key],
|
||||
subKey,
|
||||
subValue,
|
||||
);
|
||||
} else if (subKey == "UseRegionInURL") {
|
||||
} else if (subKey == 'UseRegionInURL') {
|
||||
_addBooleanSetting(
|
||||
s3ConfigSettings,
|
||||
_settings[key],
|
||||
@ -480,9 +480,9 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
);
|
||||
}
|
||||
});
|
||||
} else if (key == "SiaConfig") {
|
||||
} else if (key == 'SiaConfig') {
|
||||
value.forEach((subKey, subValue) {
|
||||
if (subKey == "Bucket") {
|
||||
if (subKey == 'Bucket') {
|
||||
_addStringSetting(
|
||||
siaConfigSettings,
|
||||
_settings[key],
|
||||
@ -527,7 +527,7 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
||||
SettingsSection(
|
||||
title: const Text('Remote Mount'),
|
||||
tiles:
|
||||
_settings["RemoteMount"]["Enable"] as bool
|
||||
_settings['RemoteMount']['Enable'] as bool
|
||||
? remoteMountSettings
|
||||
: [remoteMountSettings[0]],
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user