Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signup view #61

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4fcaab6
Adding logo test
jxeyallen Sep 2, 2024
83ca9f9
Merge pull request #1 from rokesby/Logo
maryashariq Sep 2, 2024
96f4a25
added login button
maryashariq Sep 2, 2024
df2d0f3
added login button
maryashariq Sep 2, 2024
8afbe48
Add page structure
santy1315 Sep 2, 2024
8d7eae3
Merge pull request #2 from rokesby/create-pages
jxeyallen Sep 2, 2024
110047b
Welcome Page updated design and styling
jxeyallen Sep 2, 2024
f08c7cb
Further styling changes
jxeyallen Sep 2, 2024
2a47d37
For changes
jxeyallen Sep 2, 2024
de8d94f
Final Styling changes
jxeyallen Sep 2, 2024
ab301dc
Merge pull request #3 from rokesby/Welcome-Page
rokesby Sep 3, 2024
1fc70f3
Spacer Changes
jxeyallen Sep 3, 2024
03c6e30
Further changes
jxeyallen Sep 3, 2024
cc6944a
Login Page Styling
jxeyallen Sep 3, 2024
f39e8eb
Adding style for login button
jxeyallen Sep 3, 2024
e6592f8
Merge pull request #4 from rokesby/Welcome-Page
rokesby Sep 3, 2024
16716ca
Changes
jxeyallen Sep 3, 2024
cdc8950
Merge pull request #5 from rokesby/Welcome-Page
santy1315 Sep 3, 2024
598d239
added basic signup form
maryashariq Sep 3, 2024
b05f76b
Added functionality for Login button to navigate to login page
jxeyallen Sep 3, 2024
6cd3bd4
starter for feed page structure
rokesby Sep 3, 2024
509cc13
Merge pull request #6 from rokesby/Homepage-1
JohnK02 Sep 3, 2024
f4cd8bc
upload image functionality for signup
maryashariq Sep 3, 2024
b9ae52f
Merge pull request #7 from rokesby/Welcome-Page
JohnK02 Sep 3, 2024
6c05fad
Merge branch 'main' into signup-view
santy1315 Sep 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.xcworkspace/xcuserdata/
DerivedData/
build/
*DS_Store*
40 changes: 38 additions & 2 deletions MobileAcebook.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
AE5D85E32AC9AFD2009680C6 /* MockAuthenticationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE5D85E22AC9AFD2009680C6 /* MockAuthenticationService.swift */; };
AE5D85E62AC9B077009680C6 /* AuthenticationServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE5D85E52AC9B077009680C6 /* AuthenticationServiceProtocol.swift */; };
AE5D85E82AC9B29A009680C6 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE5D85E72AC9B29A009680C6 /* User.swift */; };
F12EC4E32C873A1800467C46 /* ImagePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = F12EC4E22C873A1700467C46 /* ImagePicker.swift */; };
F52702832C872E7900C5B8E7 /* Post.swift in Sources */ = {isa = PBXBuildFile; fileRef = F52702822C872E7900C5B8E7 /* Post.swift */; };
F52702852C872FB500C5B8E7 /* PostsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F52702842C872FB500C5B8E7 /* PostsViewModel.swift */; };
F8E51E812C861051005418F9 /* SignUpPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E51E802C861051005418F9 /* SignUpPageView.swift */; };
F8E51E832C861062005418F9 /* LoginPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E51E822C861062005418F9 /* LoginPageView.swift */; };
F8E51E852C861071005418F9 /* FeedPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E51E842C861071005418F9 /* FeedPageView.swift */; };
F8E51E872C861086005418F9 /* CreatePostsPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E51E862C861086005418F9 /* CreatePostsPageView.swift */; };
F8E51E892C861095005418F9 /* ProfilePageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E51E882C861095005418F9 /* ProfilePageView.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -36,6 +44,7 @@
remoteGlobalIDString = AE5D85AB2AC8A221009680C6;
remoteInfo = MobileAcebook;
};
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
Expand All @@ -54,6 +63,14 @@
AE5D85E22AC9AFD2009680C6 /* MockAuthenticationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockAuthenticationService.swift; sourceTree = "<group>"; };
AE5D85E52AC9B077009680C6 /* AuthenticationServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationServiceProtocol.swift; sourceTree = "<group>"; };
AE5D85E72AC9B29A009680C6 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
F12EC4E22C873A1700467C46 /* ImagePicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImagePicker.swift; sourceTree = "<group>"; };
F52702822C872E7900C5B8E7 /* Post.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Post.swift; sourceTree = "<group>"; };
F52702842C872FB500C5B8E7 /* PostsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostsViewModel.swift; sourceTree = "<group>"; };
F8E51E802C861051005418F9 /* SignUpPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignUpPageView.swift; sourceTree = "<group>"; };
F8E51E822C861062005418F9 /* LoginPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginPageView.swift; sourceTree = "<group>"; };
F8E51E842C861071005418F9 /* FeedPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedPageView.swift; sourceTree = "<group>"; };
F8E51E862C861086005418F9 /* CreatePostsPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreatePostsPageView.swift; sourceTree = "<group>"; };
F8E51E882C861095005418F9 /* ProfilePageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfilePageView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -63,7 +80,6 @@
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
AE5D85B92AC8A224009680C6 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -111,6 +127,12 @@
AE5D85B32AC8A224009680C6 /* Assets.xcassets */,
AE5D85B52AC8A224009680C6 /* Preview Content */,
AE5D85D92AC8A337009680C6 /* WelcomePageView.swift */,
F8E51E802C861051005418F9 /* SignUpPageView.swift */,
F8E51E822C861062005418F9 /* LoginPageView.swift */,
F8E51E842C861071005418F9 /* FeedPageView.swift */,
F8E51E862C861086005418F9 /* CreatePostsPageView.swift */,
F8E51E882C861095005418F9 /* ProfilePageView.swift */,
F12EC4E22C873A1700467C46 /* ImagePicker.swift */,
);
path = MobileAcebook;
sourceTree = "<group>";
Expand Down Expand Up @@ -162,6 +184,8 @@
isa = PBXGroup;
children = (
AE5D85E72AC9B29A009680C6 /* User.swift */,
F52702822C872E7900C5B8E7 /* Post.swift */,
F52702842C872FB500C5B8E7 /* PostsViewModel.swift */,
);
path = Models;
sourceTree = "<group>";
Expand Down Expand Up @@ -238,7 +262,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1420;
LastUpgradeCheck = 1420;
LastUpgradeCheck = 1540;
TargetAttributes = {
AE5D85AB2AC8A221009680C6 = {
CreatedOnToolsVersion = 14.2;
Expand Down Expand Up @@ -305,8 +329,16 @@
buildActionMask = 2147483647;
files = (
AE5D85E12AC9AFA9009680C6 /* AuthenticationService.swift in Sources */,
F52702832C872E7900C5B8E7 /* Post.swift in Sources */,
F8E51E892C861095005418F9 /* ProfilePageView.swift in Sources */,
F8E51E852C861071005418F9 /* FeedPageView.swift in Sources */,
AE5D85E62AC9B077009680C6 /* AuthenticationServiceProtocol.swift in Sources */,
F8E51E832C861062005418F9 /* LoginPageView.swift in Sources */,
AE5D85B02AC8A221009680C6 /* MobileAcebookApp.swift in Sources */,
F8E51E812C861051005418F9 /* SignUpPageView.swift in Sources */,
F12EC4E32C873A1800467C46 /* ImagePicker.swift in Sources */,
F52702852C872FB500C5B8E7 /* PostsViewModel.swift in Sources */,
F8E51E872C861086005418F9 /* CreatePostsPageView.swift in Sources */,
AE5D85E82AC9B29A009680C6 /* User.swift in Sources */,
AE5D85DA2AC8A337009680C6 /* WelcomePageView.swift in Sources */,
);
Expand Down Expand Up @@ -383,6 +415,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -443,6 +476,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -469,6 +503,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"MobileAcebook/Preview Content\"";
DEVELOPMENT_TEAM = 93ARFXYW45;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
Expand Down Expand Up @@ -497,6 +532,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"MobileAcebook/Preview Content\"";
DEVELOPMENT_TEAM = 93ARFXYW45;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
Expand Down
114 changes: 114 additions & 0 deletions MobileAcebook.xcodeproj/xcshareddata/xcschemes/MobileAcebook.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AE5D85AB2AC8A221009680C6"
BuildableName = "MobileAcebook.app"
BlueprintName = "MobileAcebook"
ReferencedContainer = "container:MobileAcebook.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:MobileAcebook.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AE5D85BB2AC8A224009680C6"
BuildableName = "MobileAcebookTests.xctest"
BlueprintName = "MobileAcebookTests"
ReferencedContainer = "container:MobileAcebook.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "YES"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AE5D85C52AC8A224009680C6"
BuildableName = "MobileAcebookUITests.xctest"
BlueprintName = "MobileAcebookUITests"
ReferencedContainer = "container:MobileAcebook.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AE5D85AB2AC8A221009680C6"
BuildableName = "MobileAcebook.app"
BlueprintName = "MobileAcebook"
ReferencedContainer = "container:MobileAcebook.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "IDEPreferLogStreaming"
value = "YES"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AE5D85AB2AC8A221009680C6"
BuildableName = "MobileAcebook.app"
BlueprintName = "MobileAcebook"
ReferencedContainer = "container:MobileAcebook.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0.697",
"green" : "0.696",
"red" : "0.671"
}
},
"idiom" : "universal"
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "makers-logo.png",
"filename" : "Screenshot 2024-09-02 at 15.59.50.png",
"idiom" : "universal",
"scale" : "1x"
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
8 changes: 8 additions & 0 deletions MobileAcebook/CreatePostsPageView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// CreatePostsPageView.swift
// MobileAcebook
//
// Created by Santosh Dasari on 02/09/2024.
//

