mirror of
https://github.com/yattee/yattee.git
synced 2024-12-14 14:20:32 +05:30
Change subscriptions view picker
This commit is contained in:
parent
59f48c739a
commit
4d70c8a3c3
@ -31,7 +31,16 @@ struct SubscriptionsView: View {
|
|||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItem(placement: .principal) {
|
ToolbarItem(placement: .principal) {
|
||||||
subscriptionsMenu
|
HStack {
|
||||||
|
Picker("Page", selection: $subscriptionsViewPage) {
|
||||||
|
Label("Feed", systemImage: "film").tag(Page.feed)
|
||||||
|
Label("Channels", systemImage: "person.3.fill").tag(Page.channels)
|
||||||
|
}
|
||||||
|
.pickerStyle(.segmented)
|
||||||
|
|
||||||
|
subscriptionsMenu
|
||||||
|
}
|
||||||
|
.frame(maxWidth: 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolbarItem {
|
ToolbarItem {
|
||||||
@ -61,11 +70,6 @@ struct SubscriptionsView: View {
|
|||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
var subscriptionsMenu: some View {
|
var subscriptionsMenu: some View {
|
||||||
Menu {
|
Menu {
|
||||||
Picker("Page", selection: $subscriptionsViewPage) {
|
|
||||||
Label("Feed", systemImage: "film").tag(Page.feed)
|
|
||||||
Label("Channels", systemImage: "person.3.fill").tag(Page.channels)
|
|
||||||
}
|
|
||||||
|
|
||||||
if subscriptionsViewPage == .feed {
|
if subscriptionsViewPage == .feed {
|
||||||
ListingStyleButtons(listingStyle: $subscriptionsListingStyle)
|
ListingStyleButtons(listingStyle: $subscriptionsListingStyle)
|
||||||
}
|
}
|
||||||
@ -84,12 +88,9 @@ struct SubscriptionsView: View {
|
|||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
HStack(spacing: 12) {
|
HStack(spacing: 12) {
|
||||||
menuLabel
|
|
||||||
.foregroundColor(.primary)
|
|
||||||
|
|
||||||
Image(systemName: "chevron.down.circle.fill")
|
Image(systemName: "chevron.down.circle.fill")
|
||||||
.foregroundColor(.accentColor)
|
.foregroundColor(.accentColor)
|
||||||
.imageScale(.small)
|
.imageScale(.large)
|
||||||
}
|
}
|
||||||
.transaction { t in t.animation = nil }
|
.transaction { t in t.animation = nil }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user