Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b10528d69c |
No files matched your search
@@ -315,11 +315,14 @@ struct HingeEdge: ViewModifier {
|
|||||||
struct Page<Content: View>: View {
|
struct Page<Content: View>: View {
|
||||||
let title: String
|
let title: String
|
||||||
var large = true
|
var large = true
|
||||||
|
/// Moves the content up into an empty nav bar.
|
||||||
|
var pullUp: CGFloat = 0
|
||||||
@ViewBuilder let content: () -> Content
|
@ViewBuilder let content: () -> Content
|
||||||
@Environment(\.palette) private var p
|
@Environment(\.palette) private var p
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ScrollView {
|
ScrollView {
|
||||||
LazyVStack(alignment: .leading, spacing: 0) { content() }
|
LazyVStack(alignment: .leading, spacing: 0) { content() }
|
||||||
|
.padding(.top, -pullUp)
|
||||||
.padding(.bottom, 24)
|
.padding(.bottom, 24)
|
||||||
}
|
}
|
||||||
.modifier(HingeEdge())
|
.modifier(HingeEdge())
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ struct StemPlaylistScreen: View {
|
|||||||
.navigationTitle(pl.title)
|
.navigationTitle(pl.title)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
} else {
|
} else {
|
||||||
Page(title: pl.title, large: false) {
|
Page(title: pl.title, large: false, pullUp: BAR_PULL) {
|
||||||
header(pl)
|
header(pl)
|
||||||
if pl.items.isEmpty {
|
if pl.items.isEmpty {
|
||||||
EmptyState(icon: "slider.horizontal.3", title: "No Songs",
|
EmptyState(icon: "slider.horizontal.3", title: "No Songs",
|
||||||
@@ -164,7 +164,7 @@ struct StemPlaylistScreen: View {
|
|||||||
else { MoreMenu(items: moreItems(pl)) }
|
else { MoreMenu(items: moreItems(pl)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.modifier(SplitHidesTitle())
|
.modifier(SplitHidesTitle(bare: !editing))
|
||||||
}
|
}
|
||||||
|
|
||||||
private func header(_ pl: StemPlaylist) -> some View {
|
private func header(_ pl: StemPlaylist) -> some View {
|
||||||
@@ -279,7 +279,7 @@ struct PlaylistScreen: View {
|
|||||||
.navigationTitle(title)
|
.navigationTitle(title)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
} else {
|
} else {
|
||||||
Page(title: title, large: false) {
|
Page(title: title, large: false, pullUp: BAR_PULL) {
|
||||||
header(list)
|
header(list)
|
||||||
Loaded(state: tracks, retry: { reload += 1 }) { list in
|
Loaded(state: tracks, retry: { reload += 1 }) { list in
|
||||||
ForEach(Array(list.enumerated()), id: \.element.id) { i, t in
|
ForEach(Array(list.enumerated()), id: \.element.id) { i, t in
|
||||||
@@ -297,7 +297,7 @@ struct PlaylistScreen: View {
|
|||||||
else { MoreMenu(items: moreItems(list)) }
|
else { MoreMenu(items: moreItems(list)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.modifier(SplitHidesTitle())
|
.modifier(SplitHidesTitle(bare: !editing))
|
||||||
.task(id: reload) {
|
.task(id: reload) {
|
||||||
await LoadState.load($tracks) { try await g.plex.playlistTracks(playlist.ratingKey) }
|
await LoadState.load($tracks) { try await g.plex.playlistTracks(playlist.ratingKey) }
|
||||||
}
|
}
|
||||||
@@ -426,11 +426,16 @@ struct SearchScreen: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Split at the Duo's hinge the pane's own header already names the playlist, so the bar drops the title.
|
/// Split at the Duo's hinge the pane's own header already names the playlist, so the bar drops the title.
|
||||||
|
/// How far a playlist page's header rides up into the empty nav bar, between back and •••.
|
||||||
|
private let BAR_PULL: CGFloat = 40
|
||||||
|
|
||||||
|
/// Hides the bar title in split view, and while [bare] (the header already shows it).
|
||||||
private struct SplitHidesTitle: ViewModifier {
|
private struct SplitHidesTitle: ViewModifier {
|
||||||
|
var bare = false
|
||||||
@Environment(Ui.self) private var ui
|
@Environment(Ui.self) private var ui
|
||||||
func body(content: Content) -> some View {
|
func body(content: Content) -> some View {
|
||||||
content.toolbar {
|
content.toolbar {
|
||||||
if ui.split { ToolbarItem(placement: .principal) { Color.clear.frame(width: 1, height: 1) } }
|
if ui.split || bare { ToolbarItem(placement: .principal) { Color.clear.frame(width: 1, height: 1) } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -9,7 +9,7 @@ settings:
|
|||||||
# iOS needs a plain number for the bundle version; the label is what the app and releases show.
|
# iOS needs a plain number for the bundle version; the label is what the app and releases show.
|
||||||
MARKETING_VERSION: "0.10.1"
|
MARKETING_VERSION: "0.10.1"
|
||||||
VERSION_LABEL: "0.10.1"
|
VERSION_LABEL: "0.10.1"
|
||||||
CURRENT_PROJECT_VERSION: "63"
|
CURRENT_PROJECT_VERSION: "64"
|
||||||
# Dev builds override these (build-ipa.sh dev) so they install next to the release app.
|
# Dev builds override these (build-ipa.sh dev) so they install next to the release app.
|
||||||
APP_ID: org.cdnutter.stemify
|
APP_ID: org.cdnutter.stemify
|
||||||
APP_NAME: Stemify
|
APP_NAME: Stemify
|
||||||
|
|||||||
Reference in new issue
Block a user