Skip to content

Commit

Permalink
Merge pull request #8 from RocketCommunicationsInc/view-refactor
Browse files Browse the repository at this point in the history
View refactor and TV updates
  • Loading branch information
rocketjeff authored Sep 30, 2021
2 parents b9dc752 + 8d5a606 commit 0e609b2
Show file tree
Hide file tree
Showing 23 changed files with 1,382 additions and 278 deletions.
78 changes: 58 additions & 20 deletions Astro Launches TV/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,43 @@ struct ContentView: View {
HStack(spacing:0) {
if let image = launch.image
{
ZStack {
ZStack(alignment:.leading) {
Image(uiImage: image)
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: 1280, height: 1080, alignment: .topLeading)
.clipped()
.blur(radius:2)

VStack
VStack(alignment: .leading)
{
Spacer()
HStack {
Text(launch.missionName)
.padding()
.font(.system(size: 90
, weight: .semibold, design: .default))
.frame(alignment: .leading)
Spacer()
Text("T- 00:00:00")
.padding()
.font(.system(size: 90
, weight: .semibold, design: .default))
}
.frame(width: 1280, alignment: .leading)
.background(.ultraThinMaterial)
}.frame(width: 1280)
Text(launch.missionName)
.font(.system(size: 90
, weight: .semibold, design: .default))
.padding()
Countdown(launch:launch)
.padding()
}.padding(.leading,40)//.frame(width: 1280)
}
}
VStack {
VStack(alignment: .leading) {
Image("AstroLogoLarge")
}.padding()
Spacer()
Text("ROCKET").font(.system(size: 60)) .foregroundColor(.launchesTextColor)
Text(launch.rocketName).font(.system(size: 60)) .foregroundColor(.white)
Spacer()

Text("STATUS").font(.system(size: 60)) .foregroundColor(.launchesTextColor)
if let status = launch.status
{
GiantStatusTag(text: status,status: launch.astroStatus)
}
Spacer()

Text("LOCATION").font(.system(size: 60)) .foregroundColor(.launchesTextColor)
Text(launch.locationName).font(.system(size: 60)) .foregroundColor(.white)

}.padding(.all,40)
.frame(width: 640, height: 1080, alignment: .leading)
.background(Color.launchesCardColor)

Expand All @@ -58,6 +65,37 @@ struct ContentView: View {
}
}


struct Countdown: View {
// let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect()

var launch:Launch

var body: some View {
HStack {
if let windowOpenDate = launch.windowOpenDate
{
HStack {
Text("T-")
.font(.system(size: 90
, weight: .semibold, design: .default))
.foregroundColor(.white)

Text(windowOpenDate, style: .timer)
.foregroundColor(.white)
.font(.system(size: 90, weight: .semibold,design: .monospaced))

}.padding()
.background(.ultraThinMaterial)
.cornerRadius(6)



}
}
}
}

