Skip to content

Commit a2b9592

Browse files
committed
♻️ New UI
Signed-off-by: Peter Friese <[email protected]>
1 parent a9f7f95 commit a2b9592

File tree

51 files changed

+1653
-909
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1653
-909
lines changed

Examples/FriendlyFlix/app/FriendlyFlix/FriendlyFlix.xcodeproj/project.pbxproj

Lines changed: 34 additions & 324 deletions
Large diffs are not rendered by default.

Examples/FriendlyFlix/app/FriendlyFlix/FriendlyFlix.xcodeproj/xcshareddata/xcschemes/FriendlyFlix.xcscheme

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
buildForAnalyzing = "YES">
1616
<BuildableReference
1717
BuildableIdentifier = "primary"
18-
BlueprintIdentifier = "884EA4CB2C7E0CC7009866B5"
18+
BlueprintIdentifier = "88A9E6332CA834C600B3C4EF"
1919
BuildableName = "FriendlyFlix.app"
2020
BlueprintName = "FriendlyFlix"
2121
ReferencedContainer = "container:FriendlyFlix.xcodeproj">
@@ -29,30 +29,6 @@
2929
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
3030
shouldUseLaunchSchemeArgsEnv = "YES"
3131
shouldAutocreateTestPlan = "YES">
32-
<Testables>
33-
<TestableReference
34-
skipped = "NO"
35-
parallelizable = "YES">
36-
<BuildableReference
37-
BuildableIdentifier = "primary"
38-
BlueprintIdentifier = "884EA4DB2C7E0CC8009866B5"
39-
BuildableName = "FriendlyFlixTests.xctest"
40-
BlueprintName = "FriendlyFlixTests"
41-
ReferencedContainer = "container:FriendlyFlix.xcodeproj">
42-
</BuildableReference>
43-
</TestableReference>
44-
<TestableReference
45-
skipped = "NO"
46-
parallelizable = "YES">
47-
<BuildableReference
48-
BuildableIdentifier = "primary"
49-
BlueprintIdentifier = "884EA4E52C7E0CC8009866B5"
50-
BuildableName = "FriendlyFlixUITests.xctest"
51-
BlueprintName = "FriendlyFlixUITests"
52-
ReferencedContainer = "container:FriendlyFlix.xcodeproj">
53-
</BuildableReference>
54-
</TestableReference>
55-
</Testables>
5632
</TestAction>
5733
<LaunchAction
5834
buildConfiguration = "Debug"
@@ -68,7 +44,7 @@
6844
runnableDebuggingMode = "0">
6945
<BuildableReference
7046
BuildableIdentifier = "primary"
71-
BlueprintIdentifier = "884EA4CB2C7E0CC7009866B5"
47+
BlueprintIdentifier = "88A9E6332CA834C600B3C4EF"
7248
BuildableName = "FriendlyFlix.app"
7349
BlueprintName = "FriendlyFlix"
7450
ReferencedContainer = "container:FriendlyFlix.xcodeproj">
@@ -85,7 +61,7 @@
8561
runnableDebuggingMode = "0">
8662
<BuildableReference
8763
BuildableIdentifier = "primary"
88-
BlueprintIdentifier = "884EA4CB2C7E0CC7009866B5"
64+
BlueprintIdentifier = "88A9E6332CA834C600B3C4EF"
8965
BuildableName = "FriendlyFlix.app"
9066
BlueprintName = "FriendlyFlix"
9167
ReferencedContainer = "container:FriendlyFlix.xcodeproj">
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
// Copyright 2024 Google LLC
1+
//
2+
// FriendlyFlixMocksApp.swift
3+
// FriendlyFlixMocks
4+
//
5+
// Created by Peter Friese on 28.09.24.
26
//
37
// Licensed under the Apache License, Version 2.0 (the "License");
48
// you may not use this file except in compliance with the License.
@@ -14,25 +18,26 @@
1418

1519
import SwiftUI
1620

17-
struct StarRatingView: View {
18-
var rating: Double
19-
20-
var body: some View {
21-
HStack(spacing: 4) {
22-
ForEach(0 ..< 5) { index in
23-
Image(systemName: self.starType(for: index))
24-
.foregroundColor(.yellow)
25-
}
21+
@main
22+
struct FriendlyFlixApp: App {
23+
private func loadRocketSimConnect() {
24+
#if DEBUG
25+
guard (Bundle(path: "/Applications/RocketSim.app/Contents/Frameworks/RocketSimConnectLinker.nocache.framework")?.load() == true) else {
26+
print("Failed to load linker framework")
27+
return
2628
}
29+
print("RocketSim Connect successfully linked")
30+
#endif
31+
}
32+
33+
init () {
34+
loadRocketSimConnect()
2735
}
2836

29-
func starType(for index: Int) -> String {
30-
if rating > Double(index) + 0.75 {
31-
return "star.fill"
32-
} else if rating > Double(index) + 0.25 {
33-
return "star.lefthalf.fill"
34-
} else {
35-
return "star"
37+
var body: some Scene {
38+
WindowGroup {
39+
RootView()
40+
.environment(AuthenticationViewModel())
3641
}
3742
}
3843
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
//
2+
// RootView.swift
3+
// FriendlyFlixMocks
4+
//
5+
// Created by Peter Friese on 10.10.24.
6+
//
7+
// Licensed under the Apache License, Version 2.0 (the "License");
8+
// you may not use this file except in compliance with the License.
9+
// You may obtain a copy of the License at
10+
//
11+
// http://www.apache.org/licenses/LICENSE-2.0
12+
//
13+
// Unless required by applicable law or agreed to in writing, software
14+
// distributed under the License is distributed on an "AS IS" BASIS,
15+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
// See the License for the specific language governing permissions and
17+
// limitations under the License.
18+
19+
import SwiftUI
20+
21+
struct RootView: View {
22+
@Environment(AuthenticationViewModel.self) private var authenticationViewModel
23+
24+
var body: some View {
25+
@Bindable var authenticationViewModel = authenticationViewModel
26+
TabView {
27+
HomeScreen()
28+
.tabItem {
29+
Label("Home", systemImage: "house")
30+
}
31+
SearchScreen()
32+
.tabItem {
33+
Label("Search", systemImage: "magnifyingglass")
34+
}
35+
LibraryScreen()
36+
.tabItem {
37+
Label("Library", systemImage: "rectangle.on.rectangle")
38+
}
39+
}
40+
.sheet(isPresented: $authenticationViewModel.presentingAuthenticationDialog) {
41+
AuthenticationScreen()
42+
}
43+
.sheet(isPresented: $authenticationViewModel.presentingAccountDialog) {
44+
AccountScreen()
45+
}
46+
}
47+
}
48+
49+
#Preview {
50+
RootView()
51+
.environment(AuthenticationViewModel())
52+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "yr9A3KGQlxBh3yW0cmglsr8aMIz.jpg",
5+
"idiom" : "universal",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}
147 KB
Loading
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "gEU2QniE6E77NI6lCU6MxlNBvIx.jpg",
5+
"idiom" : "universal",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}
424 KB
Loading
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "Login.png",
5+
"idiom" : "universal",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}
32.9 KB
Loading

0 commit comments

Comments
 (0)