-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored and updated views for iOS
- Loading branch information
1 parent
b9dc752
commit 4bcca84
Showing
17 changed files
with
1,282 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Shared/Assets.xcassets/Astro Status Caution Border Color.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
Shared/Assets.xcassets/Astro Status Critical Border Color.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
Shared/Assets.xcassets/Astro Status Normal Border Color.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
Shared/Assets.xcassets/Astro Status Off Border Color.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
Shared/Assets.xcassets/Astro Status Serious Border Color.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
Shared/Assets.xcassets/Astro Status Standby Border Color.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
Shared/Assets.xcassets/Astro Status Standby Color.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
// | ||
// Colors.swift | ||
// Astro Launches | ||
// | ||
// Created by rocketjeff on 9/22/21. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
import AstroSwiftFoundation | ||
|
||
public extension Color | ||
{ | ||
|
||
// based on a similar function for UIColor at https://stackoverflow.com/questions/56487679/how-do-i-easily-support-light-and-dark-mode-with-a-custom-color-used-in-my-app | ||
static func dynamicColor(light: Color, dark: Color) -> Color { | ||
@Environment(\.colorScheme) var colorScheme // iOS 15.0, always returns light | ||
|
||
if (colorScheme == .dark) | ||
{ | ||
return dark | ||
} | ||
else | ||
{ | ||
return light | ||
} | ||
// return Color { colorScheme == .dark ? dark : light } | ||
} | ||
|
||
//—————————————————————————————————————————————————————————————————————————————— | ||
// New Astro Colors, not yet in Foundation | ||
//—————————————————————————————————————————————————————————————————————————————— | ||
//MARK: Color - Astro Status colors | ||
//—————————————————————————————————————————————————————————————————————————————— | ||
// Astro status colors | ||
//—————————————————————————————————————————————————————————————————————————————— | ||
static var astroStatusBorderOff:Color | ||
{ return Color("#32363A")} | ||
|
||
static var astroStatusBorderStandby:Color | ||
{ return Color("#224C58")} | ||
|
||
static var astroStatusBorderNormal:Color | ||
{ return Color("#015800")} | ||
|
||
static var astroStatusBorderCaution:Color | ||
{ return Color("#544900")} | ||
|
||
static var astroStatusBorderSerious:Color | ||
{ return Color("#64451A")} | ||
|
||
static var astroStatusBorderCritical:Color | ||
{ return Color("#570D01")} | ||
|
||
static func borderColorForAstroStatus(_ status:AstroStatus)->Color | ||
{ | ||
switch status { | ||
case .Off: | ||
return Color.astroStatusBorderOff | ||
case .Standby: | ||
return Color.astroStatusBorderStandby | ||
case .Normal: | ||
return Color.astroStatusBorderNormal | ||
case .Caution: | ||
return Color.astroStatusBorderCaution | ||
case .Serious: | ||
return Color.astroStatusBorderSerious | ||
case .Critical: | ||
return Color.astroStatusBorderCritical | ||
} | ||
} | ||
//—————————————————————————————————————————————————————————————————————————————— | ||
// Semantic UI colors | ||
//—————————————————————————————————————————————————————————————————————————————— | ||
static var launchesTextColor:Color | ||
{return Color("Text Color")} // astroUIPrimaryLighten4,astroUITertiaryLighten1 | ||
|
||
static var launchesBackgroundColor:Color | ||
{return Color("Background Color")} // | ||
|
||
static var launchesCardColor:Color | ||
{return Color("Card Color")} // | ||
|
||
static var launchesTagBorderColor:Color | ||
{return Color("Tag Border")} // not Astro colors | ||
|
||
static var launchesTagBackgroundColor:Color | ||
{return Color("Tag Background")} //astroUIPrimaryLighten2,astroUISecondaryLighten4 | ||
|
||
// static var launchesTextColor:Color | ||
// { | ||
// @Environment(\.colorScheme) var colorScheme // iOS 15.0, always returns light | ||
// | ||
// if (colorScheme == .dark) | ||
// { | ||
// return .astroUITertiaryLighten1 | ||
// } | ||
// else | ||
// { | ||
// return .astroUIPrimaryLighten4 | ||
// } | ||
// } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"data" : [ | ||
{ | ||
"filename" : "Colors.swift", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.