taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

TransactionsEmptyView.swift (1126B)


      1 /*
      2  * This file is part of GNU Taler, ©2022-25 Taler Systems S.A.
      3  * See LICENSE.md
      4  */
      5 /**
      6  * @author Marc Stibane
      7  */
      8 import SwiftUI
      9 import SymLog
     10 
     11 /// This view shows hints if a wallet is empty
     12 /// It is the very first thing the user sees after installing the app
     13 
     14 struct TransactionsEmptyView: View {
     15     private let symLog = SymLogV(0)
     16     let stack: CallStack
     17     let currency: String
     18 
     19     @AppStorage("myListStyle") var myListStyle: MyListStyle = .automatic
     20 
     21     var body: some View {
     22         List {
     23             Section {
     24                 Text("There are no transactions for \(currency).")
     25             }
     26             .talerFont(.title2)
     27         }
     28         .listStyle(myListStyle.style).anyView
     29 //        .padding(.vertical)
     30         .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
     31         .onAppear() {
     32             DebugViewC.shared.setViewID(VIEW_EMPTY_HISTORY, stack: stack.push())     // 20
     33         }
     34     }
     35 }
     36 
     37 struct TransactionsEmptyView_Previews: PreviewProvider {
     38     static var previews: some View {
     39         TransactionsEmptyView(stack: CallStack("Preview"), currency: LONGCURRENCY)
     40     }
     41 }