-
Notifications
You must be signed in to change notification settings - Fork 1
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 #452 from PermanentOrg/feature/VSP-1442-iOS-Login-…
…Screen VSP-1442 [IOS][Mobile]Login Screen
- Loading branch information
Showing
36 changed files
with
973 additions
and
91 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,43 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>NSPrivacyAccessedAPITypes</key> | ||
<array> | ||
<dict> | ||
<key>NSPrivacyAccessedAPIType</key> | ||
<string>NSPrivacyAccessedAPICategorySystemBootTime</string> | ||
<key>NSPrivacyAccessedAPITypeReasons</key> | ||
<array> | ||
<string>35F9.1</string> | ||
</array> | ||
</dict> | ||
<dict> | ||
<key>NSPrivacyAccessedAPIType</key> | ||
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string> | ||
<key>NSPrivacyAccessedAPITypeReasons</key> | ||
<array> | ||
<string>3B52.1</string> | ||
<string>DDA9.1</string> | ||
</array> | ||
</dict> | ||
<dict> | ||
<key>NSPrivacyAccessedAPIType</key> | ||
<string>NSPrivacyAccessedAPICategoryDiskSpace</string> | ||
<key>NSPrivacyAccessedAPITypeReasons</key> | ||
<array> | ||
<string>E174.1</string> | ||
</array> | ||
</dict> | ||
<dict> | ||
<key>NSPrivacyAccessedAPIType</key> | ||
<string>NSPrivacyAccessedAPICategoryUserDefaults</string> | ||
<key>NSPrivacyAccessedAPITypeReasons</key> | ||
<array> | ||
<string>CA92.1</string> | ||
<string>AC6B.1</string> | ||
</array> | ||
</dict> | ||
</array> | ||
</dict> | ||
</plist> |
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,43 @@ | ||
// | ||
// SnackBarView.swift | ||
// Permanent | ||
// | ||
// Created by Flaviu Silaghi on 15.04.2024. | ||
|
||
import SwiftUI | ||
|
||
struct SnackBarView: View { | ||
@Binding var show: Bool | ||
private var messsage: String | ||
|
||
init(message: String, show: Binding<Bool>) { | ||
self.messsage = message | ||
_show = show | ||
} | ||
|
||
var body: some View { | ||
VStack { | ||
Spacer() | ||
if show { | ||
Text(messsage) | ||
.textStyle(SmallRegularTextStyle()) | ||
.foregroundColor(Color.middleGray) | ||
.frame(minWidth: 240, minHeight: 64) | ||
.padding(.horizontal, 12) | ||
.padding(.vertical, 4) | ||
.background(Color.white) | ||
.cornerRadius(32) | ||
.shadow(color: .black.opacity(0.08), radius: 8, x: 0, y: 16) | ||
.padding(.bottom, 32) | ||
|
||
// Optionally add a button to dismiss | ||
} | ||
} | ||
.animation(.spring(), value: show) // Animation for showing/hiding | ||
.edgesIgnoringSafeArea(.bottom) // Overlay the whole window | ||
} | ||
} | ||
|
||
#Preview { | ||
SnackBarView(message: "Hello", show: .constant(true)) | ||
} |
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
24 changes: 24 additions & 0 deletions
24
Permanent/Modules/Authentication/Screens/AuthLeftSideView.swift
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,24 @@ | ||
// | ||
// AuthLeftSideView.swift | ||
// Permanent | ||
// | ||
// Created by Lucian Cerbu on 09.09.2024. | ||
|
||
import SwiftUI | ||
|
||
struct AuthLeftSideView: View { | ||
var body: some View { | ||
VStack { | ||
HStack { | ||
Text("Show image") | ||
.foregroundStyle(.white) | ||
|
||
} | ||
} | ||
|
||
} | ||
} | ||
|
||
#Preview { | ||
AuthLeftSideView() | ||
} |
45 changes: 45 additions & 0 deletions
45
Permanent/Modules/Authentication/Screens/AuthenticatorContainerView.swift
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,45 @@ | ||
// | ||
// AuthenticatorContainerView.swift | ||
// Permanent | ||
// | ||
// Created by Lucian Cerbu on 03.09.2024. | ||
|
||
import SwiftUI | ||
|
||
struct AuthenticatorContainerView: View { | ||
@ObservedObject var viewModel: AuthenticatorContainerViewModel | ||
|
||
@State private var isBack = false | ||
@Environment(\.presentationMode) var presentationMode | ||
|
||
var body: some View { | ||
GeometryReader { geometry in | ||
ZStack { | ||
Gradient.darkLightBlueGradient | ||
HStack(spacing: 0) { | ||
if !Constants.Design.isPhone { | ||
AuthLeftSideView() | ||
.frame(width: geometry.size.width * 0.61) | ||
} | ||
LoginView(viewModel: LoginViewModel(containerViewModel: viewModel), loginSuccess: { | ||
dismissView() | ||
}) | ||
.frame(maxWidth: .infinity) | ||
} | ||
LoadingOverlay() | ||
.opacity(viewModel.isLoading ? 1 : 0) | ||
.animation(.easeInOut(duration: 0.5), value: viewModel.isLoading) | ||
.allowsHitTesting(viewModel.isLoading) | ||
} | ||
} | ||
.ignoresSafeArea(.all) | ||
} | ||
|
||
func dismissView() { | ||
presentationMode.wrappedValue.dismiss() | ||
} | ||
} | ||
|
||
#Preview { | ||
AuthenticatorContainerView(viewModel: AuthenticatorContainerViewModel()) | ||
} |
Oops, something went wrong.