PublicConstants.swift (15530B)
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 Foundation 9 10 #if TALER_WALLET 11 let TALER_LOGO = "taler-logo-2023-blue" 12 #elseif TALER_NIGHTLY 13 let TALER_LOGO = "taler-logo-2023-black" 14 #else // GNU_TALER 15 let TALER_LOGO = "taler-logo-2023-red" 16 #endif 17 let TALER_LOGO_FULL = "taler-logo-full" 18 let TALER_LOGO_QR = "taler-logo-qr" 19 let EXCHANGE_LOGO = "Exchange-logo-blue" 20 let SWISS_QR = "swiss_qr" 21 22 #if DEBUG 23 public let TCDELAY = 12000 24 #else 25 public let TCDELAY = 5000 // 5 seconds delay after each network call 26 #endif 27 public let INVISIBLE = 0.001 28 public let MAXEXCHANGES = 1000 // per currency 29 public let CHF_4217 = "CHF" // ISO-4217 Swiss Francs 30 public let EUR_4217 = "EUR" // ISO-4217 Euro 31 public let HUF_4217 = "HUF" // ISO-4217 Hungarian Forint 32 33 public let TAPPED = 3 // how often you need to tap on the Actions button before it loses its label 34 public let DRAGGED = 2 // #times to drag to stop the auto-dragging 35 public let DRAGDELAY = 0.5 36 public let DRAGDURATION = 0.45 37 public let DRAGSPEED = 0.1 38 public let MAXRECENT = 4 // # of rows in Recent Transactions 39 public let HALFDETENT = 0.666 // 2/3 height - in the rest is a (invisible) dismiss button, also for VoiceOver 40 public let FULLDETENT = 0.999 // leave 0.001 space for dismiss 41 42 public let ICONLEADING = CGFloat(-8) 43 public let HSPACING = CGFloat(10) // space between items in HStack 44 45 public let LAUNCHDURATION: Double = 1.60 46 public let BANNERDURATION: Double = 0.666 47 48 public let ONEDAY: UInt = 1 // 1..3 49 public let SEVENDAYS: UInt = 7 // 3..9 50 public let THIRTYDAYS: UInt = 30 // 10..30 51 52 public let EMPTYSTRING = "" // avoid automatic translation of empty "" textLiterals in Text() 53 public let SPACE = " " 54 public let SPACECHAR: Character = " " 55 public let NONBREAKING: Character = "\u{00A0}" 56 public let LINEFEED = "\n" 57 public let UNKNOWN = String(localized: "UNKNOWN", comment: "merchant didn't specify the currency, use ALL CAPS") 58 public let LINK = "link" // 1.0 (iOS 13) 59 public let MAPPIN = "mappin.and.ellipse" // 1.0 (iOS 13) 60 public let HAMBURGER = "line.3.horizontal" // 3.0 (iOS 15) 61 public let EXCLAMATION = "exclamationmark.circle" // 1.0 (iOS 13) 62 public let WARNING = "exclamationmark.triangle" // 1.0 (iOS 13) 63 public let CHEVRON = "chevron.forward" // 2.0 (iOS 14) reverses for RTL 64 public let CHEVRON_UP = "chevron.up" // 1.0 (iOS 13) 65 66 public let BANKNOTE = "banknote.fill" // 2.0 (iOS 14) 67 public let PLUS = "plus" // 1.0 (iOS 13) 68 public let XMARK = "xmark" // 1.0 (iOS 13) 69 public let LIGHT_OFF = "lightbulb" // 1.0 (iOS 13) 70 public let LIGHT_ON = "lightbulb.fill" // 1.0 (iOS 13) 71 public let CHECKMARK = "checkmark" // 1.0 (iOS 13) 72 public let ARROW_TOP = "arrow.up.to.line" // 1.0 (iOS 13) 73 public let ARROW_BOT = "arrow.down.to.line" // 1.0 (iOS 13) 74 public let RELOAD = "arrow.clockwise" // 1.0 (iOS 13) 75 public let COPY1 = "doc.on.doc" // 1.0 (iOS 13) 76 //public let COPY6 = "document.on.clipboard" // 6.0 (iOS 18) 77 public let PASTE = "doc.on.clipboard" // 1.0 (iOS 13) 78 public let SHARE = "square.and.arrow.up" // 1.0 (iOS 13) 79 public let RETURN = "return" // 1.0 (iOS 13) reverses for RTL 80 public let MERCHANT14 = "handbag" // 2.0 (iOS 14) 81 public let MERCHANT17 = "storefront" // 5.0 (iOS 17) 82 83 84 public let BALANCES = "chart.bar.xaxis" // 2.0 (iOS 14) 85 public let SETTINGS = "gear" // 1.0 (iOS 13) 86 public let QRBUTTON = "qrcode.viewfinder" // 1.0 (iOS 13) 87 public let QRCODE = "qrcode" // 1.0 (iOS 13) 88 public let NFCLOGO = "wave.3.right.circle" // 2.0 (iOS 14) 89 public let NOTIFICATION1 = "bell" // 1.0 (iOS 13) 90 public let NOTIFICATION2 = "bell.badge" // 2.0 (iOS 14) reverses for RTL 91 92 public let CONFIRM_BANK = "circle.fill" // badge in PendingRow, TransactionRow and TransactionSummary 93 public let NEEDS_KYC = "star.fill" // badge in PendingRow, TransactionRow and TransactionSummary 94 //public let PENDING_INCOMING = "plus.diamond" // 2.0 (iOS 14) 95 public let PENDING_INCOMING = "plus" // 1.0 (iOS 13) 96 public let PENDING_OUTGOING = "minus.diamond" // 2.0 (iOS 14) 97 public let DONE_INCOMING = "plus.circle.fill" // 1.0 (iOS 13) 98 public let DONE_OUTGOING = "minus.circle" // 1.0 (iOS 13) 99 100 public let ICONNAME_FILL = ".fill" 101 public let ICONNAME_DUMMY = "taler.dummy" // 102 public let SYSTEM_DUMMY1 = "circle" // 1.0 (iOS 13) 103 104 public let ICONNAME_WITHDRAWAL = "taler.withdrawal" // 105 public let SYSTEM_WITHDRAWAL5 = "arrowshape.down" // 5.0 (iOS 17) 106 public let FALLBACK_WITHDRAWAL = "arrow.down" // 1.0 (iOS 13) no fill variant! 107 // "arrow.down.to.line" // 1.0 (iOS 13) 108 109 public let ICONNAME_BANK = "building.columns" // 2.0 (iOS 14) 110 public let ICONNAME_PERSON_SMALL = "person.small" // 111 public let ICONNAME_PERSON_BOTTOM = "person.bottom" // 112 113 public let ICONNAME_DEPOSIT = "taler.deposit" // 114 public let SYSTEM_DEPOSIT5 = "arrowshape.up" // 5.0 (iOS 17) 115 public let FALLBACK_DEPOSIT = "arrow.up" // 1.0 (iOS 13) no fill variant! 116 // "arrow.up.to.line" // 1.0 (iOS 13) 117 118 public let ICONNAME_REFUND = "taler.refund" // 119 public let SYSTEM_REFUND2 = "arrowshape.turn.up.backward" // 2.0 (iOS 14) 120 public let ICONNAME_PAYMENT = "taler.payment" // 121 public let SYSTEM_PAYMENT2 = "arrowshape.turn.up.forward" // 2.0 (iOS 14) 122 123 public let ICONNAME_INCOMING = "taler.incoming" // 124 public let SYSTEM_INCOMING4 = "arrowshape.backward" // 4.0 (iOS 16) 125 public let FALLBACK_INCOMING = "arrow.backward" // 2.0 (iOS 14) no fill variant! 126 // "arrow.backward.to.line" // 3.0 (iOS 15) 127 128 public let ICONNAME_PERSON_LEFT = "person.left" // 129 public let ICONNAME_PERSON_RIGHT = "person.right" // 130 131 public let ICONNAME_OUTGOING = "taler.outgoing" // 132 public let SYSTEM_OUTGOING4 = "arrowshape.forward" // 4.0 (iOS 16) 133 public let FALLBACK_OUTGOING = "arrow.forward" // 2.0 (iOS 14) no fill variant! 134 // "arrow.forward.to.line" // 3.0 (iOS 15) 135 136 public let ICONNAME_REFRESH = "taler.refresh" // 137 public let SYSTEM_REFRESH6 = "arrow.trianglehead.counterclockwise" // 6.0 (iOS 18) 138 public let SYSTEM_REFRESH6_fill = "checkmark.arrow.trianglehead.counterclockwise" // 6.0 (iOS 18) 139 public let FALLBACK_REFRESH = "arrow.counterclockwise" // 1.0 (iOS 13) no fill variant! 140 //public let SYSTEM_REFRESH1 = "arrow.counterclockwise.circle" // 141 //public let SYSTEM_REFRESH2 = "arrow.counterclockwise.square" // 142 public let ICONNAME_RECOUP = "taler.recoup" // 143 public let SYSTEM_RECOUP1 = "exclamationmark.circle" // 1.0 (iOS 13) 144 public let ICONNAME_DENOMLOSS = "taler.denomloss" // 145 public let SYSTEM_DENOMLOSS1 = "exclamationmark.triangle" // 1.0 (iOS 13) 146 147 public let ICONNAME_ZOOM_IN = "taler.left.and.right.fill" // 3.0 (iOS 15) 148 public let ICONNAME_ZOOM_OUT = "taler.right.and.left.fill" // 3.0 (iOS 15) 149 public let SYSTEM_ZOOM_IN = "arrowtriangle.left.and.line.vertical.and.arrowtriangle.right.fill" // 3.0 (iOS 15) 150 public let SYSTEM_ZOOM_OUT = "arrowtriangle.right.and.line.vertical.and.arrowtriangle.left.fill" // 3.0 (iOS 15) 151 152 public let ICONNAME_LOCKCLOCK = "taler.lock.clock" // 153 public let SYSTEM_LOCKCLOCK = "lock.badge.clock" // 5.0 (iOS 17) 154 public let FALLBACK_LOCK = "lock" // 1.0 (iOS 13) 155 156 public let ICONNAME_PASSES = "taler.calendar.badge.record" // 2.0 (iOS 14) 157 public let SYSTEM_PASSES = "calendar.badge.clock" // 2.0 (iOS 14) 158 public let ICONNAME_DISCOUNTS = "taler.percent.seal" // 159 public let SYSTEM_DISCOUNTS = "percent" // 1.0 (iOS 14) 160 161 public let SUNFILL = "sun.max.fill" // 1.0 (iOS 13) 162 public let MOONFILL = "moon.fill" // 1.0 (iOS 13) 163 164 public let HTTPS = "https://" 165 //public let DEMOBANK = HTTPS + "bAnK.dEmO.tAlEr.nEt" // should be weird to read, but still work 166 //public let DEMOEXCHANGE = HTTPS + "eXcHaNgE.dEmO.tAlEr.nEt" 167 public let TALER = "taler.net/" 168 public let TALER_NET = HTTPS + TALER 169 public let DEMO = ".demo." + TALER 170 public let TEST = ".test." + TALER 171 public let HEAD = ".head." + TALER 172 173 public let SANDBOX = "instances/sandbox/" 174 public let DEMOBANK = HTTPS + "bank" + DEMO 175 public let DEMOSHOP = HTTPS + "shop" + DEMO 176 public let DEMOBACKEND = HTTPS + "backend" + DEMO + SANDBOX 177 public let DEMOEXCHANGE = HTTPS + "exchange" + DEMO 178 public let TESTBANK = HTTPS + "bank" + TEST 179 public let TESTSHOP = HTTPS + "shop" + TEST 180 public let TESTBACKEND = HTTPS + "backend" + TEST + SANDBOX 181 public let TESTEXCHANGE = HTTPS + "exchange" + TEST 182 public let HEADBANK = HTTPS + "bank" + HEAD 183 public let HEADSHOP = HTTPS + "shop" + HEAD 184 public let HEADBACKEND = HTTPS + "backend" + HEAD 185 public let HEADEXCHANGE = HTTPS + "exchange" + HEAD 186 187 public let ARS_AGE_EXCHANGE = HTTPS + "exchange-age.taler.ar/" 188 public let ARS_EXP_EXCHANGE = HTTPS + "exchange-expensive.taler.ar/" 189 public let DEMOCURRENCY = "KUDOS" 190 public let TESTCURRENCY = "TESTKUDOS" 191 //public let LONGCURRENCY = "gold-pressed Latinum" // 20 characters, with dash and space 192 public let LONGCURRENCY = "GOLDLATINUM" // 11 characters, no dash, no space 193 194 // MARK: - Titles 195 196 public let TITLE_EXCHANGES = String(localized: "TitleExchanges", defaultValue: "Payment Services") 197 198 // MARK: - Keys used in JSON 199 200 public let PLAINTEXT = "text/plain" 201 public let MARKDOWN = "text/markdown" 202 public let HTML = "text/html" 203 204 public let EXCHANGEBASEURL = "exchangeBaseUrl" 205 public let TALERURI = "talerUri" 206 207 public let TRANSACTIONTRANSITION = "transactionTransition" 208 public let TRANSACTIONID = "transactionID" 209 210 public let NOTIFICATIONTIME = "notif.time" 211 public let NOTIFICATIONERROR = "notif.error" 212 public let NOTIFICATIONPHASE = "notif.phase" 213 public let NOTIFICATIONANIMATION = "notif.animation" 214 public let NOTIFICATIONSHARE = "notif.share" 215 public let NOTIFICATIONPASTE = "notif.paste" 216 217 /// Notifications sent by wallet-core 218 extension Notification.Name { 219 static let Idle = Notification.Name("idle") 220 static let BalanceChange = Notification.Name("balance-change") 221 static let BankAccountChange = Notification.Name(AccountChange.TransitionType.change.rawValue) 222 static let ExchangeAdded = Notification.Name("exchange-added") 223 static let ExchangeDeleted = Notification.Name("exchange-deleted") 224 static let ExchangeStateTransition = Notification.Name("exchange-state-transition") 225 static let RequestProgressPhase = Notification.Name("request-progress-phase") 226 static let RequestProgressError = Notification.Name("request-progress-error") 227 static let TransactionStateTransition = Notification.Name("transaction-state-transition") 228 static let TransactionDone = Notification.Name("transaction-done") 229 static let TransactionExpired = Notification.Name("transaction-expired") 230 static let TransactionScanned = Notification.Name("transaction-scanned") 231 static let PendingReady = Notification.Name("pending-ready") 232 static let WaitReserve = Notification.Name("wait-reserve") 233 static let WithdrawCoins = Notification.Name("withdraw-coins") 234 static let KYCrequired = Notification.Name("kyc-required") 235 static let DismissSheet = Notification.Name("dismiss-sheet") 236 static let PendingOperationProcessed = Notification.Name("pending-operation-processed") 237 static let ReserveNotYetFound = Notification.Name("reserve-not-yet-found") 238 // static let WithdrawalGroupBankConfirmed = Notification.Name("withdrawal-group-bank-confirmed") 239 // static let WithdrawalGroupReserveReady = Notification.Name("withdrawal-group-reserve-ready") 240 // static let WithdrawGroupFinished = Notification.Name("withdraw-group-finished") 241 // static let PayOperationSuccess = Notification.Name("pay-operation-success") 242 static let ProposalAccepted = Notification.Name("proposal-accepted") 243 static let ProposalDownloaded = Notification.Name("proposal-downloaded") 244 static let TaskObservabilityEvent = Notification.Name("task-observability-event") 245 static let RequestObservabilityEvent = Notification.Name("request-observability-event") 246 247 static let GeneralError = Notification.Name("error") 248 static let TransactionError = Notification.Name("txError") 249 } 250 251 /// Notifications for internal synchronization 252 extension Notification.Name { 253 static let SendAction = Notification.Name("sendAction") 254 static let RequestAction = Notification.Name("requestAction") 255 static let DepositAction = Notification.Name("depositAction") 256 static let WithdrawAction = Notification.Name("withdrawAction") 257 static let QrScanAction = Notification.Name("qrScanAction") 258 static let SettingsAction = Notification.Name("settingsAction") 259 static let ShareAction = Notification.Name("shareAction") 260 static let PasteAction = Notification.Name("pasteAction") 261 }