Compare commits

..

3 Commits

Author SHA1 Message Date
c54838ad6f fix display
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-05 20:21:51 -06:00
58fde34cfe Create management portal in Flutter #39 2025-03-05 20:19:42 -06:00
3a72563a5c Create management portal in Flutter #39 2025-03-05 19:59:49 -06:00
2 changed files with 20 additions and 15 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::s3 || prov == provider_type::sia)
? " [" + unique_id + ']'
: " [" + remote_host + ':' +
std::to_string(remote_port) + ']')
: (prov == provider_type::remote)
? " [" + remote_host + ':' +
std::to_string(remote_port) + ']'
: " [" + unique_id + ']')
<< " Drive" << std::endl;
if (prov == provider_type::remote) {
std::uint16_t port{0U};

View File

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