Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
v4.1 (#517)
Browse files Browse the repository at this point in the history
* Fix/widget and movie bugs (#511)

* change tabbar items of Widgets & Grades to "outline"

* change studyroom widget icon

* bugfix: show events on same day -> filter past events out before building dict

* Improve MovieCard Design

* Update Version Number

* Make Widgets only available on phone

* Fix/token permissions UI (#512)

* Adding a new warning if not all permissions are granted.

* Spacers and Localizables

* bugfix: fix tower image (#509)

Closes #508

* Design/login (#513)

* Move Calendar Picker to bottom

* Rename Widget Tabbaritem

* Make LecturesView icons outline

* LectureView: reduce Lecture Info Text sizes

* Remove Calendar EventsView

* Fix Movie Title Image gray bar

* - fix TUM logo white pixelation
- calendar picker back to top

* Redesign some stuff for the Login Process

* Remove old tum logo_white images

* A few Login Design changes

* Add Need Help Button to Check Permissions View

* Remove red x from Check Token Button

* Add personal NavigationTitle to Widget View

* Today Btn press in Calendar forwards to day view

* Adjust Login Design to iPad

* Localize Mensa Garching traffic

* Remove icon from Semester List Group Header on Grades & Lectures

* Adjust Grades Info Design to Lectures (-> icon outline, text larger)

* LectureDetails: Add contact btn to lecturer info

* Change Lecturer Search Icon

* Widget View: await name to display navigationTitle

* Add Spacer to Widget Detail sheet top

* Change color check token permission view text

* Open Widget View when logging in

* Generate personalized Widget Navigation Title

* Reorder Code Widget Screen

* Adjust Profile "GET IN CONTACT" Btns to Webview setting

* Move NavTitle loading into recommender loading

* remove request location always use

* A few Login - Token Design changes

Co-authored-by: August Wittgenstein <[email protected]>
Co-authored-by: August Wittgenstein <[email protected]>
Co-authored-by: 14slash12 <[email protected]>
Co-authored-by: Thomas Schuster <[email protected]>
  • Loading branch information
5 people committed Nov 24, 2022
1 parent ef0224c commit ed182bd
Show file tree
Hide file tree
Showing 31 changed files with 360 additions and 329 deletions.
8 changes: 2 additions & 6 deletions Campus-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@
36BBE7342798B04D0018FD3F /* NewsSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36BBE7332798B04D0018FD3F /* NewsSource.swift */; };
36C70FB128538A190097416E /* PanelContentCafeteriasListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36C70FB028538A190097416E /* PanelContentCafeteriasListView.swift */; };
36C70FB32854D2AB0097416E /* PanelContentStudyGroupsListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36C70FB22854D2AB0097416E /* PanelContentStudyGroupsListView.swift */; };
36E964A32774932B0055777F /* CalendarToolbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E964A22774932B0055777F /* CalendarToolbar.swift */; };
36E964A5277493D90055777F /* CalendarViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E964A4277493D90055777F /* CalendarViewModel.swift */; };
36E964A7277498540055777F /* CalendarContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E964A6277498540055777F /* CalendarContentView.swift */; };
36E964AA277498B60055777F /* KVKCalendar in Frameworks */ = {isa = PBXBuildFile; productRef = 36E964A9277498B60055777F /* KVKCalendar */; };
Expand Down Expand Up @@ -498,7 +497,6 @@
36BBE7332798B04D0018FD3F /* NewsSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewsSource.swift; sourceTree = "<group>"; };
36C70FB028538A190097416E /* PanelContentCafeteriasListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanelContentCafeteriasListView.swift; sourceTree = "<group>"; };
36C70FB22854D2AB0097416E /* PanelContentStudyGroupsListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanelContentStudyGroupsListView.swift; sourceTree = "<group>"; };
36E964A22774932B0055777F /* CalendarToolbar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarToolbar.swift; sourceTree = "<group>"; };
36E964A4277493D90055777F /* CalendarViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarViewModel.swift; sourceTree = "<group>"; };
36E964A6277498540055777F /* CalendarContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarContentView.swift; sourceTree = "<group>"; };
36E964AB277499860055777F /* CalendarDisplayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarDisplayView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1468,7 +1466,6 @@
36E9649F277492B70055777F /* Views */ = {
isa = PBXGroup;
children = (
36E964A22774932B0055777F /* CalendarToolbar.swift */,
36E964A6277498540055777F /* CalendarContentView.swift */,
36E964AB277499860055777F /* CalendarDisplayView.swift */,
36AD5CF327B8C83500DAE143 /* CalendarSingleEventView.swift */,
Expand Down Expand Up @@ -1722,7 +1719,6 @@
36BB6F7027B1197400F224AB /* Profile.swift in Sources */,
08D0703A28776DD6004140B1 /* TextWidgetView.swift in Sources */,
08FAFD15287DC484006A0E27 /* CalendarWidgetView.swift in Sources */,
36E964A32774932B0055777F /* CalendarToolbar.swift in Sources */,
3654F3762851710E008AD5DC /* RoomFinderViewModel.swift in Sources */,
36108BC427A3046B007DC62D /* LectureDetailsDetailedInfoRowView.swift in Sources */,
36108C1C27A307FA007DC62D /* GradesView.swift in Sources */,
Expand Down Expand Up @@ -2106,7 +2102,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.0;
MARKETING_VERSION = 4.1;
PRODUCT_BUNDLE_IDENTIFIER = de.tum.tca;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTS_MACCATALYST = YES;
Expand Down Expand Up @@ -2149,7 +2145,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.0;
MARKETING_VERSION = 4.1;
PRODUCT_BUNDLE_IDENTIFIER = de.tum.tca;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTS_MACCATALYST = YES;
Expand Down
30 changes: 16 additions & 14 deletions Campus-iOS/App.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct CampusApp: App {
NavigationView {
LoginView(model: model)
.onAppear {
selectedTab = 2
selectedTab = 0
}
}
.navigationViewStyle(.stack)
Expand Down Expand Up @@ -82,19 +82,21 @@ struct CampusApp: App {
view.navigationViewStyle(.stack)
})

NavigationView {
WidgetScreen(model: model)
//.navigationTitle("My Widgets")
.toolbar {
ToolbarItemGroup(placement: .navigationBarTrailing) {
ProfileToolbar(model: model)
if UIDevice.current.userInterfaceIdiom == .phone {
NavigationView {
WidgetScreen(model: model)

.toolbar {
ToolbarItemGroup(placement: .navigationBarTrailing) {
ProfileToolbar(model: model)
}
}
}
}
.navigationViewStyle(.stack)
.tag(0)
.tabItem {
Label("My Widgets", systemImage: "rectangle.3.group")
}
.navigationViewStyle(.stack)
.tag(0)
.tabItem {
Label("Home", systemImage: "rectangle.3.group").environment(\.symbolVariants, .none)
}
}

NavigationView {
Expand All @@ -108,7 +110,7 @@ struct CampusApp: App {
}
.tag(2)
.tabItem {
Label("Grades", systemImage: "checkmark.shield")
Label("Grades", systemImage: "checkmark.shield").environment(\.symbolVariants, .none)
}
.if(UIDevice.current.userInterfaceIdiom == .pad, transformT: { view in
view.navigationViewStyle(.stack)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "TUMLogo_oZ_Vollfl_negativ_RGB.png",
"filename" : "TUM2.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.
21 changes: 21 additions & 0 deletions Campus-iOS/Assets.xcassets/set-permissions.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "set-permissions.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.
Binary file modified Campus-iOS/Assets.xcassets/tower.imageset/image4-94.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class CalendarViewModel: ObservableObject {

var eventsByDate: [Date? : [CalendarEvent]] {
let sortedEvents = events.sorted { $0.startDate ?? Date() < $1.startDate ?? Date() }
let dictionary = Dictionary(grouping: sortedEvents, by: { $0.startDate?.removeTimeStamp })
let filteredEvents = sortedEvents.filter { Date() <= $0.startDate ?? Date() }
let dictionary = Dictionary(grouping: filteredEvents, by: { $0.startDate?.removeTimeStamp })
return dictionary
}
}
Expand Down
8 changes: 7 additions & 1 deletion Campus-iOS/CalendarComponent/Views/CalendarContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ struct CalendarContentView: View {
}
.toolbar {
ToolbarItemGroup(placement: .navigationBarLeading) {
CalendarToolbar(viewModel: self.viewModel, selectedEventID: self.$selectedEventID, isTodayPressed: self.$isTodayPressed)
Button(action: {
self.isTodayPressed = true
selectedType = .day
}) {
Text("Today")
}
}
ToolbarItem(placement: .principal) {
Picker("Calendar Type", selection: $selectedType) {
Expand All @@ -88,6 +93,7 @@ struct CalendarContentView: View {
}
}
}
.opacity(1.0)
.pickerStyle(.segmented)
.onAppear {
UISegmentedControl.appearance().backgroundColor = UIColor.systemBlue.withAlphaComponent(0.2)
Expand Down
52 changes: 0 additions & 52 deletions Campus-iOS/CalendarComponent/Views/CalendarToolbar.swift

This file was deleted.

6 changes: 4 additions & 2 deletions Campus-iOS/CalendarComponent/Views/CalendarWidgetView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ struct CalendarWidgetView: View {
var body: some View {
// Show the events on the earliest date which is not in the past.
let events = viewModel.eventsByDate
.filter { Date() <= $0.key ?? Date() }
.min { $0.key ?? Date() < $1.key ?? Date() }?.value ?? []

WidgetFrameView(
Expand All @@ -52,7 +51,10 @@ struct CalendarWidgetView: View {
showDetails.toggle()
}
.sheet(isPresented: $showDetails) {
CalendarContentView(model: model, refresh: .constant(false))
VStack {
Spacer().frame(height: 10)
CalendarContentView(model: model, refresh: .constant(false))
}
}
.expandable(size: $size, initialSize: initialSize, scale: $scale)
}
Expand Down
12 changes: 6 additions & 6 deletions Campus-iOS/Campus-iOS/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
// TokenConfirmationView
"Back" = "Back";
"Log in on " = "Log in on ";
"TUMOnline" = "TUMOnline";
"Select **Token-Management**" = "Select **Token-Management**";
"Activate the newly created token and enable your desired permissions" = "Activate the newly created token and enable your desired permissions";
"Contact Support" = "Contact Support";
Expand All @@ -92,16 +91,16 @@
"Leaving now will invalidate the current token!" = "Leaving now will invalidate the current token!";
"Leave" = "Leave";

"Open TUMOnline" = "Open TUMOnline";
"Check Token" = "Check Token";
"Token inactive" = "Token inactive";
"Please activate the latest token on TUMOnline" = "Please activate the latest token on TUMOnline";
"Token active" = "Token active";

// TokenPermissionsView
"You can change your permissions on TUMOnline" = "You can change your permissions on TUMOnline";
"You can change your permissions in TUMOnline" = "You can change your permissions in TUMOnline";
"Identification (TUM ID and name)" = "Identification (TUM ID and name)";
"Check Permissions" = "Check Permissions";
"Permissions" = "Permissions";
"You have not granted the following permissions: \n\n" = "You have not granted the following permissions: \n\n";
"\nJust be aware that the app will not fully work without all permissions. You can change the permissions every time in TUMOnline." = "\nJust be aware that the app will not fully work without all permissions. You can change the permissions every time in TUMOnline.";
"Continue anyways" = "Continue anyways";

// ProfileView
"Token Permissions" = "Token Permissions";
Expand Down Expand Up @@ -176,6 +175,7 @@

// Map
"Search ..." = "Search ...";
"Traffic" = "Traffic";

// Movies
"No more movies this semester 😢\nGet excited for the next season!" = "No more movies this semester 😢\nGet excited for the next season!";
Expand Down
12 changes: 6 additions & 6 deletions Campus-iOS/Campus-iOS/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
// TokenConfirmationView
"Back" = "Zurück";
"Log in on " = "Melde dich auf ";
"TUMOnline" = "TUMOnline an";
"Select **Token-Management**" = "Gehe auf **Token Verwaltung**";
"Activate the newly created token and enable your desired permissions" = "Aktiviere den Token und stelle die benötigten Rechte ein";
"Contact Support" = "Support kontaktieren";
Expand All @@ -86,16 +85,16 @@
"Leaving now will invalidate the current token!" = "Wenn du jetzt die Seite verlässt wird der aktuelle Token ungültig!";
"Leave" = "Verlassen";

"Open TUMOnline" = "Öffne TUMOnline";
"Check Token" = "Token überprüfen";
"Token inactive" = "Token inaktiv";
"Please activate the latest token on TUMOnline" = "Bitte aktiviere den neusten Token auf TUMOnline";
"Token active" = "Token aktiv";

// TokenPermissionsView
"You can change your permissions on TUMOnline" = "Du kannst deine Rechte auf TUMOnline anpassen";
"You can change your permissions in TUMOnline" = "Du kannst deine Rechte in TUMOnline anpassen";
"Identification (TUM ID and name)" = "Identifikation (TUM ID und Name)";
"Check Permissions" = "Rechte überprüfen";
"Permissions" = "Rechte";
"You have not granted the following permissions: \n\n" = "Du hast nicht alle Rechte freigegeben: \n\n";
"\nJust be aware that the app will not fully work without all permissions. You can change the permissions every time in TUMOnline." = "\nDadurch können nicht alle Features der App genutzt werden. Du kannst die Rechte jederzeit auf TUMOnline anpassen.";
"Continue anyways" = "Trotzdem weiter";

// ProfileView
"Token Permissions" = "Token Rechte";
Expand Down Expand Up @@ -170,6 +169,7 @@

// Map
"Search ..." = "Suchen ...";
"Traffic" = "Auslastung";

// Movies
"No more movies this semester 😢\nGet excited for the next season!" = "Keine Filme mehr dieses Semester 😢\nMacht euch ready für die nächste Saison!";
Expand Down
12 changes: 6 additions & 6 deletions Campus-iOS/GradesComponent/Views/GradeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,34 +36,34 @@ struct GradeView: View {
VStack(alignment: .leading, spacing: 8) {
HStack(spacing: 16) {
HStack {
Image(systemName: "pencil.circle.fill")
Image(systemName: "pencil.circle")
.frame(width: 12, height: 12)
.foregroundColor(Color("tumBlue"))
Text(grade.modusShort)
.font(.system(size: 12))
.font(.footnote)
.foregroundColor(colorScheme == .dark ? .init(UIColor.lightGray) : .init(UIColor.darkGray))
Spacer()
}
.frame(minWidth: 0, maxWidth: .infinity)

HStack {
Image(systemName: "number.circle.fill")
Image(systemName: "number.circle")
.frame(width: 12, height: 12)
.foregroundColor(Color("tumBlue"))
Text(grade.lvNumber)
.font(.system(size: 12))
.font(.footnote)
.foregroundColor(colorScheme == .dark ? .init(UIColor.lightGray) : .init(UIColor.darkGray))
Spacer()
}
.frame(minWidth: 0, maxWidth: .infinity)
}.foregroundColor(.init(.darkGray))

HStack {
Image(systemName: "person.circle.fill")
Image(systemName: "person.circle")
.frame(width: 12, height: 12)
.foregroundColor(Color("tumBlue"))
Text(grade.examiner)
.font(.system(size: 12))
.font(.footnote)
.foregroundColor(colorScheme == .dark ? .init(UIColor.lightGray) : .init(UIColor.darkGray))
.fixedSize(horizontal: false, vertical: true)
}.foregroundColor(.init(.darkGray))
Expand Down
9 changes: 3 additions & 6 deletions Campus-iOS/GradesComponent/Views/GradesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@ struct GradesView: View {
}

ForEach(self.vm.gradesByDegreeAndSemester[index].1, id: \.0) { gradesBySemester in
Section(
header:
GroupBoxLabelView(
iconName: "graduationcap.fill",
text: gradesBySemester.0
)
Section(header: Text(gradesBySemester.0)
.font(.headline.bold())
.foregroundColor(Color("tumBlue"))
) {
ForEach(gradesBySemester.1) { item in
VStack {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,16 @@ struct LectureDetailsBasicInfoView: View {
text: lectureDetails.organisation
)
Divider()
LectureDetailsBasicInfoRowView(
iconName: "person.fill",
text: lectureDetails.speaker
)
.onTapGesture {
self.showActionSheet = true
HStack {
LectureDetailsBasicInfoRowView(
iconName: "person.fill",
text: lectureDetails.speaker
)
Spacer()
Button(
action: { self.showActionSheet = true },
label: { Image(systemName: "magnifyingglass").foregroundColor(.blue) }
)
}
if let firstMeeting = lectureDetails.firstScheduledDate {
Divider()
Expand Down
Loading

0 comments on commit ed182bd

Please sign in to comment.