Skip to content

Commit

Permalink
ui tweaks from new v3 designs and deps updates (#13)
Browse files Browse the repository at this point in the history
* feat: added new bottom bar
* feat: updated project settings and new bottom bar
* Update README.md
  • Loading branch information
Chandram-Dutta authored Dec 18, 2024
1 parent a0b1d35 commit b428a66
Show file tree
Hide file tree
Showing 18 changed files with 145 additions and 299 deletions.
35 changes: 7 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<a href="https://dscvit.com">
<img src="https://user-images.githubusercontent.com/30529572/92081025-fabe6f00-edb1-11ea-9169-4a8a61a5dd45.png" alt="DSC VIT"/>
</a>
<h2 align="center"> < Insert Project Title Here > </h2>
<h4 align="center"> < Insert Project Description Here > <h4>
<h2 align="center"> VITTY iOS</h2>
<h4 align="center"> iOS app for VITTY <h4>
</p>

---
Expand All @@ -13,48 +13,27 @@
[![DOCS](https://img.shields.io/badge/Documentation-see%20docs-green?style=flat-square&logo=appveyor)](INSERT_LINK_FOR_DOCS_HERE)
[![UI ](https://img.shields.io/badge/User%20Interface-Link%20to%20UI-orange?style=flat-square&logo=appveyor)](INSERT_UI_LINK_HERE)


## Features
- [ ] < feature >
- [ ] < feature >
- [ ] < feature >
- [ ] < feature >

<br>

## Dependencies
- < dependency >
- < dependency >


## Running


< directions to install >
```bash
< insert code >
```

< directions to execute >

```bash
< insert code >
```
Open in Xcode and run the app in simulator.

## Contributors

<table>
<tr align="center">
<td>
John Doe
Chandram Dutta
<p align="center">
<img src = "https://dscvit.com/images/dsc-logo-square.svg" width="150" height="150" alt="Your Name Here (Insert Your Image Link In Src">
<img src = "https://dscvit.com/images/dsc-logo-square.svg" width="150" height="150" alt="Chandram Dutta">
</p>
<p align="center">
<a href = "https://github.com/person1">
<a href = "https://github.com/Chandram-Dutta">
<img src = "http://www.iconninja.com/files/241/825/211/round-collaboration-social-github-code-circle-network-icon.svg" width="36" height = "36" alt="GitHub"/>
</a>
<a href = "https://www.linkedin.com/in/person1">
<a href = "https://www.linkedin.com/in/chandramdutta">
<img src = "http://www.iconninja.com/files/863/607/751/network-linkedin-social-connection-circular-circle-media-icon.svg" width="36" height="36" alt="LinkedIn"/>
</a>
</p>
Expand Down
107 changes: 11 additions & 96 deletions VITTY/VITTY.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/app-check.git",
"state" : {
"revision" : "076b241a625e25eac22f8849be256dfb960fcdfe",
"version" : "10.19.1"
"revision" : "3b62f154d00019ae29a71e9738800bb6f18b236d",
"version" : "10.19.2"
}
},
{
Expand All @@ -42,17 +42,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk",
"state" : {
"revision" : "8bcaf973b1d84e119b7c7c119abad72ed460979f",
"version" : "10.27.0"
"revision" : "e57841b296d04370ea23580f908881b0ccab17b9",
"version" : "10.28.1"
}
},
{
"identity" : "googleappmeasurement",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : {
"revision" : "70df02431e216bed98dd461e0c4665889245ba70",
"version" : "10.27.0"
"revision" : "fe727587518729046fc1465625b9afd80b5ab361",
"version" : "10.28.0"
}
},
{
Expand Down Expand Up @@ -96,8 +96,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/gtm-session-fetcher.git",
"state" : {
"revision" : "0382ca27f22fb3494cf657d8dc356dc282cd1193",
"version" : "3.4.1"
"revision" : "a2ab612cb980066ee56d90d60d8462992c07f24b",
"version" : "3.5.0"
}
},
{
Expand Down Expand Up @@ -159,8 +159,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-cmark.git",
"state" : {
"revision" : "f218e5d7691f78b55bfa39b367763f4612486c35",
"version" : "0.3.0"
"revision" : "3bc2f3e25df0cecc5dc269f7ccae65d0f386f06a",
"version" : "0.4.0"
}
},
{
Expand All @@ -177,8 +177,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-markdown.git",
"state" : {
"revision" : "e4f95e2dc23097a1a9a1dfdfe3fe3ee44de77378",
"version" : "0.3.0"
"revision" : "4aae40bf6fff5286e0e1672329d17824ce16e081",
"version" : "0.4.0"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1610"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1610"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
Expand Down
4 changes: 2 additions & 2 deletions VITTY/VITTY/Auth/ViewModels/AuthViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ class AuthViewModel: NSObject, ASAuthorizationControllerDelegate {
private func signInWithGoogle() async throws {
logger.info("Signing in with Google...")

let screen = await UIApplication.shared.connectedScenes.first as! UIWindowScene
let window = await screen.windows.first!.rootViewController!
let screen = UIApplication.shared.connectedScenes.first as! UIWindowScene
let window = screen.windows.first!.rootViewController!

let signInResult = try await GIDSignIn.sharedInstance.signIn(withPresenting: window)
let credential = GoogleAuthProvider.credential(
Expand Down
2 changes: 1 addition & 1 deletion VITTY/VITTY/Connect/View/ConnectPage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ struct ConnectPage: View {
}
.padding(.bottom)
}

.listRowBackground(
RoundedRectangle(cornerRadius: 15)
.fill(Color("Secondary"))
.padding(.bottom)
)
.listRowSeparator(.hidden)
}
.safeAreaPadding(EdgeInsets(top: 0, leading: 0, bottom: 100, trailing: 0))
.scrollContentBackground(.hidden)
.refreshable {
communityPageViewModel.fetchData(
Expand Down
36 changes: 27 additions & 9 deletions VITTY/VITTY/Home/View/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,34 @@
import SwiftUI

struct HomeView: View {

@State private var selectedPage = 1

var body: some View {
TabView {
TimeTableView(friend: nil)
.tabItem {
Label("Time Table", systemImage: "calendar.day.timeline.left")
}
ConnectPage()
.tabItem {
Label("Connect", systemImage: "person.2")
}
ZStack (alignment: .bottom) {
switch (selectedPage) {
// case 0:
// NavigationStack {
// ZStack {
// BackgroundView()
// }
// .navigationTitle("Courses")
// }
case 1:
TimeTableView(friend: nil)
.tabItem {
Label("Schedule", systemImage: "calendar.day.timeline.left")
}
case 2:
ConnectPage()
.tabItem {
Label("Connect", systemImage: "person.2")
}
default:
Text("Error Lol")
}
BottomBarView(presentTab: $selectedPage)
.padding(.bottom, 24)
}
}
}
Expand Down
81 changes: 81 additions & 0 deletions VITTY/VITTY/Shared/BottomBarView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
//
// BottomBarView.swift
// VITTY
//
// Created by Chandram Dutta on 07/07/24.
//

import SwiftUI

struct BottomBarView: View {

@Binding var presentTab: Int
@Namespace var bottomBarAnimation

var body: some View {
HStack {
// TabButtonView(value: $presentTab, name: "Courses", image: "book.closed.fill", tabNo: 0, namespace: bottomBarAnimation)
TabButtonView(value: $presentTab, name: "Schedule", image: "calendar.badge.clock", tabNo: 1, namespace: bottomBarAnimation)
TabButtonView(value: $presentTab, name: "Connect", image: "person.2.fill", tabNo: 2, namespace: bottomBarAnimation)
}
.padding()
.frame(height: 84)
.background(
RoundedRectangle(cornerRadius: 120)
.stroke(Color("Secondary"), lineWidth: 2)
.fill(Color("Background"))
)
.gesture(DragGesture(minimumDistance: 0, coordinateSpace: .local)
.onEnded({ value in
if value.translation.width < 0 {
if presentTab == 1 {
return
}
withAnimation (.bouncy(extraBounce: 0.1)) {
presentTab -= 1
}
}
if value.translation.width > 0 {
if presentTab == 2 {
return
}
withAnimation (.interactiveSpring(duration: 0.50, extraBounce: 0.3)) {
presentTab += 1
}
}
}))
}
}

struct TabButtonView: View {

@Binding var value: Int

let name: String
let image: String
let tabNo: Int
let namespace: Namespace.ID

var body: some View {
HStack {
Image(systemName: image)
.symbolEffect(.bounce, value: value == tabNo)
if value == tabNo {
Text(name)
}
}
.padding()
.background {
if value == tabNo {
RoundedRectangle(cornerRadius: 120)
.fill(Color("Secondary"))
.matchedGeometryEffect(id: "selectedTab", in: namespace)
}
}
.onTapGesture {
withAnimation (.interactiveSpring(duration: 0.50, extraBounce: 0.3)) {
value = tabNo
}
}
}
}
1 change: 1 addition & 0 deletions VITTY/VITTY/TimeTable/Views/TimeTableView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ struct TimeTableView: View {
)
.listRowSeparator(.hidden)
}
.safeAreaPadding(EdgeInsets(top: 0, leading: 0, bottom: 100, trailing: 0))
.sheet(item: $selectedLecture) { lecture in
LectureDetailView(lecture: lecture)
}
Expand Down
2 changes: 1 addition & 1 deletion VITTY/VITTY/Username/Views/UsernameView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ struct UsernameView: View {
Button(action: {
Task {
// TODO: Important
//

// isLoading = true
// await authViewModel.signInServer(username: username, regNo: regNo)
// isLoading = false
Expand Down

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions VITTY/vittyios-widgets/Assets.xcassets/Contents.json

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions VITTY/vittyios-widgets/Info.plist

This file was deleted.

Loading

0 comments on commit b428a66

Please sign in to comment.