WIP
This commit is contained in:
@@ -39,6 +39,11 @@
|
||||
1CAF4D8A2A5132F900B00E50 /* PlannedWorkout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CAF4D892A5132F900B00E50 /* PlannedWorkout.swift */; };
|
||||
1CAF4D8C2A51339200B00E50 /* PlannedWorkouts.json in Resources */ = {isa = PBXBuildFile; fileRef = 1CAF4D8B2A51339200B00E50 /* PlannedWorkouts.json */; };
|
||||
1CAF4D952A52180600B00E50 /* PlanWorkoutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CAF4D942A52180600B00E50 /* PlanWorkoutView.swift */; };
|
||||
1CC092ED2C1FAC730004E1E6 /* Logoutview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CC092EC2C1FAC730004E1E6 /* Logoutview.swift */; };
|
||||
1CC092EF2C1FACFC0004E1E6 /* NameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CC092EE2C1FACFC0004E1E6 /* NameView.swift */; };
|
||||
1CC092F12C1FAD1E0004E1E6 /* CompletedWorkoutsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CC092F02C1FAD1E0004E1E6 /* CompletedWorkoutsView.swift */; };
|
||||
1CC092F32C1FADDA0004E1E6 /* ThotPreferenceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CC092F22C1FADDA0004E1E6 /* ThotPreferenceView.swift */; };
|
||||
1CC092F52C1FAE7B0004E1E6 /* ShowNextUpView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CC092F42C1FAE7B0004E1E6 /* ShowNextUpView.swift */; };
|
||||
1CD0C6632A5AF62900970E52 /* WorkoutOverviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CD0C6622A5AF62900970E52 /* WorkoutOverviewView.swift */; };
|
||||
1CD0C6672A5CA19600970E52 /* BaseURLs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CD0C6662A5CA19600970E52 /* BaseURLs.swift */; };
|
||||
1CD0C6682A5CA1A200970E52 /* BaseURLs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CD0C6662A5CA19600970E52 /* BaseURLs.swift */; };
|
||||
@@ -158,6 +163,11 @@
|
||||
1CAF4D892A5132F900B00E50 /* PlannedWorkout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlannedWorkout.swift; sourceTree = "<group>"; };
|
||||
1CAF4D8B2A51339200B00E50 /* PlannedWorkouts.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = PlannedWorkouts.json; sourceTree = "<group>"; };
|
||||
1CAF4D942A52180600B00E50 /* PlanWorkoutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanWorkoutView.swift; sourceTree = "<group>"; };
|
||||
1CC092EC2C1FAC730004E1E6 /* Logoutview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logoutview.swift; sourceTree = "<group>"; };
|
||||
1CC092EE2C1FACFC0004E1E6 /* NameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NameView.swift; sourceTree = "<group>"; };
|
||||
1CC092F02C1FAD1E0004E1E6 /* CompletedWorkoutsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompletedWorkoutsView.swift; sourceTree = "<group>"; };
|
||||
1CC092F22C1FADDA0004E1E6 /* ThotPreferenceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThotPreferenceView.swift; sourceTree = "<group>"; };
|
||||
1CC092F42C1FAE7B0004E1E6 /* ShowNextUpView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowNextUpView.swift; sourceTree = "<group>"; };
|
||||
1CD0C6622A5AF62900970E52 /* WorkoutOverviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkoutOverviewView.swift; sourceTree = "<group>"; };
|
||||
1CD0C6662A5CA19600970E52 /* BaseURLs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseURLs.swift; sourceTree = "<group>"; };
|
||||
1CD0C66B2A5E4EA100970E52 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
@@ -250,6 +260,18 @@
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1CC092EB2C1FAC2A0004E1E6 /* subview */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1CC092EC2C1FAC730004E1E6 /* Logoutview.swift */,
|
||||
1CC092EE2C1FACFC0004E1E6 /* NameView.swift */,
|
||||
1CC092F02C1FAD1E0004E1E6 /* CompletedWorkoutsView.swift */,
|
||||
1CC092F22C1FADDA0004E1E6 /* ThotPreferenceView.swift */,
|
||||
1CC092F42C1FAE7B0004E1E6 /* ShowNextUpView.swift */,
|
||||
);
|
||||
path = subview;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1CF65A192A3972840042FFBD = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -287,6 +309,7 @@
|
||||
1CF65A802A412AA30042FFBD /* DataStore.swift */,
|
||||
1CF65AB92A4894430042FFBD /* UserStore.swift */,
|
||||
1C6BF28E2A56602B00450FD7 /* Keychain.swift */,
|
||||
1CC092EB2C1FAC2A0004E1E6 /* subview */,
|
||||
1CF65A3F2A3973840042FFBD /* Views */,
|
||||
1CF65A3E2A39737D0042FFBD /* APIModels */,
|
||||
1CF65A3D2A3973760042FFBD /* Network */,
|
||||
@@ -592,6 +615,7 @@
|
||||
1CF65A3C2A3972CE0042FFBD /* ExternalWorkoutDetailView.swift in Sources */,
|
||||
1CF65A632A3BF6A30042FFBD /* AllWorkoutsView.swift in Sources */,
|
||||
1CF65A692A3C018F0042FFBD /* AccountView.swift in Sources */,
|
||||
1CC092EF2C1FACFC0004E1E6 /* NameView.swift in Sources */,
|
||||
1CF65A4E2A39FF200042FFBD /* WorkoutDetailViewModel.swift in Sources */,
|
||||
1CF65A472A39FB6C0042FFBD /* RegisteredUser.swift in Sources */,
|
||||
1CF65AB32A452F360042FFBD /* WatchPackageModel.swift in Sources */,
|
||||
@@ -601,11 +625,13 @@
|
||||
1CF65A852A43E8060042FFBD /* CompletedWorkout.swift in Sources */,
|
||||
1CF65A6E2A3F60480042FFBD /* CreateViewModels.swift in Sources */,
|
||||
1CF65A4C2A39FDA20042FFBD /* WorkoutDetailView.swift in Sources */,
|
||||
1CC092F12C1FAD1E0004E1E6 /* CompletedWorkoutsView.swift in Sources */,
|
||||
1C4AFF182A65CD290027710B /* Superset.swift in Sources */,
|
||||
1CF65A8E2A44B78B0042FFBD /* CompletedWorkoutView.swift in Sources */,
|
||||
1CF65A432A39FB410042FFBD /* Workout.swift in Sources */,
|
||||
1CF65A502A3A1EA90042FFBD /* BridgeModule.swift in Sources */,
|
||||
1CF65A592A3BF4B60042FFBD /* Muscle.swift in Sources */,
|
||||
1CC092F32C1FADDA0004E1E6 /* ThotPreferenceView.swift in Sources */,
|
||||
1C4AFF1E2A7579410027710B /* NSFWVideo.swift in Sources */,
|
||||
1C5190D02A589D5F00885849 /* AllWorkoutsListView.swift in Sources */,
|
||||
1C5190CA2A589CEC00885849 /* ExerciseListView.swift in Sources */,
|
||||
@@ -621,12 +647,14 @@
|
||||
1C485C8A2A492BB400A6F896 /* LoginView.swift in Sources */,
|
||||
1C4AFF1B2A65FB190027710B /* CurrentWorkoutInfo.swift in Sources */,
|
||||
1CF65A732A3F60D20042FFBD /* CreateExerciseActionsView.swift in Sources */,
|
||||
1CC092ED2C1FAC730004E1E6 /* Logoutview.swift in Sources */,
|
||||
1CF65A832A42347D0042FFBD /* Extensions.swift in Sources */,
|
||||
1CF65A282A3972840042FFBD /* Persistence.swift in Sources */,
|
||||
1CF65ABA2A4894430042FFBD /* UserStore.swift in Sources */,
|
||||
1C485C8C2A49D65600A6F896 /* WorkoutHistoryView.swift in Sources */,
|
||||
1CAF4D952A52180600B00E50 /* PlanWorkoutView.swift in Sources */,
|
||||
1C5190C62A589CC100885849 /* ActionsView.swift in Sources */,
|
||||
1CC092F52C1FAE7B0004E1E6 /* ShowNextUpView.swift in Sources */,
|
||||
1CF65A5B2A3BF4BE0042FFBD /* Equipment.swift in Sources */,
|
||||
1C4AFF152A60F25F0027710B /* ThotStyle.swift in Sources */,
|
||||
1C5190C82A589CDA00885849 /* CurrentWorkoutElapsedTimeView.swift in Sources */,
|
||||
|
||||
@@ -9,168 +9,37 @@ import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct AccountView: View {
|
||||
@State var completedWorkouts: [CompletedWorkout]?
|
||||
@ObservedObject var userStore = UserStore.shared
|
||||
@State var showCompletedWorkouts: Bool = false
|
||||
@AppStorage(Constants.phoneThotStyle) private var phoneThotStyle: ThotStyle = .never
|
||||
@AppStorage(Constants.extThotStyle) private var extThotStyle: ThotStyle = .never
|
||||
@AppStorage(Constants.extShowNextVideo) private var extShowNextVideo: Bool = false
|
||||
@AppStorage(Constants.thotGenderOption) private var thotGenderOption: String = "female"
|
||||
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
if let registeredUser = userStore.registeredUser {
|
||||
if let nickName = registeredUser.nickName {
|
||||
Text(nickName)
|
||||
.font(.title)
|
||||
}
|
||||
|
||||
HStack {
|
||||
Text(registeredUser.firstName ?? "-")
|
||||
Text(registeredUser.lastName ?? "-")
|
||||
}
|
||||
|
||||
if let email = registeredUser.email {
|
||||
Text(email)
|
||||
}
|
||||
}
|
||||
NameView()
|
||||
|
||||
CompletedWorkoutsView()
|
||||
|
||||
if let completedWorkouts = completedWorkouts {
|
||||
VStack(alignment: .leading) {
|
||||
Divider()
|
||||
Text("Workout History:")
|
||||
HStack {
|
||||
Text("Number of workouts:")
|
||||
Text("\(completedWorkouts.count)")
|
||||
}
|
||||
|
||||
if let lastWorkout = completedWorkouts.last {
|
||||
HStack {
|
||||
Text("Last workout:")
|
||||
Text(lastWorkout.workoutStartTime)
|
||||
}
|
||||
|
||||
Button("View All Workouts", action: {
|
||||
showCompletedWorkouts = true
|
||||
})
|
||||
.frame(maxWidth: .infinity, alignment: .center)
|
||||
.frame(height: 44)
|
||||
.foregroundColor(.blue)
|
||||
.background(.yellow)
|
||||
.cornerRadius(8)
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Divider()
|
||||
|
||||
if userStore.registeredUser?.NSFWValue ?? false {
|
||||
Group {
|
||||
Text("Phone THOT Style:")
|
||||
Picker("Phone THOT Style:", selection: $phoneThotStyle) {
|
||||
ForEach(ThotStyle.allCases, id: \.self) { style in
|
||||
Text(style.stringValue())
|
||||
.tag(phoneThotStyle.rawValue)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
|
||||
Divider()
|
||||
|
||||
Text("External THOT Style:")
|
||||
Picker("External THOT Style:", selection: $extThotStyle) {
|
||||
ForEach(ThotStyle.allCases, id: \.self) { style in
|
||||
Text(style.stringValue())
|
||||
.tag(extThotStyle.rawValue)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
|
||||
if let genderOptions = DataStore.shared.nsfwGenderOptions {
|
||||
Divider()
|
||||
Text("Video Gender:")
|
||||
Picker("Video Gender:", selection: $thotGenderOption) {
|
||||
ForEach(genderOptions, id: \.self) { option in
|
||||
Text(option.capitalized)
|
||||
.tag(option.lowercased())
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
}
|
||||
}
|
||||
}
|
||||
ThotPreferenceView()
|
||||
|
||||
Group {
|
||||
Divider()
|
||||
|
||||
Toggle(isOn: $extShowNextVideo, label: {
|
||||
Text("Show next up video")
|
||||
})
|
||||
}
|
||||
ShowNextUpView()
|
||||
|
||||
Spacer()
|
||||
|
||||
HStack {
|
||||
Button("Logout", action: {
|
||||
userStore.logout()
|
||||
})
|
||||
.frame(maxWidth: .infinity, alignment: .center)
|
||||
.frame(height: 44)
|
||||
.foregroundColor(.white)
|
||||
.background(.red)
|
||||
.cornerRadius(8)
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
Button(action: {
|
||||
userStore.refreshUserData()
|
||||
}, label: {
|
||||
Image(systemName: "arrow.triangle.2.circlepath")
|
||||
})
|
||||
.frame(width: 44, height: 44)
|
||||
.foregroundColor(.white)
|
||||
.background(.green)
|
||||
.cornerRadius(8)
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
Logoutview()
|
||||
}
|
||||
.padding()
|
||||
.sheet(isPresented: $showCompletedWorkouts) {
|
||||
if let history = completedWorkouts {
|
||||
WorkoutHistoryView(completedWorkouts: history)
|
||||
}
|
||||
}
|
||||
.onAppear{
|
||||
if completedWorkouts == nil {
|
||||
fetchCompletedWorkouts()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func fetchCompletedWorkouts() {
|
||||
CompletedWorkoutFetchable().fetch(completion: { result in
|
||||
switch result {
|
||||
case .success(let model):
|
||||
completedWorkouts = model
|
||||
case .failure(let failure):
|
||||
fatalError(failure.localizedDescription)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
struct AccountView_Previews: PreviewProvider {
|
||||
static let userStore = UserStore.shared
|
||||
static let completedWorkouts = PreviewData.parseCompletedWorkouts()
|
||||
|
||||
static var previews: some View {
|
||||
AccountView(completedWorkouts: completedWorkouts)
|
||||
.onAppear{
|
||||
userStore.setFakeUser()
|
||||
}
|
||||
}
|
||||
}
|
||||
//struct AccountView_Previews: PreviewProvider {
|
||||
// static let userStore = UserStore.shared
|
||||
// static let completedWorkouts = PreviewData.parseCompletedWorkouts()
|
||||
//
|
||||
// static var previews: some View {
|
||||
// AccountView(completedWorkouts: completedWorkouts)
|
||||
// .onAppear{
|
||||
// userStore.setFakeUser()
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
68
Werkout_ios/subview/CompletedWorkoutsView.swift
Normal file
68
Werkout_ios/subview/CompletedWorkoutsView.swift
Normal file
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// CompletedWorkoutsView.swift
|
||||
// Werkout_ios
|
||||
//
|
||||
// Created by Trey Tartt on 6/16/24.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct CompletedWorkoutsView: View {
|
||||
@State var completedWorkouts: [CompletedWorkout]?
|
||||
@State var showCompletedWorkouts: Bool = false
|
||||
|
||||
var body: some View {
|
||||
if let completedWorkouts = completedWorkouts {
|
||||
VStack(alignment: .leading) {
|
||||
Divider()
|
||||
Text("Workout History:")
|
||||
HStack {
|
||||
Text("Number of workouts:")
|
||||
Text("\(completedWorkouts.count)")
|
||||
}
|
||||
|
||||
if let lastWorkout = completedWorkouts.last {
|
||||
HStack {
|
||||
Text("Last workout:")
|
||||
Text(lastWorkout.workoutStartTime)
|
||||
}
|
||||
|
||||
Button("View All Workouts", action: {
|
||||
showCompletedWorkouts = true
|
||||
})
|
||||
.frame(maxWidth: .infinity, alignment: .center)
|
||||
.frame(height: 44)
|
||||
.foregroundColor(.blue)
|
||||
.background(.yellow)
|
||||
.cornerRadius(8)
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
|
||||
}
|
||||
.onAppear{
|
||||
fetchCompletedWorkouts()
|
||||
}
|
||||
.sheet(isPresented: $showCompletedWorkouts) {
|
||||
if completedWorkouts.count > 0 {
|
||||
WorkoutHistoryView(completedWorkouts: completedWorkouts)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func fetchCompletedWorkouts() {
|
||||
CompletedWorkoutFetchable().fetch(completion: { result in
|
||||
switch result {
|
||||
case .success(let model):
|
||||
completedWorkouts = model
|
||||
case .failure(let failure):
|
||||
fatalError(failure.localizedDescription)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
CompletedWorkoutsView()
|
||||
}
|
||||
43
Werkout_ios/subview/Logoutview.swift
Normal file
43
Werkout_ios/subview/Logoutview.swift
Normal file
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// Logoutview.swift
|
||||
// Werkout_ios
|
||||
//
|
||||
// Created by Trey Tartt on 6/16/24.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct Logoutview: View {
|
||||
@ObservedObject var userStore = UserStore.shared
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
Button("Logout", action: {
|
||||
userStore.logout()
|
||||
})
|
||||
.frame(maxWidth: .infinity, alignment: .center)
|
||||
.frame(height: 44)
|
||||
.foregroundColor(.white)
|
||||
.background(.red)
|
||||
.cornerRadius(8)
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
Button(action: {
|
||||
userStore.refreshUserData()
|
||||
}, label: {
|
||||
Image(systemName: "arrow.triangle.2.circlepath")
|
||||
})
|
||||
.frame(width: 44, height: 44)
|
||||
.foregroundColor(.white)
|
||||
.background(.green)
|
||||
.cornerRadius(8)
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
Logoutview()
|
||||
}
|
||||
34
Werkout_ios/subview/NameView.swift
Normal file
34
Werkout_ios/subview/NameView.swift
Normal file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// NameView.swift
|
||||
// Werkout_ios
|
||||
//
|
||||
// Created by Trey Tartt on 6/16/24.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct NameView: View {
|
||||
@ObservedObject var userStore = UserStore.shared
|
||||
|
||||
var body: some View {
|
||||
if let registeredUser = userStore.registeredUser {
|
||||
if let nickName = registeredUser.nickName {
|
||||
Text(nickName)
|
||||
.font(.title)
|
||||
}
|
||||
|
||||
HStack {
|
||||
Text(registeredUser.firstName ?? "-")
|
||||
Text(registeredUser.lastName ?? "-")
|
||||
}
|
||||
|
||||
if let email = registeredUser.email {
|
||||
Text(email)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
NameView()
|
||||
}
|
||||
22
Werkout_ios/subview/ShowNextUpView.swift
Normal file
22
Werkout_ios/subview/ShowNextUpView.swift
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// ShowNextUpView.swift
|
||||
// Werkout_ios
|
||||
//
|
||||
// Created by Trey Tartt on 6/16/24.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ShowNextUpView: View {
|
||||
@AppStorage(Constants.extShowNextVideo) private var extShowNextVideo: Bool = false
|
||||
|
||||
var body: some View {
|
||||
Toggle(isOn: $extShowNextVideo, label: {
|
||||
Text("Show next up video")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ShowNextUpView()
|
||||
}
|
||||
57
Werkout_ios/subview/ThotPreferenceView.swift
Normal file
57
Werkout_ios/subview/ThotPreferenceView.swift
Normal file
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// ThosPreferenceView.swift
|
||||
// Werkout_ios
|
||||
//
|
||||
// Created by Trey Tartt on 6/16/24.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ThotPreferenceView: View {
|
||||
@ObservedObject var userStore = UserStore.shared
|
||||
@AppStorage(Constants.phoneThotStyle) private var phoneThotStyle: ThotStyle = .never
|
||||
@AppStorage(Constants.extThotStyle) private var extThotStyle: ThotStyle = .never
|
||||
@AppStorage(Constants.thotGenderOption) private var thotGenderOption: String = "female"
|
||||
|
||||
var body: some View {
|
||||
if userStore.registeredUser?.NSFWValue ?? false {
|
||||
Group {
|
||||
Text("Phone THOT Style:")
|
||||
Picker("Phone THOT Style:", selection: $phoneThotStyle) {
|
||||
ForEach(ThotStyle.allCases, id: \.self) { style in
|
||||
Text(style.stringValue())
|
||||
.tag(phoneThotStyle.rawValue)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
|
||||
Divider()
|
||||
|
||||
Text("External THOT Style:")
|
||||
Picker("External THOT Style:", selection: $extThotStyle) {
|
||||
ForEach(ThotStyle.allCases, id: \.self) { style in
|
||||
Text(style.stringValue())
|
||||
.tag(extThotStyle.rawValue)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
|
||||
if let genderOptions = DataStore.shared.nsfwGenderOptions {
|
||||
Divider()
|
||||
Text("Video Gender:")
|
||||
Picker("Video Gender:", selection: $thotGenderOption) {
|
||||
ForEach(genderOptions, id: \.self) { option in
|
||||
Text(option.capitalized)
|
||||
.tag(option.lowercased())
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ThotPreferenceView()
|
||||
}
|
||||
Reference in New Issue
Block a user