mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-25 09:41:02 +00:00
Add Labels in settings
This commit is contained in:
parent
456d85eda2
commit
a737ac19e5
1 changed files with 8 additions and 5 deletions
|
@ -136,10 +136,10 @@ struct SettingsTabs: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
addAccountButton
|
||||
if !appAccountsManager.availableAccounts.isEmpty {
|
||||
editAccountButton
|
||||
}
|
||||
addAccountButton
|
||||
}
|
||||
#if !os(visionOS)
|
||||
.listRowBackground(theme.primaryBackgroundColor)
|
||||
|
@ -154,6 +154,7 @@ struct SettingsTabs: View {
|
|||
await timelineCache.clearCache(for: client.id)
|
||||
await sub.deleteSubscription()
|
||||
appAccountsManager.delete(account: account)
|
||||
Telemetry.signal("account.removed")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -314,7 +315,7 @@ struct SettingsTabs: View {
|
|||
Button {
|
||||
addAccountSheetPresented.toggle()
|
||||
} label: {
|
||||
Text("settings.account.add")
|
||||
Label("settings.account.add", systemImage: "person.badge.plus")
|
||||
}
|
||||
.sheet(isPresented: $addAccountSheetPresented) {
|
||||
AddAccountView()
|
||||
|
@ -322,15 +323,17 @@ struct SettingsTabs: View {
|
|||
}
|
||||
|
||||
private var editAccountButton: some View {
|
||||
Button(role: isEditingAccount ? .none : .destructive) {
|
||||
Button(role: .destructive) {
|
||||
withAnimation {
|
||||
isEditingAccount.toggle()
|
||||
}
|
||||
} label: {
|
||||
if isEditingAccount {
|
||||
Text("action.done")
|
||||
Label("action.done", systemImage: "person.badge.minus")
|
||||
.foregroundStyle(.red)
|
||||
} else {
|
||||
Text("account.action.logout")
|
||||
Label("account.action.logout", systemImage: "person.badge.minus")
|
||||
.foregroundStyle(.red)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue