Configured the Login module and moved all its files in it.
This commit is contained in:
parent
8b34dc54ad
commit
9ed753b2fe
@ -36,6 +36,7 @@
|
|||||||
/* End PBXContainerItemProxy section */
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
02784F03293A8331005F839D /* Modules */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Modules; sourceTree = "<group>"; };
|
||||||
02AE64EB29363DBF005A4AF3 /* BeReal.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BeReal.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
02AE64EB29363DBF005A4AF3 /* BeReal.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BeReal.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
02AE64EE29363DBF005A4AF3 /* BeRealApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BeRealApp.swift; sourceTree = "<group>"; };
|
02AE64EE29363DBF005A4AF3 /* BeRealApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BeRealApp.swift; sourceTree = "<group>"; };
|
||||||
02AE64F029363DBF005A4AF3 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
|
02AE64F029363DBF005A4AF3 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
|
||||||
@ -47,7 +48,6 @@
|
|||||||
02AE650929363DC1005A4AF3 /* BeRealUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BeRealUITests.swift; sourceTree = "<group>"; };
|
02AE650929363DC1005A4AF3 /* BeRealUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BeRealUITests.swift; sourceTree = "<group>"; };
|
||||||
02AE650B29363DC1005A4AF3 /* BeRealUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BeRealUITestsLaunchTests.swift; sourceTree = "<group>"; };
|
02AE650B29363DC1005A4AF3 /* BeRealUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BeRealUITestsLaunchTests.swift; sourceTree = "<group>"; };
|
||||||
02FFFD7A29395DD200306533 /* String+Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Constants.swift"; sourceTree = "<group>"; };
|
02FFFD7A29395DD200306533 /* String+Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Constants.swift"; sourceTree = "<group>"; };
|
||||||
4694AA9D293A7B8B00D54903 /* Modules */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = Modules; path = ../../../../../../Users/logansama/Desktop/Modules; sourceTree = "<group>"; };
|
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@ -79,23 +79,14 @@
|
|||||||
027F60592937662300467238 /* Login */ = {
|
027F60592937662300467238 /* Login */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
02FFFD7629395D7F00306533 /* Components */,
|
|
||||||
027F605C29376EEB00467238 /* Views */,
|
|
||||||
);
|
);
|
||||||
path = Login;
|
path = Login;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
027F605C29376EEB00467238 /* Views */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
);
|
|
||||||
path = Views;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
02AE64E229363DBF005A4AF3 = {
|
02AE64E229363DBF005A4AF3 = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
4694AA9D293A7B8B00D54903 /* Modules */,
|
02784F03293A8331005F839D /* Modules */,
|
||||||
02AE64ED29363DBF005A4AF3 /* BeReal */,
|
02AE64ED29363DBF005A4AF3 /* BeReal */,
|
||||||
02AE64FE29363DC1005A4AF3 /* BeRealTests */,
|
02AE64FE29363DC1005A4AF3 /* BeRealTests */,
|
||||||
02AE650829363DC1005A4AF3 /* BeRealUITests */,
|
02AE650829363DC1005A4AF3 /* BeRealUITests */,
|
||||||
@ -152,13 +143,6 @@
|
|||||||
path = BeRealUITests;
|
path = BeRealUITests;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
02FFFD7629395D7F00306533 /* Components */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
);
|
|
||||||
path = Components;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
02FFFD7929395DBF00306533 /* Extensions */ = {
|
02FFFD7929395DBF00306533 /* Extensions */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
25
Modules/Package.swift
Normal file
25
Modules/Package.swift
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// swift-tools-version: 5.7
|
||||||
|
|
||||||
|
import PackageDescription
|
||||||
|
|
||||||
|
let package = Package(
|
||||||
|
name: "Modules",
|
||||||
|
defaultLocalization: "en",
|
||||||
|
platforms: [
|
||||||
|
.iOS(.v15)
|
||||||
|
],
|
||||||
|
products: [
|
||||||
|
.library(
|
||||||
|
name: "Modules",
|
||||||
|
targets: [
|
||||||
|
"Login"
|
||||||
|
]
|
||||||
|
),
|
||||||
|
],
|
||||||
|
targets: [
|
||||||
|
.target(
|
||||||
|
name: "Login",
|
||||||
|
resources: [.process("Resources")]
|
||||||
|
),
|
||||||
|
]
|
||||||
|
)
|
@ -1,13 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
Localizable.strings
|
Localizable.strings
|
||||||
BeReal
|
Login
|
||||||
|
|
||||||
Created by Javier Cicchelli on 02/12/2022.
|
Created by Javier Cicchelli on 02/12/2022.
|
||||||
Copyright © 2022 Röck+Cöde. All rights reserved.
|
Copyright © 2022 Röck+Cöde. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Login view
|
|
||||||
|
|
||||||
"login.title.text" = "My files";
|
"login.title.text" = "My files";
|
||||||
"login.text_field.username.placeholder" = "Username";
|
"login.text_field.username.placeholder" = "Username";
|
||||||
"login.text_field.password.placeholder" = "Password";
|
"login.text_field.password.placeholder" = "Password";
|
@ -8,15 +8,19 @@
|
|||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct LoginView: View {
|
public struct LoginView: View {
|
||||||
|
|
||||||
// MARK: States
|
// MARK: States
|
||||||
|
|
||||||
@State private var containerTopPadding: CGFloat = 0
|
@State private var containerTopPadding: CGFloat = 0
|
||||||
|
|
||||||
|
// MARK: Initialisers
|
||||||
|
|
||||||
|
public init() {}
|
||||||
|
|
||||||
// MARK: Body
|
// MARK: Body
|
||||||
|
|
||||||
var body: some View {
|
public var body: some View {
|
||||||
ScrollView(
|
ScrollView(
|
||||||
.vertical,
|
.vertical,
|
||||||
showsIndicators: false
|
showsIndicators: false
|
||||||
@ -42,15 +46,15 @@ fileprivate extension LoginView {
|
|||||||
// MARK: States
|
// MARK: States
|
||||||
|
|
||||||
@State private var isAuthenticating: Bool = false
|
@State private var isAuthenticating: Bool = false
|
||||||
@State private var username: String = .empty
|
@State private var username: String = ""
|
||||||
@State private var password: String = .empty
|
@State private var password: String = ""
|
||||||
@State private var errorMessage: String?
|
@State private var errorMessage: String?
|
||||||
|
|
||||||
// MARK: Body
|
// MARK: Body
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(spacing: 32) {
|
VStack(spacing: 32) {
|
||||||
Text("login.title.text")
|
Text("login.title.text", bundle: .module)
|
||||||
.font(.largeTitle)
|
.font(.largeTitle)
|
||||||
.fontWeight(.bold)
|
.fontWeight(.bold)
|
||||||
.foregroundColor(.primary)
|
.foregroundColor(.primary)
|
||||||
@ -67,7 +71,7 @@ fileprivate extension LoginView {
|
|||||||
// TODO: login with the username and password.
|
// TODO: login with the username and password.
|
||||||
} label: {
|
} label: {
|
||||||
Label {
|
Label {
|
||||||
Text("login.button.log_in.text")
|
Text("login.button.log_in.text", bundle: .module)
|
||||||
.fontWeight(.semibold)
|
.fontWeight(.semibold)
|
||||||
} icon: {
|
} icon: {
|
||||||
if isAuthenticating {
|
if isAuthenticating {
|
Loading…
x
Reference in New Issue
Block a user