Improve settings

This commit is contained in:
Arkadiusz Fal
2021-11-04 23:01:27 +01:00
parent d50b136b38
commit dc9cbd34d0
9 changed files with 120 additions and 81 deletions

View File

@@ -20,8 +20,8 @@ struct InstancesSettings: View {
@Default(.instances) private var instances
var body: some View {
Section {
Text("Instance")
Group {
SettingsHeader(text: "Instance")
if !instances.isEmpty {
Picker("Instance", selection: $selectedInstanceID) {
@@ -37,7 +37,8 @@ struct InstancesSettings: View {
}
if !selectedInstance.isNil, selectedInstance.app.supportsAccounts {
Text("Accounts")
SettingsHeader(text: "Accounts")
List(selection: $selectedAccount) {
if selectedInstanceAccounts.isEmpty {
Text("You have no accounts for this instance")
@@ -70,7 +71,7 @@ struct InstancesSettings: View {
}
if selectedInstance != nil, selectedInstance.app.hasFrontendURL {
Text("Frontend URL")
SettingsHeader(text: "Frontend URL")
TextField("Frontend URL", text: $frontendURL, prompt: Text("Frontend URL"))
.onAppear {