Skip to content

Commit 8d1f0e6

Browse files
Merge pull request #166 from bitcoinppl/161-unified-settings-redesign
Unified settings redesign
2 parents 5718687 + 240f9e1 commit 8d1f0e6

File tree

65 files changed

+1977
-773
lines changed

Some content is hidden

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

65 files changed

+1977
-773
lines changed

ios/Cove/AppManager.swift

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ import SwiftUI
1515
var alertState: TaggedItem<AppAlertState>? = .none
1616
var sheetState: TaggedItem<AppSheetState>? = .none
1717

18+
var selectedNetwork = Database().globalConfig().selectedNetwork()
19+
var previousSelectedNetwork: Network? = nil
20+
1821
var colorSchemeSelection = Database().globalConfig().colorScheme()
1922
var selectedNode = Database().globalConfig().selectedNode()
2023
var selectedFiatCurrency = Database().globalConfig().selectedFiatCurrency()
@@ -33,10 +36,6 @@ import SwiftUI
3336
@ObservationIgnored
3437
weak var walletManager: WalletManager?
3538

36-
public var selectedNetwork: Network {
37-
rust.network()
38-
}
39-
4039
public var colorScheme: ColorScheme? {
4140
switch colorSchemeSelection {
4241
case .light:
@@ -110,6 +109,11 @@ import SwiftUI
110109
router.routes.append(route)
111110
}
112111

112+
func pushRoutes(_ routes: [Route]) {
113+
isSidebarVisible = false
114+
router.routes.append(contentsOf: routes)
115+
}
116+
113117
func popRoute() {
114118
router.routes.removeLast()
115119
}
@@ -137,6 +141,10 @@ import SwiftUI
137141
rust.loadAndResetDefaultRoute(route: route)
138142
}
139143

