File tree 7 files changed +21
-19
lines changed
Flipper/Packages/UI/Sources
7 files changed +21
-19
lines changed Original file line number Diff line number Diff line change 1
1
import SwiftUI
2
2
3
- struct FeaturePauseSyncAlert : View {
3
+ struct PauseSyncAlert : View {
4
4
@Binding var isPresented : Bool
5
5
var onAction : ( ) -> Void
6
6
@@ -10,12 +10,14 @@ struct FeaturePauseSyncAlert: View {
10
10
Text ( " Pause Synchronization? " )
11
11
. font ( . system( size: 14 , weight: . bold) )
12
12
13
- Text ( " This feature can't be used during device synchronization. "
14
- + " Wait for sync to finish or pause it. " )
15
- . font ( . system( size: 14 , weight: . medium) )
16
- . multilineTextAlignment ( . center)
17
- . foregroundColor ( . black40)
18
- . padding ( . horizontal, 12 )
13
+ Text (
14
+ " This feature can't be used during device " +
15
+ " synchronization. Wait for sync to finish or pause it. "
16
+ )
17
+ . font ( . system( size: 14 , weight: . medium) )
18
+ . multilineTextAlignment ( . center)
19
+ . foregroundColor ( . black40)
20
+ . padding ( . horizontal, 12 )
19
21
}
20
22
. padding ( . top, 25 )
21
23
Original file line number Diff line number Diff line change 1
1
import Core
2
2
import SwiftUI
3
3
4
- struct PauseSyncAlert : View {
4
+ struct PauseSyncToUpdateAlert : View {
5
5
@Binding var isPresented : Bool
6
6
let installedVersion : Update . Version
7
7
let availableVersion : Update . Version
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ struct DeviceUpdateCard: View {
126
126
LowBatteryAlert ( isPresented: $showCharge)
127
127
}
128
128
. alert ( isPresented: $showPauseSync) {
129
- PauseSyncAlert (
129
+ PauseSyncToUpdateAlert (
130
130
isPresented: $showPauseSync,
131
131
installedVersion: updateModel. installed!,
132
132
availableVersion: updateModel. available!
Original file line number Diff line number Diff line change @@ -2,15 +2,15 @@ import Core
2
2
import SwiftUI
3
3
4
4
struct InfraredLibraryCard : View {
5
-
6
5
var body : some View {
7
6
HubCard (
8
7
icon: " infrared " ,
9
8
title: " Infrared " ,
10
9
image: " InfraredRemoteLibrary " ,
11
10
subtitle: " Remotes Library " ,
12
- description: " Find remotes for your devices from a "
13
- + " wide range of brands and models "
11
+ description:
12
+ " Find remotes for your devices from a " +
13
+ " wide range of brands and models "
14
14
) {
15
15
Badge ( )
16
16
}
@@ -62,7 +62,7 @@ struct InfraredLibraryCardButton: View {
62
62
NotSupportedFeatureAlert ( isPresented: $showFlipperNotSupported)
63
63
}
64
64
. alert ( isPresented: $showFlipperSyncing) {
65
- FeaturePauseSyncAlert ( isPresented: $showFlipperSyncing) {
65
+ PauseSyncAlert ( isPresented: $showFlipperSyncing) {
66
66
synchronization. cancelSync ( )
67
67
onTap ( )
68
68
recordInfraredLibraryOpened ( )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ struct InAppNotifications {
22
22
}
23
23
24
24
struct InfraredLibrary {
25
- var showFoundRemote = false
25
+ var showRemoteFound = false
26
26
}
27
27
}
28
28
Original file line number Diff line number Diff line change 1
1
import SwiftUI
2
2
3
3
extension InfraredView {
4
- struct FoundRemoteBanner : View {
4
+ struct RemoteFoundBanner : View {
5
5
var body : some View {
6
6
Banner (
7
7
image: " Done " ,
Original file line number Diff line number Diff line change @@ -118,9 +118,9 @@ extension InfraredView {
118
118
}
119
119
}
120
120
. notification (
121
- isPresented: notifications. infraredLibrary. showFoundRemote
121
+ isPresented: notifications. infraredLibrary. showRemoteFound
122
122
) {
123
- FoundRemoteBanner ( )
123
+ RemoteFoundBanner ( )
124
124
}
125
125
. alert ( isPresented: $isFlipperBusyAlertPresented) {
126
126
FlipperIsBusyAlert (
@@ -166,7 +166,7 @@ extension InfraredView {
166
166
}
167
167
168
168
private func processLoadFile( ) async {
169
- notifications. infraredLibrary. showFoundRemote = true
169
+ notifications. infraredLibrary. showRemoteFound = true
170
170
viewState = . loadLayoyt
171
171
do {
172
172
let layout = try await infraredModel. loadLayout ( file)
@@ -202,7 +202,7 @@ extension InfraredView {
202
202
203
203
private func retry( ) {
204
204
Task {
205
- notifications. infraredLibrary. showFoundRemote = false
205
+ notifications. infraredLibrary. showRemoteFound = false
206
206
await processLoadFile ( )
207
207
}
208
208
}
You can’t perform that action at this time.
0 commit comments