struct ContentView_Previews: PreviewProvider {
static var networkManager = NetworkManager()

Expand Down
2 changes: 1 addition & 1 deletion Astro Launches TV/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>19</string>
<string>20</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchScreen</key>
Expand Down
2 changes: 1 addition & 1 deletion Astro Launches WatchKit App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>19</string>
<string>20</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
2 changes: 1 addition & 1 deletion Astro Launches WatchKit Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>19</string>
<string>20</string>
<key>CLKComplicationPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).ComplicationController</string>
<key>NSExtension</key>
Expand Down
8 changes: 8 additions & 0 deletions Astro Launches.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
7C834939260931D1008B4895 /* Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C834937260931D1008B4895 /* Settings.swift */; };
7C8BFBF1270374BD00D6AB09 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7CF87F1B25AE45F300BD9D06 /* Assets.xcassets */; };
7C8BFBF22703808C00D6AB09 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C79988226FB7EC700FCAEF2 /* Colors.swift */; };
7CB1EE8727062383004E0CD4 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CB1EE8627062383004E0CD4 /* Tag.swift */; };
7CB1EE8827062810004E0CD4 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CB1EE8627062383004E0CD4 /* Tag.swift */; };
7CB1EE8927062816004E0CD4 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CB1EE8627062383004E0CD4 /* Tag.swift */; };
7CD3C90526028B020071FB78 /* NetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD3C90426028B020071FB78 /* NetworkManager.swift */; };
7CD3C90626028B020071FB78 /* NetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD3C90426028B020071FB78 /* NetworkManager.swift */; };
7CF87F2E25AE45F300BD9D06 /* AstroLaunchesApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CF87F1825AE45F300BD9D06 /* AstroLaunchesApp.swift */; };
Expand Down Expand Up @@ -115,6 +118,7 @@
7C7243C826E8188400233B33 /* LaunchDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchDetail.swift; sourceTree = "<group>"; };
7C79988226FB7EC700FCAEF2 /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = "<group>"; };
7C834937260931D1008B4895 /* Settings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Settings.swift; sourceTree = "<group>"; };
7CB1EE8627062383004E0CD4 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = "<group>"; };
7CD3C90426028B020071FB78 /* NetworkManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkManager.swift; sourceTree = "<group>"; };
7CF87F1825AE45F300BD9D06 /* AstroLaunchesApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AstroLaunchesApp.swift; sourceTree = "<group>"; };
7CF87F1925AE45F300BD9D06 /* LaunchList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchList.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -218,6 +222,7 @@
7CD3C90426028B020071FB78 /* NetworkManager.swift */,
7C6954092612876E008A811E /* Launch.swift */,
7C79988226FB7EC700FCAEF2 /* Colors.swift */,
7CB1EE8627062383004E0CD4 /* Tag.swift */,
7C44C05B2608FEDB00B8D86A /* launches.json */,
7CF87F1B25AE45F300BD9D06 /* Assets.xcassets */,
7C6A025626278C0C00273563 /* Preview Content */,
Expand Down Expand Up @@ -555,6 +560,7 @@
7C3D4CCE2603EFDA00CB0C41 /* LaunchRow.swift in Sources */,
7CF87F2E25AE45F300BD9D06 /* AstroLaunchesApp.swift in Sources */,
7C79988326FB7EC700FCAEF2 /* Colors.swift in Sources */,
7CB1EE8727062383004E0CD4 /* Tag.swift in Sources */,
7CF87F3025AE45F300BD9D06 /* LaunchList.swift in Sources */,
7C7243C926E8188400233B33 /* LaunchDetail.swift in Sources */,
7C69540A2612876E008A811E /* Launch.swift in Sources */,
Expand All @@ -572,6 +578,7 @@
7C3D4CCF2603EFDA00CB0C41 /* LaunchRow.swift in Sources */,
7CF87F2F25AE45F300BD9D06 /* AstroLaunchesApp.swift in Sources */,
7C79988426FB7EC700FCAEF2 /* Colors.swift in Sources */,
7CB1EE8827062810004E0CD4 /* Tag.swift in Sources */,
7CF87F3125AE45F300BD9D06 /* LaunchList.swift in Sources */,
7C7243CA26E8188400233B33 /* LaunchDetail.swift in Sources */,
7C69540B2612876E008A811E /* Launch.swift in Sources */,
Expand All @@ -596,6 +603,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7CB1EE8927062816004E0CD4 /* Tag.swift in Sources */,
7C5A1B09261BB52B00E452DE /* DateFormatters.swift in Sources */,
7C5A1AFB261BB51A00E452DE /* NetworkManager.swift in Sources */,
7CF87F8825AE49B600BD9D06 /* ContentView.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x00",
"green" : "0x49",
"red" : "0x55"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x01",
"green" : "0x0D",
"red" : "0x57"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x00",
"green" : "0x58",
"red" : "0x01"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "extended-srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x3A",
"green" : "0x36",
"red" : "0x32"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x1A",
"green" : "0x45",
"red" : "0x64"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x58",
"green" : "0x4C",
"red" : "0x22"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "0.851",
"red" : "0.392"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading

0 comments on commit 0e609b2

Please sign in to comment.