mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-10 19:20:59 +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 {
|
if !appAccountsManager.availableAccounts.isEmpty {
|
||||||
editAccountButton
|
editAccountButton
|
||||||
}
|
}
|
||||||
addAccountButton
|
|
||||||
}
|
}
|
||||||
#if !os(visionOS)
|
#if !os(visionOS)
|
||||||
.listRowBackground(theme.primaryBackgroundColor)
|
.listRowBackground(theme.primaryBackgroundColor)
|
||||||
|
@ -154,6 +154,7 @@ struct SettingsTabs: View {
|
||||||
await timelineCache.clearCache(for: client.id)
|
await timelineCache.clearCache(for: client.id)
|
||||||
await sub.deleteSubscription()
|
await sub.deleteSubscription()
|
||||||
appAccountsManager.delete(account: account)
|
appAccountsManager.delete(account: account)
|
||||||
|
Telemetry.signal("account.removed")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,7 +315,7 @@ struct SettingsTabs: View {
|
||||||
Button {
|
Button {
|
||||||
addAccountSheetPresented.toggle()
|
addAccountSheetPresented.toggle()
|
||||||
} label: {
|
} label: {
|
||||||
Text("settings.account.add")
|
Label("settings.account.add", systemImage: "person.badge.plus")
|
||||||
}
|
}
|
||||||
.sheet(isPresented: $addAccountSheetPresented) {
|
.sheet(isPresented: $addAccountSheetPresented) {
|
||||||
AddAccountView()
|
AddAccountView()
|
||||||
|
@ -322,15 +323,17 @@ struct SettingsTabs: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
private var editAccountButton: some View {
|
private var editAccountButton: some View {
|
||||||
Button(role: isEditingAccount ? .none : .destructive) {
|
Button(role: .destructive) {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
isEditingAccount.toggle()
|
isEditingAccount.toggle()
|
||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
if isEditingAccount {
|
if isEditingAccount {
|
||||||
Text("action.done")
|
Label("action.done", systemImage: "person.badge.minus")
|
||||||
|
.foregroundStyle(.red)
|
||||||
} else {
|
} else {
|
||||||
Text("account.action.logout")
|
Label("account.action.logout", systemImage: "person.badge.minus")
|
||||||
|
.foregroundStyle(.red)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue