diff --git a/web/repertory/lib/helpers.dart b/web/repertory/lib/helpers.dart index 2ab37fd4..cd032b2d 100644 --- a/web/repertory/lib/helpers.dart +++ b/web/repertory/lib/helpers.dart @@ -62,7 +62,13 @@ Map createDefaultSettings(String mountType) { 'EncryptConfig': {'EncryptionToken': '', 'Path': ''}, }; case 'Remote': - return {'EventLevel': 'info'}; + return { + 'RemoteConfig': { + 'ApiPort': 1, + 'EncryptionToken': '', + 'HostNameOrIp': '', + }, + }; case 'S3': return { 'S3Config': { diff --git a/web/repertory/lib/screens/add_mount_screen.dart b/web/repertory/lib/screens/add_mount_screen.dart index 62681034..1cf6d0f8 100644 --- a/web/repertory/lib/screens/add_mount_screen.dart +++ b/web/repertory/lib/screens/add_mount_screen.dart @@ -84,9 +84,9 @@ class _AddMountScreenState extends State { ), ), ), - if (_mountType.isNotEmpty) + if (_mountType.isNotEmpty && _mountType != "Remote") const SizedBox(height: constants.padding), - if (_mountType.isNotEmpty) + if (_mountType.isNotEmpty && _mountType != "Remote") Card( margin: EdgeInsets.all(0.0), child: Padding( @@ -206,7 +206,12 @@ class _AddMountScreenState extends State { final changed = _mountType != mountType; _mountType = mountType; - if (changed) { + if (_mountType == 'Remote') { + _mountNameController.text = + (_settings[_mountType]?['HostNameOrIp'].toString() ?? '') + + '_' + + (_settings[_mountType]?['ApiPort'].toString() ?? ''); + } else if (changed) { _mountNameController.text = mountType == 'Sia' ? 'default' : ''; }