Skip to content

Commit

Permalink
fix: aussie mode getting stuck
Browse files Browse the repository at this point in the history
  • Loading branch information
castdrian committed Apr 23, 2024
1 parent 6ac3c98 commit d22f445
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
4 changes: 2 additions & 2 deletions ishare.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@
CURRENT_PROJECT_VERSION = "${BUILD_NUMBER}";
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = LT2SM56C52;
DEVELOPMENT_TEAM = L988J7YMK5;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
ENABLE_TESTING_SEARCH_PATHS = NO;
Expand Down Expand Up @@ -640,7 +640,7 @@
CURRENT_PROJECT_VERSION = "${BUILD_NUMBER}";
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = LT2SM56C52;
DEVELOPMENT_TEAM = L988J7YMK5;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
ENABLE_TESTABILITY = NO;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "5eabf058ace08720d140dc4edb54fe6ba0d10003c721d565e0b0dbb24158362b",
"originHash" : "457379c019910912d45c64f6cf194185cf499a36d1e88eb6d8948ac28538815f",
"pins" : [
{
"identity" : "alamofire",
Expand Down
2 changes: 2 additions & 0 deletions ishare/Views/Settings/UploaderSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct UploaderSettingsView: View {
@Default(.activeCustomUploader) var activeCustomUploader
@Default(.savedCustomUploaders) var savedCustomUploaders
@Default(.uploadType) var uploadType
@Default(.aussieMode) var aussieMode

@State private var isAddSheetPresented = false
@State private var isImportSheetPresented = false
Expand Down Expand Up @@ -115,6 +116,7 @@ struct UploaderSettingsView: View {
}
.padding(.bottom)
}
.rotationEffect(aussieMode ? .degrees(180) : .zero)
.sheet(isPresented: $isAddSheetPresented) {
AddCustomUploaderView()
.frame(minWidth: 450)
Expand Down
34 changes: 19 additions & 15 deletions ishare/Views/SettingsMenuView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,30 @@ import ScreenCaptureKit

struct SettingsMenuView: View {
@Default(.aussieMode) var aussieMode

let appVersionString: String = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! String

var body: some View {
NavigationView {
VStack {
List {
NavigationLink(destination: GeneralSettingsView()) {
Label("General", systemImage: "gearshape")
Label("General", systemImage: "gearshape").rotationEffect(aussieMode ? .degrees(180) : .zero)
}
NavigationLink(destination: UploaderSettingsView()) {
Label("Uploaders", systemImage: "icloud.and.arrow.up")
Label("Uploaders", systemImage: "icloud.and.arrow.up").rotationEffect(aussieMode ? .degrees(180) : .zero)
}
NavigationLink(destination: KeybindSettingsView()) {
Label("Keybinds", systemImage: "command.circle")
Label("Keybinds", systemImage: "command.circle").rotationEffect(aussieMode ? .degrees(180) : .zero)
}
NavigationLink(destination: CaptureSettingsView()) {
Label("Image files", systemImage: "photo")
Label("Image files", systemImage: "photo").rotationEffect(aussieMode ? .degrees(180) : .zero)
}
NavigationLink(destination: RecordingSettingsView()) {
Label("Video files", systemImage: "menubar.dock.rectangle.badge.record")
Label("Video files", systemImage: "menubar.dock.rectangle.badge.record").rotationEffect(aussieMode ? .degrees(180) : .zero)
}
NavigationLink(destination: AdvancedSettingsView()) {
Label("Advanced", systemImage: "hammer.circle")
Label("Advanced", systemImage: "hammer.circle").rotationEffect(aussieMode ? .degrees(180) : .zero)
}
}
.listStyle(SidebarListStyle())
Expand All @@ -52,6 +52,7 @@ struct SettingsMenuView: View {
Text("GitHub")
}
}
.rotationEffect(aussieMode ? .degrees(180) : .zero)
.padding()
.frame(maxWidth: .infinity, alignment: .center)
}
Expand All @@ -60,7 +61,6 @@ struct SettingsMenuView: View {
GeneralSettingsView() // default view
}
.frame(minWidth: 600, maxWidth: 600, minHeight: 300, maxHeight: 300)
.rotationEffect(aussieMode ? .degrees(180) : .zero)
.navigationTitle("Settings")
}
}
Expand Down Expand Up @@ -89,7 +89,6 @@ struct GeneralSettingsView: View {
var body: some View {
VStack(alignment: .leading) {
Spacer()
Text("ishare").font(.largeTitle).frame(maxWidth: .infinity).padding(-10)

HStack() {
VStack(alignment: .leading) {
Expand All @@ -100,7 +99,7 @@ struct GeneralSettingsView: View {
Spacer()

VStack {
Text("Menu Icon")
Text("Menu Bar Icon")

HStack {
ForEach(MenuBarIcon.allCases, id: \.self) { choice in
Expand Down Expand Up @@ -165,11 +164,13 @@ struct GeneralSettingsView: View {
.padding(0)
.frame(maxWidth: .infinity)
}
.padding()
.padding().rotationEffect(aussieMode ? .degrees(180) : .zero)
}
}

struct KeybindSettingsView: View {
@Default(.aussieMode) var aussieMode

var body: some View {
Spacer()

Expand All @@ -193,14 +194,15 @@ struct KeybindSettingsView: View {
.foregroundColor(.red)
.frame(maxWidth: .infinity)
}
.padding()
.padding().rotationEffect(aussieMode ? .degrees(180) : .zero)
}
}

struct CaptureSettingsView: View {
@Default(.capturePath) var capturePath
@Default(.captureFileType) var fileType
@Default(.captureFileName) var fileName
@Default(.aussieMode) var aussieMode

var body: some View {
VStack(alignment: .leading) {
Expand Down Expand Up @@ -241,7 +243,7 @@ struct CaptureSettingsView: View {
}.labelsHidden()
}.padding()

}.padding()
}.padding().rotationEffect(aussieMode ? .degrees(180) : .zero)
}
}

Expand All @@ -252,6 +254,7 @@ struct RecordingSettingsView: View {
@Default(.recordMP4) var recordMP4
@Default(.useHEVC) var useHEVC
@Default(.compressVideo) var compressVideo
@Default(.aussieMode) var aussieMode

@State private var isExcludedAppSheetPresented = false

Expand Down Expand Up @@ -311,14 +314,15 @@ struct RecordingSettingsView: View {
.sheet(isPresented: $isExcludedAppSheetPresented) {
ExcludedAppsView().frame(maxHeight: 500)
}
}
}.rotationEffect(aussieMode ? .degrees(180) : .zero)
}
}

struct AdvancedSettingsView: View {
@State private var showingAlert: Bool = false
@Default(.imgurClientId) var imgurClientId
@Default(.captureBinary) var captureBinary
@Default(.aussieMode) var aussieMode

var body: some View {
VStack{
Expand Down Expand Up @@ -350,7 +354,7 @@ struct AdvancedSettingsView: View {
}
}
Spacer()
}.padding()
}.padding().rotationEffect(aussieMode ? .degrees(180) : .zero)
.alert(Text("Advanced Settings"),
isPresented: $showingAlert,
actions: {
Expand Down

0 comments on commit d22f445

Please sign in to comment.