-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'origin/main' into feature/philip/edit-profile-view
- Loading branch information
Showing
83 changed files
with
3,106 additions
and
1,700 deletions.
There are no files selected for viewing
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
20 changes: 20 additions & 0 deletions
20
ALUM/ALUM/Assets.xcassets/ALUM Beige.colorset/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,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0xF6", | ||
"green" : "0xFA", | ||
"red" : "0xFC" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
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
Binary file added
BIN
+9.04 KB
ALUM/ALUM/Assets.xcassets/AppIcon.appiconset/ALUM app icon (120x120) 1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.04 KB
ALUM/ALUM/Assets.xcassets/AppIcon.appiconset/ALUM app icon (120x120).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.5 KB
ALUM/ALUM/Assets.xcassets/AppIcon.appiconset/ALUM app icon (180x180).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.36 KB
ALUM/ALUM/Assets.xcassets/AppIcon.appiconset/ALUM app icon (40x40).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.59 KB
ALUM/ALUM/Assets.xcassets/AppIcon.appiconset/ALUM app icon (58x58).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.67 KB
ALUM/ALUM/Assets.xcassets/AppIcon.appiconset/ALUM app icon (60x60).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.32 KB
ALUM/ALUM/Assets.xcassets/AppIcon.appiconset/ALUM app icon (80x80).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.01 KB
ALUM/ALUM/Assets.xcassets/AppIcon.appiconset/ALUM app icon (87x87).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 95 additions & 3 deletions
98
ALUM/ALUM/Assets.xcassets/AppIcon.appiconset/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
21 changes: 21 additions & 0 deletions
21
ALUM/ALUM/Assets.xcassets/Logout Icon.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,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "log-out.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
ALUM/ALUM/Assets.xcassets/NoConnectionIcon.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,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "no-connection.svg", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
ALUM/ALUM/Assets.xcassets/NoConnectionIcon.imageset/no-connection.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
31 changes: 31 additions & 0 deletions
31
ALUM/ALUM/Components/ButtonStyles/FullWidthButtonStyle.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,31 @@ | ||
// | ||
// FullWidthButtonStyle.swift | ||
// ALUM | ||
// | ||
// Created by Aman Aggarwal on 5/28/23. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct FullWidthButtonStyle: ButtonStyle { | ||
func makeBody(configuration: Configuration) -> some View { | ||
configuration.label | ||
.frame(maxWidth: .infinity) | ||
.padding(.vertical, 16) | ||
.background(ALUMColor.white.color) | ||
} | ||
} | ||
|
||
struct FullWidthButtonStyle_Previews: PreviewProvider { | ||
static var previews: some View { | ||
Button(action: { | ||
print("out") | ||
}, label: { | ||
HStack { | ||
ALUMText(text: "Log out", textColor: ALUMColor.red) | ||
Image("Logout Icon") | ||
} | ||
}) | ||
.buttonStyle(FullWidthButtonStyle()) | ||
} | ||
} |
File renamed without changes.
63 changes: 63 additions & 0 deletions
63
ALUM/ALUM/Components/CustomNavBar/CustomNavBarContainerView.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,63 @@ | ||
// | ||
// CustomNavBarContainerView.swift | ||
// ALUM | ||
// | ||
// Created by Yash Ravipati on 5/18/23. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct CustomNavBarDefaultValues { | ||
static var showBackButton: Bool = true | ||
static var title: String = "" | ||
static var barIsPurple: Bool = false | ||
static var barIsHidden: Bool = false | ||
} | ||
|
||
struct CustomNavBarContainerView<Content: View>: View { | ||
let content: Content | ||
|
||
// By default, we show the back button unless some view explicitly sets | ||
// this to false | ||
@State private var showBackButton: Bool = CustomNavBarDefaultValues.showBackButton | ||
|
||
@State private var title: String = CustomNavBarDefaultValues.title | ||
@State private var isPurple: Bool = CustomNavBarDefaultValues.barIsPurple | ||
@State private var isHidden: Bool = CustomNavBarDefaultValues.barIsHidden | ||
|
||
init(@ViewBuilder content: () -> Content) { | ||
self.content = content() | ||
} | ||
|
||
var body: some View { | ||
return VStack(spacing: 0) { | ||
if !isHidden { | ||
CustomNavBarView(showBackButton: showBackButton, title: title, isPurple: isPurple) | ||
} | ||
content | ||
.frame(maxWidth: .infinity, maxHeight: .infinity) | ||
} | ||
.onPreferenceChange(CustomNavBarTitlePreferenceKey.self, perform: { value in | ||
self.title = value | ||
}) | ||
.onPreferenceChange(CustomNavBarIsPurplePreferenceKey.self, perform: { value in | ||
self.isPurple = value | ||
}) | ||
.onPreferenceChange(CustomNavBarBackHiddenPreferenceKey.self, perform: { value in | ||
self.showBackButton = !value | ||
}) | ||
.onPreferenceChange(CustomNavBarIsHiddenPreferenceKey.self, perform: { value in | ||
self.isHidden = value | ||
}) | ||
} | ||
} | ||
|
||
struct CustomNavBarContainerView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
CustomNavBarContainerView { | ||
VStack(spacing: 0) { | ||
LoginReviewPage(text: ["Hello", "Hi"]) | ||
} | ||
} | ||
} | ||
} |
66 changes: 66 additions & 0 deletions
66
ALUM/ALUM/Components/CustomNavBar/CustomNavBarPreferenceKeys.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,66 @@ | ||
// | ||
// CustomNavBarPreferenceKeys.swift | ||
// ALUM | ||
// | ||
// Created by Yash Ravipati on 5/18/23. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
struct CustomNavBarTitlePreferenceKey: PreferenceKey { | ||
static var defaultValue: String = CustomNavBarDefaultValues.title | ||
|
||
static func reduce(value: inout String, nextValue: () -> String) { | ||
value = nextValue() | ||
} | ||
} | ||
|
||
struct CustomNavBarIsHiddenPreferenceKey: PreferenceKey { | ||
static var defaultValue: Bool = CustomNavBarDefaultValues.barIsHidden | ||
|
||
static func reduce(value: inout Bool, nextValue: () -> Bool) { | ||
value = nextValue() | ||
} | ||
} | ||
|
||
struct CustomNavBarIsPurplePreferenceKey: PreferenceKey { | ||
static var defaultValue: Bool = CustomNavBarDefaultValues.barIsPurple | ||
|
||
static func reduce(value: inout Bool, nextValue: () -> Bool) { | ||
value = nextValue() | ||
} | ||
} | ||
|
||
struct CustomNavBarBackHiddenPreferenceKey: PreferenceKey { | ||
static var defaultValue: Bool = !CustomNavBarDefaultValues.showBackButton | ||
|
||
static func reduce(value: inout Bool, nextValue: () -> Bool) { | ||
value = nextValue() | ||
} | ||
} | ||
|
||
extension View { | ||
func customNavigationIsHidden(_ isHidden: Bool) -> some View { | ||
preference(key: CustomNavBarIsHiddenPreferenceKey.self, value: isHidden) | ||
} | ||
|
||
func customNavigationTitle(_ title: String) -> some View { | ||
preference(key: CustomNavBarTitlePreferenceKey.self, value: title) | ||
} | ||
|
||
func customNavigationIsPurple(_ isPurple: Bool) -> some View { | ||
preference(key: CustomNavBarIsPurplePreferenceKey.self, value: isPurple) | ||
} | ||
|
||
func customNavigationBarBackButtonHidden(_ hidden: Bool) -> some View { | ||
preference(key: CustomNavBarBackHiddenPreferenceKey.self, value: hidden) | ||
} | ||
|
||
func customNavBarItems(title: String, isPurple: Bool, backButtonHidden: Bool) -> some View { | ||
self | ||
.customNavigationTitle(title) | ||
.customNavigationIsPurple(isPurple) | ||
.customNavigationBarBackButtonHidden(backButtonHidden) | ||
} | ||
} |
Oops, something went wrong.