PublicConstants.swift (16531B)
1 /* 2 * This file is part of GNU Taler, ©2022-26 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 public let INVISIBLE = 0.001 23 public let MAXEXCHANGES = 1000 // per currency 24 public let CHF_4217 = "CHF" // ISO-4217 Swiss Francs 25 public let EUR_4217 = "EUR" // ISO-4217 Euro 26 public let HUF_4217 = "HUF" // ISO-4217 Hungarian Forint 27 28 public let BUBBLE = 1 // how often the ActionsBubble is shown 29 public let TAPPED = 3 // how often you need to tap on the Actions button before it loses its label 30 public let DRAGGED = 2 // #times to drag to stop the auto-dragging 31 public let DRAGDELAY = 0.5 32 public let DRAGDURATION = 0.45 33 public let DRAGSPEED = 0.1 34 public let MAXRECENT = 4 // # of rows in Recent Transactions 35 public let HALFDETENT = 0.666 // 2/3 height - in the rest is a (invisible) dismiss button, also for VoiceOver 36 public let FULLDETENT = 0.999 // leave 0.001 space for dismiss 37 38 public let ICONLEADING = CGFloat(-8) 39 public let HSPACING = CGFloat(10) // space between items in HStack 40 41 public let LAUNCHDURATION: Double = 1.60 42 public let BANNERDURATION: Double = 0.5 43 44 public let ONEDAY: UInt = 1 // 1..3 45 public let SEVENDAYS: UInt = 7 // 3..9 46 public let THIRTYDAYS: UInt = 30 // 10..30 47 public let DEFAULTEXPIRATION = 7*24 // for P2P Send - that's what wallet-core uses 48 49 public let EMPTYSTRING = "" // avoid automatic translation of empty "" textLiterals in Text() 50 public let SPACE = " " 51 public let SPACECHAR: Character = " " 52 public let NONBREAKING: Character = "\u{00A0}" 53 public let LINEFEED = "\n" 54 public let SLASH = "/" 55 56 public let UNKNOWN = String(localized: "UNKNOWN", comment: "merchant didn't specify the currency, use ALL CAPS") 57 public let LINK = "link" // 1.0 (iOS 13) 58 public let MAPPIN = "mappin.and.ellipse" // 1.0 (iOS 13) 59 public let HAMBURGER = "line.3.horizontal" // 3.0 (iOS 15) 60 public let EXCLAMATION = "exclamationmark.circle" // 1.0 (iOS 13) 61 public let WARNING = "exclamationmark.triangle" // 1.0 (iOS 13) 62 public let CHEVRON = "chevron.forward" // 2.0 (iOS 14) reverses for RTL 63 public let CHEVRON_UP = "chevron.up" // 1.0 (iOS 13) 64 65 public let BANKNOTE = "banknote.fill" // 2.0 (iOS 14) 66 public let MORE = "ellipsis" // 1.0 (iOS 13) 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 public let ICONNAME_PERSON = "person" // 131 public let ICONNAME_PERSON3 = "person.3" // 132 public let ICONNAME_PERSON_FILL = "person.fill" // 133 public let ICONNAME_MAILBOX = "smallcircle.filled.circle" // 134 public let ICONNAME_ALIAS = "person.fill.viewfinder" // 135 136 public let ICONNAME_OUTGOING = "taler.outgoing" // 137 public let SYSTEM_OUTGOING4 = "arrowshape.forward" // 4.0 (iOS 16) 138 public let FALLBACK_OUTGOING = "arrow.forward" // 2.0 (iOS 14) no fill variant! 139 // "arrow.forward.to.line" // 3.0 (iOS 15) 140 141 public let ICONNAME_REFRESH = "taler.refresh" // 142 public let SYSTEM_REFRESH6 = "arrow.trianglehead.counterclockwise" // 6.0 (iOS 18) 143 public let SYSTEM_REFRESH6_fill = "checkmark.arrow.trianglehead.counterclockwise" // 6.0 (iOS 18) 144 public let FALLBACK_REFRESH = "arrow.counterclockwise" // 1.0 (iOS 13) no fill variant! 145 //public let SYSTEM_REFRESH1 = "arrow.counterclockwise.circle" // 146 //public let SYSTEM_REFRESH2 = "arrow.counterclockwise.square" // 147 public let ICONNAME_RECOUP = "taler.recoup" // 148 public let SYSTEM_RECOUP1 = "exclamationmark.circle" // 1.0 (iOS 13) 149 public let ICONNAME_DENOMLOSS = "taler.denomloss" // 150 public let SYSTEM_DENOMLOSS1 = "exclamationmark.triangle" // 1.0 (iOS 13) 151 152 public let ICONNAME_ZOOM_IN = "taler.left.and.right.fill" // 3.0 (iOS 15) 153 public let ICONNAME_ZOOM_OUT = "taler.right.and.left.fill" // 3.0 (iOS 15) 154 public let SYSTEM_ZOOM_IN = "arrowtriangle.left.and.line.vertical.and.arrowtriangle.right.fill" // 3.0 (iOS 15) 155 public let SYSTEM_ZOOM_OUT = "arrowtriangle.right.and.line.vertical.and.arrowtriangle.left.fill" // 3.0 (iOS 15) 156 157 public let ICONNAME_LOCKCLOCK = "taler.lock.clock" // 158 public let SYSTEM_LOCKCLOCK = "lock.badge.clock" // 5.0 (iOS 17) 159 public let FALLBACK_LOCK = "lock" // 1.0 (iOS 13) 160 161 public let ICONNAME_PASSES = "taler.calendar.badge.record" // 2.0 (iOS 14) 162 public let SYSTEM_PASSES = "calendar.badge.clock" // 2.0 (iOS 14) 163 public let ICONNAME_DISCOUNTS = "taler.percent.seal" // 164 public let SYSTEM_DISCOUNTS = "percent" // 1.0 (iOS 14) 165 166 public let SUNFILL = "sun.max.fill" // 1.0 (iOS 13) 167 public let MOONFILL = "moon.fill" // 1.0 (iOS 13) 168 169 public let HTTPS = "https://" 170 public let TALER = "taler://" 171 public let TALER_NET = "taler.net" 172 public let DEMO = ".demo." + TALER_NET 173 public let TEST = ".test." + TALER_NET 174 public let HEAD = ".head." + TALER_NET 175 176 public let SANDBOX = "/instances/sandbox/" 177 public let EXCHANGE = "exchange" 178 public let BACKEND = "backend" 179 public let BANK = "bank" 180 public let SHOP = "shop" 181 public let DEMOBANK = HTTPS + BANK + DEMO + "/" 182 public let DEMOSHOP = HTTPS + SHOP + DEMO 183 public let DEMOBACKEND = HTTPS + BACKEND + DEMO + SANDBOX 184 public let DEMOEXCHANGE = HTTPS + EXCHANGE + DEMO + "/" 185 public let TESTBANK = HTTPS + BANK + TEST + "/" 186 public let TESTSHOP = HTTPS + SHOP + TEST 187 public let TESTBACKEND = HTTPS + BACKEND + TEST + SANDBOX 188 public let TESTEXCHANGE = HTTPS + EXCHANGE + TEST + "/" 189 public let HEADBANK = HTTPS + BANK + HEAD + "/" 190 public let HEADSHOP = HTTPS + SHOP + HEAD 191 public let HEADBACKEND = HTTPS + BACKEND + HEAD + "/" 192 public let HEADEXCHANGE = HTTPS + EXCHANGE + HEAD + "/" 193 194 public let ARS_AGE_EXCHANGE = HTTPS + "exchange-age.taler.ar/" 195 public let ARS_EXP_EXCHANGE = HTTPS + "exchange-expensive.taler.ar/" 196 public let DEMOAMOUNT = UInt64(2500) 197 public let DEMOCURRENCY = "KUDOS" 198 public let TESTCURRENCY = "TESTKUDOS" 199 //public let LONGCURRENCY = "gold-pressed Latinum" // 20 characters, with dash and space 200 public let LONGCURRENCY = "GOLDLATINUM" // 11 characters, no dash, no space 201 202 // MARK: - Titles 203 204 public let TITLE_EXCHANGES = String(localized: "TitleExchanges", defaultValue: "Payment Services") 205 206 // MARK: - Keys used in JSON 207 208 public let PLAINTEXT = "text/plain" 209 public let MARKDOWN = "text/markdown" 210 public let HTML = "text/html" 211 212 public let EXCHANGEBASEURL = "exchangeBaseUrl" 213 public let TALERURI = "talerUri" 214 215 public let TRANSACTIONTRANSITION = "transactionTransition" 216 public let TRANSACTIONID = "transactionID" 217 218 public let NOTIFICATIONTIME = "notif.time" 219 public let NOTIFICATIONERROR = "notif.error" 220 public let NOTIFICATIONPHASE = "notif.phase" 221 public let NOTIFICATIONANIMATION = "notif.animation" 222 public let NOTIFICATIONSHARE = "notif.share" 223 public let NOTIFICATIONPASTE = "notif.paste" 224 public let NOTIFICATIONPAYLOAD = "notif.payload" 225 226 /// Notifications sent by wallet-core 227 extension Notification.Name { 228 static let Idle = Notification.Name("idle") 229 static let BalanceChange = Notification.Name("balance-change") 230 static let BalanceRefreshChange = Notification.Name("balance-refresh-info-changed") 231 static let BankAccountChange = Notification.Name(AccountChange.TransitionType.change.rawValue) 232 static let DatabaseMaintenance = Notification.Name("database-maintenance-progress") 233 static let ExchangeAdded = Notification.Name("exchange-added") 234 static let ExchangeDeleted = Notification.Name("exchange-deleted") 235 static let ExchangeStateTransition = Notification.Name("exchange-state-transition") 236 static let RequestProgressPhase = Notification.Name("request-progress-phase") 237 static let RequestProgressError = Notification.Name("request-progress-error") 238 static let TransactionStateTransition = Notification.Name("transaction-state-transition") 239 static let TransactionDone = Notification.Name("transaction-done") 240 static let TransactionExpired = Notification.Name("transaction-expired") 241 static let TransactionDeleted = Notification.Name("transaction-deleted") 242 static let TransactionScanned = Notification.Name("transaction-scanned") 243 static let PendingReady = Notification.Name("pending-ready") 244 static let WaitReserve = Notification.Name("wait-reserve") 245 static let WithdrawCoins = Notification.Name("withdraw-coins") 246 static let KYCrequired = Notification.Name("kyc-required") 247 static let DismissSheet = Notification.Name("dismiss-sheet") 248 static let PendingOperationProcessed = Notification.Name("pending-operation-processed") 249 static let ReserveNotYetFound = Notification.Name("reserve-not-yet-found") 250 // static let WithdrawalGroupBankConfirmed = Notification.Name("withdrawal-group-bank-confirmed") 251 // static let WithdrawalGroupReserveReady = Notification.Name("withdrawal-group-reserve-ready") 252 // static let WithdrawGroupFinished = Notification.Name("withdraw-group-finished") 253 // static let PayOperationSuccess = Notification.Name("pay-operation-success") 254 static let ProposalAccepted = Notification.Name("proposal-accepted") 255 static let ProposalDownloaded = Notification.Name("proposal-downloaded") 256 static let TaskObservabilityEvent = Notification.Name("task-observability-event") 257 static let RequestObservabilityEvent = Notification.Name("request-observability-event") 258 static let ContactAdded = Notification.Name("contact-added") 259 static let MailboxMessageAdded = Notification.Name("mailbox-message-added") 260 261 static let GeneralError = Notification.Name("error") 262 static let TransactionError = Notification.Name("txError") 263 } 264 265 /// Notifications for internal synchronization 266 extension Notification.Name { 267 static let SendAction = Notification.Name("sendAction") 268 static let RequestAction = Notification.Name("requestAction") 269 static let DepositAction = Notification.Name("depositAction") 270 static let WithdrawAction = Notification.Name("withdrawAction") 271 static let QrScanAction = Notification.Name("qrScanAction") 272 static let SettingsAction = Notification.Name("settingsAction") 273 static let ShareAction = Notification.Name("shareAction") 274 static let PasteAction = Notification.Name("pasteAction") 275 }