import Foundation
110 changes: 110 additions & 0 deletions MobileAcebook/FeedPageView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
//
// FeedPageView.swift
// MobileAcebook
//
// Created by Santosh Dasari on 02/09/2024.
//

import Foundation

// Mock up a simple posting
// Make a call to the Acebook API to retreive a posting
// Loop through and render each posting

import SwiftUI


// View Model to manage the list of posts
class PostViewModel: ObservableObject {

@Published var posts: [Post] = [
Post(title: "This is my first post", comment: "This is a comment on post 1", likes: 0),
Post(title: "This is my second post", comment: "This is a comment on post 2", likes: 0),
Post(title: "This is my third post", comment: "This is a comment on post 3", likes: 0)
]

func likePost(_ post: Post) {
if let index = posts.firstIndex(where: { $0.id == post.id }) {
posts[index].likes += 1
}
}

func addComment(_ post: Post, newComment: String) {
if let index = posts.firstIndex(where: { $0.id == post.id }) {
posts[index].comment = newComment
}
}
}

// Main View
struct ContentView: View {
@StateObject private var viewModel = PostViewModel()

var body: some View {
NavigationView {
List {
ForEach(viewModel.posts) { post in
PostView(post: post)
.environmentObject(viewModel)
}
}
.navigationTitle("Postings")
}
}
}

// View for a single post
struct PostView: View {
@EnvironmentObject var viewModel: PostViewModel
@State private var newComment: String = ""
var post: Post

var body: some View {
VStack(alignment: .leading) {
Text(post.title)
.font(.headline)

Text(post.comment)
.font(.subheadline)
.foregroundColor(.gray)

HStack {
Button(action: {
viewModel.likePost(post)
}) {
HStack {
Image(systemName: "hand.thumbsup")
Text("\(post.likes) Likes")
}
}
.buttonStyle(BorderlessButtonStyle())

Spacer()
}
.padding(.top, 5)

TextField("Add a comment...", text: $newComment, onCommit: {
viewModel.addComment(post, newComment: newComment)
newComment = ""
})
.textFieldStyle(RoundedBorderTextFieldStyle())
.padding(.top, 5)
}
.padding()
}
}

/*@main
struct PostingsApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}*/

struct PostView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Loading