mirror of
https://github.com/yattee/yattee.git
synced 2024-11-14 10:08:23 +00:00
Menus improvements
This commit is contained in:
parent
09ff16d464
commit
c2d16774f7
@ -45,8 +45,7 @@ struct SubscriptionsView: View {
|
|||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
HStack(spacing: 12) {
|
HStack(spacing: 12) {
|
||||||
Text(menuLabel)
|
menuLabel
|
||||||
.font(.headline)
|
|
||||||
.foregroundColor(.primary)
|
.foregroundColor(.primary)
|
||||||
|
|
||||||
Image(systemName: "chevron.down.circle.fill")
|
Image(systemName: "chevron.down.circle.fill")
|
||||||
@ -57,8 +56,12 @@ struct SubscriptionsView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var menuLabel: String {
|
var menuLabel: some View {
|
||||||
subscriptionsViewPage == .channels ? "Channels" : "Feed"
|
HStack {
|
||||||
|
Image(systemName: subscriptionsViewPage == .channels ? "person.3.fill" : "film")
|
||||||
|
Text(subscriptionsViewPage.rawValue.capitalized.localized())
|
||||||
|
.font(.headline)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,11 @@ struct SettingsButtons: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Button(action: { navigation.presentingAccounts = true }) {
|
Button(action: { navigation.presentingAccounts = true }) {
|
||||||
Label(accounts.current?.description ?? "", image: accounts.app.rawValue.capitalized)
|
if let account = accounts.current {
|
||||||
|
Label(account.description, image: account.app?.rawValue.capitalized ?? "")
|
||||||
|
} else {
|
||||||
|
Label("Signed Out", systemImage: "xmark")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Button(action: { navigation.presentingSettings = true }) {
|
Button(action: { navigation.presentingSettings = true }) {
|
||||||
Label("Settings", systemImage: "gearshape.2")
|
Label("Settings", systemImage: "gearshape.2")
|
||||||
@ -16,6 +20,8 @@ struct SettingsButtons: View {
|
|||||||
|
|
||||||
struct SettingsButtons_Previews: PreviewProvider {
|
struct SettingsButtons_Previews: PreviewProvider {
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
|
VStack(spacing: 10) {
|
||||||
SettingsButtons()
|
SettingsButtons()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user