144+
func confirmNetworkChange() {
145+
previousSelectedNetwork = nil
146+
}
147+
140148
func reconcile(message: AppStateReconcileMessage) {
141149
Task {
142150
await MainActor.run {
@@ -155,6 +163,12 @@ import SwiftUI
155163
case let .selectedNodeChanged(node):
156164
self.selectedNode = node
157165

166+
case let .selectedNetworkChanged(network):
167+
if previousSelectedNetwork == nil {
168+
self.previousSelectedNetwork = self.selectedNetwork
169+
}
170+
self.selectedNetwork = network
171+
158172
case let .defaultRouteChanged(route, nestedRoutes):
159173
self.router.routes = nestedRoutes
160174
self.router.default = route
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"colors" : [
2+
"colors": [
33
{
4-
"idiom" : "universal"
4+
"idiom": "universal"
55
}
66
],
7-
"info" : {
8-
"author" : "xcode",
9-
"version" : 1
7+
"info": {
8+
"author": "xcode",
9+
"version": 1
1010
}
1111
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"images" : [
2+
"images": [
33
{
4-
"filename" : "cove icon flat.jpg",
5-
"idiom" : "universal",
6-
"platform" : "ios",
7-
"size" : "1024x1024"
4+
"filename": "cove icon flat.jpg",
5+
"idiom": "universal",
6+
"platform": "ios",
7+
"size": "1024x1024"
88
}
99
],
10-
"info" : {
11-
"author" : "xcode",
12-
"version" : 1
10+
"info": {
11+
"author": "xcode",
12+
"version": 1
1313
}
1414
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"info" : {
3-
"author" : "xcode",
4-
"version" : 1
2+
"info": {
3+
"author": "xcode",
4+
"version": 1
55
}
66
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"colors": [
3+
{
4+
"color": {
5+
"color-space": "srgb",
6+
"components": {
7+
"alpha": "1.000",
8+
"blue": "0.5020",
9+
"green": "0.4706",
10+
"red": "0.4706"
11+
}
12+
},
13+
"idiom": "universal"
14+
},
15+
{
16+
"appearances": [{ "appearance": "luminosity", "value": "dark" }],
17+
"color": {
18+
"color-space": "srgb",
19+
"components": {
20+
"alpha": "1.000",
21+
"blue": "0.5020",
22+
"green": "0.4706",
23+
"red": "0.4706"
24+
}
25+
},
26+
"idiom": "universal"
27+
}
28+
],
29+
"info": { "author": "xcode", "version": 1 }
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"colors": [
3+
{
4+
"color": {
5+
"color-space": "srgb",
6+
"components": {
7+
"alpha": "1.000",
8+
"blue": "0.9412",
9+
"green": "0.9294",
10+
"red": "0.9216"
11+
}
12+
},
13+
"idiom": "universal"
14+
},
15+
{
16+
"appearances": [{ "appearance": "luminosity", "value": "dark" }],
17+
"color": {
18+
"color-space": "srgb",
19+
"components": {
20+
"alpha": "1.000",
21+
"blue": "0.9412",
22+
"green": "0.9294",
23+
"red": "0.9216"
24+
}
25+
},
26+
"idiom": "universal"
27+
}
28+
],
29+
"info": { "author": "xcode", "version": 1 }
30+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"colors": [
3+
{
4+
"color": {
5+
"color-space": "srgb",
6+
"components": {
7+
"alpha": "1.000",
8+
"blue": "0.4314",
9+
"green": "0.7020",
10+
"red": "1.0000"
11+
}
12+
},
13+
"idiom": "universal"
14+
},
15+
{
16+
"appearances": [
17+
{
18+
"appearance": "luminosity",
19+
"value": "dark"
20+
}
21+
],
22+
"color": {
23+
"color-space": "srgb",
24+
"components": {
25+
"alpha": "1.000",
26+
"blue": "0.4314",
27+
"green": "0.7020",
28+
"red": "1.0000"
29+
}
30+
},
31+
"idiom": "universal"
32+
}
33+
],
34+
"info": {
35+
"author": "xcode",
36+
"version": 1
37+
}
38+
}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
2-
"images" : [
2+
"images": [
33
{
4-
"filename" : "header_pattern.svg",
5-
"idiom" : "universal",
6-
"scale" : "1x"
4+
"filename": "header_pattern.svg",
5+
"idiom": "universal",
6+
"scale": "1x"
77
},
88
{
9-
"idiom" : "universal",
10-
"scale" : "2x"
9+
"idiom": "universal",
10+
"scale": "2x"
1111
},
1212
{
13-
"idiom" : "universal",
14-
"scale" : "3x"
13+
"idiom": "universal",
14+
"scale": "3x"
1515
}
1616
],
17-
"info" : {
18-
"author" : "xcode",
19-
"version" : 1
17+
"info": {
18+
"author": "xcode",
19+
"version": 1
2020
}
2121
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"colors": [
3+
{
4+
"color": {
5+
"color-space": "srgb",
6+
"components": {
7+
"alpha": "1.000",
8+
"blue": "0.8039",
9+
"green": "0.8980",
10+
"red": "0.7725"
11+
}
12+
},
13+
"idiom": "universal"
14+
},
15+
{
16+
"appearances": [
17+
{
18+
"appearance": "luminosity",
19+
"value": "dark"
20+
}
21+
],
22+
"color": {
23+
"color-space": "srgb",
24+
"components": {
25+
"alpha": "1.000",
26+
"blue": "0.8039",
27+
"green": "0.8980",
28+
"red": "0.7725"
29+
}
30+
},
31+
"idiom": "universal"
32+
}
33+
],
34+
"info": {
35+
"author": "xcode",
36+
"version": 1
37+
}
38+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"colors": [
3+
{
4+
"color": {
5+
"color-space": "srgb",
6+
"components": {
7+
"alpha": "1.000",
8+
"blue": "0.4275",
9+
"green": "0.8196",
10+
"red": "0.9412"
11+
}
12+
},
13+
"idiom": "universal"
14+
},
15+
{
16+
"appearances": [{ "appearance": "luminosity", "value": "dark" }],
17+
"color": {
18+
"color-space": "srgb",
19+
"components": {
20+
"alpha": "1.000",
21+
"blue": "0.4275",
22+
"green": "0.8196",
23+
"red": "0.9412"
24+
}
25+
},
26+
"idiom": "universal"
27+
}
28+
],
29+
"info": { "author": "xcode", "version": 1 }
30+
}

0 commit comments

Comments
 (0)