fix: Redundant logout button in config view
Since there's now an easy to access button to logout of Damus on the side bar I didn't see a need for another logout button in the config view. Changelog-Changed: Remove redundant logout button from settings Closes: #378
This commit is contained in:
committed by
William Casarin
parent
72f00fb413
commit
889c584487
@@ -5,8 +5,8 @@
|
|||||||
// Created by William Casarin on 2022-06-09.
|
// Created by William Casarin on 2022-06-09.
|
||||||
//
|
//
|
||||||
import AVFoundation
|
import AVFoundation
|
||||||
import SwiftUI
|
|
||||||
import Kingfisher
|
import Kingfisher
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct ConfigView: View {
|
struct ConfigView: View {
|
||||||
let state: DamusState
|
let state: DamusState
|
||||||
@@ -44,7 +44,6 @@ struct ConfigView: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack(alignment: .leading) {
|
ZStack(alignment: .leading) {
|
||||||
Form {
|
Form {
|
||||||
|
|
||||||
Section(NSLocalizedString("Public Account ID", comment: "Section title for the user's public account ID.")) {
|
Section(NSLocalizedString("Public Account ID", comment: "Section title for the user's public account ID.")) {
|
||||||
HStack {
|
HStack {
|
||||||
Text(state.keypair.pubkey_bech32)
|
Text(state.keypair.pubkey_bech32)
|
||||||
@@ -129,15 +128,11 @@ struct ConfigView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Section(NSLocalizedString("Reset", comment: "Section title for resetting the user")) {
|
if state.is_privkey_user {
|
||||||
Button(NSLocalizedString("Logout", comment: "Button to logout the user.")) {
|
Section(NSLocalizedString("Delete", comment: "Section title for deleting the user")) {
|
||||||
confirm_logout = true
|
Button(NSLocalizedString("Delete Account", comment: "Button to delete the user's account."), role: .destructive) {
|
||||||
}
|
confirm_delete_account = true
|
||||||
|
}
|
||||||
if state.is_privkey_user {
|
|
||||||
Button(NSLocalizedString("Delete Account", comment: "Button to delete the user's account."), role: .destructive) {
|
|
||||||
confirm_delete_account = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user