Skip to content

Commit

Permalink
Convert TextField into SecureField where necessary + Use `.textFi…
Browse files Browse the repository at this point in the history
…eldStyle(.roundedBorder)` where necessary + Build bump
  • Loading branch information
vapidinfinity committed Aug 3, 2024
1 parent 6993b0f commit 47f99d2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Mythic.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2840;
CURRENT_PROJECT_VERSION = 2841;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Mythic/Preview Content\"";
DEVELOPMENT_TEAM = "";
Expand Down Expand Up @@ -764,7 +764,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2840;
CURRENT_PROJECT_VERSION = 2841;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Mythic/Preview Content\"";
DEVELOPMENT_TEAM = "";
Expand Down
7 changes: 6 additions & 1 deletion Mythic/Views/OnboardingViewR2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ struct OnboardingR2: View { // TODO: ViewModel

}

@Environment(\.colorScheme) var colorScheme

@State private var currentPhase: Phase
@State private var staticPhases: [Phase] = [.logo, .greetings, .rosettaInstaller, .engineDownloader, .engineInstaller, .defaultBottleSetup]

Expand Down Expand Up @@ -214,8 +216,11 @@ struct OnboardingR2: View { // TODO: ViewModel
Text("Enter the 'authorisationCode' from the JSON response in the field below.")

HStack {
TextField("Enter authorisation code...", text: $epicSigninAuthKey)
SecureField("Enter authorisation code...", text: $epicSigninAuthKey)
.onSubmit { signIn(type: .epic) }
.foregroundStyle(colorScheme == .dark ? .white : .black)
.textFieldStyle(.roundedBorder)

// .frame(width: 400, alignment: .center)

if isSigningIn {
Expand Down
2 changes: 1 addition & 1 deletion Mythic/Views/Unified/Sheets/Auth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ struct AuthView: View {
Text("\nEnter the 'authorisationCode' from the JSON response in the field below.")

HStack {
TextField("Enter authorisation key...", text: $code)
SecureField("Enter authorisation key...", text: $code)
.onSubmit {
Task(priority: .userInitiated) { await submitToLegendary() }
}
Expand Down
1 change: 1 addition & 0 deletions Mythic/Views/Unified/Sheets/GameSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ private extension GameSettingsView {
)
)
.truncationMode(.tail)
.textFieldStyle(.roundedBorder)
.onSubmit {
modifyThumbnailURL()
}
Expand Down

0 comments on commit 47f99d2

Please sign in to comment.