mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Home Settings
This commit is contained in:
@@ -5,6 +5,9 @@ struct AccentButton: View {
|
||||
var imageSystemName: String?
|
||||
var maxWidth: CGFloat? = .infinity
|
||||
var bold = true
|
||||
var verticalPadding = 10.0
|
||||
var horizontalPadding = 10.0
|
||||
var minHeight = 45.0
|
||||
var action: () -> Void = {}
|
||||
|
||||
var body: some View {
|
||||
@@ -18,9 +21,9 @@ struct AccentButton: View {
|
||||
.fontWeight(bold ? .bold : .regular)
|
||||
}
|
||||
}
|
||||
.padding(.vertical, 10)
|
||||
.padding(.horizontal, 10)
|
||||
.frame(minHeight: 45)
|
||||
.padding(.vertical, verticalPadding)
|
||||
.padding(.horizontal, horizontalPadding)
|
||||
.frame(minHeight: minHeight)
|
||||
.frame(maxWidth: maxWidth)
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
|
21
Shared/Views/HomeSettingsButton.swift
Normal file
21
Shared/Views/HomeSettingsButton.swift
Normal file
@@ -0,0 +1,21 @@
|
||||
import SwiftUI
|
||||
|
||||
struct HomeSettingsButton: View {
|
||||
var navigation = NavigationModel.shared
|
||||
|
||||
var body: some View {
|
||||
Button {
|
||||
navigation.presentingHomeSettings = true
|
||||
} label: {
|
||||
Label("Home Settings", systemImage: "gear")
|
||||
}
|
||||
.font(.caption)
|
||||
.imageScale(.small)
|
||||
}
|
||||
}
|
||||
|
||||
struct HomeSettingsButton_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
HomeSettingsButton()
|
||||
}
|
||||
}
|
@@ -160,6 +160,7 @@ struct VideoContextMenuView: View {
|
||||
Button {
|
||||
Watch.markAsWatched(videoID: video.videoID, account: accounts.current, duration: video.length, context: backgroundContext)
|
||||
FeedModel.shared.calculateUnwatchedFeed()
|
||||
WatchModel.shared.watchesChanged()
|
||||
} label: {
|
||||
Label("Mark as watched", systemImage: "checkmark.circle.fill")
|
||||
}
|
||||
|
Reference in New Issue
Block a user