-
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.
add new login screen and remove deeplink login
- Loading branch information
1 parent
c18b20d
commit ba33b90
Showing
17 changed files
with
356 additions
and
77 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
24 changes: 24 additions & 0 deletions
24
HappyPathTimeTracker/Assets.xcassets/hummingbird.imageset/Contents.json
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 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "hummingbird.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"template-rendering-intent" : "template" | ||
} | ||
} |
Binary file added
BIN
+20.4 KB
HappyPathTimeTracker/Assets.xcassets/hummingbird.imageset/hummingbird.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,37 @@ | ||
// | ||
// LargeButton.swift | ||
// HappyPathTimeTracker | ||
// | ||
// Created by Gorkem Sevim on 29.06.2024. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
struct LargeButton: View { | ||
let title: String | ||
let color: Color = Color.ShadesOfTeal.Teal_300 | ||
let disabled: Bool | ||
let isLoading: Bool | ||
let onClick: () -> Void | ||
|
||
var body: some View { | ||
Button(action: onClick, label: { | ||
Text(title) | ||
.foregroundStyle(Color.Primary.RealWhite) | ||
.padding() | ||
.frame(maxWidth: .infinity) | ||
.background { | ||
RoundedRectangle(cornerRadius: 20) | ||
.foregroundStyle(disabled ? Color.ShadesofCadetGray.CadetGray200 : color) | ||
} | ||
.disabled(disabled || isLoading) | ||
}) | ||
} | ||
} | ||
|
||
#Preview { | ||
LargeButton(title: "Signin", disabled: false, isLoading: true) { | ||
print("signin clicked") | ||
} | ||
} |
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,30 @@ | ||
// | ||
// RoundedContainer.swift | ||
// HappyPathTimeTracker | ||
// | ||
// Created by Gorkem Sevim on 29.06.2024. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
struct RoundedContainer<Content: View>: View { | ||
let content: () -> Content | ||
|
||
init(@ViewBuilder content: @escaping () -> Content) { | ||
self.content = content | ||
} | ||
var body: some View { | ||
GeometryReader { proxy in | ||
content() | ||
.padding(24) | ||
.background { | ||
Color.Primary.RealWhite | ||
} | ||
.frame(width: proxy.size.width * 0.8) | ||
.clipShape(RoundedRectangle(cornerRadius: 16)) | ||
.shadow(radius: 10) | ||
.frame(maxWidth: .infinity, maxHeight: .infinity) | ||
} | ||
} | ||
} |
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,52 @@ | ||
// | ||
// RoundedTextField.swift | ||
// HappyPathTimeTracker | ||
// | ||
// Created by Gorkem Sevim on 29.06.2024. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
struct RoundedTextField: View { | ||
@Binding var text: String | ||
var type: TextFieldType = .text | ||
@State private var isSecure: Bool = true | ||
|
||
var body: some View { | ||
HStack { | ||
if type == .text || !isSecure { | ||
TextField("", text: $text) | ||
.textFieldStyle(.plain) | ||
.foregroundColor(.Primary.DarkNight) | ||
.padding(5) | ||
} else { | ||
SecureField("", text: $text) | ||
.textFieldStyle(.plain) | ||
.foregroundColor(.Primary.DarkNight) | ||
.padding(5) | ||
} | ||
|
||
if type == .password { | ||
Button(action: { | ||
isSecure.toggle() | ||
}) { | ||
Image(systemName: isSecure ? "eye.slash" : "eye") | ||
.resizable() | ||
.frame(width: 16, height: 12) | ||
.foregroundColor(Color.ShadesOfTeal.Teal_300) | ||
} | ||
.padding(5) | ||
} | ||
} | ||
.overlay( | ||
RoundedRectangle(cornerRadius: 4) | ||
.stroke(Color.ShadesofCadetGray.CadetGray200) | ||
) | ||
} | ||
} | ||
|
||
enum TextFieldType { | ||
case text | ||
case password | ||
} |
This file was deleted.
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
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
Oops, something went wrong.