Compare commits

..

No commits in common. "c54838ad6ff4fae975c265cda13f7f24c5b39f26" and "9e2ad81cff1465e26bbed011803624f58eb7fd2a" have entirely different histories.

2 changed files with 14 additions and 19 deletions

View File

@ -120,10 +120,10 @@ mount(std::vector<const char *> args, std::string data_directory,
std::cout << "Initializing "
<< app_config::get_provider_display_name(prov)
<< (unique_id.empty() ? ""
: (prov == provider_type::remote)
? " [" + remote_host + ':' +
std::to_string(remote_port) + ']'
: " [" + unique_id + ']')
: (prov == provider_type::s3 || prov == provider_type::sia)
? " [" + unique_id + ']'
: " [" + remote_host + ':' +
std::to_string(remote_port) + ']')
<< " Drive" << std::endl;
if (prov == provider_type::remote) {
std::uint16_t port{0U};

View File

@ -18,17 +18,19 @@ class _AddMountWidgetState extends State<AddMountWidget> {
static const _items = <String>['Encrypt', 'Remote', 'S3', 'Sia'];
static const _padding = 15.0;
late String _mountType;
String? _mountType;
@override
void initState() {
_mountType = widget.mountType;
super.initState();
}
List<Widget> _createTextField(
String title,
String dataName, {
String? value,
}) {
if (value != null) {
widget.onDataChanged(dataName, value);
}
return [
const SizedBox(height: _padding),
Text(
@ -40,7 +42,6 @@ class _AddMountWidgetState extends State<AddMountWidget> {
),
),
TextField(
autofocus: dataName == 'Name',
decoration: InputDecoration(),
onChanged: (value) => widget.onDataChanged(dataName, value),
controller: TextEditingController(text: value),
@ -50,7 +51,7 @@ class _AddMountWidgetState extends State<AddMountWidget> {
@override
Widget build(BuildContext context) {
final mountTypeLower = _mountType.toLowerCase();
final mountTypeLower = _mountType?.toLowerCase();
return Column(
mainAxisSize: MainAxisSize.min,
@ -73,10 +74,10 @@ class _AddMountWidgetState extends State<AddMountWidget> {
DropdownButton<String>(
value: _mountType,
onChanged: (value) {
widget.onDataChanged('Provider', value);
setState(() {
_mountType = value ?? "";
_mountType = value;
});
widget.onDataChanged('Provider', value);
},
items:
_items.map<DropdownMenuItem<String>>((item) {
@ -116,10 +117,4 @@ class _AddMountWidgetState extends State<AddMountWidget> {
],
);
}
@override
void initState() {
_mountType = widget.mountType;
super.initState();
}
}