From 3323dcac5a4339a0c0d910da7e7390e30f0a265c Mon Sep 17 00:00:00 2001 From: David Huh <38101884+qt1337@users.noreply.github.com> Date: Sun, 7 Feb 2021 16:13:37 +0100 Subject: [PATCH] :lipstick: Added frame for Information of user --- .../l10n/de.lproj/HomeView.strings | 1 + .../l10n/en.lproj/HomeView.strings | 1 + DHBW-Service/Views/Tabs/HomeView.swift | 26 +++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/DHBW-Service/Supporting Files/l10n/de.lproj/HomeView.strings b/DHBW-Service/Supporting Files/l10n/de.lproj/HomeView.strings index 48b54fc..f6872d2 100644 --- a/DHBW-Service/Supporting Files/l10n/de.lproj/HomeView.strings +++ b/DHBW-Service/Supporting Files/l10n/de.lproj/HomeView.strings @@ -7,6 +7,7 @@ */ "hey" = "Hey 👋🏻"; +"information" = "Deine Informationen"; "today" = "Heute"; "tomorrow" = "Morgen"; "upcomingExams" = "Nächste Klausuren"; diff --git a/DHBW-Service/Supporting Files/l10n/en.lproj/HomeView.strings b/DHBW-Service/Supporting Files/l10n/en.lproj/HomeView.strings index 0b25092..9d2e8dc 100644 --- a/DHBW-Service/Supporting Files/l10n/en.lproj/HomeView.strings +++ b/DHBW-Service/Supporting Files/l10n/en.lproj/HomeView.strings @@ -7,6 +7,7 @@ */ "hey" = "Hey 👋🏻"; +"information" = "Your Information"; "today" = "Today"; "tomorrow" = "Tomorrow"; "upcomingExams" = "Upcoming exams"; diff --git a/DHBW-Service/Views/Tabs/HomeView.swift b/DHBW-Service/Views/Tabs/HomeView.swift index fef94e9..d10084c 100644 --- a/DHBW-Service/Views/Tabs/HomeView.swift +++ b/DHBW-Service/Views/Tabs/HomeView.swift @@ -37,6 +37,32 @@ struct HomeView: View { ) Spacer() } + HStack { + Spacer() + VStack { + Text("information".localized(tableName: "HomeView", plural: false)) + .font(.title3) + .frame(maxWidth: .infinity, alignment: .leading) + HStack { + VStack(alignment: .leading) { + Text("course".localized(tableName: "General", plural: false) + ": ") + Text("director".localized(tableName: "General", plural: false) + ": ") + } + VStack(alignment: .leading) { + Text(self.course) + .bold() + Text(self.director) + .bold() + }.frame(maxWidth: .infinity, alignment: .leading) + } + } + .padding() + .background( + RoundedRectangle(cornerRadius: 10) + .fill(Color.gray) + ) + Spacer() + } Spacer() HStack { Text("course".localized(tableName: "General", plural: false) + ": ")