-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Merge pull request #42 from edx/password-input-view-eye feat: eye icon for password field * chore: added SecureInputView to project * Merge pull request #44 from edx/clear-cookies-by-logout fix: clear cookies by logout * Merge pull request #47 from edx/reduce-grid-spacing style: reduce grid spacing * chore: Fix outdated course dates alert title truncation issue (#53) * Merge pull request #57 from edx/remaining-size-in-gb-or-mb chore: size in GB or MB * fix: Remove urls from headings of End User lisence agreements (#65) * fix: move padding to right place * chore: fixed double space --------- Co-authored-by: Anton Yarmolenko <[email protected]> Co-authored-by: Shafqat Muneer <[email protected]>
- Loading branch information
1 parent
255e2b7
commit f209262
Showing
10 changed files
with
75 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// SecureInputView.swift | ||
// Core | ||
// | ||
// Created by Anton Yarmolenka on 25/07/2024. | ||
// | ||
|
||
import SwiftUI | ||
import Theme | ||
|
||
public struct SecureInputView: View { | ||
|
||
@Binding private var text: String | ||
@State private var isSecured: Bool = true | ||
|
||
public init(_ text: Binding<String>) { | ||
self._text = text | ||
} | ||
|
||
public var body: some View { | ||
ZStack(alignment: .trailing) { | ||
Group { | ||
if isSecured { | ||
SecureField("", text: $text) | ||
} else { | ||
TextField("", text: $text) | ||
} | ||
}.padding(.trailing, 32) | ||
|
||
Button(action: { | ||
isSecured.toggle() | ||
}) { | ||
Image(systemName: self.isSecured ? "eye.slash" : "eye") | ||
.accentColor(Theme.Colors.textInputPlaceholderColor) | ||
} | ||
.frame(height: 23) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters