This commit is contained in:
Pengwius 2021-02-23 13:39:46 +01:00
parent 9d5fa7d15e
commit b898042784
8 changed files with 134 additions and 14 deletions

View file

@ -9,10 +9,12 @@
/* Begin PBXBuildFile section */
5C478F3525DC742100ABEFB7 /* VulcanStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C478F3425DC742100ABEFB7 /* VulcanStore.swift */; };
5C9B6F4925D6C08D00C3F5F5 /* Sdk in Frameworks */ = {isa = PBXBuildFile; productRef = 5C9B6F4825D6C08D00C3F5F5 /* Sdk */; };
5CC2EAA525E516F100B6183E /* Dashboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CC2EAA425E516F100B6183E /* Dashboard.swift */; };
5CC2EAAE25E526B500B6183E /* navigation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CC2EAAD25E526B500B6183E /* navigation.swift */; };
5CCAE31625DA4CDD00D87580 /* OpenSSL in Frameworks */ = {isa = PBXBuildFile; productRef = 5CCAE31525DA4CDD00D87580 /* OpenSSL */; };
5CEA516B25D540B900DB45BD /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5CEA516D25D540B900DB45BD /* Localizable.strings */; };
F4C6D9082544E17400F8903A /* wulkanowyApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4C6D9072544E17400F8903A /* wulkanowyApp.swift */; };
F4C6D90A2544E17400F8903A /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4C6D9092544E17400F8903A /* ContentView.swift */; };
F4C6D90A2544E17400F8903A /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4C6D9092544E17400F8903A /* LoginView.swift */; };
F4C6D90C2544E17500F8903A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F4C6D90B2544E17500F8903A /* Assets.xcassets */; };
F4C6D90F2544E17500F8903A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F4C6D90E2544E17500F8903A /* Preview Assets.xcassets */; };
F4C6D91A2544E17500F8903A /* wulkanowyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4C6D9192544E17500F8903A /* wulkanowyTests.swift */; };
@ -63,11 +65,13 @@
5C478F3425DC742100ABEFB7 /* VulcanStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VulcanStore.swift; sourceTree = "<group>"; };
5C9B6E4925D6ADFB00C3F5F5 /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = System/Library/Frameworks/NetworkExtension.framework; sourceTree = SDKROOT; };
5C9B6F4525D6C06D00C3F5F5 /* Sdk */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Sdk; sourceTree = "<group>"; };
5CC2EAA425E516F100B6183E /* Dashboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dashboard.swift; sourceTree = "<group>"; };
5CC2EAAD25E526B500B6183E /* navigation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = navigation.swift; sourceTree = "<group>"; };
5CEA516C25D540B900DB45BD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
5CF81BD725D9D44400B12C4C /* pl-PL */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pl-PL"; path = "pl-PL.lproj/Localizable.strings"; sourceTree = "<group>"; };
F4C6D9042544E17400F8903A /* wulkanowy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = wulkanowy.app; sourceTree = BUILT_PRODUCTS_DIR; };
F4C6D9072544E17400F8903A /* wulkanowyApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = wulkanowyApp.swift; sourceTree = "<group>"; };
F4C6D9092544E17400F8903A /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
F4C6D9092544E17400F8903A /* LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = "<group>"; };
F4C6D90B2544E17500F8903A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
F4C6D90E2544E17500F8903A /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
F4C6D9102544E17500F8903A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@ -106,6 +110,40 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
5C1B848625E1B6740074F29D /* App */ = {
isa = PBXGroup;
children = (
F4C6D9072544E17400F8903A /* wulkanowyApp.swift */,
);
path = App;
sourceTree = "<group>";
};
5C1B848925E1B6910074F29D /* Views */ = {
isa = PBXGroup;
children = (
5CC2EAAC25E5269E00B6183E /* Navigation */,
5CC2EAA325E516DD00B6183E /* Content */,
5C1B849F25E1B7A30074F29D /* Login */,
);
path = Views;
sourceTree = "<group>";
};
5C1B848E25E1B6FA0074F29D /* Resources */ = {
isa = PBXGroup;
children = (
5CEA516D25D540B900DB45BD /* Localizable.strings */,
);
path = Resources;
sourceTree = "<group>";
};
5C1B849F25E1B7A30074F29D /* Login */ = {
isa = PBXGroup;
children = (
F4C6D9092544E17400F8903A /* LoginView.swift */,
);
path = Login;
sourceTree = "<group>";
};
5C9B6E4825D6ADFB00C3F5F5 /* Frameworks */ = {
isa = PBXGroup;
children = (
@ -114,6 +152,22 @@
name = Frameworks;
sourceTree = "<group>";
};
5CC2EAA325E516DD00B6183E /* Content */ = {
isa = PBXGroup;
children = (
5CC2EAA425E516F100B6183E /* Dashboard.swift */,
);
path = Content;
sourceTree = "<group>";
};
5CC2EAAC25E5269E00B6183E /* Navigation */ = {
isa = PBXGroup;
children = (
5CC2EAAD25E526B500B6183E /* navigation.swift */,
);
path = Navigation;
sourceTree = "<group>";
};
F4C6D8FB2544E17300F8903A = {
isa = PBXGroup;
children = (
@ -139,12 +193,12 @@
F4C6D9062544E17400F8903A /* wulkanowy */ = {
isa = PBXGroup;
children = (
F4C6D9072544E17400F8903A /* wulkanowyApp.swift */,
F4C6D9092544E17400F8903A /* ContentView.swift */,
5C1B848E25E1B6FA0074F29D /* Resources */,
5C1B848925E1B6910074F29D /* Views */,
5C1B848625E1B6740074F29D /* App */,
F4C6D90B2544E17500F8903A /* Assets.xcassets */,
F4C6D9102544E17500F8903A /* Info.plist */,
F4C6D90D2544E17500F8903A /* Preview Content */,
5CEA516D25D540B900DB45BD /* Localizable.strings */,
5C478F3425DC742100ABEFB7 /* VulcanStore.swift */,
);
path = wulkanowy;
@ -317,7 +371,9 @@
buildActionMask = 2147483647;
files = (
5C478F3525DC742100ABEFB7 /* VulcanStore.swift in Sources */,
F4C6D90A2544E17400F8903A /* ContentView.swift in Sources */,
F4C6D90A2544E17400F8903A /* LoginView.swift in Sources */,
5CC2EAAE25E526B500B6183E /* navigation.swift in Sources */,
5CC2EAA525E516F100B6183E /* Dashboard.swift in Sources */,
F4C6D9082544E17400F8903A /* wulkanowyApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;

BIN
wulkanowy/.DS_Store vendored

Binary file not shown.

View file

@ -13,7 +13,7 @@ import Combine
struct wulkanowyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
NavigationBarView()
}
}
}

View file

@ -0,0 +1,34 @@
//
// Dashboard.swift
// wulkanowy
//
// Created by Tomasz on 23/02/2021.
//
import SwiftUI
struct DashboardView: View {
var body: some View {
NavigationView {
VStack {
Text("You are not logged in")
NavigationLink(destination: LoginView()) {
Text("Log in")
}
}
}
}
}
struct DashboardView_Previews: PreviewProvider {
static var previews: some View {
Group {
DashboardView()
}
.preferredColorScheme(.dark)
}
}

View file

@ -14,7 +14,7 @@ enum AvailableEndpoints: String, CaseIterable {
}
struct ContentView: View {
struct LoginView: View {
@StateObject var vulcan: VulcanStore = VulcanStore.shared
@ -26,6 +26,7 @@ struct ContentView: View {
@State private var clicked: Bool = false
@State private var buttonValue = String(format: NSLocalizedString("loginButton", comment: "loginButton"))
@State private var loginStatus: String = ""
@State private var willMoveToNextScreen = false
let cellHeight: CGFloat = 55
let cornerRadius: CGFloat = 12
@ -54,7 +55,7 @@ struct ContentView: View {
}
} else {
print("success")
buttonValue = String(format: NSLocalizedString("success", comment: "loginButton"))
}
}
@ -116,8 +117,6 @@ struct ContentView: View {
.font(.largeTitle)
.fontWeight(.semibold)
}
.padding(.top, 50)
.padding(.bottom, -50)
Spacer()
@ -182,16 +181,16 @@ struct ContentView: View {
.frame(maxWidth: .infinity)
.background(Color.accentColor.opacity(0.1))
.cornerRadius(cornerRadius)
Spacer()
}
.padding()
}
}
struct ContentView_Previews: PreviewProvider {
struct LoginView_Previews: PreviewProvider {
static var previews: some View {
Group {
ContentView()
LoginView()
}
.preferredColorScheme(.dark)
}

View file

@ -0,0 +1,31 @@
//
// navigation.swift
// wulkanowy
//
// Created by Tomasz on 23/02/2021.
//
import SwiftUI
struct NavigationBarView: View {
var body: some View {
TabView {
DashboardView()
.tabItem {
Label("Grades", systemImage: "rosette")
.accessibility(label: Text("Grades"))
}
}
}
}
struct NavigationBarView_Previews: PreviewProvider {
static var previews: some View {
Group {
NavigationBarView()
}
.preferredColorScheme(.dark)
}
}