File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 754754 }
755755 }
756756 },
757+ "Keep Kyoto open while it bootstraps." : {
758+ "comment" : "A notice explaining that the user should keep Kyoto open while it bootstraps.",
759+ "isCommentAutoGenerated" : true
760+ },
757761 "Kyoto" : {
758762
759763 },
12681272 }
12691273 }
12701274 },
1275+ "This one-time sync can take a few minutes." : {
1276+ "comment" : "A description of the time it takes to sync with Kyoto.",
1277+ "isCommentAutoGenerated" : true
1278+ },
12711279 "To" : {
12721280 "extractionState" : "stale",
12731281 "localizations" : {
Original file line number Diff line number Diff line change @@ -56,6 +56,11 @@ struct WalletView: View {
5656 showAllTransactions = true
5757 }
5858
59+ if shouldShowKyotoInitialSyncNotice {
60+ KyotoInitialSyncNoticeView ( isConnected: viewModel. isKyotoConnected)
61+ . transition ( . opacity)
62+ }
63+
5964 TransactionListView (
6065 viewModel: . init( ) ,
6166 transactions: viewModel. recentTransactions,
@@ -227,3 +232,40 @@ struct WalletView: View {
227232 )
228233 }
229234#endif
235+
236+ extension WalletView {
237+ fileprivate var shouldShowKyotoInitialSyncNotice : Bool {
238+ viewModel. isKyotoClient
239+ && viewModel. needsFullScan
240+ && viewModel. walletSyncState == . syncing
241+ }
242+ }
243+
244+ private struct KyotoInitialSyncNoticeView : View {
245+ let isConnected : Bool
246+
247+ var body : some View {
248+ HStack ( alignment: . top, spacing: 12 ) {
249+ Image ( systemName: " clock.arrow.circlepath " )
250+ . font ( . title3)
251+ . foregroundStyle ( . orange)
252+
253+ VStack ( alignment: . leading, spacing: 4 ) {
254+ Text (
255+ " Keep Kyoto open while it bootstraps. "
256+ )
257+ . font ( . subheadline)
258+ . fontWeight ( . semibold)
259+
260+ Text (
261+ " This one-time sync can take a few minutes. "
262+ )
263+ . font ( . footnote)
264+ . foregroundStyle ( . secondary)
265+ }
266+ }
267+ . padding ( )
268+ . frame ( maxWidth: . infinity, alignment: . leading)
269+ . background ( . thinMaterial, in: RoundedRectangle ( cornerRadius: 16 , style: . continuous) )
270+ }
271+ }
You can’t perform that action at this time.
0 commit comments