BlueWallet/typings/CommonToolTipActions.ts

263 lines
7.2 KiB
TypeScript
Raw Normal View History

import { Platform } from 'react-native';
2024-07-04 20:45:07 +02:00
import loc from '../loc';
2024-10-22 23:05:09 +02:00
import { Action } from '../components/types';
2024-07-04 20:45:07 +02:00
const keys = {
CopyTXID: 'copyTX_ID',
CopyBlockExplorerLink: 'copy_blockExplorer',
ExpandNote: 'expandNote',
OpenInBlockExplorer: 'open_in_blockExplorer',
CopyAmount: 'copyAmount',
CopyNote: 'copyNote',
ManageWallets: 'manageWallets',
ImportWallet: 'importWallet',
2024-08-22 17:50:12 +02:00
HideBalance: 'hideBalance',
ViewInBitcoin: 'viewInBitcoin',
ViewInSats: 'viewInSats',
ViewInFiat: 'viewInFiat',
Entropy: 'entropy',
SearchAccount: 'searchAccount',
Passphrase: 'passphrase',
MoreInfo: 'moreInfo',
SaveChanges: 'saveChanges',
PaymentsCode: 'paymentsCode',
2024-10-13 09:08:52 +02:00
RemoveAllRecipients: 'RemoveAllRecipients',
AddRecipient: 'AddRecipient',
RemoveRecipient: 'RemoveRecipient',
ScanQR: 'scan_qr',
CopyFromClipboard: 'copy_from_clipboard',
ChoosePhoto: 'choose_photo',
ImportFile: 'import_file',
InsertContact: 'insert_contact',
SignPSBT: 'sign_psbt',
SendMax: 'send_max',
AllowRBF: 'allow_rbf',
ImportTransaction: 'import_transaction',
ImportTransactionMultsig: 'import_transaction_multisig',
ImportTransactionQR: 'import_transaction_qr',
CoinControl: 'coin_control',
CoSignTransaction: 'co_sign_transaction',
2024-07-04 20:45:07 +02:00
};
2024-10-22 23:05:09 +02:00
const icons: { [key: string]: { iconValue: string } } = {
Eye: { iconValue: 'eye' },
EyeSlash: { iconValue: 'eye.slash' },
Link: { iconValue: 'link' },
Note: { iconValue: 'note.text' },
ManageWallets: { iconValue: 'slider.horizontal.3' },
ImportWallet: { iconValue: 'square.and.arrow.down.on.square' },
ViewInBitcoin: { iconValue: 'bitcoinsign.circle' },
ViewInFiat: { iconValue: 'coloncurrencysign.circle' },
Entropy: { iconValue: 'dice' },
SearchAccount: { iconValue: 'magnifyingglass' },
Passphrase: { iconValue: 'rectangle.and.pencil.and.ellipsis' },
MoreInfo: { iconValue: 'info.circle' },
SaveChanges: { iconValue: 'checkmark' },
InsertContact: { iconValue: 'at.badge.plus' },
SignPSBT: { iconValue: 'signature' },
SendMax: { iconValue: 'dial.high' },
AllowRBF: { iconValue: 'arrowshape.up.circle' },
ImportTransaction: { iconValue: 'square.and.arrow.down' },
ImportTransactionMultsig: { iconValue: 'square.and.arrow.down.on.square' },
ImportTransactionQR: { iconValue: 'qrcode.viewfinder' },
CoinControl: { iconValue: 'switch.2' },
CoSignTransaction: { iconValue: 'signature' },
PaymentsCode: { iconValue: 'qrcode' },
2024-10-13 09:08:52 +02:00
RemoveAllRecipients: { iconValue: 'person.2.slash' },
AddRecipient: { iconValue: 'person.badge.plus' },
RemoveRecipient: { iconValue: 'person.badge.minus' },
2024-10-22 23:05:09 +02:00
ScanQR: { iconValue: Platform.OS === 'ios' ? 'qrcode' : 'ic_menu_camera' },
ImportFile: { iconValue: 'doc' },
ChoosePhoto: { iconValue: Platform.OS === 'ios' ? 'photo' : 'ic_menu_gallery' },
Clipboard: { iconValue: Platform.OS === 'ios' ? 'doc.on.doc' : 'ic_menu_file' },
2024-07-04 20:45:07 +02:00
};
2024-10-22 23:05:09 +02:00
export const CommonToolTipActions: { [key: string]: Action } = {
2024-07-04 20:45:07 +02:00
CopyTXID: {
id: keys.CopyTXID,
text: loc.transactions.details_copy_txid,
icon: icons.Clipboard,
},
CopyBlockExplorerLink: {
id: keys.CopyBlockExplorerLink,
text: loc.transactions.details_copy_block_explorer_link,
icon: icons.Clipboard,
},
OpenInBlockExplorer: {
id: keys.OpenInBlockExplorer,
text: loc.transactions.details_show_in_block_explorer,
icon: icons.Link,
},
ExpandNote: {
id: keys.ExpandNote,
text: loc.transactions.expand_note,
icon: icons.Note,
},
CopyAmount: {
id: keys.CopyAmount,
text: loc.transactions.details_copy_amount,
icon: icons.Clipboard,
},
2024-10-13 09:08:52 +02:00
AddRecipient: {
id: keys.AddRecipient,
text: loc.send.details_add_rec_add,
icon: icons.AddRecipient,
},
RemoveRecipient: {
id: keys.RemoveRecipient,
text: loc.send.details_add_rec_rem,
icon: icons.RemoveRecipient,
},
2024-07-04 20:45:07 +02:00
CopyNote: {
id: keys.CopyNote,
text: loc.transactions.details_copy_note,
icon: icons.Clipboard,
},
ManageWallet: {
id: keys.ManageWallets,
text: loc.wallets.manage_title,
icon: icons.ManageWallets,
},
ImportWallet: {
id: keys.ImportWallet,
text: loc.wallets.add_import_wallet,
icon: icons.ImportWallet,
},
2024-08-22 17:50:12 +02:00
HideBalance: {
id: keys.HideBalance,
text: loc.transactions.details_balance_hide,
icon: icons.EyeSlash,
},
ViewInFiat: {
id: keys.ViewInFiat,
text: loc.total_balance_view.view_in_fiat,
icon: icons.ViewInFiat,
},
ViewInSats: {
id: keys.ViewInSats,
text: loc.total_balance_view.view_in_sats,
icon: icons.ViewInBitcoin,
},
ViewInBitcoin: {
id: keys.ViewInBitcoin,
text: loc.total_balance_view.view_in_bitcoin,
icon: icons.ViewInBitcoin,
},
Entropy: {
id: keys.Entropy,
text: loc.wallets.add_entropy_provide,
icon: icons.Entropy,
},
2024-10-13 09:08:52 +02:00
RemoveAllRecipients: {
id: keys.RemoveAllRecipients,
text: loc.send.details_add_rec_rem_all,
icon: icons.RemoveAllRecipients,
},
SearchAccount: {
id: keys.SearchAccount,
text: loc.wallets.import_search_accounts,
icon: icons.SearchAccount,
menuState: false,
},
Passphrase: {
id: keys.Passphrase,
text: loc.wallets.import_passphrase,
icon: icons.Passphrase,
menuState: false,
},
MoreInfo: {
id: keys.MoreInfo,
text: loc.wallets.more_info,
icon: icons.MoreInfo,
hidden: false,
},
SaveChanges: {
id: keys.SaveChanges,
text: loc._.save,
icon: icons.SaveChanges,
},
PaymentCode: {
id: keys.PaymentsCode,
text: loc.bip47.purpose,
icon: icons.PaymentsCode,
menuState: false,
},
ScanQR: {
id: keys.ScanQR,
text: loc.wallets.list_long_scan,
icon: icons.ScanQR,
},
CopyFromClipboard: {
id: keys.CopyFromClipboard,
text: loc.wallets.list_long_clipboard,
icon: icons.Clipboard,
subtitle: '',
hidden: false,
},
ChoosePhoto: {
id: keys.ChoosePhoto,
text: loc.wallets.list_long_choose,
icon: icons.ChoosePhoto,
},
ImportFile: {
id: keys.ImportFile,
text: loc.wallets.import_file,
icon: icons.ImportFile,
},
2024-10-22 23:05:09 +02:00
InsertContact: {
id: keys.InsertContact,
text: loc.send.details_insert_contact,
icon: icons.InsertContact,
hidden: true,
},
SignPSBT: {
id: keys.SignPSBT,
text: loc.send.psbt_sign,
icon: icons.SignPSBT,
hidden: true,
},
SendMax: {
id: keys.SendMax,
text: loc.send.details_adv_full,
icon: icons.SendMax,
hidden: true,
},
AllowRBF: {
id: keys.AllowRBF,
text: loc.send.details_adv_fee_bump,
icon: icons.AllowRBF,
hidden: true,
menuState: false,
},
ImportTransaction: {
id: keys.ImportTransaction,
text: loc.send.details_adv_import,
icon: icons.ImportTransaction,
hidden: true,
},
ImportTransactionQR: {
id: keys.ImportTransactionQR,
text: loc.send.details_adv_import_qr,
icon: icons.ImportTransactionQR,
hidden: true,
},
ImportTransactionMultsig: {
id: keys.ImportTransactionMultsig,
text: loc.send.details_adv_import,
icon: icons.ImportTransactionMultsig,
hidden: true,
},
CoSignTransaction: {
id: keys.CoSignTransaction,
text: loc.multisig.co_sign_transaction,
icon: icons.CoSignTransaction,
hidden: true,
},
CoinControl: {
id: keys.CoinControl,
text: loc.cc.header,
icon: icons.CoinControl,
hidden: false,
},
2024-07-04 20:45:07 +02:00
};