PublicConstants.swift (15686B)
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 MORE = "ellipsis" // 1.0 (iOS 13) 68 public let PLUS = "plus" // 1.0 (iOS 13) 69 public let XMARK = "xmark" // 1.0 (iOS 13) 70 public let LIGHT_OFF = "lightbulb" // 1.0 (iOS 13) 71 public let LIGHT_ON = "lightbulb.fill" // 1.0 (iOS 13) 72 public let CHECKMARK = "checkmark" // 1.0 (iOS 13) 73 public let ARROW_TOP = "arrow.up.to.line" // 1.0 (iOS 13) 74 public let ARROW_BOT = "arrow.down.to.line" // 1.0 (iOS 13) 75 public let RELOAD = "arrow.clockwise" // 1.0 (iOS 13) 76 public let COPY1 = "doc.on.doc" // 1.0 (iOS 13) 77 //public let COPY6 = "document.on.clipboard" // 6.0 (iOS 18) 78 public let PASTE = "doc.on.clipboard" // 1.0 (iOS 13) 79 public let SHARE = "square.and.arrow.up" // 1.0 (iOS 13) 80 public let RETURN = "return" // 1.0 (iOS 13) reverses for RTL 81 public let MERCHANT14 = "handbag" // 2.0 (iOS 14) 82 public let MERCHANT17 = "storefront" // 5.0 (iOS 17) 83 84 85 public let BALANCES = "chart.bar.xaxis" // 2.0 (iOS 14) 86 public let SETTINGS = "gear" // 1.0 (iOS 13) 87 public let QRBUTTON = "qrcode.viewfinder" // 1.0 (iOS 13) 88 public let QRCODE = "qrcode" // 1.0 (iOS 13) 89 public let NFCLOGO = "wave.3.right.circle" // 2.0 (iOS 14) 90 public let NOTIFICATION1 = "bell" // 1.0 (iOS 13) 91 public let NOTIFICATION2 = "bell.badge" // 2.0 (iOS 14) reverses for RTL 92 93 public let CONFIRM_BANK = "circle.fill" // badge in PendingRow, TransactionRow and TransactionSummary 94 public let NEEDS_KYC = "star.fill" // badge in PendingRow, TransactionRow and TransactionSummary 95 //public let PENDING_INCOMING = "plus.diamond" // 2.0 (iOS 14) 96 public let PENDING_INCOMING = "plus" // 1.0 (iOS 13) 97 public let PENDING_OUTGOING = "minus.diamond" // 2.0 (iOS 14) 98 public let DONE_INCOMING = "plus.circle.fill" // 1.0 (iOS 13) 99 public let DONE_OUTGOING = "minus.circle" // 1.0 (iOS 13) 100 101 public let ICONNAME_FILL = ".fill" 102 public let ICONNAME_DUMMY = "taler.dummy" // 103 public let SYSTEM_DUMMY1 = "circle" // 1.0 (iOS 13) 104 105 public let ICONNAME_WITHDRAWAL = "taler.withdrawal" // 106 public let SYSTEM_WITHDRAWAL5 = "arrowshape.down" // 5.0 (iOS 17) 107 public let FALLBACK_WITHDRAWAL = "arrow.down" // 1.0 (iOS 13) no fill variant! 108 // "arrow.down.to.line" // 1.0 (iOS 13) 109 110 public let ICONNAME_BANK = "building.columns" // 2.0 (iOS 14) 111 public let ICONNAME_PERSON_SMALL = "person.small" // 112 public let ICONNAME_PERSON_BOTTOM = "person.bottom" // 113 114 public let ICONNAME_DEPOSIT = "taler.deposit" // 115 public let SYSTEM_DEPOSIT5 = "arrowshape.up" // 5.0 (iOS 17) 116 public let FALLBACK_DEPOSIT = "arrow.up" // 1.0 (iOS 13) no fill variant! 117 // "arrow.up.to.line" // 1.0 (iOS 13) 118 119 public let ICONNAME_REFUND = "taler.refund" // 120 public let SYSTEM_REFUND2 = "arrowshape.turn.up.backward" // 2.0 (iOS 14) 121 public let ICONNAME_PAYMENT = "taler.payment" // 122 public let SYSTEM_PAYMENT2 = "arrowshape.turn.up.forward" // 2.0 (iOS 14) 123 124 public let ICONNAME_INCOMING = "taler.incoming" // 125 public let SYSTEM_INCOMING4 = "arrowshape.backward" // 4.0 (iOS 16) 126 public let FALLBACK_INCOMING = "arrow.backward" // 2.0 (iOS 14) no fill variant! 127 // "arrow.backward.to.line" // 3.0 (iOS 15) 128 129 public let ICONNAME_PERSON_LEFT = "person.left" // 130 public let ICONNAME_PERSON_RIGHT = "person.right" // 131 132 public let ICONNAME_OUTGOING = "taler.outgoing" // 133 public let SYSTEM_OUTGOING4 = "arrowshape.forward" // 4.0 (iOS 16) 134 public let FALLBACK_OUTGOING = "arrow.forward" // 2.0 (iOS 14) no fill variant! 135 // "arrow.forward.to.line" // 3.0 (iOS 15) 136 137 public let ICONNAME_REFRESH = "taler.refresh" // 138 public let SYSTEM_REFRESH6 = "arrow.trianglehead.counterclockwise" // 6.0 (iOS 18) 139 public let SYSTEM_REFRESH6_fill = "checkmark.arrow.trianglehead.counterclockwise" // 6.0 (iOS 18) 140 public let FALLBACK_REFRESH = "arrow.counterclockwise" // 1.0 (iOS 13) no fill variant! 141 //public let SYSTEM_REFRESH1 = "arrow.counterclockwise.circle" // 142 //public let SYSTEM_REFRESH2 = "arrow.counterclockwise.square" // 143 public let ICONNAME_RECOUP = "taler.recoup" // 144 public let SYSTEM_RECOUP1 = "exclamationmark.circle" // 1.0 (iOS 13) 145 public let ICONNAME_DENOMLOSS = "taler.denomloss" // 146 public let SYSTEM_DENOMLOSS1 = "exclamationmark.triangle" // 1.0 (iOS 13) 147 148 public let ICONNAME_ZOOM_IN = "taler.left.and.right.fill" // 3.0 (iOS 15) 149 public let ICONNAME_ZOOM_OUT = "taler.right.and.left.fill" // 3.0 (iOS 15) 150 public let SYSTEM_ZOOM_IN = "arrowtriangle.left.and.line.vertical.and.arrowtriangle.right.fill" // 3.0 (iOS 15) 151 public let SYSTEM_ZOOM_OUT = "arrowtriangle.right.and.line.vertical.and.arrowtriangle.left.fill" // 3.0 (iOS 15) 152 153 public let ICONNAME_LOCKCLOCK = "taler.lock.clock" // 154 public let SYSTEM_LOCKCLOCK = "lock.badge.clock" // 5.0 (iOS 17) 155 public let FALLBACK_LOCK = "lock" // 1.0 (iOS 13) 156 157 public let ICONNAME_PASSES = "taler.calendar.badge.record" // 2.0 (iOS 14) 158 public let SYSTEM_PASSES = "calendar.badge.clock" // 2.0 (iOS 14) 159 public let ICONNAME_DISCOUNTS = "taler.percent.seal" // 160 public let SYSTEM_DISCOUNTS = "percent" // 1.0 (iOS 14) 161 162 public let SUNFILL = "sun.max.fill" // 1.0 (iOS 13) 163 public let MOONFILL = "moon.fill" // 1.0 (iOS 13) 164 165 public let HTTPS = "https://" 166 public let TALER = "taler.net" 167 public let DEMO = ".demo." + TALER 168 public let TEST = ".test." + TALER 169 public let HEAD = ".head." + TALER 170 171 public let SANDBOX = "/instances/sandbox/" 172 public let EXCHANGE = "exchange" 173 public let BACKEND = "backend" 174 public let BANK = "bank" 175 public let SHOP = "shop" 176 public let DEMOBANK = HTTPS + BANK + DEMO + "/" 177 public let DEMOSHOP = HTTPS + SHOP + DEMO 178 public let DEMOBACKEND = HTTPS + BACKEND + DEMO + SANDBOX 179 public let DEMOEXCHANGE = HTTPS + EXCHANGE + DEMO + "/" 180 public let TESTBANK = HTTPS + BANK + TEST + "/" 181 public let TESTSHOP = HTTPS + SHOP + TEST 182 public let TESTBACKEND = HTTPS + BACKEND + TEST + SANDBOX 183 public let TESTEXCHANGE = HTTPS + EXCHANGE + TEST + "/" 184 public let HEADBANK = HTTPS + BANK + HEAD + "/" 185 public let HEADSHOP = HTTPS + SHOP + HEAD 186 public let HEADBACKEND = HTTPS + BACKEND + HEAD + "/" 187 public let HEADEXCHANGE = HTTPS + EXCHANGE + HEAD + "/" 188 189 public let ARS_AGE_EXCHANGE = HTTPS + "exchange-age.taler.ar/" 190 public let ARS_EXP_EXCHANGE = HTTPS + "exchange-expensive.taler.ar/" 191 public let DEMOCURRENCY = "KUDOS" 192 public let TESTCURRENCY = "TESTKUDOS" 193 //public let LONGCURRENCY = "gold-pressed Latinum" // 20 characters, with dash and space 194 public let LONGCURRENCY = "GOLDLATINUM" // 11 characters, no dash, no space 195 196 // MARK: - Titles 197 198 public let TITLE_EXCHANGES = String(localized: "TitleExchanges", defaultValue: "Payment Services") 199 200 // MARK: - Keys used in JSON 201 202 public let PLAINTEXT = "text/plain" 203 public let MARKDOWN = "text/markdown" 204 public let HTML = "text/html" 205 206 public let EXCHANGEBASEURL = "exchangeBaseUrl" 207 public let TALERURI = "talerUri" 208 209 public let TRANSACTIONTRANSITION = "transactionTransition" 210 public let TRANSACTIONID = "transactionID" 211 212 public let NOTIFICATIONTIME = "notif.time" 213 public let NOTIFICATIONERROR = "notif.error" 214 public let NOTIFICATIONPHASE = "notif.phase" 215 public let NOTIFICATIONANIMATION = "notif.animation" 216 public let NOTIFICATIONSHARE = "notif.share" 217 public let NOTIFICATIONPASTE = "notif.paste" 218 public let NOTIFICATIONPAYLOAD = "notif.payload" 219 220 /// Notifications sent by wallet-core 221 extension Notification.Name { 222 static let Idle = Notification.Name("idle") 223 static let BalanceChange = Notification.Name("balance-change") 224 static let BankAccountChange = Notification.Name(AccountChange.TransitionType.change.rawValue) 225 static let DatabaseMaintenance = Notification.Name("database-maintenance-progress") 226 static let ExchangeAdded = Notification.Name("exchange-added") 227 static let ExchangeDeleted = Notification.Name("exchange-deleted") 228 static let ExchangeStateTransition = Notification.Name("exchange-state-transition") 229 static let RequestProgressPhase = Notification.Name("request-progress-phase") 230 static let RequestProgressError = Notification.Name("request-progress-error") 231 static let TransactionStateTransition = Notification.Name("transaction-state-transition") 232 static let TransactionDone = Notification.Name("transaction-done") 233 static let TransactionExpired = Notification.Name("transaction-expired") 234 static let TransactionScanned = Notification.Name("transaction-scanned") 235 static let PendingReady = Notification.Name("pending-ready") 236 static let WaitReserve = Notification.Name("wait-reserve") 237 static let WithdrawCoins = Notification.Name("withdraw-coins") 238 static let KYCrequired = Notification.Name("kyc-required") 239 static let DismissSheet = Notification.Name("dismiss-sheet") 240 static let PendingOperationProcessed = Notification.Name("pending-operation-processed") 241 static let ReserveNotYetFound = Notification.Name("reserve-not-yet-found") 242 // static let WithdrawalGroupBankConfirmed = Notification.Name("withdrawal-group-bank-confirmed") 243 // static let WithdrawalGroupReserveReady = Notification.Name("withdrawal-group-reserve-ready") 244 // static let WithdrawGroupFinished = Notification.Name("withdraw-group-finished") 245 // static let PayOperationSuccess = Notification.Name("pay-operation-success") 246 static let ProposalAccepted = Notification.Name("proposal-accepted") 247 static let ProposalDownloaded = Notification.Name("proposal-downloaded") 248 static let TaskObservabilityEvent = Notification.Name("task-observability-event") 249 static let RequestObservabilityEvent = Notification.Name("request-observability-event") 250 251 static let GeneralError = Notification.Name("error") 252 static let TransactionError = Notification.Name("txError") 253 } 254 255 /// Notifications for internal synchronization 256 extension Notification.Name { 257 static let SendAction = Notification.Name("sendAction") 258 static let RequestAction = Notification.Name("requestAction") 259 static let DepositAction = Notification.Name("depositAction") 260 static let WithdrawAction = Notification.Name("withdrawAction") 261 static let QrScanAction = Notification.Name("qrScanAction") 262 static let SettingsAction = Notification.Name("settingsAction") 263 static let ShareAction = Notification.Name("shareAction") 264 static let PasteAction = Notification.Name("pasteAction") 265 }