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