Compare commits

..

170 Commits

Author SHA1 Message Date
luigi1111
113efbfdf0 Merge pull request #3678
0e1c6ae build: prepare v0.17.2.3 (selsta)
2021-08-30 16:14:30 -04:00
selsta
0e1c6ae60f build: prepare v0.17.2.3 2021-08-29 20:49:45 +02:00
luigi1111
b461373b8a Merge pull request #3674
3719f00 TxKey: fix get / check proof (selsta)
2021-08-26 21:30:02 -04:00
luigi1111
046124cd9b Merge pull request #3672
09003dd StandardDialog: use secondary color for cancel button (rating89us)
2021-08-26 21:29:18 -04:00
luigi1111
0ca7e4ec76 Merge pull request #3670
ac432fe InputDialog: use secondary color for cancel Button (rating89us)
2021-08-26 21:28:38 -04:00
luigi1111
376eaecf08 Merge pull request #3667
52c8d68 WizardRestoreWallet4: 'Open wallet' -> 'Create wallet'; add translation (rating89us)
2021-08-26 21:28:08 -04:00
luigi1111
316f8b1762 Merge pull request #3666
4fec3a4 WizardHeader: fix subtitle text width (rating89us)
2021-08-26 21:25:22 -04:00
luigi1111
cbed1ed6f7 Merge pull request #3665
02e0ac1 cmake: remove unnecessary steps (selsta)
2021-08-26 21:24:34 -04:00
luigi1111
3507e848cf Merge pull request #3650
946fa53 Receive: implement payment request (rating89us)
2021-08-26 21:23:23 -04:00
luigi1111
60967d3930 Merge pull request #3644
57f9cf9 History: fix transactions missing after midnight (selsta)
2021-08-26 21:22:05 -04:00
luigi1111
55a262b892 Merge pull request #3618
5234570 WizardCreateDevice1: display images; differentiate Ledger Nano X and S; add label to dropdown (rating89us)
2021-08-26 21:19:11 -04:00
selsta
3719f00953 TxKey: fix get / check proof 2021-08-20 23:51:04 +02:00
rating89us
09003dd140 StandardDialog: use secondary color for cancel button 2021-08-20 14:34:38 +02:00
rating89us
ac432fe947 InputDialog: use secondary color for cancel Button 2021-08-20 13:23:43 +02:00
rating89us
5234570afa WizardCreateDevice1: display images; differentiate Ledger Nano X and S; add label to dropdown 2021-08-19 17:26:32 +02:00
rating89us
946fa538b9 Receive: implement payment request 2021-08-19 17:13:57 +02:00
rating89us
52c8d68240 WizardRestoreWallet4: "Open wallet" -> "Create wallet"; add translation 2021-08-15 21:25:20 +02:00
rating89us
4fec3a4d6f WizardHeader: fix subtitle text width 2021-08-13 14:56:22 +02:00
selsta
02e0ac1309 cmake: remove unnecessary steps 2021-08-12 01:08:13 +02:00
luigi1111
51828babbb Merge pull request #3641
d8fb9ec Transfer: use defaultFontColor for text cursor when address field is blank (rating89us)
2021-07-26 15:37:47 -04:00
luigi1111
a13e4b622c Merge pull request #3640
7805430 Account, Receive, RemoteNodeList, SettingsNode: selection indicator in lists (rating89us)
2021-07-26 15:37:26 -04:00
luigi1111
56a17e0a85 Merge pull request #3638
faf9ec3 AddressBook: add Grab QR code inline button (rating89us)
2021-07-26 15:36:48 -04:00
luigi1111
e74ef368df Merge pull request #3637
22291b1 NetworkStatusItem: add tooltip to switch node button; adjust colors of lightning icon, switch node button and network status (rating89us)
2021-07-26 15:36:20 -04:00
luigi1111
857d034f18 Merge pull request #3634
b30be48 README: TOC, update building titles (rating89us)
2021-07-26 15:35:55 -04:00
luigi1111
3f4cedea54 Merge pull request #3630
284caf8 RemoteNodeList: truncate long addresses (rating89us)
2021-07-26 15:35:13 -04:00
luigi1111
4376880b46 Merge pull request #3627
d20c589 Tooltip: fix tooltip width (rating89us)
2021-07-26 15:34:50 -04:00
luigi1111
98057487f6 Merge pull request #3624
ea9ed3e openpgp: add missing include (selsta)
2021-07-26 15:34:29 -04:00
luigi1111
06025352ce Merge pull request #3620
c4c549e Upgrade Font Awesome icons to v5.15.3 (rating89us)
2021-07-26 15:31:58 -04:00
selsta
57f9cf9d85 History: fix transactions missing after midnight 2021-07-26 00:42:44 +02:00
rating89us
d8fb9ec081 Transfer: use defaultFontColor for text cursor when address field is blank 2021-07-25 20:09:52 +02:00
rating89us
faf9ec3027 AddressBook: add Grab QR code inline button
Co-authored-by: selsta <selsta@users.noreply.github.com>
2021-07-25 09:08:17 +02:00
rating89us
22291b1df1 NetworkStatusItem: add tooltip to switch node button; adjust colors of lightning icon, switch node button and network status 2021-07-23 08:14:20 +02:00
rating89us
7805430f4f Account, Receive, RemoteNodeList, SettingsNode: selection indicator in lists 2021-07-23 08:13:01 +02:00
rating89us
b30be48a24 README: TOC, update building titles 2021-07-22 18:06:44 +02:00
rating89us
284caf83f6 RemoteNodeList: truncate long addresses 2021-07-21 01:34:02 +02:00
rating89us
d20c589e42 Tooltip: fix tooltip width 2021-07-16 09:59:45 +02:00
selsta
ea9ed3e0be openpgp: add missing include 2021-07-15 19:43:41 +02:00
rating89us
c4c549e57a Upgrade Font Awesome icons to v5.15.3 2021-07-12 23:15:59 +02:00
luigi1111
b6682330a6 Merge pull request #3611
0ce3e4b WizardOpenWallet1: navigate with keyboard; enable accessibility (rating89us)
2021-07-11 22:19:28 -04:00
luigi1111
b54ee598d8 Merge pull request #3523
20106b2 Tooltip: fix binding loop (selsta)
2021-07-11 22:18:49 -04:00
luigi1111
7da11b050c Merge pull request #3617
94b6a5b cmake: fix incorrect rebase (selsta)
2021-07-10 20:08:56 -04:00
selsta
94b6a5bbf5 cmake: fix incorrect rebase 2021-07-11 02:03:46 +02:00
luigi1111
5a88d4a669 Merge pull request #3565
3d6e9ce cmake: remove unnecessary file globbing (selsta)
2021-07-10 18:02:58 -04:00
selsta
3d6e9ce571 cmake: remove unnecessary file globbing 2021-07-10 23:58:25 +02:00
luigi1111
987e716374 Merge pull request #3614
3631482 SettingsInfo: fix displaying of Graphics mode and Tails on clipboard output (rating89us)
2021-07-10 17:55:11 -04:00
luigi1111
f81bfa1865 Merge pull request #3613
6739b51 WizardWalletInput: red border if error; error messages; remove placeholders; smaller font; icon for browse button (rating89us)
2021-07-10 17:54:34 -04:00
luigi1111
e4a3e282b5 Merge pull request #3593
2c0cf0d WizardCreateDevice1: move 'choose your device' dropdown to the top (rating89us)
2021-07-10 17:53:26 -04:00
luigi1111
c017522a3c Merge pull request #3599
f82336c TxConfirmationDialog: fix displaying of '<' when using fontMonoRegular (rating89us)
2021-07-10 17:52:32 -04:00
rating89us
6739b51a5b WizardWalletInput: red border if error; error messages; remove placeholders; smaller font; icon for browse button
Update WizardWalletInput.qml
2021-07-10 20:14:23 +02:00
rating89us
3631482419 SettingsInfo: fix displaying of Graphics mode and Tails on clipboard output 2021-07-09 23:00:18 +02:00
luigi1111
1c61ec2511 Merge pull request #3603
8419fce LanguageSidebar: navigate/select language with keyboard; enable accessibility; selected indicator; remember previous focused item (rating89us)
2021-07-06 11:50:34 -04:00
luigi1111
d0707d78a1 Merge pull request #3602
15dbbaf cmake: enable position independent code for quirc (selsta)
2021-07-06 11:50:01 -04:00
luigi1111
083b0fb7a8 Merge pull request #3601
d8f9d2f Transfer: fix fee label alignment (selsta)
2021-07-06 11:49:37 -04:00
luigi1111
24d113377b Merge pull request #3598
dbc8c7d qr: scan valid addresses that miss an uri prefix (selsta)
2021-07-06 11:48:58 -04:00
luigi1111
5e076325cd Merge pull request #3590
2db8f77 Transfer: UI changes to description field (use LineEdit, decrease font size, new placeholder) (rating89us)
2021-07-06 11:48:27 -04:00
luigi1111
5aef186c8a Merge pull request #3588
0de95e3 RemoteNodeList: reduce spacing between icons (selsta)
2021-07-06 11:47:49 -04:00
luigi1111
81f0209006 Merge pull request #3582
54e183a SettingsInfo: add portable mode to wallet mode (selsta)
2021-07-06 11:47:06 -04:00
luigi1111
b4e6f20b53 Merge pull request #3580
0fd0fc5 Receive: selected address details on top; QR code click to ampliate/right click to save as image; click on description to edit; display full address; use standard button for 'create new address' (rating89us)
2021-07-06 11:46:35 -04:00
luigi1111
a278781abf Merge pull request #3562
6610f6f cmake: fix compilation with zxcvbn, always enable (selsta)
2021-07-06 11:44:20 -04:00
luigi1111
2d82439b56 Merge pull request #3559
3eae630 History: collapse 'Sort & Filter' when user types (rating89us)
2021-07-06 11:43:48 -04:00
luigi1111
0b0bc87184 Merge pull request #3544
f75a244 Wizard: set unused wallet name (selsta)
2021-07-06 11:43:09 -04:00
luigi1111
59fcda43c6 Merge pull request #3505
76be4b8 main: set correct size for pruned blockchain (selsta)
2021-07-06 11:42:37 -04:00
luigi1111
6e87e2cb5b Merge pull request #3504
8236277 main: simplify fiat ticker code (selsta)
2021-07-06 11:42:09 -04:00
luigi1111
8730743207 Merge pull request #3503
b2255cf main: use Utils.epoch() for epoch (selsta)
2021-07-06 11:41:11 -04:00
luigi1111
4c67007e5b Merge pull request #3502
aa8c1a5 main: remove redundant assignment (selsta)
2021-07-06 11:40:42 -04:00
luigi1111
0ae1c721ef Merge pull request #3491
dbda233 pages: set correct icon fallback opacity (selsta)
2021-07-06 11:40:10 -04:00
luigi1111
21cce4cfb4 Merge pull request #3487
b2fbe51 StandardButton: fix warning with fallbackicon (selsta)
2021-07-06 11:39:19 -04:00
luigi1111
d595957405 Merge pull request #3165
3907dac Account: remove 'Balance:' label; add XMR; align balances (rating89us)
2021-07-06 11:36:19 -04:00
rating89us
0ce3e4b1e7 WizardOpenWallet1: navigate with keyboard; enable accessibility 2021-07-06 10:41:03 +02:00
rating89us
8419fce062 LanguageSidebar: navigate/select language with keyboard; enable accessibility; selected indicator; remember previous focused item 2021-07-04 21:56:57 +02:00
selsta
15dbbaf691 cmake: enable position independent code for quirc 2021-07-01 18:36:43 +02:00
selsta
d8f9d2f160 Transfer: fix fee label alignment 2021-07-01 01:19:57 +02:00
selsta
dbda233b94 pages: set correct icon fallback opacity 2021-07-01 00:46:03 +02:00
rating89us
f82336ce8c TxConfirmationDialog: fix displaying of "<" when using fontMonoRegular 2021-06-29 12:34:39 +02:00
selsta
dbc8c7d473 qr: scan valid addresses that miss an uri prefix 2021-06-29 04:53:24 +02:00
rating89us
2c0cf0d652 WizardCreateDevice1: move "choose your device" dropdown to the top 2021-06-28 00:33:49 +02:00
rating89us
2db8f77a0a Transfer: UI changes to description field (use LineEdit, decrease font size, new placeholder) 2021-06-26 21:25:19 +02:00
rating89us
0fd0fc5ceb Receive: selected address details on top; QR code click to ampliate/right click to save as image; click on description to edit; display full address; use standard button for "create new address" 2021-06-26 16:01:59 +02:00
selsta
0de95e3071 RemoteNodeList: reduce spacing between icons 2021-06-25 01:58:07 +02:00
luigi1111
b58bff39a0 Merge pull request #3586
614a7a0 RemoteNodeList: display shield icon if trusted daemon (rating89us)
2021-06-24 13:55:08 -05:00
luigi1111
bea763d7f8 Merge pull request #3585
b9a1fa8 History: display Payment proof dialog immediately after clicking the button (rating89us)
2021-06-24 13:54:42 -05:00
luigi1111
59a0184ebd Merge pull request #3584
51ac3ca StandardDropdown: use ArrowCursor; remove rotation of dropdownIcon; change background color on mouse hover; smaller text (rating89us)
2021-06-24 13:54:16 -05:00
luigi1111
1a8e3111e4 Merge pull request #3583
192b36f StandardDropdown: remove dots from corners (rating89us)
2021-06-24 13:53:22 -05:00
rating89us
614a7a086a RemoteNodeList: display shield icon if trusted daemon 2021-06-23 03:09:29 +02:00
rating89us
b9a1fa8563 History: display Payment proof dialog immediately after clicking the button 2021-06-22 21:19:27 +02:00
rating89us
51ac3ca981 StandardDropdown: use ArrowCursor; remove rotation of dropdownIcon; change background color on mouse hover; smaller text 2021-06-22 20:38:21 +02:00
rating89us
192b36f74f StandardDropdown: remove dots from corners 2021-06-22 10:09:11 +02:00
selsta
54e183a7f5 SettingsInfo: add portable mode to wallet mode 2021-06-22 02:30:54 +02:00
luigi1111
453388f744 Merge pull request #3578
64dd55a TitleBar: maximize window when title bar is double clicked (rating89us)
2021-06-21 13:41:10 -05:00
luigi1111
afc2b35ed0 Merge pull request #3576
4e2b1ce Transfer: don't overlap inside borders; fix margins (rating89us)
2021-06-21 13:40:36 -05:00
luigi1111
9114887866 Merge pull request #3575
08dd89d Transfer: remove leftMargin of 'Address' label (rating89us)
2021-06-21 13:39:47 -05:00
luigi1111
2afb346563 Merge pull request #3574
eacc57f StandardDropdown: use ColumnLayout; use same height of LineEdit; include dropdownLabel (rating89us)
2021-06-21 13:39:00 -05:00
luigi1111
bc8f39c311 Merge pull request #3571
c15c5b5 TransactionHistory: use displayAmount for amount (selsta)
2021-06-21 13:38:37 -05:00
luigi1111
286a3d140d Merge pull request #3569
ffd31c5 AddressBook: use LineEdit on descriptionLine; add tab/backtab; forceActiveFocus on addressLine; use Enter/Return key to save; cancel/delete buttons (rating89us)
2021-06-21 13:38:02 -05:00
luigi1111
5f2b5d940c Merge pull request #3550
417eaea History: stay on the same page after editing description (rating89us)
2021-06-21 13:36:34 -05:00
rating89us
64dd55a9a6 TitleBar: maximize window when title bar is double clicked 2021-06-20 19:28:11 +02:00
rating89us
eacc57fb44 StandardDropdown: use ColumnLayout; use same height of LineEdit; include dropdownLabel 2021-06-20 00:02:59 +02:00
rating89us
4e2b1cec95 Transfer: don't overlap inside borders; fix margins 2021-06-19 21:16:54 +02:00
rating89us
08dd89de58 Transfer: remove leftMargin of "Address" label 2021-06-19 18:21:40 +02:00
selsta
c15c5b5227 TransactionHistory: use displayAmount for amount 2021-06-18 02:08:37 +02:00
rating89us
ffd31c50da AddressBook: use LineEdit on descriptionLine; add tab/backtab; forceActiveFocus on addressLine; use Enter/Return key to save; cancel/delete buttons 2021-06-17 13:37:19 +02:00
luigi1111
b970cad48b Merge pull request #3564
dfe8146 SettingsInfo, WizardRestoreWallet1, WizardCreateDevice1: Correct restore height date when typed in wrong format (rating89us)
2021-06-16 14:53:44 -05:00
luigi1111
752f1faa93 Merge pull request #3563
b319dbb main: fixes bug not accepting new restore height (rating89us)
2021-06-16 14:53:17 -05:00
luigi1111
60b33d3a91 Merge pull request #3545
52aef11 LineEdit: use ColumnLayout instead of Item (also used in LineEditMulti) (rating89us)
2021-06-16 14:49:26 -05:00
luigi1111
5de306ab7a Merge pull request #3513
877fb9e README: freenode -> libera (selsta)
2021-06-16 14:47:59 -05:00
rating89us
dfe8146f5c SettingsInfo, WizardRestoreWallet1, WizardCreateDevice1: Correct restore height date when typed in wrong format 2021-06-15 16:34:07 +02:00
selsta
6610f6f2da cmake: fix compilation with zxcvbn, always enable 2021-06-14 21:47:54 +02:00
rating89us
b319dbb1b2 main: fixes bug not accepting new restore height 2021-06-14 21:21:16 +02:00
rating89us
3eae630cfe History: collapse "Sort & Filter" when user types 2021-06-12 20:43:35 +02:00
rating89us
52aef114fa LineEdit: use ColumnLayout instead of Item (also used in LineEditMulti) 2021-06-11 17:13:52 +02:00
luigi1111
7c379e2cda Merge pull request #3548
979e0da History: add fontAwesomeFallbackIcon (rating89us)
2021-06-10 11:07:53 -05:00
luigi1111
244459e606 Merge pull request #3546
8ac1b4e AddressBook: add 'See transactions' button (rating89us)
2021-06-10 11:07:10 -05:00
luigi1111
0e561de0a9 Merge pull request #3543
c5bad8e SettingsLog: fix text color bug on theme switch; new warning and green text colors (rating89us)
2021-06-10 11:06:31 -05:00
luigi1111
ceac6c8a47 Merge pull request #3542
f6a66b6 SettingsLog: ScrollBar always visible (except Mac) (rating89us)
2021-06-10 11:06:04 -05:00
luigi1111
b542f15531 Merge pull request #3541
2f1092d Slider: use MoneroComponents.TextPlain instead of Text on label (rating89us)
2021-06-10 11:05:38 -05:00
luigi1111
3621ab3344 Merge pull request #3539
b825f6e StandardDropdown: add FontAwesome fallback icons (rating89us)
2021-06-10 11:05:01 -05:00
luigi1111
4850e13895 Merge pull request #3538
ad38f15 DatePicker: date input with fixed size; longer animation; move up calendar rectangle (rating89us)
2021-06-10 11:04:39 -05:00
luigi1111
950e20d400 Merge pull request #3537
5a41849 SettingsLog: new placeholder text in command field (no commands in translation string) (rating89us)
2021-06-10 11:04:15 -05:00
luigi1111
124a8b5f4e Merge pull request #3536
cea712e History: close sortAndFilter when exiting Transactions page (rating89us)
2021-06-10 11:03:31 -05:00
luigi1111
0bd4d731d2 Merge pull request #3535
1f8aa0d History: change default dates of 'Date from' and 'Date to' DatePicker components (rating89us)
2021-06-10 11:02:36 -05:00
luigi1111
e3a17a66ff Merge pull request #3534
9ab104b DatePicker: display currently selected month when opening calendar (rating89us)
2021-06-10 11:01:52 -05:00
luigi1111
4f385b9a04 Merge pull request #3533
39d561d DatePicker: support mouse wheel to navigate months (rating89us)
2021-06-10 11:01:19 -05:00
luigi1111
2c54787644 Merge pull request #3532
23301da DatePicker: highlight selected date/today; hide invalid days (rating89us)
2021-06-10 10:27:42 -05:00
luigi1111
7770621a2f Merge pull request #3531
2c51762 DatePicker: FontAwesome fallback icons (rating89us)
2021-06-10 10:25:55 -05:00
luigi1111
b22fc4266c Merge pull request #3528
f06d6e0 Transfer: add XMR unit on transactions with a single recipient; move 'send all' button next to Amount label (rating89us)
2021-06-10 10:22:52 -05:00
luigi1111
2290e7e762 Merge pull request #3527
1512908 Transfer: fix y position of recipient elements (rating89us)
2021-06-10 10:21:07 -05:00
luigi1111
f8344ce7c6 Merge pull request #3525
ed1bc2e build: fix typo (rating89us)
2021-06-10 10:20:12 -05:00
luigi1111
1be9ea4828 Merge pull request #3524
aca6174 AddressBook: add Font Awesome fallback icons (rating89us)
2021-06-10 10:19:35 -05:00
luigi1111
b07016b7cd Merge pull request #3522
c9ee4bf History: move cursor to end of search input field after importing address (rating89us)
2021-06-10 10:18:59 -05:00
luigi1111
179b74e570 Merge pull request #3521
10a01fa Receive: add tooltip to search transactions button (rating89us)
2021-06-10 10:18:27 -05:00
luigi1111
0a6f6cb9ac Merge pull request #3520
0775b52 History: clean search bar inline button (rating89us)
2021-06-10 10:16:26 -05:00
rating89us
417eaeae28 History: stay on the same page after editing description 2021-06-10 12:59:39 +02:00
rating89us
8ac1b4ef58 AddressBook: add "See transactions" button 2021-06-10 09:05:09 +02:00
rating89us
979e0da9e0 History: add fontAwesomeFallbackIcon 2021-06-09 17:14:55 +02:00
rating89us
1f8aa0dff0 History: change default dates of "Date from" and "Date to" DatePicker components 2021-06-09 09:38:12 +02:00
selsta
f75a2447a7 Wizard: set unused wallet name 2021-06-09 01:00:16 +02:00
rating89us
f6a66b6779 SettingsLog: ScrollBar always visible (except Mac) 2021-06-07 22:37:39 +02:00
rating89us
c5bad8ec49 SettingsLog: fix text color bug on theme switch; new warning and green text colors 2021-06-07 22:35:54 +02:00
rating89us
2f1092de55 Slider: use MoneroComponents.TextPlain instead of Text on label 2021-06-07 15:30:18 +02:00
rating89us
b825f6e1bd StandardDropdown: add FontAwesome fallback icons 2021-06-07 14:02:19 +02:00
rating89us
ad38f155bc DatePicker: date input with fixed size; longer animation; move up calendar rectangle 2021-06-07 13:39:16 +02:00
rating89us
5a418499d4 SettingsLog: new placeholder text in command field (no commands in translation string) 2021-06-07 12:03:28 +02:00
rating89us
cea712e51d History: close sortAndFilter when exiting Transactions page 2021-06-07 11:31:40 +02:00
rating89us
39d561d9f2 DatePicker: support mouse wheel to navigate months 2021-06-06 23:21:32 +02:00
rating89us
23301da51b DatePicker: highlight selected date/today; hide invalid days 2021-06-06 23:15:53 +02:00
rating89us
9ab104b38a DatePicker: display currently selected month when opening calendar 2021-06-06 21:55:34 +02:00
rating89us
2c517623a1 DatePicker: FontAwesome fallback icons 2021-06-06 20:40:06 +02:00
rating89us
f06d6e067f Transfer: add XMR unit on transactions with a single recipient; move "send all" button next to Amount label 2021-06-04 19:39:21 +02:00
rating89us
1512908751 Transfer: fix y position of recipient elements 2021-06-04 19:35:19 +02:00
rating89us
ed1bc2eece build: fix typo 2021-06-02 19:33:22 +02:00
rating89us
0775b529c4 History: clean search bar inline button 2021-06-02 19:09:31 +02:00
rating89us
aca6174ef4 AddressBook: add Font Awesome fallback icons 2021-06-02 17:07:01 +02:00
selsta
20106b29ba Tooltip: fix binding loop 2021-06-02 17:06:45 +02:00
rating89us
c9ee4bf286 History: move cursor to end of search input field after importing address 2021-06-02 16:56:34 +02:00
rating89us
10a01fa5b4 Receive: add tooltip to search transactions button 2021-06-02 16:43:11 +02:00
luigi1111
2946127ed7 Merge pull request #3512
8411ec0 main: hide/show popups before/after inactivity screen lock (rating89us)
2021-06-01 01:39:21 -05:00
luigi1111
416979cdbd Merge pull request #3496
7997e6a AddressBook: highlight background when selecting contact for transfer page (rating89us)
2021-06-01 01:38:45 -05:00
luigi1111
1442215ce5 Merge pull request #3490
9d3864b Implement tooltips in multiple pages and components (rating89us)
2021-06-01 01:37:47 -05:00
luigi1111
ba3bdcd6a1 Merge pull request #3216
fa45b8f Receive: add search transactions button (rating89us)
2021-06-01 01:35:46 -05:00
selsta
877fb9ea87 README: freenode -> libera 2021-05-29 05:18:32 +02:00
rating89us
9d3864b7f0 Implement tooltips in multiple pages and components 2021-05-29 04:02:19 +02:00
rating89us
8411ec0787 main: hide/show popups before/after inactivity screen lock 2021-05-28 12:22:59 +02:00
selsta
76be4b8c0a main: set correct size for pruned blockchain 2021-05-26 03:39:35 +02:00
selsta
8236277906 main: simplify fiat ticker code 2021-05-26 01:09:30 +02:00
selsta
b2255cfd24 main: use Utils.epoch() for epoch 2021-05-26 00:55:50 +02:00
selsta
aa8c1a5421 main: remove redundant assignment 2021-05-26 00:28:58 +02:00
rating89us
7997e6aaf4 AddressBook: highlight background when selecting contact for transfer page 2021-05-22 11:31:05 +02:00
rating89us
fa45b8f96e Receive: add search transactions button 2021-05-22 10:59:17 +02:00
selsta
b2fbe51659 StandardButton: fix warning with fallbackicon 2021-05-19 02:01:10 +02:00
rating89us
3907dac198 Account: remove "Balance:" label; add XMR; align balances 2020-10-17 13:57:24 +02:00
85 changed files with 26606 additions and 284131 deletions

View File

@@ -103,7 +103,7 @@ jobs:
docker-linux-static-
- name: install dependencies
run: sudo apt -y install xvfb libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xkb1 libxkbcommon-x11-0
- name: preprare build enviroment
- name: prepare build environment
run: docker build --tag monero:build-env-linux --build-arg THREADS=3 --file Dockerfile.linux .
- name: build
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'make release-static -j3'
@@ -130,7 +130,7 @@ jobs:
key: docker-windows-static-{hash}
restore-keys: |
docker-windows-static-
- name: preprare build enviroment
- name: prepare build environment
run: docker build --tag monero:build-env-windows --build-arg THREADS=3 --file Dockerfile.windows .
- name: build
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-windows sh -c 'make depends root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j3'
@@ -149,7 +149,7 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: preprare build enviroment
- name: prepare build environment
run: docker build --tag monero:build-env-android --build-arg THREADS=3 --file Dockerfile.android .
- name: build
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -e THREADS=3 monero:build-env-android

View File

@@ -5,13 +5,12 @@ message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
set(VERSION_MAJOR "17")
set(VERSION_MINOR "2")
set(VERSION_REVISION "2")
set(VERSION_REVISION "3")
set(VERSION "0.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
option(STATIC "Link libraries statically, requires static Qt")
option(USE_DEVICE_TREZOR "Trezor support compilation" ON)
option(ENABLE_PASS_STRENGTH_METER "Enable zxcvbn library for password strength" OFF)
option(WITH_SCANNER "Enable webcam QR scanner" OFF)
option(DEV_MODE "Checkout latest monero master on build" OFF)
@@ -78,13 +77,6 @@ if(STATIC)
add_definitions(-DMONERO_GUI_STATIC)
endif()
# Include password strength library
if(ENABLE_PASS_STRENGTH_METER)
message(STATUS "Building with pass strength meter support.")
else()
add_definitions(-DDISABLE_PASS_STRENGTH_METER)
endif()
include(CMakePackageConfigHelpers)
# force version update

View File

@@ -2,12 +2,29 @@
Copyright (c) 2014-2019, The Monero Project
## Table of Contents
* [Development resources](#development-resources)
* [Vulnerability response](#vulnerability-response)
* [Introduction](#introduction)
* [About this project](#about-this-project)
* [Supporting the project](#supporting-the-project)
* [License](#license)
* [Translations](#translations)
* [Installing the Monero GUI from a package](#installing-the-monero-gui-from-a-package)
* [Compiling the Monero GUI from source](#compiling-the-monero-gui-from-source)
+ [Building Reproducible Windows static binaries with Docker (any OS)](#building-reproducible-windows-static-binaries-with-docker-any-os)
+ [Building Reproducible Linux static binaries with Docker (any OS)](#building-reproducible-linux-static-binaries-with-docker-any-os)
+ [Building Android APK with Docker (any OS) *Experimental*](#building-android-apk-with-docker-any-os-experimental)
+ [Building on Linux](#building-on-linux)
+ [Building on OS X](#building-on-os-x)
+ [Building on Windows](#building-on-windows)
## Development resources
- Web: [getmonero.org](https://getmonero.org)
- Mail: [dev@getmonero.org](mailto:dev@getmonero.org)
- Github: [https://github.com/monero-project/monero-gui](https://github.com/monero-project/monero-gui)
- IRC: [#monero-dev on Freenode](irc://chat.freenode.net/#monero-dev)
- IRC: [#monero-gui on Libera](irc://irc.libera.chat/#monero-gui)
- Translation platform (Weblate): [translate.getmonero.org](https://translate.getmonero.org)
- UI Design: [Monero-GUI on Figma](https://www.figma.com/file/DplJ2DDQfIKiuRvolHX2hN/Monero-GUI)
@@ -180,7 +197,7 @@ Packaging for your favorite distribution would be a welcome contribution!
http://<your.local.ip>:8080/QtApp-debug.apk
```
### On Linux:
### Building on Linux
(Tested on Ubuntu 17.10 x64, Ubuntu 18.04 x64 and Gentoo x64)
@@ -244,7 +261,7 @@ The following instructions will fetch Qt from your distribution's repositories i
The executable can be found in the build/release/bin folder.
### On OS X:
### Building on OS X
1. Install Xcode from AppStore
@@ -277,7 +294,7 @@ The executable can be found in the `build/release/bin` folder.
For building an application bundle see `DEPLOY.md`.
### On Windows:
### Building on Windows
The Monero GUI on Windows is 64 bits only; 32-bit Windows GUI builds are not officially supported anymore.

View File

@@ -17,11 +17,7 @@ if(APPLE OR (WIN32 AND NOT STATIC))
add_custom_command(TARGET deploy
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${_qt_svg_dylib} $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtGui.framework/Versions/5/QtGui" "@executable_path/../Frameworks/QtGui.fr amework/Versions/5/QtGui" $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/libqsvg.dylib
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtWidgets.framework/Versions/5/QtWidgets" "@executable_path/../Frameworks/ QtGui.framework/Versions/5/QtGui" $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/libqsvg.dylib
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtSvg.framework/Versions/5/QtSvg" "@executable_path/../Frameworks/QtGui.fr amework/Versions/5/QtGui" $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/libqsvg.dylib
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtCore.framework/Versions/5/QtCore" "@executable_path/../Frameworks/QtGui. framework/Versions/5/QtGui" $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/libqsvg.dylib
COMMENT "Copying libqsvg.dylib, running install_name_tool"
COMMENT "Copying libqsvg.dylib"
)
endif()

View File

@@ -22,6 +22,7 @@ RowLayout {
MoneroComponents.Label {
id: title
fontSize: 14
tooltipIconVisible: true
}
Rectangle {

View File

@@ -48,6 +48,8 @@ Item {
property int fontSize: 14
property alias fontColor: label.color
property bool iconOnTheLeft: true
property alias tooltipIconVisible: label.tooltipIconVisible
property alias tooltip: label.tooltip
signal clicked()
height: 25
@@ -121,7 +123,10 @@ Item {
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: !label.tooltipIconVisible && label.tooltip ? label.tooltipPopup.open() : ""
onExited: !label.tooltipIconVisible && label.tooltip ? label.tooltipPopup.close() : ""
onClicked: {
toggle()
}

View File

@@ -32,6 +32,7 @@ import QtQuick.Controls 2.2 as QtQuickControls2
import QtQuick.Layouts 1.2
import QtGraphicalEffects 1.0
import QtQuick.Controls.Styles 1.2
import FontAwesome 1.0
import "." as MoneroComponents
import "effects/" as MoneroEffects
@@ -91,8 +92,8 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
height: parent.height - 1
anchors.leftMargin: datePicker.expanded ? 1 : 0
anchors.rightMargin: datePicker.expanded ? 1 : 0
anchors.leftMargin: 0
anchors.rightMargin: 0
radius: 4
y: 1
color: datePicker.backgroundColor
@@ -221,21 +222,18 @@ Item {
Layout.fillWidth: true
color: "transparent"
Image {
MoneroEffects.ImageMask {
id: button
anchors.right: parent.right
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
source: "qrc:///images/whiteDropIndicator.png"
visible: false
}
ColorOverlay {
source: button
anchors.fill: button
image: "qrc:///images/whiteDropIndicator.png"
height: 8
width: 12
fontAwesomeFallbackIcon: FontAwesome.arrowDown
fontAwesomeFallbackSize: 14
color: MoneroComponents.Style.defaultFontColor
rotation: datePicker.expanded ? 180 : 0
opacity: 1
}
MouseArea {
@@ -252,12 +250,16 @@ Item {
id: popup
padding: 0
closePolicy: QtQuickControls2.Popup.CloseOnEscape | QtQuickControls2.Popup.CloseOnPressOutsideParent
onOpened: {
calendar.visibleMonth = currentDate.getMonth();
calendar.visibleYear = currentDate.getFullYear();
}
Rectangle {
id: calendarRect
width: head.width
x: head.x
y: head.y + head.height + 10
y: head.y + head.height - 2
color: MoneroComponents.Style.middlePanelBackgroundColor
border.width: 1
@@ -266,11 +268,16 @@ Item {
clip: true
Behavior on height {
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
NumberAnimation { duration: 150; easing.type: Easing.InQuad }
}
MouseArea {
anchors.fill: parent
scrollGestureEnabled: false
onWheel: {
if (wheel.angleDelta.y > 0) return calendar.showPreviousMonth();
if (wheel.angleDelta.y < 0) return calendar.showNextMonth();
}
}
Rectangle {
@@ -305,11 +312,6 @@ Item {
id: dayRect
anchors.fill: parent
radius: parent.implicitHeight / 2
color: {
if(dayArea.pressed && styleData.visibleMonth)
return MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
return "transparent";
}
}
MoneroComponents.TextPlain {
@@ -327,19 +329,32 @@ Item {
text: styleData.date.getDate()
themeTransition: false
color: {
if(!styleData.visibleMonth) return MoneroComponents.Style.lightGreyFontColor
if(dayArea.pressed) return MoneroComponents.Style.defaultFontColor
if(styleData.today) return MoneroComponents.Style.orange
return MoneroComponents.Style.defaultFontColor
if (currentDate.toDateString() === styleData.date.toDateString()) {
if (dayArea.containsMouse) {
dayRect.color = MoneroComponents.Style.buttonBackgroundColorHover;
} else {
dayRect.color = MoneroComponents.Style.buttonBackgroundColor;
}
} else {
if (dayArea.containsMouse) {
dayRect.color = MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
} else {
dayRect.color = "transparent";
}
}
if(!styleData.valid) return "transparent"
if(styleData.date.toDateString() === (new Date()).toDateString()) return "#FFFF00"
if(!styleData.visibleMonth) return MoneroComponents.Style.lightGreyFontColor
if(dayArea.pressed) return MoneroComponents.Style.defaultFontColor
return MoneroComponents.Style.defaultFontColor
}
}
MouseArea {
id: dayArea
anchors.fill: parent
visible: styleData.valid
hoverEnabled: true
onEntered: dayRect.color = MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
onExited: dayRect.color = "transparent"
cursorShape: Qt.PointingHandCursor
onClicked: {
if(styleData.visibleMonth) {
@@ -397,18 +412,15 @@ Item {
anchors.bottom: parent.bottom
width: height
Image {
MoneroEffects.ImageMask {
id: prevMonthIcon
anchors.centerIn: parent
source: "qrc:///images/prevMonth.png"
visible: false
}
ColorOverlay {
source: prevMonthIcon
anchors.fill: prevMonthIcon
image: "qrc:///images/prevMonth.png"
height: 8
width: 12
fontAwesomeFallbackIcon: FontAwesome.arrowLeft
fontAwesomeFallbackSize: 14
color: MoneroComponents.Style.defaultFontColor
opacity: 0.5
}
MouseArea {
@@ -426,19 +438,16 @@ Item {
anchors.bottom: parent.bottom
width: height
Image {
MoneroEffects.ImageMask {
id: nextMonthIcon
anchors.centerIn: parent
source: "qrc:///images/prevMonth.png"
visible: false
}
ColorOverlay {
source: nextMonthIcon
anchors.fill: nextMonthIcon
color: MoneroComponents.Style.defaultFontColor
opacity: 0.5
image: "qrc:///images/prevMonth.png"
height: 8
width: 12
rotation: 180
fontAwesomeFallbackIcon: FontAwesome.arrowLeft
fontAwesomeFallbackSize: 14
color: MoneroComponents.Style.defaultFontColor
}
MouseArea {

View File

@@ -36,19 +36,28 @@ MoneroEffects.ImageMask {
color: MoneroComponents.Style.defaultFontColor
image: ""
property alias tooltip: tooltip.text
signal clicked(var mouse)
MoneroComponents.Tooltip {
id: tooltip
anchors.fill: parent
tooltipLeft: true
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: {
tooltip.text ? tooltip.tooltipPopup.open() : ""
button.width = button.width + 2
button.height = button.height + 2
}
onExited: {
tooltip.text ? tooltip.tooltipPopup.close() : ""
button.width = button.width - 2
button.height = button.height - 2
}

View File

@@ -46,6 +46,9 @@ Item {
property alias fontStyleName: inlineText.font.styleName
property bool isFontAwesomeIcon: fontFamily == FontAwesome.fontFamily || fontFamily == FontAwesome.fontFamilySolid
property alias buttonColor: rect.color
property alias tooltip: tooltip.text
property alias tooltipLeft: tooltip.tooltipLeft
property alias tooltipBottom: tooltip.tooltipBottom
height: isFontAwesomeIcon ? 30 : 24
width: isFontAwesomeIcon ? height : inlineText.width + 16
@@ -82,17 +85,27 @@ Item {
}
}
MoneroComponents.Tooltip {
id: tooltip
anchors.fill: parent
}
MouseArea {
id: buttonArea
cursorShape: rect.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
hoverEnabled: true
anchors.fill: parent
onClicked: doClick()
onClicked: {
tooltip.text ? tooltip.tooltipPopup.close() : ""
doClick()
}
onEntered: {
tooltip.text ? tooltip.tooltipPopup.open() : ""
rect.color = buttonColor ? buttonColor : "#707070";
rect.opacity = 0.8;
}
onExited: {
tooltip.text ? tooltip.tooltipPopup.close() : ""
rect.opacity = 1.0;
rect.color = buttonColor ? buttonColor : "#808080";
}

View File

@@ -129,6 +129,7 @@ Item {
MoneroComponents.StandardButton {
id: cancelButton
primary: false
small: true
width: 120
fontSize: 14

View File

@@ -35,7 +35,9 @@ Item {
id: item
property alias text: label.text
property alias tooltip: label.tooltip
property alias tooltipIconVisible: label.tooltipIconVisible
property alias color: label.color
property alias labelMouseArea: labelMouseArea
property int textFormat: Text.PlainText
property string tipText: ""
property int fontSize: 16
@@ -71,9 +73,13 @@ Item {
onLinkActivated: item.linkActivated()
textFormat: parent.textFormat
MouseArea {
id: labelMouseArea
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.NoButton
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
cursorShape: parent.hoveredLink || (tooltip && !tooltipIconVisible) ? Qt.PointingHandCursor : Qt.ArrowCursor
onEntered: tooltip && !tooltipIconVisible ? parent.tooltipPopup.open() : undefined
onExited: tooltip && !tooltipIconVisible ? parent.tooltipPopup.close() : undefined
}
}
}

View File

@@ -53,26 +53,64 @@ Drawer {
color: "red"
ListView {
id: languagesListView
clip: true
Layout.fillHeight: true
Layout.fillWidth: true
boundsBehavior: Flickable.StopAtBounds
width: sideBar.width
height: sideBar.height
focus: true
model: langModel
Keys.onUpPressed: currentIndex !== 0 ? currentIndex = currentIndex - 1 : ""
Keys.onBacktabPressed: currentIndex !== 0 ? currentIndex = currentIndex - 1 : ""
Keys.onDownPressed: currentIndex + 1 !== count ? currentIndex = currentIndex + 1 : ""
Keys.onTabPressed: currentIndex + 1 !== count ? currentIndex = currentIndex + 1 : ""
delegate: Rectangle {
id: item
color: "transparent"
color: index == languagesListView.currentIndex ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
width: sideBar.width
height: 32
Accessible.role: Accessible.ListItem
Accessible.name: display_name
Keys.onEnterPressed: setSelectedItemAsLanguage();
Keys.onReturnPressed: setSelectedItemAsLanguage();
Keys.onSpacePressed: setSelectedItemAsLanguage();
function setSelectedItemAsLanguage() {
var locale_spl = locale.split("_");
// reload active translations
console.log(locale_spl[0]);
translationManager.setLanguage(locale_spl[0]);
// set wizard language settings
persistentSettings.locale = locale;
persistentSettings.language = display_name;
persistentSettings.language_wallet = wallet_language;
appWindow.showStatusMessage(qsTr("Language changed."), 3);
appWindow.toggleLanguageView();
}
Rectangle {
id: selectedIndicator
anchors.left: parent.left
anchors.leftMargin: 0
height: parent.height
width: 2
color: index == languagesListView.currentIndex ? MoneroComponents.Style.buttonBackgroundColor : "transparent"
}
Rectangle {
id: flagRect
height: 24
width: 24
anchors.left: parent.left
anchors.left: selectedIndicator.right
anchors.leftMargin: 4
anchors.verticalCenter: parent.verticalCenter
color: "transparent"
@@ -85,8 +123,8 @@ Drawer {
MoneroComponents.TextPlain {
anchors.left: parent.left
anchors.leftMargin: 30
font.bold: true
anchors.leftMargin: 32
font.bold: languagesListView.currentIndex == index ? true : false
font.pixelSize: 14
color: MoneroComponents.Style.defaultFontColor
text: display_name
@@ -112,21 +150,7 @@ Drawer {
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
var locale_spl = locale.split("_");
// reload active translations
console.log(locale_spl[0]);
translationManager.setLanguage(locale_spl[0]);
// set wizard language settings
persistentSettings.locale = locale;
persistentSettings.language = display_name;
persistentSettings.language_wallet = wallet_language;
appWindow.showStatusMessage(qsTr("Language changed."), 3);
appWindow.toggleLanguageView();
}
onClicked: setSelectedItemAsLanguage();
hoverEnabled: true
onEntered: {
// item.color = "#26FFFFFF"
@@ -166,4 +190,12 @@ Drawer {
}
}
}
function selectCurrentLanguage() {
for (var i = 0; i < langModel.count; ++i) {
if (langModel.get(i).display_name === persistentSettings.language) {
languagesListView.currentIndex = i;
}
}
}
}

View File

@@ -33,14 +33,21 @@ import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
Item {
ColumnLayout {
id: item
Layout.fillWidth: true
default property alias content: inlineButtons.children
property alias input: input
property alias text: input.text
property int inputPaddingLeft: 10
property int inputPaddingRight: 10
property int inputPaddingTop: 10
property int inputPaddingBottom: 10
property int inputRadius: 4
property bool password: false
property bool passwordHidden: true
property var passwordLinked: null
@@ -55,10 +62,8 @@ Item {
property real placeholderLeftMargin: {
if (placeholderCenter) {
return undefined;
} else if (inlineIcon.visible) {
return inlineIcon.width + inlineIcon.anchors.leftMargin + inputPadding;
} else {
return inputPadding;
return inputPaddingLeft;
}
}
@@ -66,16 +71,16 @@ Item {
property alias validator: input.validator
property alias readOnly : input.readOnly
property alias cursorPosition: input.cursorPosition
property alias inlineIcon: inlineIcon.visible
property bool copyButton: false
property bool pasteButton: false
property alias copyButtonText: copyButtonId.text
property alias copyButtonEnabled: copyButtonId.enabled
property bool borderDisabled: false
property string borderColor: {
if(error && input.text !== ""){
if ((error && input.text !== "") || (errorWhenEmpty && input.text == "")) {
return MoneroComponents.Style.inputBorderColorInvalid;
} else if(input.activeFocus){
} else if (input.activeFocus) {
return MoneroComponents.Style.inputBorderColorActive;
} else {
return MoneroComponents.Style.inputBorderColorInActive;
@@ -87,6 +92,7 @@ Item {
property bool fontBold: false
property alias fontColor: input.color
property bool error: false
property bool errorWhenEmpty: false
property alias labelText: inputLabel.text
property alias labelColor: inputLabel.color
property alias labelTextFormat: inputLabel.textFormat
@@ -97,16 +103,13 @@ Item {
property alias labelWrapMode: inputLabel.wrapMode
property alias labelHorizontalAlignment: inputLabel.horizontalAlignment
property bool showingHeader: inputLabel.text !== "" || copyButton
property int inputHeight: 42
property int inputPadding: 10
property int inputHeight: 39
signal labelLinkActivated(); // input label, rich text <a> signal
signal editingFinished();
signal accepted();
signal textUpdated();
height: showingHeader ? (inputLabel.height + inputItem.height + 2) : inputHeight
onActiveFocusChanged: activeFocus && input.forceActiveFocus()
onTextUpdated: {
// check to remove placeholder text when there is content
@@ -152,45 +155,100 @@ Item {
}
}
MoneroComponents.TextPlain {
id: inputLabel
anchors.top: parent.top
anchors.left: parent.left
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: labelFontSize
font.bold: labelFontBold
textFormat: Text.RichText
color: MoneroComponents.Style.defaultFontColor
onLinkActivated: item.labelLinkActivated()
spacing: 0
Rectangle {
id: inputLabelRect
color: "transparent"
Layout.fillWidth: true
height: (inputLabel.height + 10)
visible: showingHeader ? true : false
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
}
}
MoneroComponents.TextPlain {
id: inputLabel
anchors.top: parent.top
anchors.left: parent.left
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: labelFontSize
font.bold: labelFontBold
textFormat: Text.RichText
color: MoneroComponents.Style.defaultFontColor
onLinkActivated: item.labelLinkActivated()
MoneroComponents.LabelButton {
id: copyButtonId
text: qsTr("Copy") + translationManager.emptyString
anchors.right: parent.right
onClicked: {
if (input.text.length > 0) {
console.log("Copied to clipboard");
clipboard.setText(input.text);
appWindow.showStatusMessage(qsTr("Copied to clipboard"), 3);
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
}
}
RowLayout {
anchors.right: parent.right
spacing: 16
MoneroComponents.LabelButton {
id: copyButtonId
text: qsTr("Copy") + translationManager.emptyString
onClicked: {
if (input.text.length > 0) {
console.log("Copied to clipboard");
clipboard.setText(input.text);
appWindow.showStatusMessage(qsTr("Copied to clipboard"), 3);
}
}
visible: copyButton && input.text !== ""
}
MoneroComponents.LabelButton {
id: pasteButtonId
onClicked: {
input.clear();
input.paste();
}
text: qsTr("Paste") + translationManager.emptyString
visible: pasteButton
}
}
visible: copyButton && input.text !== ""
}
Item{
id: inputItem
height: inputHeight
anchors.top: showingHeader ? inputLabel.bottom : parent.top
anchors.topMargin: showingHeader ? 12 : 0
width: parent.width
clip: true
MoneroComponents.Input {
id: input
KeyNavigation.backtab: item.KeyNavigation.backtab
KeyNavigation.tab: item.KeyNavigation.tab
Layout.fillWidth: true
Layout.preferredHeight: inputHeight
leftPadding: item.inputPaddingLeft
rightPadding: (inlineButtons.width > 0 ? inlineButtons.width + inlineButtons.spacing : 0) + inputPaddingRight
topPadding: item.inputPaddingTop
bottomPadding: item.inputPaddingBottom
font.family: item.fontFamily
font.pixelSize: item.fontSize
font.bold: item.fontBold
onEditingFinished: item.editingFinished()
onAccepted: item.accepted();
onTextChanged: item.textUpdated()
echoMode: isPasswordHidden() ? TextInput.Password : TextInput.Normal
MoneroComponents.Label {
visible: password || passwordLinked
fontSize: 20
text: isPasswordHidden() ? FontAwesome.eye : FontAwesome.eyeSlash
opacity: eyeMouseArea.containsMouse ? 0.9 : 0.7
fontFamily: FontAwesome.fontFamily
anchors.right: parent.right
anchors.rightMargin: 15
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
MouseArea {
id: eyeMouseArea
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: passwordToggle()
}
}
MoneroComponents.TextPlain {
id: placeholderLabel
@@ -221,69 +279,15 @@ Item {
anchors.fill: parent
border.width: borderDisabled ? 0 : 1
border.color: borderColor
radius: 4
radius: item.inputRadius
}
Image {
id: inlineIcon
width: 26
height: 26
anchors.top: parent.top
anchors.topMargin: 8
anchors.left: parent.left
anchors.leftMargin: 12
source: "qrc:///images/moneroIcon-28x28.png"
visible: false
}
MoneroComponents.Input {
id: input
anchors.fill: parent
anchors.leftMargin: inlineIcon.visible ? 44 : 0
font.family: item.fontFamily
font.pixelSize: item.fontSize
font.bold: item.fontBold
KeyNavigation.backtab: item.KeyNavigation.backtab
KeyNavigation.tab: item.KeyNavigation.tab
onEditingFinished: item.editingFinished()
onAccepted: item.accepted();
onTextChanged: item.textUpdated()
leftPadding: inputPadding
rightPadding: (inlineButtons.width > 0 ? inlineButtons.width + inlineButtons.spacing : 0) + inputPadding
topPadding: inputPadding
bottomPadding: inputPadding
echoMode: isPasswordHidden() ? TextInput.Password : TextInput.Normal
MoneroComponents.Label {
visible: password || passwordLinked
fontSize: 20
text: isPasswordHidden() ? FontAwesome.eye : FontAwesome.eyeSlash
opacity: eyeMouseArea.containsMouse ? 0.9 : 0.7
fontFamily: FontAwesome.fontFamily
anchors.right: parent.right
anchors.rightMargin: 15
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
MouseArea {
id: eyeMouseArea
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: passwordToggle()
}
}
RowLayout {
id: inlineButtons
anchors.bottom: parent.bottom
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: inputPadding
anchors.bottomMargin: inputPadding
anchors.rightMargin: inputPadding
spacing: 4
}
RowLayout {
id: inlineButtons
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: inputPaddingRight
spacing: 4
}
}
}

View File

@@ -68,6 +68,7 @@ ColumnLayout {
}
property alias error: input.error
property alias cursorPosition: input.cursorPosition
property string labelFontColor: MoneroComponents.Style.defaultFontColor
property bool labelFontBold: false
@@ -91,6 +92,8 @@ ColumnLayout {
signal labelButtonClicked();
signal inputLabelLinkActivated();
signal editingFinished();
signal returnPressed();
signal enterPressed();
onActiveFocusChanged: activeFocus && input.forceActiveFocus()
@@ -176,6 +179,8 @@ ColumnLayout {
fontColor: item.fontColor
mouseSelection: item.mouseSelection
onEditingFinished: item.editingFinished()
Keys.onReturnPressed: item.returnPressed()
Keys.onEnterPressed: item.enterPressed()
MoneroComponents.TextPlain {
id: placeholderLabel

View File

@@ -80,7 +80,7 @@ Rectangle {
if(item.connected == Wallet.ConnectionStatus_Connected){
return 1
} else {
return 0.5
MoneroComponents.Style.blackTheme ? 0.5 : 0.3
}
}
@@ -92,7 +92,7 @@ Rectangle {
source: {
if(appWindow.isMining) {
return "qrc:///images/miningxmr.png"
} else if(item.connected == Wallet.ConnectionStatus_Connected) {
} else if(item.connected == Wallet.ConnectionStatus_Connected || !MoneroComponents.Style.blackTheme) {
return "qrc:///images/lightning.png"
} else {
return "qrc:///images/lightning-white.png"
@@ -126,8 +126,8 @@ Rectangle {
font.family: MoneroComponents.Style.fontMedium.name
font.bold: true
font.pixelSize: 13
color: MoneroComponents.Style.dimmedFontColor
opacity: MoneroComponents.Style.blackTheme ? 0.65 : 0.5
color: MoneroComponents.Style.blackTheme ? MoneroComponents.Style.dimmedFontColor : MoneroComponents.Style.defaultFontColor
opacity: MoneroComponents.Style.blackTheme ? 0.65 : 0.75
text: qsTr("Network status") + translationManager.emptyString
themeTransition: false
}
@@ -159,16 +159,18 @@ Rectangle {
}
}
Text {
MoneroComponents.TextPlain {
anchors.left: statusTextVal.right
anchors.leftMargin: 16
anchors.verticalCenter: parent.verticalCenter
color: refreshMouseArea.containsMouse ? MoneroComponents.Style.dimmedFontColor : MoneroComponents.Style.defaultFontColor
color: refreshMouseArea.containsMouse ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor
font.family: FontAwesome.fontFamilySolid
font.pixelSize: 24
font.styleName: "Solid"
opacity: iconItem.opacity * (refreshMouseArea.visible ? 1 : 0.5)
opacity: 0.85
text: FontAwesome.random
themeTransition: false
tooltip: qsTr("Switch to another public remote node") + translationManager.emptyString;
visible: (
!appWindow.disconnected &&
!persistentSettings.useRemoteNode &&
@@ -181,6 +183,8 @@ Rectangle {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
visible: true
onEntered: parent.tooltipPopup.open()
onExited: parent.tooltipPopup.close()
onClicked: {
const callback = function(result) {
refreshMouseArea.visible = true;

View File

@@ -90,6 +90,9 @@ Rectangle {
if (!parsed.error) {
root.qrcode_decoded(parsed.address, parsed.payment_id, parsed.amount, parsed.tx_description, parsed.recipient_name, parsed.extra_parameters);
root.state = "Stopped";
} else if (walletManager.addressValid(data, appWindow.persistentSettings.nettype)) {
root.qrcode_decoded(data, "", "", "", "", null);
root.state = "Stopped";
} else {
onNotifyError(parsed.error);
}

View File

@@ -82,9 +82,9 @@ GridLayout {
return addr + ":" + port;
}
LineEdit {
MoneroComponents.LineEdit {
id: daemonAddr
Layout.fillWidth: true
Layout.preferredWidth: root.width/3
placeholderText: qsTr("Remote Node Hostname / IP") + translationManager.emptyString
placeholderFontFamily: root.placeholderFontFamily
placeholderFontBold: root.placeholderFontBold
@@ -104,9 +104,9 @@ GridLayout {
text: initialHostPort[1]
}
LineEdit {
MoneroComponents.LineEdit {
id: daemonPort
Layout.fillWidth: true
Layout.preferredWidth: root.width/3
placeholderText: qsTr("Port") + translationManager.emptyString
placeholderFontFamily: root.placeholderFontFamily
placeholderFontBold: root.placeholderFontBold

View File

@@ -59,7 +59,16 @@ ColumnLayout {
Rectangle {
height: 30
Layout.fillWidth: true
color: itemMouseArea.containsMouse || index === remoteNodesModel.selected ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
color: itemMouseArea.containsMouse || trustedDaemonCheckMark.labelMouseArea.containsMouse || index === remoteNodesModel.selected ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
Rectangle {
visible: index === remoteNodesModel.selected
Layout.fillHeight: true
anchors.top: parent.top
anchors.bottom: parent.bottom
color: "darkgrey"
width: 2
}
Rectangle {
color: MoneroComponents.Style.appWindowBorderColor
@@ -80,8 +89,11 @@ ColumnLayout {
anchors.fill: parent
anchors.rightMargin: 80
color: "transparent"
property var trusted: remoteNodesModel.get(index).trusted
MoneroComponents.TextPlain {
id: addressText
width: parent.width - trustedDaemonCheckMark.width
color: index === remoteNodesModel.selected ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
@@ -89,6 +101,23 @@ ColumnLayout {
font.pixelSize: 16
text: address
themeTransition: false
elide: Text.ElideMiddle
}
MoneroComponents.Label {
id: trustedDaemonCheckMark
anchors.left: addressText.right
anchors.leftMargin: 6
anchors.verticalCenter: parent.verticalCenter
z: itemMouseArea.z + 1
fontSize: 16
fontFamily: FontAwesome.fontFamilySolid
fontColor: index === remoteNodesModel.selected ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor
styleName: "Solid"
visible: trusted
text: FontAwesome.shieldAlt
tooltip: qsTr("Trusted daemon") + translationManager.emptyString
themeTransition: false
}
MouseArea {
@@ -103,15 +132,16 @@ ColumnLayout {
RowLayout {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 6
height: 30
spacing: 10
spacing: 2
MoneroComponents.InlineButton {
buttonColor: "transparent"
fontFamily: FontAwesome.fontFamily
fontPixelSize: 18
text: FontAwesome.edit
tooltip: qsTr("Edit remote node") + translationManager.emptyString
tooltipLeft: true
onClicked: remoteNodeDialog.edit(remoteNodesModel.get(index), function (remoteNode) {
remoteNodesModel.set(index, remoteNode)
})
@@ -122,6 +152,8 @@ ColumnLayout {
fontFamily: FontAwesome.fontFamily
text: FontAwesome.times
visible: remoteNodesModel.count > 1
tooltip: qsTr("Remove remote node") + translationManager.emptyString
tooltipLeft: true
onClicked: remoteNodesModel.removeSelectNextIfNeeded(index)
}
}

View File

@@ -16,11 +16,11 @@ ColumnLayout {
spacing: 0
Text {
MoneroComponents.TextPlain {
id: label
color: MoneroComponents.Style.defaultFontColor
font.pixelSize: 14
Layout.fillWidth: true
font.family: MoneroComponents.Style.fontRegular.name
}
QtQuickControls.Slider {

View File

@@ -52,6 +52,9 @@ Item {
else return 16;
}
property alias label: label
property alias tooltip: tooltip.text
property alias tooltipLeft: tooltip.tooltipLeft
property alias tooltipPopup: tooltip.tooltipPopup
signal clicked()
height: small ? 30 : 36
@@ -143,6 +146,7 @@ Item {
width: button.small ? 16 : 20
height: button.small ? 16 : 20
source: {
if (fontAwesomeIcon) return "";
if(button.rightIconInactive !== "" && !button.enabled) {
return button.rightIconInactive;
}
@@ -161,11 +165,18 @@ Item {
}
}
MoneroComponents.Tooltip {
id: tooltip
anchors.fill: parent
}
MouseArea {
id: buttonArea
anchors.fill: parent
hoverEnabled: true
onClicked: doClick()
onEntered: tooltip.text ? tooltip.tooltipPopup.open() : ""
onExited: tooltip.text ? tooltip.tooltipPopup.close() : ""
cursorShape: Qt.PointingHandCursor
}

View File

@@ -171,6 +171,7 @@ Rectangle {
MoneroComponents.StandardButton {
id: cancelButton
primary: false
text: qsTr("Cancel") + translationManager.emptyString
onClicked: {
root.close()

View File

@@ -29,12 +29,16 @@
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtGraphicalEffects 1.0
import FontAwesome 1.0
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
import "../components/effects/" as MoneroEffects
Item {
ColumnLayout {
id: dropdown
Layout.fillWidth: true
property int itemTopMargin: 0
property alias dataModel: repeater.model
property string shadowPressedColor
@@ -44,46 +48,66 @@ Item {
property string textColor: MoneroComponents.Style.defaultFontColor
property alias currentIndex: columnid.currentIndex
readonly property alias expanded: popup.visible
property int dropdownHeight: 42
property int fontHeaderSize: 16
property alias labelText: dropdownLabel.text
property alias labelColor: dropdownLabel.color
property alias labelTextFormat: dropdownLabel.textFormat
property alias labelWrapMode: dropdownLabel.wrapMode
property alias labelHorizontalAlignment: dropdownLabel.horizontalAlignment
property bool showingHeader: dropdownLabel.text !== ""
property int labelFontSize: 14
property bool labelFontBold: false
property int dropdownHeight: 39
property int fontSize: 14
property int fontItemSize: 14
property string colorBorder: MoneroComponents.Style.inputBorderColorInActive
property string colorHeaderBackground: "transparent"
property bool headerBorder: true
property bool headerFontBold: false
height: dropdownHeight
signal changed();
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
Item {
id: head
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: parent.itemTopMargin
height: dropdown.dropdownHeight
spacing: 0
Rectangle {
id: dropdownLabelRect
color: "transparent"
Layout.fillWidth: true
height: (dropdownLabel.height + 10)
visible: showingHeader ? true : false
Rectangle {
color: "transparent"
border.width: dropdown.headerBorder ? 1 : 0
border.color: dropdown.colorBorder
radius: 4
anchors.fill: parent
MoneroComponents.TextPlain {
id: dropdownLabel
anchors.top: parent.top
anchors.left: parent.left
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: labelFontSize
font.bold: labelFontBold
textFormat: Text.RichText
color: MoneroComponents.Style.defaultFontColor
}
}
Rectangle {
id: head
color: dropArea.containsMouse ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
border.width: dropdown.headerBorder ? 1 : 0
border.color: dropdown.colorBorder
radius: 4
Layout.fillWidth: true
Layout.preferredHeight: dropdownHeight
MoneroComponents.TextPlain {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 12
anchors.leftMargin: 10
anchors.right: dropIndicator.left
anchors.rightMargin: 12
width: droplist.width
elide: Text.ElideRight
font.family: MoneroComponents.Style.fontRegular.name
font.bold: dropdown.headerFontBold
font.pixelSize: dropdown.fontHeaderSize
font.pixelSize: dropdown.fontSize
color: dropdown.textColor
text: columnid.currentIndex < repeater.model.count ? qsTr(repeater.model.get(columnid.currentIndex).column1) + translationManager.emptyString : ""
}
@@ -96,19 +120,15 @@ Item {
anchors.rightMargin: 12
width: dropdownIcon.width
Image {
MoneroEffects.ImageMask {
id: dropdownIcon
anchors.centerIn: parent
source: "qrc:///images/whiteDropIndicator.png"
visible: false
}
ColorOverlay {
source: dropdownIcon
anchors.fill: dropdownIcon
image: "qrc:///images/whiteDropIndicator.png"
height: 8
width: 12
fontAwesomeFallbackIcon: FontAwesome.arrowDown
fontAwesomeFallbackSize: 14
color: MoneroComponents.Style.defaultFontColor
rotation: dropdown.expanded ? 180 : 0
opacity: 1
}
}
@@ -117,7 +137,7 @@ Item {
anchors.fill: parent
onClicked: dropdown.expanded ? popup.close() : popup.open()
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
cursorShape: Qt.ArrowCursor
}
}
@@ -128,7 +148,7 @@ Item {
Rectangle {
id: droplist
x: dropdown.x
anchors.left: parent.left
width: dropdown.width
y: head.y + head.height
clip: true
@@ -188,25 +208,11 @@ Item {
text: ""
}
Rectangle {
anchors.left: parent.left
anchors.top: parent.top
width: 3; height: 3
color: parent.color
}
Rectangle {
anchors.right: parent.right
anchors.top: parent.top
width: 3; height: 3
color: parent.color
}
MouseArea {
id: itemArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
cursorShape: Qt.ArrowCursor
onClicked: {
popup.close()

View File

@@ -13,6 +13,9 @@ Text {
property string themeTransitionBlackColor: ""
property string themeTransitionWhiteColor: ""
property alias tooltip: tooltip.text
property alias tooltipLeft: tooltip.tooltipLeft
property alias tooltipIconVisible: tooltip.tooltipIconVisible
property alias tooltipPopup: tooltip.tooltipPopup
font.family: MoneroComponents.Style.fontMedium.name
font.bold: false
font.pixelSize: 14
@@ -30,6 +33,6 @@ Text {
MoneroComponents.Tooltip {
id: tooltip
anchors.top: parent.top
anchors.left: parent.right
anchors.left: tooltipIconVisible ? parent.right : parent.left
}
}

View File

@@ -110,12 +110,24 @@ Rectangle {
opacity: 0.75
}
MoneroComponents.Tooltip {
id: btnCloseWalletTooltip
anchors.fill: parent
text: qsTr("Close this wallet and return to main menu") + translationManager.emptyString
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onEntered: {
parent.color = MoneroComponents.Style.titleBarButtonHoverColor
btnCloseWalletTooltip.tooltipPopup.open()
}
onExited: {
parent.color = "transparent"
btnCloseWalletTooltip.tooltipPopup.close()
}
onClicked: root.closeWalletClicked(leftPanel.visible)
}
}
@@ -138,12 +150,24 @@ Rectangle {
opacity: 0.75
}
MoneroComponents.Tooltip {
id: btnLanguageToggleTooltip
anchors.fill: parent
text: qsTr("Change language") + translationManager.emptyString
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onEntered: {
parent.color = MoneroComponents.Style.titleBarButtonHoverColor
btnLanguageToggleTooltip.tooltipPopup.open()
}
onExited: {
parent.color = "transparent"
btnLanguageToggleTooltip.tooltipPopup.close()
}
onClicked: root.languageClicked()
}
}
@@ -165,12 +189,24 @@ Rectangle {
opacity: 0.75
}
MoneroComponents.Tooltip {
id: btnSwitchThemeTooltip
anchors.fill: parent
text: MoneroComponents.Style.blackTheme ? qsTr("Switch to light theme") : qsTr("Switch to dark theme") + translationManager.emptyString
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onEntered: {
parent.color = MoneroComponents.Style.titleBarButtonHoverColor
btnSwitchThemeTooltip.tooltipPopup.open()
}
onExited: {
parent.color = "transparent"
btnSwitchThemeTooltip.tooltipPopup.close()
}
onClicked: {
MoneroComponents.Style.blackTheme = !MoneroComponents.Style.blackTheme;
}
@@ -346,6 +382,7 @@ Rectangle {
anchors.fill: parent
propagateComposedEvents: true
onPressed: previousPosition = globalCursor.getPosition()
onDoubleClicked: root.maximizeClicked()
onPositionChanged: {
if (pressedButtons == Qt.LeftButton) {
var pos = globalCursor.getPosition()

View File

@@ -35,14 +35,19 @@ import "." as MoneroComponents
Rectangle {
property alias text: tooltip.text
property alias tooltipPopup: popup
property bool tooltipIconVisible: false
property bool tooltipLeft: false
property bool tooltipBottom: tooltipIconVisible ? false : true
color: "transparent"
height: icon.height
width: icon.width
height: tooltipIconVisible ? icon.height : parent.height
width: tooltipIconVisible ? icon.width : parent.width
visible: text != ""
Text {
id: icon
visible: tooltipIconVisible
color: MoneroComponents.Style.orange
font.family: FontAwesome.fontFamily
font.pixelSize: 10
@@ -62,8 +67,9 @@ Rectangle {
}
}
Popup {
ToolTip {
id: popup
height: tooltip.height + 20
background: Rectangle {
border.color: MoneroComponents.Style.buttonInlineBackgroundColor
@@ -73,14 +79,27 @@ Rectangle {
}
closePolicy: Popup.NoAutoClose
padding: 10
x: icon.x + icon.width
y: icon.y - height
x: tooltipLeft
? (tooltipIconVisible ? icon.x - icon.width : parent.x - tooltip.width - 20 + parent.width/2)
: (tooltipIconVisible ? icon.x + icon.width : parent.x + parent.width/2)
y: tooltipBottom
? (tooltipIconVisible ? icon.y + height : parent.y + parent.height + 2)
: (tooltipIconVisible ? icon.y - height : parent.y - tooltip.height - 20)
enter: Transition {
NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 150 }
}
exit: Transition {
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 150 }
}
delay: 200
RowLayout {
Layout.maximumWidth: 350
Text {
id: tooltip
Layout.maximumWidth: 350
width: contentWidth > Layout.maximumWidth ? Layout.maximumWidth : contentWidth
width: contentWidth
color: MoneroComponents.Style.defaultFontColor
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 12

View File

@@ -141,7 +141,7 @@ Rectangle {
function showFiatConversion(valueXMR) {
const fiatFee = fiatApiConvertToFiat(valueXMR);
return "%1 %2".arg(fiatFee < 0.01 ? "<0.01" : "~" + fiatFee).arg(fiatApiCurrencySymbol());
return "%1 %2".arg(fiatFee < 0.01 ? "&lt;0.01" : "~" + fiatFee).arg(fiatApiCurrencySymbol());
}
ColumnLayout {

View File

@@ -4,4 +4,5 @@ add_library(quirc STATIC
quirc/lib/quirc.c
quirc/lib/version_db.c
)
set_target_properties(quirc PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(quirc PUBLIC quirc/lib)

View File

@@ -3,812 +3,71 @@ import QtQuick 2.9
Object {
//Font Awesome version 5.15.3
FontLoader {
id: regular
source: "./fa-regular-400.ttf"
source: "./fa-regular-400.otf"
}
FontLoader {
id: brands
source: "./fa-brands-400.ttf"
source: "./fa-brands-400.otf"
}
FontLoader {
id: solid
source: "./fa-solid-900.ttf"
source: "./fa-solid-900.otf"
}
property string fontFamily: regular.name
property string fontFamilyBrands: brands.name
property string fontFamilySolid: solid.name
// Icons
// Icons used in Monero GUI (Font Awesome version 5.15.3)
// To add new icons, check unicodes in Font Awesome Free's Cheatsheet:
// https://fontawesome.com/v5/cheatsheet/free/solid
// https://fontawesome.com/v5/cheatsheet/free/regular
// https://fontawesome.com/v5/cheatsheet/free/brands
property string addressBook : "\uf2b9"
property string addressBookO : "\uf2ba"
property string addressCard : "\uf2bb"
property string addressCardO : "\uf2bc"
property string adjust : "\uf042"
property string adn : "\uf170"
property string alignCenter : "\uf037"
property string alignJustify : "\uf039"
property string alignLeft : "\uf036"
property string alignRight : "\uf038"
property string amazon : "\uf270"
property string ambulance : "\uf0f9"
property string americanSignLanguageInterpreting : "\uf2a3"
property string anchor : "\uf13d"
property string android : "\uf17b"
property string angellist : "\uf209"
property string angleDoubleDown : "\uf103"
property string angleDoubleLeft : "\uf100"
property string angleDoubleRight : "\uf101"
property string angleDoubleUp : "\uf102"
property string angleDown : "\uf107"
property string angleLeft : "\uf104"
property string angleRight : "\uf105"
property string angleUp : "\uf106"
property string apple : "\uf179"
property string archive : "\uf187"
property string areaChart : "\uf1fe"
property string arrowCircleDown : "\uf0ab"
property string arrowCircleLeft : "\uf0a8"
property string arrowCircleODown : "\uf01a"
property string arrowCircleOLeft : "\uf190"
property string arrowCircleORight : "\uf18e"
property string arrowCircleOUp : "\uf01b"
property string arrowCircleRight : "\uf0a9"
property string arrowCircleUp : "\uf0aa"
property string arrowDown : "\uf063"
property string arrowLeft : "\uf060"
property string arrowRight : "\uf061"
property string arrowUp : "\uf062"
property string arrows : "\uf047"
property string arrowsAlt : "\uf0b2"
property string arrowsH : "\uf07e"
property string arrowsV : "\uf07d"
property string aslInterpreting : "\uf2a3"
property string assistiveListeningSystems : "\uf2a2"
property string asterisk : "\uf069"
property string at : "\uf1fa"
property string audioDescription : "\uf29e"
property string automobile : "\uf1b9"
property string backward : "\uf04a"
property string balanceScale : "\uf24e"
property string ban : "\uf05e"
property string bandcamp : "\uf2d5"
property string bank : "\uf19c"
property string barChart : "\uf080"
property string barChartO : "\uf080"
property string barcode : "\uf02a"
property string bars : "\uf0c9"
property string bath : "\uf2cd"
property string bathtub : "\uf2cd"
property string battery : "\uf240"
property string battery0 : "\uf244"
property string battery1 : "\uf243"
property string battery2 : "\uf242"
property string battery3 : "\uf241"
property string battery4 : "\uf240"
property string batteryEmpty : "\uf244"
property string batteryFull : "\uf240"
property string batteryHalf : "\uf242"
property string batteryQuarter : "\uf243"
property string batteryThreeQuarters : "\uf241"
property string bed : "\uf236"
property string beer : "\uf0fc"
property string behance : "\uf1b4"
property string behanceSquare : "\uf1b5"
property string bell : "\uf0f3"
property string bellO : "\uf0a2"
property string bellSlash : "\uf1f6"
property string bellSlashO : "\uf1f7"
property string bicycle : "\uf206"
property string binoculars : "\uf1e5"
property string birthdayCake : "\uf1fd"
property string bitbucket : "\uf171"
property string bitbucketSquare : "\uf172"
property string bitcoin : "\uf15a"
property string blackTie : "\uf27e"
property string blind : "\uf29d"
property string bluetooth : "\uf293"
property string bluetoothB : "\uf294"
property string bold : "\uf032"
property string bolt : "\uf0e7"
property string bomb : "\uf1e2"
property string book : "\uf02d"
property string bookmark : "\uf02e"
property string bookmarkO : "\uf097"
property string braille : "\uf2a1"
property string briefcase : "\uf0b1"
property string btc : "\uf15a"
property string bug : "\uf188"
property string building : "\uf1ad"
property string buildingO : "\uf0f7"
property string bullhorn : "\uf0a1"
property string bullseye : "\uf140"
property string bus : "\uf207"
property string buysellads : "\uf20d"
property string cab : "\uf1ba"
property string calculator : "\uf1ec"
property string calendar : "\uf073"
property string calendarCheckO : "\uf274"
property string calendarMinusO : "\uf272"
property string calendarO : "\uf133"
property string calendarPlusO : "\uf271"
property string calendarTimesO : "\uf273"
property string camera : "\uf030"
property string cameraRetro : "\uf083"
property string car : "\uf1b9"
property string caretDown : "\uf0d7"
property string caretLeft : "\uf0d9"
property string caretRight : "\uf0da"
property string caretSquareODown : "\uf150"
property string caretSquareOLeft : "\uf191"
property string caretSquareORight : "\uf152"
property string caretSquareOUp : "\uf151"
property string caretUp : "\uf0d8"
property string cartArrowDown : "\uf218"
property string cartPlus : "\uf217"
property string cashRegister: "\uf788"
property string cc : "\uf20a"
property string ccAmex : "\uf1f3"
property string ccDinersClub : "\uf24c"
property string ccDiscover : "\uf1f2"
property string ccJcb : "\uf24b"
property string ccMastercard : "\uf1f1"
property string ccPaypal : "\uf1f4"
property string ccStripe : "\uf1f5"
property string ccVisa : "\uf1f0"
property string certificate : "\uf0a3"
property string chain : "\uf0c1"
property string chainBroken : "\uf127"
property string check : "\uf00c"
property string checkCircle : "\uf058"
property string checkCircleO : "\uf05d"
property string checkSquare : "\uf14a"
property string checkSquareO : "\uf046"
property string chevronCircleDown : "\uf13a"
property string chevronCircleLeft : "\uf137"
property string chevronCircleRight : "\uf138"
property string chevronCircleUp : "\uf139"
property string chevronDown : "\uf078"
property string chevronLeft : "\uf053"
property string chevronRight : "\uf054"
property string chevronUp : "\uf077"
property string child : "\uf1ae"
property string chrome : "\uf268"
property string circle : "\uf111"
property string circleO : "\uf10c"
property string circleONotch : "\uf1ce"
property string circleThin : "\uf1db"
property string clipboard : "\uf0ea"
property string clockO : "\uf017"
property string clone : "\uf24d"
property string close : "\uf00d"
property string cloud : "\uf0c2"
property string cloudDownload : "\uf0ed"
property string cloudUpload : "\uf0ee"
property string cny : "\uf157"
property string code : "\uf121"
property string codeFork : "\uf126"
property string codepen : "\uf1cb"
property string codiepie : "\uf284"
property string coffee : "\uf0f4"
property string cog : "\uf013"
property string cogs : "\uf085"
property string columns : "\uf0db"
property string comment : "\uf075"
property string commentO : "\uf0e5"
property string commenting : "\uf27a"
property string commentingO : "\uf27b"
property string comments : "\uf086"
property string commentsO : "\uf0e6"
property string compass : "\uf14e"
property string compress : "\uf066"
property string connectdevelop : "\uf20e"
property string contao : "\uf26d"
property string copy : "\uf0c5"
property string copyright : "\uf1f9"
property string creativeCommons : "\uf25e"
property string creditCard : "\uf09d"
property string creditCardAlt : "\uf283"
property string crop : "\uf125"
property string crosshairs : "\uf05b"
property string css3 : "\uf13c"
property string cube : "\uf1b2"
property string cubes : "\uf1b3"
property string cut : "\uf0c4"
property string cutlery : "\uf0f5"
property string dashboard : "\uf0e4"
property string dashcube : "\uf210"
property string database : "\uf1c0"
property string deaf : "\uf2a4"
property string deafness : "\uf2a4"
property string dedent : "\uf03b"
property string delicious : "\uf1a5"
property string desktop : "\uf108"
property string deviantart : "\uf1bd"
property string diamond : "\uf219"
property string digg : "\uf1a6"
property string dollar : "\uf155"
property string dotCircleO : "\uf192"
property string download : "\uf019"
property string dribbble : "\uf17d"
property string driversLicense : "\uf2c2"
property string driversLicenseO : "\uf2c3"
property string dropbox : "\uf16b"
property string drupal : "\uf1a9"
property string edge : "\uf282"
property string edit : "\uf044"
property string eercast : "\uf2da"
property string eject : "\uf052"
property string ellipsisH : "\uf141"
property string ellipsisV : "\uf142"
property string empire : "\uf1d1"
property string envelope : "\uf0e0"
property string envelopeO : "\uf003"
property string envelopeOpen : "\uf2b6"
property string envelopeOpenO : "\uf2b7"
property string envelopeSquare : "\uf199"
property string envira : "\uf299"
property string eraser : "\uf12d"
property string etsy : "\uf2d7"
property string eur : "\uf153"
property string euro : "\uf153"
property string exchange : "\uf0ec"
property string exclamation : "\uf12a"
property string exclamationCircle : "\uf06a"
property string exclamationTriangle : "\uf071"
property string expand : "\uf065"
property string expeditedssl : "\uf23e"
property string externalLink : "\uf08e"
property string externalLinkSquare : "\uf14c"
property string eye : "\uf06e"
property string eyeSlash : "\uf070"
property string eyedropper : "\uf1fb"
property string fa : "\uf2b4"
property string facebook : "\uf09a"
property string facebookF : "\uf09a"
property string facebookOfficial : "\uf230"
property string facebookSquare : "\uf082"
property string fastBackward : "\uf049"
property string fastForward : "\uf050"
property string fax : "\uf1ac"
property string feed : "\uf09e"
property string female : "\uf182"
property string fighterJet : "\uf0fb"
property string file : "\uf15b"
property string fileArchiveO : "\uf1c6"
property string fileAudioO : "\uf1c7"
property string fileCodeO : "\uf1c9"
property string fileExcelO : "\uf1c3"
property string fileImageO : "\uf1c5"
property string fileMovieO : "\uf1c8"
property string fileO : "\uf016"
property string filePdfO : "\uf1c1"
property string filePhotoO : "\uf1c5"
property string filePictureO : "\uf1c5"
property string filePowerpointO : "\uf1c4"
property string fileSoundO : "\uf1c7"
property string fileText : "\uf15c"
property string fileTextO : "\uf0f6"
property string fileVideoO : "\uf1c8"
property string fileWordO : "\uf1c2"
property string fileZipO : "\uf1c6"
property string filesO : "\uf0c5"
property string film : "\uf008"
property string filter : "\uf0b0"
property string fire : "\uf06d"
property string fireExtinguisher : "\uf134"
property string firefox : "\uf269"
property string firstOrder : "\uf2b0"
property string flag : "\uf024"
property string flagCheckered : "\uf11e"
property string flagO : "\uf11d"
property string flash : "\uf0e7"
property string flask : "\uf0c3"
property string flickr : "\uf16e"
property string floppyO : "\uf0c7"
property string folder : "\uf07b"
property string folderO : "\uf114"
property string folderOpen : "\uf07c"
property string folderOpenO : "\uf115"
property string font : "\uf031"
property string fontAwesome : "\uf2b4"
property string fonticons : "\uf280"
property string fortAwesome : "\uf286"
property string forumbee : "\uf211"
property string forward : "\uf04e"
property string foursquare : "\uf180"
property string freeCodeCamp : "\uf2c5"
property string frownO : "\uf119"
property string futbolO : "\uf1e3"
property string gamepad : "\uf11b"
property string gavel : "\uf0e3"
property string gbp : "\uf154"
property string ge : "\uf1d1"
property string gear : "\uf013"
property string gears : "\uf085"
property string genderless : "\uf22d"
property string getPocket : "\uf265"
property string gg : "\uf260"
property string ggCircle : "\uf261"
property string gift : "\uf06b"
property string git : "\uf1d3"
property string gitSquare : "\uf1d2"
property string github : "\uf09b"
property string githubAlt : "\uf113"
property string githubSquare : "\uf092"
property string gitlab : "\uf296"
property string gittip : "\uf184"
property string glass : "\uf000"
property string glide : "\uf2a5"
property string glideG : "\uf2a6"
property string globe : "\uf0ac"
property string google : "\uf1a0"
property string googlePlus : "\uf0d5"
property string googlePlusCircle : "\uf2b3"
property string googlePlusOfficial : "\uf2b3"
property string googlePlusSquare : "\uf0d4"
property string googleWallet : "\uf1ee"
property string graduationCap : "\uf19d"
property string gratipay : "\uf184"
property string grav : "\uf2d6"
property string group : "\uf0c0"
property string hSquare : "\uf0fd"
property string hackerNews : "\uf1d4"
property string handGrabO : "\uf255"
property string handLizardO : "\uf258"
property string handODown : "\uf0a7"
property string handOLeft : "\uf0a5"
property string handORight : "\uf0a4"
property string handOUp : "\uf0a6"
property string handPaperO : "\uf256"
property string handPeaceO : "\uf25b"
property string handPointerO : "\uf25a"
property string handRockO : "\uf255"
property string handScissorsO : "\uf257"
property string handSpockO : "\uf259"
property string handStopO : "\uf256"
property string handshakeO : "\uf2b5"
property string hardOfHearing : "\uf2a4"
property string hashtag : "\uf292"
property string hddO : "\uf0a0"
property string header : "\uf1dc"
property string headphones : "\uf025"
property string heart : "\uf004"
property string heartO : "\uf08a"
property string heartbeat : "\uf21e"
property string history : "\uf1da"
property string home : "\uf015"
property string hospitalO : "\uf0f8"
property string hotel : "\uf236"
property string hourglass : "\uf254"
property string hourglass1 : "\uf251"
property string hourglass2 : "\uf252"
property string hourglass3 : "\uf253"
property string hourglassEnd : "\uf253"
property string hourglassHalf : "\uf252"
property string hourglassO : "\uf250"
property string hourglassStart : "\uf251"
property string houzz : "\uf27c"
property string html5 : "\uf13b"
property string iCursor : "\uf246"
property string idBadge : "\uf2c1"
property string idCard : "\uf2c2"
property string idCardO : "\uf2c3"
property string ils : "\uf20b"
property string image : "\uf03e"
property string imdb : "\uf2d8"
property string inbox : "\uf01c"
property string indent : "\uf03c"
property string industry : "\uf275"
property string houseUser : "\ue065"
property string infinity : "\uf534"
property string info : "\uf129"
property string infoCircle : "\uf05a"
property string inr : "\uf156"
property string instagram : "\uf16d"
property string institution : "\uf19c"
property string internetExplorer : "\uf26b"
property string intersex : "\uf224"
property string ioxhost : "\uf208"
property string italic : "\uf033"
property string joomla : "\uf1aa"
property string jpy : "\uf157"
property string jsfiddle : "\uf1cc"
property string key : "\uf084"
property string keyboardO : "\uf11c"
property string krw : "\uf159"
property string language : "\uf1ab"
property string laptop : "\uf109"
property string lastfm : "\uf202"
property string lastfmSquare : "\uf203"
property string leaf : "\uf06c"
property string leanpub : "\uf212"
property string legal : "\uf0e3"
property string lemonO : "\uf094"
property string levelDown : "\uf149"
property string levelUp : "\uf148"
property string lifeBouy : "\uf1cd"
property string lifeBuoy : "\uf1cd"
property string lifeRing : "\uf1cd"
property string lifeSaver : "\uf1cd"
property string lightbulbO : "\uf0eb"
property string lineChart : "\uf201"
property string link : "\uf0c1"
property string linkedin : "\uf0e1"
property string linkedinSquare : "\uf08c"
property string linode : "\uf2b8"
property string linux : "\uf17c"
property string list : "\uf03a"
property string listAlt : "\uf022"
property string listOl : "\uf0cb"
property string listUl : "\uf0ca"
property string locationArrow : "\uf124"
property string lock : "\uf023"
property string longArrowDown : "\uf175"
property string longArrowLeft : "\uf177"
property string longArrowRight : "\uf178"
property string longArrowUp : "\uf176"
property string lowVision : "\uf2a8"
property string magic : "\uf0d0"
property string magnet : "\uf076"
property string mailForward : "\uf064"
property string mailReply : "\uf112"
property string mailReplyAll : "\uf122"
property string male : "\uf183"
property string map : "\uf279"
property string mapMarker : "\uf041"
property string mapO : "\uf278"
property string mapPin : "\uf276"
property string mapSigns : "\uf277"
property string mars : "\uf222"
property string marsDouble : "\uf227"
property string marsStroke : "\uf229"
property string marsStrokeH : "\uf22b"
property string marsStrokeV : "\uf22a"
property string maxcdn : "\uf136"
property string meanpath : "\uf20c"
property string medium : "\uf23a"
property string medkit : "\uf0fa"
property string meetup : "\uf2e0"
property string mehO : "\uf11a"
property string mercury : "\uf223"
property string microchip : "\uf2db"
property string microphone : "\uf130"
property string microphoneSlash : "\uf131"
property string minus : "\uf068"
property string minusCircle : "\uf056"
property string minusSquare : "\uf146"
property string minusSquareO : "\uf147"
property string mixcloud : "\uf289"
property string mobile : "\uf10b"
property string mobilePhone : "\uf10b"
property string modx : "\uf285"
property string money : "\uf0d6"
property string moonO : "\uf186"
property string mortarBoard : "\uf19d"
property string motorcycle : "\uf21c"
property string mousePointer : "\uf245"
property string music : "\uf001"
property string navicon : "\uf0c9"
property string neuter : "\uf22c"
property string newspaperO : "\uf1ea"
property string objectGroup : "\uf247"
property string objectUngroup : "\uf248"
property string odnoklassniki : "\uf263"
property string odnoklassnikiSquare : "\uf264"
property string opencart : "\uf23d"
property string openid : "\uf19b"
property string opera : "\uf26a"
property string optinMonster : "\uf23c"
property string outdent : "\uf03b"
property string pagelines : "\uf18c"
property string paintBrush : "\uf1fc"
property string paperPlane : "\uf1d8"
property string paperPlaneO : "\uf1d9"
property string paperclip : "\uf0c6"
property string paragraph : "\uf1dd"
property string monero : "\uf3d0"
property string paste : "\uf0ea"
property string pause : "\uf04c"
property string pauseCircle : "\uf28b"
property string pauseCircleO : "\uf28c"
property string paw : "\uf1b0"
property string paypal : "\uf1ed"
property string pencil : "\uf040"
property string pencilSquare : "\uf14b"
property string pencilSquareO : "\uf044"
property string percent : "\uf295"
property string phone : "\uf095"
property string phoneSquare : "\uf098"
property string photo : "\uf03e"
property string pictureO : "\uf03e"
property string pieChart : "\uf200"
property string piedPiper : "\uf2ae"
property string piedPiperAlt : "\uf1a8"
property string piedPiperPp : "\uf1a7"
property string pinterest : "\uf0d2"
property string pinterestP : "\uf231"
property string pinterestSquare : "\uf0d3"
property string plane : "\uf072"
property string play : "\uf04b"
property string playCircle : "\uf144"
property string playCircleO : "\uf01d"
property string plug : "\uf1e6"
property string plus : "\uf067"
property string plusCircle : "\uf055"
property string plusSquare : "\uf0fe"
property string plusSquareO : "\uf196"
property string podcast : "\uf2ce"
property string powerOff : "\uf011"
property string printIcon : "\uf02f"
property string productHunt : "\uf288"
property string puzzlePiece : "\uf12e"
property string qq : "\uf1d6"
property string qrcode : "\uf029"
property string question : "\uf128"
property string questionCircle : "\uf059"
property string questionCircleO : "\uf29c"
property string quora : "\uf2c4"
property string quoteLeft : "\uf10d"
property string quoteRight : "\uf10e"
property string ra : "\uf1d0"
property string random : "\uf074"
property string ravelry : "\uf2d9"
property string rebel : "\uf1d0"
property string recycle : "\uf1b8"
property string reddit : "\uf1a1"
property string redditAlien : "\uf281"
property string redditSquare : "\uf1a2"
property string refresh : "\uf021"
property string registered : "\uf25d"
property string remove : "\uf00d"
property string renren : "\uf18b"
property string reorder : "\uf0c9"
property string repeat : "\uf01e"
property string reply : "\uf112"
property string replyAll : "\uf122"
property string resistance : "\uf1d0"
property string retweet : "\uf079"
property string rmb : "\uf157"
property string road : "\uf018"
property string rocket : "\uf135"
property string rotateLeft : "\uf0e2"
property string rotateRight : "\uf01e"
property string rouble : "\uf158"
property string rss : "\uf09e"
property string rssSquare : "\uf143"
property string rub : "\uf158"
property string ruble : "\uf158"
property string rupee : "\uf156"
property string s15 : "\uf2cd"
property string safari : "\uf267"
property string save : "\uf0c7"
property string scissors : "\uf0c4"
property string scribd : "\uf28a"
property string search : "\uf002"
property string searchMinus : "\uf010"
property string searchPlus : "\uf00e"
property string sellsy : "\uf213"
property string send : "\uf1d8"
property string sendO : "\uf1d9"
property string server : "\uf233"
property string share : "\uf064"
property string shareAlt : "\uf1e0"
property string shareAltSquare : "\uf1e1"
property string shareSquare : "\uf14d"
property string shareSquareO : "\uf045"
property string shekel : "\uf20b"
property string sheqel : "\uf20b"
property string shield : "\uf132"
property string ship : "\uf21a"
property string shirtsinbulk : "\uf214"
property string shoppingBag : "\uf290"
property string shoppingBasket : "\uf291"
property string shoppingCart : "\uf07a"
property string shower : "\uf2cc"
property string signIn : "\uf090"
property string signLanguage : "\uf2a7"
property string shieldAlt : "\uf3ed"
property string signOutAlt : "\uf2f5"
property string signOut : "\uf08b"
property string signal : "\uf012"
property string signing : "\uf2a7"
property string simplybuilt : "\uf215"
property string sitemap : "\uf0e8"
property string skyatlas : "\uf216"
property string skype : "\uf17e"
property string slack : "\uf198"
property string sliders : "\uf1de"
property string slideshare : "\uf1e7"
property string smileO : "\uf118"
property string snapchat : "\uf2ab"
property string snapchatGhost : "\uf2ac"
property string snapchatSquare : "\uf2ad"
property string snowflakeO : "\uf2dc"
property string soccerBallO : "\uf1e3"
property string sort : "\uf0dc"
property string sortAlphaAsc : "\uf15d"
property string sortAlphaDesc : "\uf15e"
property string sortAmountAsc : "\uf160"
property string sortAmountDesc : "\uf161"
property string sortAsc : "\uf0de"
property string sortDesc : "\uf0dd"
property string sortDown : "\uf0dd"
property string sortNumericAsc : "\uf162"
property string sortNumericDesc : "\uf163"
property string sortUp : "\uf0de"
property string soundcloud : "\uf1be"
property string spaceShuttle : "\uf197"
property string spinner : "\uf110"
property string spoon : "\uf1b1"
property string spotify : "\uf1bc"
property string square : "\uf0c8"
property string squareO : "\uf096"
property string stackExchange : "\uf18d"
property string stackOverflow : "\uf16c"
property string star : "\uf005"
property string starHalf : "\uf089"
property string starHalfEmpty : "\uf123"
property string starHalfFull : "\uf123"
property string starHalfO : "\uf123"
property string starO : "\uf006"
property string steam : "\uf1b6"
property string steamSquare : "\uf1b7"
property string stepBackward : "\uf048"
property string stepForward : "\uf051"
property string stethoscope : "\uf0f1"
property string stickyNote : "\uf249"
property string stickyNoteO : "\uf24a"
property string stop : "\uf04d"
property string stopCircle : "\uf28d"
property string stopCircleO : "\uf28e"
property string streetView : "\uf21d"
property string strikethrough : "\uf0cc"
property string stumbleupon : "\uf1a4"
property string stumbleuponCircle : "\uf1a3"
property string subscript : "\uf12c"
property string subway : "\uf239"
property string suitcase : "\uf0f2"
property string sunO : "\uf185"
property string superpowers : "\uf2dd"
property string superscript : "\uf12b"
property string support : "\uf1cd"
property string table : "\uf0ce"
property string tablet : "\uf10a"
property string tachometer : "\uf0e4"
property string tag : "\uf02b"
property string tags : "\uf02c"
property string tasks : "\uf0ae"
property string taxi : "\uf1ba"
property string telegram : "\uf2c6"
property string television : "\uf26c"
property string tencentWeibo : "\uf1d5"
property string terminal : "\uf120"
property string textHeight : "\uf034"
property string textWidth : "\uf035"
property string th : "\uf00a"
property string thLarge : "\uf009"
property string thList : "\uf00b"
property string themeisle : "\uf2b2"
property string thermometer : "\uf2c7"
property string thermometer0 : "\uf2cb"
property string thermometer1 : "\uf2ca"
property string thermometer2 : "\uf2c9"
property string thermometer3 : "\uf2c8"
property string thermometer4 : "\uf2c7"
property string thermometerEmpty : "\uf2cb"
property string thermometerFull : "\uf2c7"
property string thermometerHalf : "\uf2c9"
property string thermometerQuarter : "\uf2ca"
property string thermometerThreeQuarters : "\uf2c8"
property string thumbTack : "\uf08d"
property string thumbsDown : "\uf165"
property string thumbsODown : "\uf088"
property string thumbsOUp : "\uf087"
property string thumbsUp : "\uf164"
property string ticket : "\uf145"
property string times : "\uf00d"
property string timesCircle : "\uf057"
property string timesCircleO : "\uf05c"
property string timesRectangle : "\uf2d3"
property string timesRectangleO : "\uf2d4"
property string tint : "\uf043"
property string toggleDown : "\uf150"
property string toggleLeft : "\uf191"
property string toggleOff : "\uf204"
property string toggleOn : "\uf205"
property string toggleRight : "\uf152"
property string toggleUp : "\uf151"
property string trademark : "\uf25c"
property string train : "\uf238"
property string transgender : "\uf224"
property string transgenderAlt : "\uf225"
property string trash : "\uf1f8"
property string trashO : "\uf014"
property string tree : "\uf1bb"
property string trello : "\uf181"
property string tripadvisor : "\uf262"
property string trophy : "\uf091"
property string truck : "\uf0d1"
property string tryIcon : "\uf195"
property string tty : "\uf1e4"
property string tumblr : "\uf173"
property string tumblrSquare : "\uf174"
property string turkishLira : "\uf195"
property string tv : "\uf26c"
property string twitch : "\uf1e8"
property string twitter : "\uf099"
property string twitterSquare : "\uf081"
property string umbrella : "\uf0e9"
property string underline : "\uf0cd"
property string undo : "\uf0e2"
property string universalAccess : "\uf29a"
property string university : "\uf19c"
property string unlink : "\uf127"
property string unlock : "\uf09c"
property string unlockAlt : "\uf13e"
property string unsorted : "\uf0dc"
property string upload : "\uf093"
property string usb : "\uf287"
property string usd : "\uf155"
property string user : "\uf007"
property string userCircle : "\uf2bd"
property string userCircleO : "\uf2be"
property string userMd : "\uf0f0"
property string userO : "\uf2c0"
property string userPlus : "\uf234"
property string userSecret : "\uf21b"
property string userTimes : "\uf235"
property string users : "\uf0c0"
property string vcard : "\uf2bb"
property string vcardO : "\uf2bc"
property string venus : "\uf221"
property string venusDouble : "\uf226"
property string venusMars : "\uf228"
property string viacoin : "\uf237"
property string viadeo : "\uf2a9"
property string viadeoSquare : "\uf2aa"
property string videoCamera : "\uf03d"
property string vimeo : "\uf27d"
property string vimeoSquare : "\uf194"
property string vine : "\uf1ca"
property string vk : "\uf189"
property string volumeControlPhone : "\uf2a0"
property string volumeDown : "\uf027"
property string volumeOff : "\uf026"
property string volumeUp : "\uf028"
property string warning : "\uf071"
property string wechat : "\uf1d7"
property string weibo : "\uf18a"
property string weixin : "\uf1d7"
property string whatsapp : "\uf232"
property string wheelchair : "\uf193"
property string wheelchairAlt : "\uf29b"
property string wifi : "\uf1eb"
property string wikipediaW : "\uf266"
property string windowClose : "\uf2d3"
property string windowCloseO : "\uf2d4"
property string windowMaximize : "\uf2d0"
property string windowMinimize : "\uf2d1"
property string windowRestore : "\uf2d2"
property string windows : "\uf17a"
property string won : "\uf159"
property string wordpress : "\uf19a"
property string wpbeginner : "\uf297"
property string wpexplorer : "\uf2de"
property string wpforms : "\uf298"
property string wrench : "\uf0ad"
property string xing : "\uf168"
property string xingSquare : "\uf169"
property string yCombinator : "\uf23b"
property string yCombinatorSquare : "\uf1d4"
property string yahoo : "\uf19e"
property string yc : "\uf23b"
property string ycSquare : "\uf1d4"
property string yelp : "\uf1e9"
property string yen : "\uf157"
property string yoast : "\uf2b1"
property string youtube : "\uf167"
property string youtubePlay : "\uf16a"
property string youtubeSquare : "\uf166"
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
images/ledgerNanoS.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
images/ledgerNanoX.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
images/trezor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
images/trezor@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 KiB

View File

@@ -74,13 +74,29 @@ function isValidOpenAliasAddress(address) {
return true
}
function makeQRCodeString(addr, amount) {
function makeQRCodeString(addr, amount, txDescription, recipientName) {
var XMR_URI_SCHEME = "monero:"
var XMR_AMOUNT = "tx_amount"
var XMR_RECIPIENT_NAME = "recipient_name"
var XMR_TX_DESCRIPTION = "tx_description"
var qrCodeString =""
qrCodeString += (XMR_URI_SCHEME + addr)
if (amount !== undefined && amount !== ""){
qrCodeString += ("?" + XMR_AMOUNT + "=" + amount)
}
if (txDescription !== undefined && txDescription !== ""){
if (amount == ""){
qrCodeString += ("?" + XMR_TX_DESCRIPTION + "=" + encodeURI(txDescription))
} else {
qrCodeString += ("&" + XMR_TX_DESCRIPTION + "=" + encodeURI(txDescription))
}
}
if (recipientName !== undefined && recipientName !== ""){
if (amount == "" && txDescription == ""){
qrCodeString += ("?" + XMR_RECIPIENT_NAME + "=" + encodeURI(recipientName))
} else {
qrCodeString += ("&" + XMR_RECIPIENT_NAME + "=" + encodeURI(recipientName))
}
}
return qrCodeString
}

View File

@@ -115,3 +115,18 @@ function capitalize(s){
function removeTrailingZeros(value) {
return (value + '').replace(/(\.\d*?)0+$/, '$1').replace(/\.$/, '');
}
function parseDateStringOrRestoreHeightAsInteger(value) {
// Parse date string or restore height as integer
var restoreHeight = 0;
if (value.indexOf('-') === 4 && value.length === 10) {
restoreHeight = Wizard.getApproximateBlockchainHeight(value, Utils.netTypeToString());
} else if (parseInt(value.substring(0, 4)) >= 2014 && parseInt(value.substring(0, 4)) <= 2025 && value.length === 8) {
// Correct date typed in a wrong format (20201225 instead of 2020-12-25)
var restoreHeightHyphenated = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6, 8);
restoreHeight = Wizard.getApproximateBlockchainHeight(restoreHeightHyphenated, Utils.netTypeToString());
} else {
restoreHeight = parseInt(value);
}
return restoreHeight;
}

View File

@@ -82,6 +82,17 @@ function walletPathExists(accountsDir, directory, filename, isIOS, walletManager
return false;
}
function unusedWalletName(directory, filename, walletManager) {
for (var i = 0; i < 100; i++) {
var walletName = filename + (i > 0 ? "_" + i : "");
if (!walletManager.walletExists(directory + "/" + walletName + "/" + walletName)) {
return walletName;
}
}
return filename;
}
function isAscii(str){
for (var i = 0; i < str.length; i++) {
if (str.charCodeAt(i) > 127)

View File

@@ -62,6 +62,7 @@ ApplicationWindow {
minimumHeight: 450
property var currentItem
property var previousActiveFocusItem
property bool hideBalanceForced: false
property bool ctrlPressed: false
property alias persistentSettings : persistentSettings
@@ -92,16 +93,14 @@ ApplicationWindow {
readonly property string localDaemonAddress : "localhost:" + getDefaultDaemonRpcPort(persistentSettings.nettype)
property string currentDaemonAddress;
property int disconnectedEpoch: 0
property int estimatedBlockchainSize: 105 // GB
property int estimatedBlockchainSize: persistentSettings.pruneBlockchain ? 40 : 105 // GB
property alias viewState: rootItem.state
property string prevSplashText;
property bool splashDisplayedBeforeButtonRequest;
property int appEpoch: Math.floor((new Date).getTime() / 1000)
property bool themeTransition: false
// fiat price conversion
property real fiatPriceXMRUSD: 0
property real fiatPriceXMREUR: 0
property real fiatPrice: 0
property var fiatPriceAPIs: {
return {
"kraken": {
@@ -212,6 +211,9 @@ ApplicationWindow {
if (prevState) {
appWindow.viewState = prevState;
}
if (wizard.wizardState == "wizardOpenWallet1") {
wizard.wizardStateView.wizardOpenWallet1View.pageRoot.forceActiveFocus();
}
};
passwordDialog.open(usefulName(persistentSettings.wallet_path));
}
@@ -359,6 +361,7 @@ ApplicationWindow {
middlePanel.getProofClicked.connect(handleGetProof);
middlePanel.checkProofClicked.connect(handleCheckProof);
persistentSettings.restore_height = currentWallet.walletCreationHeight;
console.log("Recovering from seed: ", persistentSettings.is_recovering)
console.log("restore Height", persistentSettings.restore_height)
@@ -422,8 +425,8 @@ ApplicationWindow {
leftPanel.balanceString = balance
leftPanel.balanceUnlockedString = balanceU
if (middlePanel.state === "Account") {
middlePanel.accountView.balanceAllText = walletManager.displayAmount(appWindow.currentWallet.balanceAll());
middlePanel.accountView.unlockedBalanceAllText = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll());
middlePanel.accountView.balanceAllText = walletManager.displayAmount(appWindow.currentWallet.balanceAll()) + " XMR";
middlePanel.accountView.unlockedBalanceAllText = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll()) + " XMR";
}
}
@@ -1002,7 +1005,6 @@ ApplicationWindow {
}
function txProofComputed(txid, result){
informationPopup.title = qsTr("Payment proof") + translationManager.emptyString;
if (result.indexOf("error|") === 0) {
var errorString = result.split("|")[1];
informationPopup.text = qsTr("Couldn't generate a proof because of the following reason: \n") + errorString + translationManager.emptyString;
@@ -1011,8 +1013,6 @@ ApplicationWindow {
informationPopup.text = result;
informationPopup.icon = StandardIcon.Critical;
}
informationPopup.onCloseCallback = null
informationPopup.open()
}
// called on "checkProof"
@@ -1204,10 +1204,7 @@ ApplicationWindow {
return;
}
if(persistentSettings.fiatPriceCurrency === "xmrusd")
appWindow.fiatPriceXMRUSD = ticker;
else if(persistentSettings.fiatPriceCurrency === "xmreur")
appWindow.fiatPriceXMREUR = ticker;
appWindow.fiatPrice = ticker;
appWindow.updateBalance();
}
@@ -1246,7 +1243,7 @@ ApplicationWindow {
}
function fiatApiConvertToFiat(amount) {
var ticker = persistentSettings.fiatPriceCurrency === "xmrusd" ? appWindow.fiatPriceXMRUSD : appWindow.fiatPriceXMREUR;
const ticker = appWindow.fiatPrice;
if(ticker <= 0){
fiatApiError("Invalid ticker value: " + ticker);
return "?.??";
@@ -1254,6 +1251,15 @@ ApplicationWindow {
return (amount * ticker).toFixed(2);
}
function fiatApiConvertToXMR(amount) {
const ticker = appWindow.fiatPrice;
if(ticker <= 0){
fiatApiError("Invalid ticker value: " + ticker);
return "?.??";
}
return (amount / ticker).toFixed(12);
}
function fiatApiUpdateBalance(balance){
// update balance card
var bFiat = "?.??"
@@ -1944,6 +1950,7 @@ ApplicationWindow {
function toggleLanguageView(){
languageSidebar.visible ? languageSidebar.close() : languageSidebar.open();
languageSidebar.selectCurrentLanguage()
resetLanguageFields()
}
@@ -2203,8 +2210,7 @@ ApplicationWindow {
function userActivity() {
// register user activity
var epoch = Math.floor((new Date).getTime()/1000);
appWindow.userLastActive = epoch;
appWindow.userLastActive = Utils.epoch();
}
function checkInUserActivity() {
@@ -2212,24 +2218,32 @@ ApplicationWindow {
if(!persistentSettings.lockOnUserInActivity) return;
if(passwordDialog.visible) return;
var inputDialogVisible = inputDialog && inputDialog.visible
var successfulTxPopupVisible = successfulTxPopup && successfulTxPopup.visible
var informationPopupVisible = informationPopup && informationPopup.visible
// prompt password after X seconds of inactivity
var epoch = Math.floor((new Date).getTime() / 1000);
var inactivity = epoch - appWindow.userLastActive;
var inactivity = Utils.epoch() - appWindow.userLastActive;
if(inactivity < (persistentSettings.lockOnUserInActivityInterval * 60)) return;
passwordDialog.onAcceptedCallback = function() {
if(walletPassword === passwordDialog.password){
passwordDialog.close();
if (inputDialogVisible) inputDialog.open(inputDialog.inputText)
if (successfulTxPopupVisible) successfulTxPopup.open(successfulTxPopup.transactionID)
if (informationPopupVisible) informationPopup.open()
} else {
passwordDialog.showError(qsTr("Wrong password"));
}
if (inputDialogVisible) inputDialog.open(inputDialog.inputText)
}
passwordDialog.onRejectedCallback = function() { appWindow.showWizard(); }
if (inputDialogVisible) inputDialog.close()
remoteNodeDialog.close();
informationPopup.close()
txConfirmationPopup.close()
txConfirmationPopup.clearFields()
txConfirmationPopup.rejected()
successfulTxPopup.close();
passwordDialog.open();
}
@@ -2246,7 +2260,6 @@ ApplicationWindow {
function changeWalletMode(mode){
appWindow.disconnectedEpoch = 0;
appWindow.walletMode = mode;
persistentSettings.walletMode = mode;
applyWalletMode(mode);
}
@@ -2350,6 +2363,8 @@ ApplicationWindow {
MoneroComponents.LanguageSidebar {
id: languageSidebar
dragMargin: 0
onAboutToShow: previousActiveFocusItem = activeFocusItem;
onClosed: { if (previousActiveFocusItem) previousActiveFocusItem.forceActiveFocus() }
}
MoneroComponents.MenuBar { }

2
monero

Submodule monero updated: f6e63ef260...2222bea92f

View File

@@ -103,6 +103,7 @@ Rectangle {
MoneroComponents.TextPlain {
id: balanceAll
Layout.rightMargin: 87
font.family: MoneroComponents.Style.fontMonoRegular.name;
font.pixelSize: 16
color: MoneroComponents.Style.defaultFontColor
@@ -115,7 +116,8 @@ Rectangle {
onExited: parent.color = MoneroComponents.Style.defaultFontColor
onClicked: {
console.log("Copied to clipboard");
clipboard.setText(parent.text);
var balanceAllNumberOnly = parent.text.slice(0, -4);
clipboard.setText(balanceAllNumberOnly);
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
}
}
@@ -136,6 +138,7 @@ Rectangle {
MoneroComponents.TextPlain {
id: unlockedBalanceAll
Layout.rightMargin: 87
font.family: MoneroComponents.Style.fontMonoRegular.name;
font.pixelSize: 16
color: MoneroComponents.Style.defaultFontColor
@@ -148,7 +151,8 @@ Rectangle {
onExited: parent.color = MoneroComponents.Style.defaultFontColor
onClicked: {
console.log("Copied to clipboard");
clipboard.setText(parent.text);
var unlockedBalanceAllNumberOnly = parent.text.slice(0, -4);
clipboard.setText(unlockedBalanceAllNumberOnly);
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
}
}
@@ -192,6 +196,15 @@ Rectangle {
Layout.fillWidth: true
color: itemMouseArea.containsMouse || index === currentAccountIndex ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
Rectangle {
visible: index === currentAccountIndex
Layout.fillHeight: true
anchors.top: parent.top
anchors.bottom: parent.bottom
color: "darkgrey"
width: 2
}
Rectangle {
color: MoneroComponents.Style.appWindowBorderColor
anchors.right: parent.right
@@ -241,7 +254,7 @@ Rectangle {
id: addressLabel
color: MoneroComponents.Style.defaultFontColor
anchors.verticalCenter: parent.verticalCenter
anchors.left: mainLayout.width >= 590 ? balanceTextLabel.left : balanceNumberLabel.left
anchors.left: balanceNumberLabel.left
anchors.leftMargin: -addressLabel.width - 30
fontSize: 16
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
@@ -249,18 +262,6 @@ Rectangle {
themeTransition: false
}
MoneroComponents.Label {
id: balanceTextLabel
visible: mainLayout.width >= 590
color: MoneroComponents.Style.defaultFontColor
anchors.verticalCenter: parent.verticalCenter
anchors.left: balanceNumberLabel.left
anchors.leftMargin: -balanceTextLabel.width - 5
fontSize: 16
text: qsTr("Balance: ") + translationManager.emptyString
themeTransition: false
}
MoneroComponents.Label {
id: balanceNumberLabel
color: MoneroComponents.Style.defaultFontColor
@@ -269,9 +270,9 @@ Rectangle {
anchors.leftMargin: -balanceNumberLabel.width
fontSize: 16
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
text: balance
text: balance + " XMR"
elide: Text.ElideRight
textWidth: mainLayout.width < 660 ? 70 : 135
textWidth: 180
themeTransition: false
}
@@ -301,9 +302,11 @@ Rectangle {
fontAwesomeFallbackIcon: FontAwesome.edit
fontAwesomeFallbackSize: 22
color: MoneroComponents.Style.defaultFontColor
opacity: 0.5
opacity: isOpenGL ? 0.5 : 1
fontAwesomeFallbackOpacity: 0.5
Layout.preferredWidth: 23
Layout.preferredHeight: 21
tooltip: qsTr("Edit account label") + translationManager.emptyString
onClicked: pageAccount.renameSubaddressAccountLabel(index);
}
@@ -314,9 +317,11 @@ Rectangle {
fontAwesomeFallbackIcon: FontAwesome.clipboard
fontAwesomeFallbackSize: 22
color: MoneroComponents.Style.defaultFontColor
opacity: 0.5
opacity: isOpenGL ? 0.5 : 1
fontAwesomeFallbackOpacity: 0.5
Layout.preferredWidth: 16
Layout.preferredHeight: 21
tooltip: qsTr("Copy address to clipboard") + translationManager.emptyString
onClicked: {
console.log("Address copied to clipboard");
@@ -378,8 +383,8 @@ Rectangle {
subaddressAccountListView.model = appWindow.currentWallet.subaddressAccountModel;
appWindow.currentWallet.subaddress.refresh(appWindow.currentWallet.currentSubaddressAccount)
balanceAll.text = walletManager.displayAmount(appWindow.currentWallet.balanceAll())
unlockedBalanceAll.text = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll())
balanceAll.text = walletManager.displayAmount(appWindow.currentWallet.balanceAll()) + " XMR"
unlockedBalanceAll.text = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll()) + " XMR"
}
}

View File

@@ -134,7 +134,7 @@ Rectangle {
height: addressBookListRow.addressBookListItemHeight
width: parent ? parent.width : undefined
Layout.fillWidth: true
color: "transparent"
color: itemMouseArea.containsMouse ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
function doSend() {
console.log("Sending to: ", address +" "+ paymentId);
@@ -159,7 +159,7 @@ Rectangle {
Rectangle {
anchors.fill: parent
anchors.topMargin: 5
anchors.rightMargin: 110
anchors.rightMargin: 125
color: "transparent"
MoneroComponents.Label {
@@ -187,8 +187,10 @@ Rectangle {
}
MouseArea {
id: itemMouseArea
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
visible: root.selectAndSend
onClicked: {
doSend();
@@ -207,21 +209,42 @@ Rectangle {
id: sendToButton
image: "qrc:///images/arrow-right-in-circle-outline-medium-white.svg"
color: MoneroComponents.Style.defaultFontColor
opacity: 0.5
opacity: isOpenGL ? 0.5 : 1
fontAwesomeFallbackIcon: FontAwesome.arrowRight
fontAwesomeFallbackSize: 22
fontAwesomeFallbackOpacity: 0.5
Layout.preferredWidth: 20
Layout.preferredHeight: 20
tooltip: qsTr("Send to this address") + translationManager.emptyString
onClicked: {
doSend();
}
}
MoneroComponents.IconButton {
fontAwesomeFallbackIcon: FontAwesome.searchPlus
fontAwesomeFallbackSize: 22
color: MoneroComponents.Style.defaultFontColor
fontAwesomeFallbackOpacity: 0.5
Layout.preferredWidth: 23
Layout.preferredHeight: 21
tooltip: qsTr("See transactions") + translationManager.emptyString
onClicked: doSearchInHistory(address)
}
MoneroComponents.IconButton {
id: renameButton
image: "qrc:///images/edit.svg"
color: MoneroComponents.Style.defaultFontColor
opacity: 0.5
opacity: isOpenGL ? 0.5 : 1
fontAwesomeFallbackIcon: FontAwesome.edit
fontAwesomeFallbackSize: 22
fontAwesomeFallbackOpacity: 0.5
Layout.preferredWidth: 23
Layout.preferredHeight: 21
tooltip: qsTr("Edit address label") + translationManager.emptyString
onClicked: {
addressBookListView.currentIndex = index;
@@ -232,10 +255,14 @@ Rectangle {
MoneroComponents.IconButton {
id: copyButton
image: "qrc:///images/copy.svg"
color: MoneroComponents.Style.defaultFontColor
opacity: isOpenGL ? 0.5 : 1
fontAwesomeFallbackIcon: FontAwesome.clipboard
fontAwesomeFallbackSize: 22
fontAwesomeFallbackOpacity: 0.5
Layout.preferredWidth: 16
Layout.preferredHeight: 21
color: MoneroComponents.Style.defaultFontColor
opacity: 0.5
tooltip: qsTr("Copy address to clipboard") + translationManager.emptyString
onClicked: {
console.log("Address copied to clipboard");
@@ -292,6 +319,8 @@ Rectangle {
MoneroComponents.LineEditMulti {
id: addressLine
Layout.topMargin: 20
KeyNavigation.backtab: deleteButton.visible ? deleteButton: cancelButton
KeyNavigation.tab: resolveButton.visible ? resolveButton : descriptionLine
labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style> %1"
.arg(qsTr("Address")) + translationManager.emptyString
placeholderText: {
@@ -313,6 +342,31 @@ Rectangle {
descriptionLine.text = parsed.tx_description;
}
}
onEnterPressed: addButton.enabled ? addButton.clicked() : ""
onReturnPressed: addButton.enabled ? addButton.clicked() : ""
MoneroComponents.InlineButton {
fontFamily: FontAwesome.fontFamilySolid
fontStyleName: "Solid"
fontPixelSize: 18
text: FontAwesome.desktop
tooltip: qsTr("Grab QR code from screen") + translationManager.emptyString
onClicked: {
clearFields();
const codes = oshelper.grabQrCodesFromScreen();
for (var index = 0; index < codes.length; ++index) {
const parsed = walletManager.parse_uri_to_object(codes[index]);
if (!parsed.error) {
addressLine.text = parsed.address
descriptionLine.text = parsed.recipient_name
break;
} else if (walletManager.addressValid(codes[index], appWindow.persistentSettings.nettype)) {
addressLine.text = codes[index];
break;
}
}
}
}
MoneroComponents.InlineButton {
buttonColor: MoneroComponents.Style.orange
@@ -328,6 +382,8 @@ Rectangle {
MoneroComponents.StandardButton {
id: resolveButton
KeyNavigation.backtab: addressLine
KeyNavigation.tab: descriptionLine
Layout.topMargin: 10
text: qsTr("Resolve") + translationManager.emptyString
visible: TxUtils.isValidOpenAliasAddress(addressLine.text)
@@ -365,17 +421,25 @@ Rectangle {
}
}
MoneroComponents.LineEditMulti {
MoneroComponents.LineEdit {
id: descriptionLine
KeyNavigation.backtab: resolveButton.visible ? resolveButton : addressLine
KeyNavigation.tab: addButton.enabled ? addButton : cancelButton
Layout.topMargin: 20
Layout.fillWidth: true
fontSize: 16
placeholderFontSize: 16
labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style> %1"
.arg(qsTr("Description")) + translationManager.emptyString
placeholderText: qsTr("Add a name...") + translationManager.emptyString
onAccepted: addButton.enabled ? addButton.clicked() : ""
}
RowLayout {
Layout.topMargin: 20
MoneroComponents.StandardButton {
id: addButton
KeyNavigation.backtab: descriptionLine
KeyNavigation.tab: cancelButton
text: (root.editEntry ? qsTr("Save") : qsTr("Add")) + translationManager.emptyString
enabled: root.checkInformation(addressLine.text, appWindow.persistentSettings.nettype)
onClicked: {
@@ -401,39 +465,25 @@ Rectangle {
}
}
Text {
MoneroComponents.StandardButton {
id: cancelButton
Layout.leftMargin: 20
font.pixelSize: 16
font.bold: false
color: MoneroComponents.Style.defaultFontColor
KeyNavigation.backtab: addButton
KeyNavigation.tab: deleteButton.visible ? deleteButton : addressLine
text: qsTr("Cancel") + translationManager.emptyString
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.showAddressBook();
}
primary: false
onClicked: root.showAddressBook();
}
Text {
MoneroComponents.StandardButton {
id: deleteButton
KeyNavigation.backtab: cancelButton
KeyNavigation.tab: addressLine
visible: root.editEntry
Layout.leftMargin: 20
font.pixelSize: 16
font.bold: false
color: MoneroComponents.Style.defaultFontColor
text: qsTr("Delete") + translationManager.emptyString
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
currentWallet.addressBook.deleteRow(addressBookListView.currentIndex);
root.showAddressBook();
}
primary: false
onClicked: {
currentWallet.addressBook.deleteRow(addressBookListView.currentIndex);
root.showAddressBook();
}
}
}
@@ -464,6 +514,7 @@ Rectangle {
addressBookEmptyLayout.visible = false
addressBookLayout.visible = false;
addContactLayout.visible = true;
addressLine.forceActiveFocus();
}
function showEditAddress(address, description) {
@@ -474,12 +525,14 @@ Rectangle {
addContactLayout.visible = true;
addressLine.text = address;
descriptionLine.text = description;
addressLine.forceActiveFocus();
addressLine.cursorPosition = addressLine.text.length;
}
function updateFromQrCode(address, payment_id, amount, tx_description, recipient_name) {
console.log("updateFromQrCode")
addressLine.text = address
descriptionLine.text = recipient_name + " " + tx_description
descriptionLine.text = recipient_name
cameraUi.qrcode_decoded.disconnect(updateFromQrCode)
}

View File

@@ -154,12 +154,15 @@ Rectangle {
Layout.fillWidth: true
input.topPadding: 6
input.bottomPadding: 6
fontSize: 16
fontSize: 15
labelFontSize: 14
placeholderText: qsTr("Search by Transaction ID, Address, Description, Amount or Blockheight") + translationManager.emptyString
placeholderFontSize: 16
placeholderFontSize: 15
inputHeight: 34
onTextUpdated: {
if (!sortAndFilter.collapsed) {
sortAndFilter.collapsed = true;
}
if(searchInput.text != null && searchInput.text.length >= 3){
root.sortSearchString = searchInput.text;
root.reset();
@@ -170,6 +173,27 @@ Rectangle {
root.updateFilter();
}
}
Rectangle {
color: "transparent"
height: cleanButton.height
width: cleanButton.width
Layout.rightMargin: -8
Layout.leftMargin: -2
MoneroComponents.InlineButton {
id: cleanButton
buttonColor: "transparent"
fontFamily: FontAwesome.fontFamilySolid
fontStyleName: "Solid"
fontPixelSize: 18
text: FontAwesome.times
tooltip: qsTr("Clean") + translationManager.emptyString
tooltipLeft: true
visible: searchInput.text != ""
onClicked: searchInput.text = ""
}
}
}
}
@@ -958,6 +982,8 @@ Rectangle {
label.font.family: FontAwesome.fontFamily
fontSize: 18
width: 34
tooltip: qsTr("Transaction details") + translationManager.emptyString
tooltipLeft: true
MouseArea {
state: "details"
@@ -965,8 +991,14 @@ Rectangle {
hoverEnabled: true
z: parent.z + 1
onEntered: parent.opacity = 0.8;
onExited: parent.opacity = 1.0;
onEntered: {
parent.opacity = 0.8;
parent.tooltipPopup.open()
}
onExited: {
parent.opacity = 1.0;
parent.tooltipPopup.close()
}
}
}
@@ -988,6 +1020,8 @@ Rectangle {
label.font.family: FontAwesome.fontFamilyBrands
fontSize: 18
width: 34
tooltip: qsTr("Generate payment proof") + translationManager.emptyString
tooltipLeft: true
MouseArea {
state: "proof"
@@ -995,8 +1029,14 @@ Rectangle {
hoverEnabled: true
z: parent.z + 1
onEntered: parent.opacity = 0.8;
onExited: parent.opacity = 1.0;
onEntered: {
parent.opacity = 0.8;
parent.tooltipPopup.open()
}
onExited: {
parent.opacity = 1.0;
parent.tooltipPopup.close()
}
}
}
}
@@ -1232,7 +1272,7 @@ Rectangle {
if(res[i].state === 'copyable_address') (address ? root.toClipboard(address) : root.toClipboard(addressField.text));
if(res[i].state === 'copyable_receiving_address') root.toClipboard(currentWallet.address(subaddrAccount, subaddrIndex));
if(res[i].state === 'copyable_txkey') root.getTxKey(hash, res[i]);
if(res[i].state === 'set_tx_note') root.editDescription(hash, tx_note);
if(res[i].state === 'set_tx_note') root.editDescription(hash, tx_note, root.txPage);
if(res[i].state === 'details') root.showTxDetails(hash, paymentId, destinations, subaddrAccount, subaddrIndex, dateTime, displayAmount, isout);
if(res[i].state === 'proof') root.showTxProof(hash, paymentId, destinations, subaddrAccount, subaddrIndex);
doCollapse = false;
@@ -1271,6 +1311,8 @@ Rectangle {
image: "qrc:///images/whiteDropIndicator.png"
rotation: delegate.collapsed ? 180 : 0
color: MoneroComponents.Style.defaultFontColor
fontAwesomeFallbackIcon: FontAwesome.arrowDown
fontAwesomeFallbackSize: 14
}
}
@@ -1393,7 +1435,7 @@ Rectangle {
}
}
function updateFilter(){
function updateFilter(currentPage){
// applying filters
root.txData = JSON.parse(JSON.stringify(root.txModelData)); // deepcopy
@@ -1443,6 +1485,9 @@ Rectangle {
root.updateSort();
root.updateDisplay(root.txOffset, root.txMax);
if (currentPage) {
root.paginationJump(parseInt(currentPage));
}
}
function updateSort(){
@@ -1581,20 +1626,20 @@ Rectangle {
root.txCount = root.txData.length;
}
function update() {
function update(currentPage) {
// handle outside mutation of tx model; incoming/outgoing funds or new blocks. Update table.
currentWallet.history.refresh(currentWallet.currentSubaddressAccount);
root.updateTransactionsFromModel();
root.updateFilter();
root.updateFilter(currentPage);
}
function editDescription(_hash, _tx_note){
function editDescription(_hash, _tx_note, currentPage){
inputDialog.labelText = qsTr("Set description:") + translationManager.emptyString;
inputDialog.onAcceptedCallback = function() {
appWindow.currentWallet.setUserNote(_hash, inputDialog.inputText);
appWindow.showStatusMessage(qsTr("Updated description."),3);
root.update();
root.update(currentPage);
}
inputDialog.onRejectedCallback = null;
inputDialog.open(_tx_note);
@@ -1675,6 +1720,10 @@ Rectangle {
console.log("getProof: Generate clicked: txid " + hash + ", address " + address);
middlePanel.getProofClicked(hash, address, '');
informationPopup.title = qsTr("Payment proof") + translationManager.emptyString;
informationPopup.text = qsTr("Generating payment proof") + "..." + translationManager.emptyString;
informationPopup.onCloseCallback = null
informationPopup.open()
}
function toClipboard(text){
@@ -1746,7 +1795,14 @@ Rectangle {
root.model = appWindow.currentWallet.historyModel;
root.model.sortRole = TransactionHistoryModel.TransactionBlockHeightRole
root.model.sort(0, Qt.DescendingOrder);
fromDatePicker.currentDate = model.transactionHistory.firstDateTime
var count = root.model.rowCount()
if (count > 0) {
//date of the first transaction
fromDatePicker.currentDate = root.model.data(root.model.index((count - 1), 0), TransactionHistoryModel.TransactionDateRole);
} else {
//date of monero birth (2014-04-18)
fromDatePicker.currentDate = model.transactionHistory.firstDateTime
}
}
root.reset();
@@ -1763,10 +1819,13 @@ Rectangle {
function searchInHistory(searchTerm){
searchInput.text = searchTerm;
searchInput.forceActiveFocus();
searchInput.cursorPosition = searchInput.text.length;
sortAndFilter.collapsed = true;
}
function clearFields() {
sortAndFilter.collapsed = false;
searchInput.text = "";
root.txDataCollapsed = [];
}

View File

@@ -50,6 +50,7 @@ Rectangle {
color: "transparent"
property var model
property alias receiveHeight: mainLayout.height
property var state: "Address"
function renameSubaddressLabel(_index){
inputDialog.labelText = qsTr("Set the label of the selected address:") + translationManager.emptyString;
@@ -60,6 +61,17 @@ Rectangle {
inputDialog.open(appWindow.currentWallet.getSubaddressLabel(appWindow.currentWallet.currentSubaddressAccount, _index))
}
function generateQRCodeString() {
if (pageReceive.state == "PaymentRequest") {
return TxUtils.makeQRCodeString(appWindow.current_address,
(amountToReceiveXMR.text != "" && parseFloat(amountToReceiveXMR.text) != 0 ? amountToReceiveXMR.text : ""),
(txDescriptionInput.text != "" ? txDescriptionInput.text : ""),
(receiverNameInput.text != "" ? receiverNameInput.text : ""));
} else {
return TxUtils.makeQRCodeString(appWindow.current_address);
}
}
Clipboard { id: clipboard }
/* main layout */
@@ -72,17 +84,467 @@ Rectangle {
anchors.top: parent.top
anchors.right: parent.right
spacing: 20
spacing: 15
ColumnLayout {
id: selectedAddressDetailsColumn
Layout.alignment: Qt.AlignHCenter
spacing: 0
property int qrSize: 220
MoneroComponents.Navbar {
Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: 10
MoneroComponents.NavbarItem {
active: state == "Address"
text: qsTr("Address") + translationManager.emptyString
onSelected: state = "Address"
}
MoneroComponents.NavbarItem {
active: state == "PaymentRequest"
text: qsTr("Payment request") + translationManager.emptyString
onSelected: {
state = "PaymentRequest";
qrCodeTextMouseArea.hoverEnabled = true;
}
}
}
Rectangle {
id: qrContainer
color: MoneroComponents.Style.blackTheme ? "white" : "transparent"
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: parent.qrSize
Layout.preferredHeight: width
radius: 4
Image {
id: qrCode
anchors.fill: parent
anchors.margins: 1
smooth: false
fillMode: Image.PreserveAspectFit
source: "image://qrcode/" + generateQRCodeString();
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.LeftButton | Qt.RightButton
onEntered: qrCodeTooltip.tooltipPopup.open()
onExited: qrCodeTooltip.tooltipPopup.close()
onClicked: {
if (mouse.button == Qt.LeftButton){
walletManager.saveQrCodeToClipboard(generateQRCodeString());
appWindow.showStatusMessage(qsTr("QR code copied to clipboard") + translationManager.emptyString, 3);
} else if (mouse.button == Qt.RightButton){
qrMenu.x = this.mouseX;
qrMenu.y = this.mouseY;
qrMenu.open()
}
}
}
}
Menu {
id: qrMenu
title: "QrCode"
MenuItem {
text: qsTr("Copy to clipboard") + translationManager.emptyString;
onTriggered: walletManager.saveQrCodeToClipboard(generateQRCodeString())
}
MenuItem {
text: qsTr("Save as Image") + translationManager.emptyString;
onTriggered: qrFileDialog.open()
}
}
MoneroComponents.Tooltip {
id: qrCodeTooltip
text: qsTr("Left click: copy QR code to clipboard") + "<br>" + qsTr("Right click: save QR code as image file") + translationManager.emptyString
}
}
MoneroComponents.TextPlain {
id: qrCodeText
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: 6
Layout.maximumWidth: 285
Layout.minimumHeight: 75
verticalAlignment: Text.AlignVCenter
visible: paymentRequestGridLayout.visible
font.pixelSize: 12
color: qrCodeTextMouseArea.containsMouse ? MoneroComponents.Style.orange : MoneroComponents.Style.defaultFontColor
text: generateQRCodeString();
wrapMode: Text.WrapAnywhere
tooltip: qsTr("Copy payment request to clipboard") + translationManager.emptyString
themeTransition: false
MouseArea {
id: qrCodeTextMouseArea
hoverEnabled: false //true when Payment request navbar button is clicked (fix bug displaying tooltip when navbar button is clicked)
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: parent.tooltipPopup.open()
onExited: parent.tooltipPopup.close()
onClicked: {
clipboard.setText(qrCodeText.text);
appWindow.showStatusMessage(qsTr("Payment request copied to clipboard") + translationManager.emptyString, 3);
}
}
}
GridLayout {
id: paymentRequestGridLayout
columns: 3
rows: 4
visible: pageReceive.state == "PaymentRequest"
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: 6
Layout.preferredWidth: 285
Layout.maximumWidth: 285
MoneroComponents.Label {
id: amountTitleFiat
Layout.bottomMargin: 3
Layout.preferredWidth: 90
visible: persistentSettings.fiatPriceEnabled
fontSize: 14
text: qsTr("Amount") + translationManager.emptyString
}
MoneroComponents.Input {
id: amountToReceiveFiat
Layout.preferredWidth: 165
Layout.maximumWidth: 165
visible: persistentSettings.fiatPriceEnabled
topPadding: 5
leftPadding: 5
font.family: MoneroComponents.Style.fontMonoRegular.name
font.pixelSize: 14
font.bold: false
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
selectByMouse: true
color: MoneroComponents.Style.defaultFontColor
placeholderText: "0.00"
background: Rectangle {
color: MoneroComponents.Style.blackTheme ? "transparent" : "white"
radius: 3
border.color: parent.activeFocus ? MoneroComponents.Style.inputBorderColorActive : MoneroComponents.Style.inputBorderColorInActive
border.width: 1
}
onTextEdited: {
text = text.trim().replace(",", ".");
const match = text.match(/^0+(\d.*)/);
if (match) {
const cursorPosition = cursorPosition;
text = match[1];
cursorPosition = Math.max(cursorPosition, 1) - 1;
} else if(text.indexOf('.') === 0){
text = '0' + text;
if (text.length > 2) {
cursorPosition = 1;
}
}
if (amountToReceiveFiat.text == "") {
amountToReceiveXMR.text = "";
} else {
amountToReceiveXMR.text = fiatApiConvertToXMR(amountToReceiveFiat.text);
}
}
validator: RegExpValidator {
regExp: /^\s*(\d{1,8})?([\.,]\d{1,2})?\s*$/
}
}
MoneroComponents.Label {
Layout.bottomMargin: 3
visible: persistentSettings.fiatPriceEnabled
fontSize: 14
text: appWindow.fiatApiCurrencySymbol();
}
MoneroComponents.Label {
id: amountTitleXMR
Layout.bottomMargin: 3
Layout.preferredWidth: 90
fontSize: 14
text: persistentSettings.fiatPriceEnabled ? "" : qsTr("Amount") + translationManager.emptyString
}
MoneroComponents.Input {
id: amountToReceiveXMR
Layout.preferredWidth: 165
Layout.maximumWidth: 165
topPadding: 5
leftPadding: 5
font.family: MoneroComponents.Style.fontMonoRegular.name
font.pixelSize: 14
font.bold: false
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
selectByMouse: true
color: MoneroComponents.Style.defaultFontColor
placeholderText: "0.000000000000"
background: Rectangle {
color: MoneroComponents.Style.blackTheme ? "transparent" : "white"
radius: 3
border.color: parent.activeFocus ? MoneroComponents.Style.inputBorderColorActive : MoneroComponents.Style.inputBorderColorInActive
border.width: 1
}
onTextEdited: {
text = text.trim().replace(",", ".");
const match = text.match(/^0+(\d.*)/);
if (match) {
const cursorPosition = cursorPosition;
text = match[1];
cursorPosition = Math.max(cursorPosition, 1) - 1;
} else if(text.indexOf('.') === 0){
text = '0' + text;
if (text.length > 2) {
cursorPosition = 1;
}
}
if (amountToReceiveXMR.text == "") {
amountToReceiveFiat.text = "";
} else {
amountToReceiveFiat.text = fiatApiConvertToFiat(amountToReceiveXMR.text);
}
}
validator: RegExpValidator {
regExp: /^\s*(\d{1,8})?([\.,]\d{1,12})?\s*$/
}
}
MoneroComponents.Label {
Layout.bottomMargin: 3
fontSize: 14
text: "XMR"
}
MoneroComponents.Label {
id: txDescription
Layout.bottomMargin: 3
Layout.preferredWidth: 90
fontSize: 14
text: qsTr("Description") + translationManager.emptyString
tooltip: qsTr("What is being payed for (a product, service, donation) (optional)") + translationManager.emptyString
tooltipIconVisible: true
}
MoneroComponents.Input {
id: txDescriptionInput
Layout.preferredWidth: 165
Layout.maximumWidth: 165
topPadding: 7
leftPadding: 7
font.pixelSize: 14
font.bold: false
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
selectByMouse: true
color: MoneroComponents.Style.defaultFontColor
placeholderText: qsTr("Visible to the sender") + translationManager.emptyString
background: Rectangle {
color: MoneroComponents.Style.blackTheme ? "transparent" : "white"
radius: 3
border.color: parent.activeFocus ? MoneroComponents.Style.inputBorderColorActive : MoneroComponents.Style.inputBorderColorInActive
border.width: 1
}
}
MoneroComponents.Label {
Layout.bottomMargin: 3
fontSize: 14
text: ""
}
MoneroComponents.Label {
id: receiverNameLabel
Layout.bottomMargin: 3
Layout.preferredWidth: 90
fontSize: 14
text: qsTr("Your name") + translationManager.emptyString
tooltip: qsTr("Your name, company or website (optional)") + translationManager.emptyString
tooltipIconVisible: true
}
MoneroComponents.Input {
id: receiverNameInput
Layout.preferredWidth: 165
Layout.maximumWidth: 165
topPadding: 7
leftPadding: 7
font.pixelSize: 14
font.bold: false
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
selectByMouse: true
color: MoneroComponents.Style.defaultFontColor
placeholderText: qsTr("Visible to the sender") + translationManager.emptyString
background: Rectangle {
color: MoneroComponents.Style.blackTheme ? "transparent" : "white"
radius: 3
border.color: parent.activeFocus ? MoneroComponents.Style.inputBorderColorActive : MoneroComponents.Style.inputBorderColorInActive
border.width: 1
}
}
MoneroComponents.Label {
Layout.bottomMargin: 3
fontSize: 14
text: ""
}
}
MoneroComponents.TextPlain {
id: selectedaddressIndex
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: 220
Layout.maximumWidth: 220
Layout.topMargin: 15
visible: pageReceive.state == "Address"
horizontalAlignment: Text.AlignHCenter
text: qsTr("Address #") + subaddressListView.currentIndex + translationManager.emptyString
wrapMode: Text.WordWrap
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 17
textFormat: Text.RichText
color: MoneroComponents.Style.defaultFontColor
themeTransition: false
}
MoneroComponents.TextPlain {
id: selectedAddressDrescription
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: 220
Layout.maximumWidth: 220
Layout.topMargin: 10
visible: pageReceive.state == "Address"
horizontalAlignment: Text.AlignHCenter
text: "(" + qsTr("no label") + ")" + translationManager.emptyString
wrapMode: Text.WordWrap
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 17
textFormat: Text.RichText
color: selectedAddressDrescriptionMouseArea.containsMouse ? MoneroComponents.Style.orange : MoneroComponents.Style.dimmedFontColor
themeTransition: false
tooltip: subaddressListView.currentIndex > 0 ? qsTr("Edit address label") : "" + translationManager.emptyString
MouseArea {
id: selectedAddressDrescriptionMouseArea
visible: subaddressListView.currentIndex > 0
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: parent.tooltip ? parent.tooltipPopup.open() : ""
onExited: parent.tooltip ? parent.tooltipPopup.close() : ""
onClicked: {
renameSubaddressLabel(appWindow.current_subaddress_table_index);
}
}
}
MoneroComponents.TextPlain {
id: selectedAddress
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: 300
Layout.topMargin: 11
visible: pageReceive.state == "Address"
text: appWindow.current_address ? appWindow.current_address : ""
horizontalAlignment: TextInput.AlignHCenter
wrapMode: Text.Wrap
textFormat: Text.RichText
color: selectedAddressMouseArea.containsMouse ? MoneroComponents.Style.orange : MoneroComponents.Style.defaultFontColor
font.pixelSize: 15
font.family: MoneroComponents.Style.fontRegular.name
themeTransition: false
tooltip: qsTr("Copy address to clipboard") + translationManager.emptyString
MouseArea {
id: selectedAddressMouseArea
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: parent.tooltip ? parent.tooltipPopup.open() : ""
onExited: parent.tooltip ? parent.tooltipPopup.close() : ""
onClicked: {
clipboard.setText(appWindow.current_address);
appWindow.showStatusMessage(qsTr("Address copied to clipboard") + translationManager.emptyString, 3);
}
}
}
MoneroComponents.StandardButton {
Layout.preferredWidth: 220
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: 18
small: true
text: qsTr("Show on device") + translationManager.emptyString
fontSize: 14
visible: appWindow.currentWallet ? appWindow.currentWallet.isHwBacked() : false
onClicked: {
appWindow.currentWallet.deviceShowAddressAsync(
appWindow.currentWallet.currentSubaddressAccount,
appWindow.current_subaddress_table_index,
'');
}
}
}
ColumnLayout {
id: addressRow
spacing: 0
MoneroComponents.LabelSubheader {
Layout.fillWidth: true
fontSize: 24
textFormat: Text.RichText
text: qsTr("Addresses") + translationManager.emptyString
RowLayout {
spacing: 0
MoneroComponents.LabelSubheader {
Layout.fillWidth: true
fontSize: 24
textFormat: Text.RichText
text: qsTr("Addresses") + translationManager.emptyString
}
MoneroComponents.StandardButton {
id: createAddressButton
small: true
text: qsTr("Create new address") + translationManager.emptyString
fontSize: 13
onClicked: {
inputDialog.labelText = qsTr("Set the label of the new address:") + translationManager.emptyString
inputDialog.onAcceptedCallback = function() {
appWindow.currentWallet.subaddress.addRow(appWindow.currentWallet.currentSubaddressAccount, inputDialog.inputText)
current_subaddress_table_index = appWindow.currentWallet.numSubaddresses(appWindow.currentWallet.currentSubaddressAccount) - 1
subaddressListView.currentIndex = current_subaddress_table_index
}
inputDialog.onRejectedCallback = null;
inputDialog.open()
}
Rectangle {
anchors.top: createAddressButton.bottom
anchors.topMargin: 8
anchors.left: createAddressButton.left
anchors.right: createAddressButton.right
height: 2
color: MoneroComponents.Style.appWindowBorderColor
MoneroEffects.ColorTransition {
targetObj: parent
blackColor: MoneroComponents.Style._b_appWindowBorderColor
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
}
}
}
}
ColumnLayout {
@@ -109,6 +571,15 @@ Rectangle {
Layout.fillWidth: true
color: itemMouseArea.containsMouse || index === appWindow.current_subaddress_table_index ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
Rectangle {
visible: index === appWindow.current_subaddress_table_index
Layout.fillHeight: true
anchors.top: parent.top
anchors.bottom: parent.bottom
color: "darkgrey"
width: 2
}
Rectangle{
anchors.right: parent.right
anchors.left: parent.left
@@ -127,7 +598,7 @@ Rectangle {
Rectangle {
anchors.fill: parent
anchors.topMargin: 5
anchors.rightMargin: 80
anchors.rightMargin: 90
color: "transparent"
MoneroComponents.Label {
@@ -182,16 +653,30 @@ Rectangle {
height: 21
spacing: 10
MoneroComponents.IconButton {
fontAwesomeFallbackIcon: FontAwesome.searchPlus
fontAwesomeFallbackSize: 22
color: MoneroComponents.Style.defaultFontColor
fontAwesomeFallbackOpacity: 0.5
Layout.preferredWidth: 23
Layout.preferredHeight: 21
tooltip: qsTr("See transactions") + translationManager.emptyString
onClicked: doSearchInHistory(address)
}
MoneroComponents.IconButton {
id: renameButton
image: "qrc:///images/edit.svg"
fontAwesomeFallbackIcon: FontAwesome.edit
fontAwesomeFallbackSize: 22
color: MoneroComponents.Style.defaultFontColor
opacity: 0.5
opacity: isOpenGL ? 0.5 : 1
fontAwesomeFallbackOpacity: 0.5
Layout.preferredWidth: 23
Layout.preferredHeight: 21
visible: index !== 0
tooltip: qsTr("Edit address label") + translationManager.emptyString
onClicked: {
renameSubaddressLabel(index);
@@ -204,9 +689,11 @@ Rectangle {
fontAwesomeFallbackIcon: FontAwesome.clipboard
fontAwesomeFallbackSize: 22
color: MoneroComponents.Style.defaultFontColor
opacity: 0.5
opacity: isOpenGL ? 0.5 : 1
fontAwesomeFallbackOpacity: 0.5
Layout.preferredWidth: 16
Layout.preferredHeight: 21
tooltip: qsTr("Copy address to clipboard") + translationManager.emptyString
onClicked: {
console.log("Address copied to clipboard");
@@ -223,6 +710,16 @@ Rectangle {
appWindow.currentWallet.currentSubaddressAccount,
subaddressListView.currentIndex
);
if (subaddressListView.currentIndex == 0) {
selectedAddressDrescription.text = qsTr("Primary address") + translationManager.emptyString;
} else {
var selectedAddressLabel = appWindow.currentWallet.getSubaddressLabel(appWindow.currentWallet.currentSubaddressAccount, appWindow.current_subaddress_table_index);
if (selectedAddressLabel == "") {
selectedAddressDrescription.text = "(" + qsTr("no label") + ")" + translationManager.emptyString
} else {
selectedAddressDrescription.text = selectedAddressLabel
}
}
}
}
}
@@ -238,84 +735,6 @@ Rectangle {
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
}
}
MoneroComponents.CheckBox {
id: addNewAddressCheckbox
border: false
uncheckedIcon: FontAwesome.plusCircle
toggleOnClick: false
fontAwesomeIcons: true
fontSize: 16
iconOnTheLeft: true
Layout.fillWidth: true
Layout.topMargin: 10
text: qsTr("Create new address") + translationManager.emptyString;
onClicked: {
inputDialog.labelText = qsTr("Set the label of the new address:") + translationManager.emptyString
inputDialog.onAcceptedCallback = function() {
appWindow.currentWallet.subaddress.addRow(appWindow.currentWallet.currentSubaddressAccount, inputDialog.inputText)
current_subaddress_table_index = appWindow.currentWallet.numSubaddresses(appWindow.currentWallet.currentSubaddressAccount) - 1
subaddressListView.currentIndex = current_subaddress_table_index
}
inputDialog.onRejectedCallback = null;
inputDialog.open()
}
}
}
ColumnLayout {
Layout.alignment: Qt.AlignHCenter
spacing: 11
property int qrSize: 220
Rectangle {
id: qrContainer
color: MoneroComponents.Style.blackTheme ? "white" : "transparent"
Layout.fillWidth: true
Layout.maximumWidth: parent.qrSize
Layout.preferredHeight: width
radius: 4
Image {
id: qrCode
anchors.fill: parent
anchors.margins: 1
smooth: false
fillMode: Image.PreserveAspectFit
source: "image://qrcode/" + TxUtils.makeQRCodeString(appWindow.current_address)
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.RightButton
onPressAndHold: qrFileDialog.open()
}
}
}
MoneroComponents.StandardButton {
Layout.preferredWidth: 220
small: true
text: FontAwesome.save + " %1".arg(qsTr("Save as image")) + translationManager.emptyString
label.font.family: FontAwesome.fontFamily
fontSize: 13
onClicked: qrFileDialog.open()
}
MoneroComponents.StandardButton {
Layout.preferredWidth: 220
small: true
text: FontAwesome.eye + " %1".arg(qsTr("Show on device")) + translationManager.emptyString
label.font.family: FontAwesome.fontFamily
fontSize: 13
visible: appWindow.currentWallet ? appWindow.currentWallet.isHwBacked() : false
onClicked: {
appWindow.currentWallet.deviceShowAddressAsync(
appWindow.currentWallet.currentSubaddressAccount,
appWindow.current_subaddress_table_index,
'');
}
}
}
MessageDialog {
@@ -330,12 +749,14 @@ Rectangle {
selectExisting: false
nameFilters: ["Image (*.png)"]
onAccepted: {
if(!walletManager.saveQrCode(TxUtils.makeQRCodeString(appWindow.current_address), walletManager.urlToLocalPath(fileUrl))) {
if(!walletManager.saveQrCode(generateQRCodeString(), walletManager.urlToLocalPath(fileUrl))) {
console.log("Failed to save QrCode to file " + walletManager.urlToLocalPath(fileUrl) )
receivePageDialog.title = qsTr("Save QrCode") + translationManager.emptyString;
receivePageDialog.text = qsTr("Failed to save QrCode to ") + walletManager.urlToLocalPath(fileUrl) + translationManager.emptyString;
receivePageDialog.icon = StandardIcon.Error
receivePageDialog.open()
} else {
appWindow.showStatusMessage(qsTr("QR code saved to ") + walletManager.urlToLocalPath(fileUrl) + translationManager.emptyString, 3);
}
}
}
@@ -343,16 +764,23 @@ Rectangle {
function onPageCompleted() {
console.log("Receive page loaded");
pageReceive.clearFields();
subaddressListView.model = appWindow.currentWallet.subaddressModel;
if (appWindow.currentWallet) {
appWindow.current_address = appWindow.currentWallet.address(appWindow.currentWallet.currentSubaddressAccount, 0)
appWindow.currentWallet.subaddress.refresh(appWindow.currentWallet.currentSubaddressAccount)
if (subaddressListView.currentIndex == -1) {
subaddressListView.currentIndex = 0;
}
}
}
function clearFields() {
// @TODO: add fields
amountToReceiveFiat.text = "";
amountToReceiveXMR.text = "";
txDescriptionInput.text = "";
receiverNameInput.text = "";
}
function onPageClosed() {

View File

@@ -102,7 +102,7 @@ Rectangle {
recipientModel.newRecipient(address, Utils.removeTrailingZeros(amount || ""));
setPaymentId(payment_id || "");
setDescription((recipient_name ? recipient_name + " " : "") + (tx_description || ""));
setDescription((recipient_name ? recipient_name + (tx_description ? " (" + tx_description + ")" : "") : (tx_description || "")));
}
function updateFromQrCode(address, payment_id, amount, tx_description, recipient_name) {
@@ -265,7 +265,6 @@ Rectangle {
Layout.fillWidth: true
MoneroComponents.TextPlain {
Layout.leftMargin: 10
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16
color: MoneroComponents.Style.defaultFontColor
@@ -277,6 +276,7 @@ Rectangle {
fontStyleName: "Solid"
fontPixelSize: 18
text: FontAwesome.desktop
tooltip: qsTr("Grab QR code from screen") + translationManager.emptyString
onClicked: {
clearFields();
const codes = oshelper.grabQrCodesFromScreen();
@@ -285,6 +285,9 @@ Rectangle {
if (!parsed.error) {
fillPaymentDetails(parsed.address, parsed.payment_id, parsed.amount, parsed.tx_description, parsed.recipient_name);
break;
} else if (walletManager.addressValid(codes[index], appWindow.persistentSettings.nettype)) {
fillPaymentDetails(codes[index]);
break;
}
}
}
@@ -295,6 +298,7 @@ Rectangle {
fontStyleName: "Solid"
text: FontAwesome.qrcode
visible: appWindow.qrScannerEnabled
tooltip: qsTr("Scan QR code") + translationManager.emptyString
onClicked: {
cameraUi.state = "Capture"
cameraUi.qrcode_decoded.connect(updateFromQrCode)
@@ -304,6 +308,7 @@ Rectangle {
MoneroComponents.InlineButton {
fontFamily: FontAwesome.fontFamily
text: FontAwesome.addressBook
tooltip: qsTr("Import from address book") + translationManager.emptyString
onClicked: {
middlePanel.addressBookView.selectAndSend = true;
appWindow.showPageRequest("AddressBook");
@@ -315,12 +320,32 @@ Rectangle {
}
}
MoneroComponents.TextPlain {
Layout.preferredWidth: recipientLayout.secondRowWidth
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16
color: MoneroComponents.Style.defaultFontColor
text: qsTr("Amount") + translationManager.emptyString
RowLayout {
id: amountLabel
spacing: 6
Layout.preferredWidth: 125
Layout.maximumWidth: recipientLayout.secondRowWidth
MoneroComponents.TextPlain {
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16
color: MoneroComponents.Style.defaultFontColor
text: qsTr("Amount") + translationManager.emptyString
}
MoneroComponents.InlineButton {
fontFamily: FontAwesome.fontFamilySolid
fontStyleName: "Solid"
fontPixelSize: 16
text: FontAwesome.infinity
visible: recipientModel.count == 1
tooltip: qsTr("Send all unlocked balance of this account") + translationManager.emptyString
onClicked: recipientRepeater.itemAt(0).children[1].children[2].text = "(all)";
}
Item {
Layout.fillWidth: true
}
}
Item {
@@ -337,7 +362,9 @@ Rectangle {
Rectangle {
Layout.fillWidth: true
Layout.rightMargin: recipientLayout.thirdRowWidth
Layout.topMargin: -1
Layout.leftMargin: 1
Layout.rightMargin: recipientLayout.thirdRowWidth + 1
color: MoneroComponents.Style.inputBorderColorInActive
height: 1
visible: index > 0
@@ -350,12 +377,12 @@ Rectangle {
KeyNavigation.backtab: index > 0 ? recipientRepeater.itemAt(index - 1).children[1].children[2] : sendButton
KeyNavigation.tab: parent.children[2]
Layout.alignment: Qt.AlignVCenter
Layout.topMargin: recipientLayout.rowSpacing / 2
Layout.bottomMargin: recipientLayout.rowSpacing / 2
Layout.topMargin: index > 0 ? 0 : 1
Layout.bottomMargin: 2
Layout.fillWidth: true
addressValidation: true
borderDisabled: true
fontColor: error ? MoneroComponents.Style.errorColor : MoneroComponents.Style.defaultFontColor
fontColor: error && text != "" ? MoneroComponents.Style.errorColor : MoneroComponents.Style.defaultFontColor
fontFamily: MoneroComponents.Style.fontMonoRegular.name
fontSize: 14
inputPaddingBottom: 0
@@ -377,7 +404,7 @@ Rectangle {
onTextChanged: {
const parsed = walletManager.parse_uri_to_object(text);
if (!parsed.error) {
fillPaymentDetails(parsed.address, parsed.payment_id, parsed.amount, parsed.tx_description);
fillPaymentDetails(parsed.address, parsed.payment_id, parsed.amount, parsed.tx_description, parsed.recipient_name);
}
address = text;
}
@@ -430,6 +457,8 @@ Rectangle {
Rectangle {
Layout.fillHeight: true
Layout.topMargin: index > 0 ? 0 : 1
Layout.bottomMargin: 1
Layout.leftMargin: recipientLayout.colSpacing / 2 - width
Layout.rightMargin: recipientLayout.colSpacing / 2
color: MoneroComponents.Style.inputBorderColorInActive
@@ -440,14 +469,18 @@ Rectangle {
KeyNavigation.backtab: parent.children[0]
KeyNavigation.tab: index + 1 < recipientRepeater.count ? recipientRepeater.itemAt(index + 1).children[1].children[0] : sendButton
Layout.alignment: Qt.AlignVCenter
Layout.topMargin: recipientLayout.rowSpacing / 2
Layout.bottomMargin: recipientLayout.rowSpacing / 2
Layout.topMargin: index > 0 ? 0 : 1
Layout.bottomMargin: 2
Layout.rightMargin: recipientLayout.colSpacing / 2
Layout.preferredWidth: 125
Layout.maximumWidth: 125
borderDisabled: true
fontFamily: MoneroComponents.Style.fontMonoRegular.name
fontSize: 14
inputPadding: 0
inputPaddingLeft: 0
inputPaddingRight: 0
inputPaddingTop: 0
inputPaddingBottom: 0
placeholderFontFamily: MoneroComponents.Style.fontMonoRegular.name
placeholderFontSize: 14
placeholderLeftMargin: 0
@@ -482,22 +515,30 @@ Rectangle {
font.styleName: "Solid"
horizontalAlignment: Text.AlignHCenter
opacity: mouseArea.containsMouse ? 1 : 0.85
text: recipientModel.count == 1 ? FontAwesome.infinity : FontAwesome.times
text: FontAwesome.times
tooltip: qsTr("Remove recipient") + translationManager.emptyString
tooltipLeft: true
visible: recipientModel.count > 1
MouseArea {
id: mouseArea
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: {
if (recipientModel.count == 1) {
parent.parent.children[2].text = "(all)";
} else {
recipientModel.remove(index);
}
}
onEntered: parent.tooltipPopup.open()
onExited: parent.tooltipPopup.close()
onClicked: recipientModel.remove(index);
}
}
MoneroComponents.TextPlain {
Layout.leftMargin: recipientLayout.colSpacing / 2
Layout.preferredWidth: recipientLayout.thirdRowWidth
horizontalAlignment: Text.AlignHCenter
font.family: MoneroComponents.Style.fontRegular.name
text: "XMR"
visible: recipientModel.count == 1
}
}
}
}
@@ -514,6 +555,7 @@ Rectangle {
Layout.column: 0
Layout.row: 0
Layout.fillWidth: true
Layout.topMargin: recipientModel.count > 1 ? 0 : -1
spacing: 0
CheckBox {
@@ -553,11 +595,16 @@ Rectangle {
Layout.column: 1
Layout.row: 0
Layout.preferredWidth: recipientLayout.secondRowWidth
Layout.topMargin: recipientModel.count > 1 ? 0 : -1
Layout.maximumWidth: recipientLayout.secondRowWidth
borderDisabled: true
fontFamily: MoneroComponents.Style.fontMonoRegular.name
fontSize: 14
inputHeight: 30
inputPadding: 0
inputPaddingLeft: 0
inputPaddingRight: 0
inputPaddingTop: 0
inputPaddingBottom: 0
readOnly: true
text: Utils.removeTrailingZeros(walletManager.displayAmount(recipientModel.getAmountTotal()))
visible: recipientModel.count > 1
@@ -567,6 +614,7 @@ Rectangle {
Layout.column: 2
Layout.row: 0
Layout.preferredWidth: recipientLayout.thirdRowWidth
Layout.maximumWidth: recipientLayout.thirdRowWidth
horizontalAlignment: Text.AlignHCenter
font.family: MoneroComponents.Style.fontRegular.name
text: "XMR"
@@ -577,11 +625,16 @@ Rectangle {
Layout.column: 1
Layout.row: recipientModel.count > 1 ? 1 : 0
Layout.preferredWidth: recipientLayout.secondRowWidth
Layout.topMargin: recipientModel.count > 1 ? 0 : -1
Layout.maximumWidth: recipientLayout.secondRowWidth
borderDisabled: true
fontFamily: MoneroComponents.Style.fontMonoRegular.name
fontSize: 14
inputHeight: 30
inputPadding: 0
inputPaddingLeft: 0
inputPaddingRight: 0
inputPaddingTop: 0
inputPaddingBottom: 0
opacity: 0.7
readOnly: true
text: fiatApiConvertToFiat(walletManager.displayAmount(recipientModel.getAmountTotal()))
@@ -592,6 +645,8 @@ Rectangle {
Layout.column: 2
Layout.row: recipientModel.count > 1 ? 1 : 0
Layout.preferredWidth: recipientLayout.thirdRowWidth
Layout.topMargin: recipientModel.count > 1 ? 0 : -1
Layout.maximumWidth: recipientLayout.thirdRowWidth
font.family: MoneroComponents.Style.fontRegular.name
horizontalAlignment: Text.AlignHCenter
opacity: 0.7
@@ -620,13 +675,6 @@ Rectangle {
spacing: 0
visible: appWindow.walletMode >= 2
Label {
id: transactionPriority
Layout.topMargin: 0
text: qsTr("Transaction priority") + translationManager.emptyString
fontBold: false
fontSize: 16
}
// Note: workaround for translations in listElements
// ListElement: cannot use script for property value, so
// code like this wont work:
@@ -650,15 +698,18 @@ Rectangle {
spacing: 10
StandardDropdown {
Layout.preferredWidth: 200
Layout.maximumWidth: 200
id: priorityDropdown
currentIndex: 0
dataModel: priorityModelV5
labelText: qsTr("Transaction priority") + translationManager.emptyString
labelFontSize: 16
}
MoneroComponents.TextPlain {
id: feeLabel
Layout.alignment: Qt.AlignVCenter
Layout.alignment: Qt.AlignBottom
Layout.bottomMargin: 11
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
color: MoneroComponents.Style.defaultFontColor
@@ -742,9 +793,11 @@ Rectangle {
}
}
LineEditMulti {
LineEdit {
id: descriptionLine
placeholderText: qsTr("Saved to local wallet history") + translationManager.emptyString
placeholderFontSize: 16
fontSize: 16
placeholderText: qsTr("Saved to local wallet history") + " (" + qsTr("only visible to you") + ")" + translationManager.emptyString
Layout.fillWidth: true
visible: descriptionCheckbox.checked
}

View File

@@ -116,7 +116,7 @@ Rectangle {
enabled: TxUtils.checkTxID(getProofTxIdLine.text) && (getProofAddressLine.text.length == 0 || TxUtils.checkAddress(getProofAddressLine.text, appWindow.persistentSettings.nettype))
onClicked: {
console.log("getProof: Generate clicked: txid " + getProofTxIdLine.text + ", address " + getProofAddressLine.text + ", message: " + getProofMessageLine.text);
root.getProofClicked(getProofTxIdLine.text, getProofAddressLine.text, getProofMessageLine.text)
middlePanel.getProofClicked(getProofTxIdLine.text, getProofAddressLine.text, getProofMessageLine.text)
}
}
@@ -201,7 +201,7 @@ Rectangle {
enabled: TxUtils.checkTxID(checkProofTxIdLine.text) && TxUtils.checkSignature(checkProofSignatureLine.text) && ((checkProofSignatureLine.text.indexOf("SpendProofV") === 0 && checkProofAddressLine.text.length == 0) || (checkProofSignatureLine.text.indexOf("SpendProofV") !== 0 && TxUtils.checkAddress(checkProofAddressLine.text, appWindow.persistentSettings.nettype)))
onClicked: {
console.log("checkProof: Check clicked: txid " + checkProofTxIdLine.text + ", address " + checkProofAddressLine.text + ", message " + checkProofMessageLine.text + ", signature " + checkProofSignatureLine.text);
root.checkProofClicked(checkProofTxIdLine.text, checkProofAddressLine.text, checkProofMessageLine.text, checkProofSignatureLine.text)
middlePanel.checkProofClicked(checkProofTxIdLine.text, checkProofAddressLine.text, checkProofMessageLine.text, checkProofSignatureLine.text)
}
}

View File

@@ -42,13 +42,15 @@ Rectangle {
Layout.fillWidth: true
property alias infoHeight: infoLayout.height
property string walletModeString: {
var modeStr;
if(appWindow.walletMode === 0){
return qsTr("Simple mode") + translationManager.emptyString;
modeStr = qsTr("Simple mode") + translationManager.emptyString;
} else if(appWindow.walletMode === 1){
return qsTr("Simple mode") + " (bootstrap)" + translationManager.emptyString;
modeStr = qsTr("Simple mode") + " (bootstrap)" + translationManager.emptyString;
} else if(appWindow.walletMode === 2){
return "%1 (%2)".arg(qsTr("Advanced mode")).arg(persistentSettings.useRemoteNode ? qsTr("Remote node") : qsTr("Local node")) + translationManager.emptyString;
modeStr = "%1 (%2)".arg(qsTr("Advanced mode")).arg(persistentSettings.useRemoteNode ? qsTr("Remote node") : qsTr("Local node")) + translationManager.emptyString;
}
return modeStr + (persistentSettings.portable ? ", %1".arg(qsTr("portable")) : "");
}
ColumnLayout {
@@ -189,13 +191,7 @@ Rectangle {
inputDialog.onAcceptedCallback = function() {
var _restoreHeight;
if (inputDialog.inputText) {
var restoreHeightText = inputDialog.inputText;
// Parse date string or restore height as integer
if(restoreHeightText.indexOf('-') === 4 && restoreHeightText.length === 10) {
_restoreHeight = Wizard.getApproximateBlockchainHeight(restoreHeightText, Utils.netTypeToString());
} else {
_restoreHeight = parseInt(restoreHeightText)
}
_restoreHeight = Utils.parseDateStringOrRestoreHeightAsInteger(inputDialog.inputText);
}
if (!isNaN(_restoreHeight)) {
if(_restoreHeight >= 0) {
@@ -399,9 +395,9 @@ Rectangle {
data += "\nWallet log path: " + logger.logFilePath;
data += "\nWallet mode: " + walletModeString;
data += "\nGraphics mode: " + isOpenGL ? "OpenGL" : "Low graphics mode";
data += "\nGraphics mode: " + (isOpenGL ? "OpenGL" : "Low graphics mode");
if (isTails)
data += "\nTails: " + tailsUsePersistence ? "persistent" : "persistence disabled";
data += "\nTails: " + (tailsUsePersistence ? "persistent" : "persistence disabled");
console.log("Copied to clipboard");
clipboard.setText(data);

View File

@@ -178,52 +178,34 @@ Rectangle {
Layout.leftMargin: 36
columnSpacing: 32
ColumnLayout {
spacing: 10
Layout.fillWidth: true
MoneroComponents.StandardDropdown {
id: fiatPriceProviderDropDown
Layout.maximumWidth: 200
labelText: qsTr("Price source") + translationManager.emptyString
labelFontSize: 14
dataModel: fiatPriceProvidersModel
onChanged: {
var obj = dataModel.get(currentIndex);
persistentSettings.fiatPriceProvider = obj.data;
MoneroComponents.Label {
Layout.fillWidth: true
fontSize: 14
text: qsTr("Price source") + translationManager.emptyString
}
MoneroComponents.StandardDropdown {
id: fiatPriceProviderDropDown
Layout.fillWidth: true
dataModel: fiatPriceProvidersModel
onChanged: {
var obj = dataModel.get(currentIndex);
persistentSettings.fiatPriceProvider = obj.data;
if(persistentSettings.fiatPriceEnabled)
appWindow.fiatApiRefresh();
}
if(persistentSettings.fiatPriceEnabled)
appWindow.fiatApiRefresh();
}
}
ColumnLayout {
spacing: 10
Layout.fillWidth: true
MoneroComponents.StandardDropdown {
id: fiatPriceCurrencyDropdown
Layout.maximumWidth: 100
labelText: qsTr("Currency") + translationManager.emptyString
labelFontSize: 14
currentIndex: persistentSettings.fiatPriceCurrency === "xmrusd" ? 0 : 1
dataModel: fiatPriceCurrencyModel
onChanged: {
var obj = dataModel.get(currentIndex);
persistentSettings.fiatPriceCurrency = obj.data;
MoneroComponents.Label {
Layout.fillWidth: true
fontSize: 14
text: qsTr("Currency") + translationManager.emptyString
}
MoneroComponents.StandardDropdown {
id: fiatPriceCurrencyDropdown
Layout.fillWidth: true
currentIndex: persistentSettings.fiatPriceCurrency === "xmrusd" ? 0 : 1
dataModel: fiatPriceCurrencyModel
onChanged: {
var obj = dataModel.get(currentIndex);
persistentSettings.fiatPriceCurrency = obj.data;
if(persistentSettings.fiatPriceEnabled)
appWindow.fiatApiRefresh();
}
if(persistentSettings.fiatPriceEnabled)
appWindow.fiatApiRefresh();
}
}

View File

@@ -28,7 +28,7 @@
import QtQuick 2.9
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
import QtQuick.Controls 2.2
import "../../js/Utils.js" as Utils
import "../../components" as MoneroComponents
@@ -132,6 +132,18 @@ Rectangle {
font.pixelSize: 18
font.family: MoneroComponents.Style.fontRegular.name
text: qsTr("Daemon log") + translationManager.emptyString
themeTransition: false
onColorChanged: {
var flickableContentYBefore = flickable.contentY
var daemonLogText = consoleArea.text
consoleArea.clear();
if (MoneroComponents.Style.blackTheme) {
consoleArea.append(daemonLogText.replace(/#000000/g, '#ffffff').replace(/#008000/g, '#00ff00'));
} else {
consoleArea.append(daemonLogText.replace(/#ffffff/g, '#000000').replace(/#00ff00/g, '#008000'));
}
flickable.contentY = flickableContentYBefore
}
}
Item {
@@ -164,7 +176,7 @@ Rectangle {
wrapMode: TextEdit.Wrap
readOnly: true
function logCommand(msg){
msg = log_color(msg, "lime");
msg = log_color(msg, MoneroComponents.Style.blackTheme ? "lime" : "green");
consoleArea.append(msg);
}
function logMessage(msg){
@@ -173,7 +185,7 @@ Rectangle {
if(msg.toLowerCase().indexOf('error') >= 0){
color = MoneroComponents.Style.errorColor;
} else if (msg.toLowerCase().indexOf('warning') >= 0){
color = MoneroComponents.Style.warningColor;
color = "#fa6800"
}
// format multi-lines
@@ -206,6 +218,7 @@ Rectangle {
ScrollBar.vertical: ScrollBar {
onActiveChanged: if (!active && !isMac) active = true
policy: isMac ? ScrollBar.AsNeeded : ScrollBar.AlwaysOn
}
}
}
@@ -213,11 +226,14 @@ Rectangle {
MoneroComponents.LineEdit {
id: sendCommandText
Layout.fillWidth: true
inputPaddingTop: 0
inputPaddingBottom: 0
property var lastCommands: []
property int currentCommandIndex
enabled: !persistentSettings.useRemoteNode
fontBold: false
placeholderText: qsTr("command + enter (e.g 'help' or 'status')") + translationManager.emptyString
fontSize: 16
placeholderText: qsTr("Type a command (e.g '%1' or '%2') and press Enter").arg("help").arg("status") + translationManager.emptyString
placeholderFontSize: 16
Keys.onUpPressed: {
if (currentCommandIndex != 0) {

View File

@@ -72,7 +72,7 @@ Rectangle{
Layout.fillHeight: true
anchors.top: parent.top
anchors.bottom: parent.bottom
color: MoneroComponents.Style.blackTheme ? "white" : "darkgrey"
color: "darkgrey"
width: 2
}
@@ -165,7 +165,7 @@ Rectangle{
Layout.fillHeight: true
anchors.top: parent.top
anchors.bottom: parent.bottom
color: MoneroComponents.Style.blackTheme ? "white" : "darkgrey"
color: "darkgrey"
width: 2
}

10
qml.qrc
View File

@@ -179,9 +179,9 @@
<file>images/merchant/arrow_right.png</file>
<file>images/merchant/bg.png</file>
<file>images/merchant/input_box.png</file>
<file>fonts/FontAwesome/fa-brands-400.ttf</file>
<file>fonts/FontAwesome/fa-regular-400.ttf</file>
<file>fonts/FontAwesome/fa-solid-900.ttf</file>
<file>fonts/FontAwesome/fa-brands-400.otf</file>
<file>fonts/FontAwesome/fa-regular-400.otf</file>
<file>fonts/FontAwesome/fa-solid-900.otf</file>
<file>fonts/FontAwesome/FontAwesome.qml</file>
<file>fonts/FontAwesome/Object.qml</file>
<file>fonts/FontAwesome/qmldir</file>
@@ -252,5 +252,9 @@
<file>images/success@2x.png</file>
<file>components/SuccessfulTxDialog.qml</file>
<file>components/TxConfirmationDialog.qml</file>
<file>images/ledgerNanoS.png</file>
<file>images/ledgerNanoX.png</file>
<file>images/trezor.png</file>
<file>images/trezor@2x.png</file>
</qresource>
</RCC>

View File

@@ -1,7 +1,4 @@
add_subdirectory(QR-Code-scanner)
add_subdirectory(daemon)
add_subdirectory(libwalletqt)
add_subdirectory(model)
add_subdirectory(openpgp)
add_subdirectory(zxcvbn-c)
@@ -48,13 +45,6 @@ if(APPLE)
list(APPEND SOURCE_FILES "qt/macoshelper.mm")
endif()
if(ENABLE_PASS_STRENGTH_METER)
file(GLOB PASS_STRENGTH_FILES
"zxcvbn-c/zxcvbn.h"
"zxcvbn-c/zxcvbn.c"
)
endif()
set(EXECUTABLE_FLAG)
if(MINGW)
set(EXECUTABLE_FLAG WIN32)
@@ -76,7 +66,6 @@ endif()
set(monero_wallet_gui_sources
${SOURCE_FILES}
${PASS_STRENGTH_FILES}
${RESOURCES}
)
@@ -100,9 +89,6 @@ message(STATUS "OpenGL: libraries at ${OPENGL_LIBRARIES}")
target_include_directories(monero-wallet-gui PUBLIC ${Qt5Gui_PRIVATE_INCLUDE_DIRS})
file(GLOB_RECURSE SRC_SOURCES *.cpp)
file(GLOB_RECURSE SRC_HEADERS *.h)
target_include_directories(monero-wallet-gui PUBLIC
${CMAKE_SOURCE_DIR}/monero/include
${CMAKE_SOURCE_DIR}/monero/src
@@ -148,6 +134,7 @@ target_link_libraries(monero-wallet-gui
openpgp
qrdecoder
translations
zxcvbn
)
if(X11_FOUND)

View File

@@ -1,4 +0,0 @@
file(GLOB_RECURSE SRC_SOURCES *.cpp)
file(GLOB_RECURSE SRC_HEADERS *.h)

View File

@@ -1,4 +0,0 @@
file(GLOB_RECURSE SRC_SOURCES *.cpp)
file(GLOB_RECURSE SRC_HEADERS *.h)

View File

@@ -181,7 +181,6 @@ QString TransactionHistory::writeCSV(quint32 accountIndex, QString out)
TransactionInfo info(tx, this);
// collect column data
double amount = info.amount();
quint64 atomicAmount = info.atomicAmount();
quint32 subaddrAccount = info.subaddrAccount();
QString fee = info.fee();
@@ -212,7 +211,7 @@ QString TransactionHistory::writeCSV(quint32 accountIndex, QString out)
// format and write
QString line = QString("%1,%2,%3,%4,%5,%6,%7,%8,\"%9\",%10,%11\n")
.arg(QString::number(blockHeight), QString::number(epoch), date)
.arg(direction, QString::number(amount), QString::number(atomicAmount))
.arg(direction, displayAmount, QString::number(atomicAmount))
.arg(info.fee(), info.hash(), label, QString::number(subaddrAccount))
.arg(paymentId);
output << line;

View File

@@ -31,6 +31,8 @@
#include "wallet/api/wallet2_api.h"
#include "zxcvbn-c/zxcvbn.h"
#include "QRCodeImageProvider.h"
#include <QClipboard>
#include <QGuiApplication>
#include <QFile>
#include <QFileInfo>
#include <QDir>
@@ -459,7 +461,6 @@ QUrl WalletManager::localPathToUrl(const QString &path) const
return QUrl::fromLocalFile(path);
}
#ifndef DISABLE_PASS_STRENGTH_METER
double WalletManager::getPasswordStrength(const QString &password) const
{
static const char *local_dict[] = {
@@ -474,7 +475,6 @@ double WalletManager::getPasswordStrength(const QString &password) const
ZxcvbnUnInit();
return e;
}
#endif
bool WalletManager::saveQrCode(const QString &code, const QString &path) const
{
@@ -482,6 +482,14 @@ bool WalletManager::saveQrCode(const QString &code, const QString &path) const
return QRCodeImageProvider::genQrImage(code, &size).scaled(size.expandedTo(QSize(240, 240)), Qt::KeepAspectRatio).save(path, "PNG", 100);
}
void WalletManager::saveQrCodeToClipboard(const QString &code) const
{
QClipboard *clipboard = QGuiApplication::clipboard();
QSize size;
clipboard->setImage(QRCodeImageProvider::genQrImage(code, &size).scaled(size.expandedTo(QSize(240, 240)), Qt::KeepAspectRatio), QClipboard::Clipboard);
clipboard->setImage(QRCodeImageProvider::genQrImage(code, &size).scaled(size.expandedTo(QSize(240, 240)), Qt::KeepAspectRatio), QClipboard::Selection);
}
void WalletManager::checkUpdatesAsync(
const QString &software,
const QString &subdir,

View File

@@ -174,14 +174,13 @@ public:
Q_INVOKABLE qint64 addi(qint64 x, qint64 y) const { return x + y; }
Q_INVOKABLE qint64 subi(qint64 x, qint64 y) const { return x - y; }
#ifndef DISABLE_PASS_STRENGTH_METER
Q_INVOKABLE double getPasswordStrength(const QString &password) const;
#endif
Q_INVOKABLE QString resolveOpenAlias(const QString &address) const;
Q_INVOKABLE bool parse_uri(const QString &uri, QString &address, QString &payment_id, uint64_t &amount, QString &tx_description, QString &recipient_name, QVector<QString> &unknown_parameters, QString &error) const;
Q_INVOKABLE QVariantMap parse_uri_to_object(const QString &uri) const;
Q_INVOKABLE bool saveQrCode(const QString &, const QString &) const;
Q_INVOKABLE void saveQrCodeToClipboard(const QString &) const;
Q_INVOKABLE void checkUpdatesAsync(
const QString &software,
const QString &subdir,

View File

@@ -1,4 +0,0 @@
file(GLOB_RECURSE SRC_SOURCES *.cpp)
file(GLOB_RECURSE SRC_HEADERS *.h)

View File

@@ -28,6 +28,7 @@
#pragma once
#include <string>
#include <vector>
#include <gcrypt.h>

View File

@@ -1,4 +1,3 @@
file(GLOB_RECURSE SRC_SOURCES *.cpp)
file(GLOB_RECURSE SRC_HEADERS *.h)
add_library(zxcvbn STATIC zxcvbn.c)
set_target_properties(zxcvbn PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(zxcvbn PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@@ -1,86 +0,0 @@
# zxcvbn-c
This is a C/C++ implementation of the zxcvbn password strength estimation.
The code is intended to be included as part of the source of a C/C++ program. Like the
original this code is for character sets which use single byte characters primarily in the
code range 0x20 to 0x7E.
The original coffee script version is available at
https://github.com/lowe/zxcvbn
An article on the reasons for zxcvbn is at
https://tech.dropox.com/2012/04/zxcvbn-realistic-password-strength-estimation
##Building
The makefile will build several test programs to test the code. It shows the steps needed
to use the code in C and C++ programs, using the dictionary data read from file or included
within the program executable.
The makefile has only been tried on Linux using GCC version 4.8.4, but should be faily
portable to other systems.
When dictionary data is included in your program's executable, the files `zxcvbn.c` ,
`zxcvbn.h` , `dict-src.h` are used in your program.
When dictionary data is read from file, the files `zxcvbn.c` , `zxcvbn.h` , `dict-crc.h`
and `zxcvbn.dict` are used in your program, compiled with `#define USE_DICT_FILE`. The CRC
of the dictionary data file is written to `dict-crc.h` so your executable can detect
corruption of the data.
Rename `zxcvbn.c` to `zxcvbn.cpp` (or whatever your compiler uses) to compile as C++.
The `dict*.h` and `zxcvbn.dict` files are generated by the dictgen program compiled from
dict-generate.cpp (see makefile for details).
##Using
Initially call `ZxcvbnInit()` with the pathname of the `zxcvbn.dict` file. This can be
omitted when dictionary data is included in the executable.
Call `ZxcvbnMatch()` with the password and optional user dictionary to get the entropy
estimation and optional information on the password parts (which will need freeing with
`ZxcvbnFreeInfo()` after use). Do this for each password to be tested, or as each character
of it is entered into your program. The optional user dictionary can change between each
call.
Finally call `ZxcvbnUninit()` to free the dictionary data from read from file. This can be
omitted when dictionary data is included in the executable.
Review the test program in `test.c` for an example.
## Differences from the original version.
The entropy calculated will sometimes differ from the original because of
* The UK keyboard layout is also included, so there are additional spacial sequences, e.g.
**;'#** is a spacial sequence.
* The different character classes in a password are taken into account when calculating the
strength of brute-force matches.
* Dijktra's path searching algorithm is used to combine parts of the entered password. This
can result in the found parts of the password being combined differently than the
original coffee script. E.g. the password **passwordassword**
is combined by the original coffee script as **p** (3.5 bits) + **asswordassword** (12.6
bits) + multiple part allowance (1.0bit) to give total entropy of 17.1 bits. This
implementation combines it as **password** (1.0 bit) + **assword** (11.6 bits) + multiple
part allowance (1.0bit) to give 13.6 bits.
* For multi part passwords the original coffee script version multiplies the number of
guesses needed by the factorial of the number of parts. This is not possible in this
version as Dijktra's algorithm is used. Instead one bit entropy is added for the part at the
end of the password, 1.7 bits for each part in the middle of a password and nothing
for the part at the beginning. This gives similar results compared to the coffee script
version when there are 4 or less parts, but will differ significantly when there are many
parts (which is likely to be a rare occurrence).
##References
The original coffee-script version is available at
https://github.com/lowe/zxcvbn
The dictionary words are taken from the original coffee script version.
Dictionary trie encoding (used for by the word lookup code) based on idea from the Caroline
Word Graph from
http://www.pathcom.com/~vadco/cwg.html

File diff suppressed because it is too large Load Diff

24867
src/zxcvbn-c/dict-src.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,104 +0,0 @@
CFLAGS ?= -O2 -Wall -Wextra -Wdeclaration-after-statement
CXXFLAGS ?= -O2 -Wall -Wextra
# default programs
CC ?= gcc
AR ?= ar
CXX ?= g++
# need zxcvbn.h prior to package installation
CPPFLAGS += -I.
# library metadata
TARGET_LIB = libzxcvbn.so.0.0.0
SONAME = libzxcvbn.so.0
WORDS = words-eng_wiki.txt words-female.txt words-male.txt words-passwd.txt words-surname.txt words-tv_film.txt
#all: test-file test-inline test-c++inline test-c++file test-shlib test-statlib
all: test-statlib
test-shlib: test.c $(TARGET_LIB)
if [ ! -e libzxcvbn.so ]; then ln -s $(TARGET_LIB) libzxcvbn.so; fi
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -L. $(LDFLAGS) libzxcvbn.so -lm
$(TARGET_LIB): zxcvbn-inline-pic.o
$(CC) $(CPPFLAGS) $(CFLAGS) \
-o $@ $^ -fPIC -shared -Wl,-soname,$(SONAME) $(LDFLAGS) -lm
if [ ! -e $(SONAME) ]; then ln -s $(TARGET_LIB) $(SONAME); fi
test-statlib: test.c libzxcvbn.a
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(LDFLAGS) -lm
libzxcvbn.a: zxcvbn-inline.o
$(AR) cvq $@ $^
test-file: test.c zxcvbn-file.o
$(CC) $(CPPFLAGS) $(CFLAGS) \
-DUSE_DICT_FILE -o test-file test.c zxcvbn-file.o $(LDFLAGS) -lm
zxcvbn-file.o: zxcvbn.c dict-crc.h zxcvbn.h
$(CC) $(CPPFLAGS) $(CFLAGS) \
-DUSE_DICT_FILE -c -o zxcvbn-file.o zxcvbn.c
test-inline: test.c zxcvbn-inline.o
$(CC) $(CPPFLAGS) $(CFLAGS) \
-o test-inline test.c zxcvbn-inline.o $(LDFLAGS) -lm
zxcvbn-inline-pic.o: zxcvbn.c dict-src.h zxcvbn.h
$(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -c -o $@ $<
zxcvbn-inline.o: zxcvbn.c dict-src.h zxcvbn.h
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o zxcvbn-inline.o zxcvbn.c
dict-src.h: dictgen $(WORDS)
./dictgen -o dict-src.h $(WORDS)
dict-crc.h: dictgen $(WORDS)
./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS)
dictgen: dict-generate.cpp makefile
$(CXX) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \
-o dictgen dict-generate.cpp $(LDFLAGS)
test-c++inline: test.c zxcvbn-c++inline.o
if [ ! -e test.cpp ]; then ln -s test.c test.cpp; fi
$(CXX) $(CPPFLAGS) $(CXXFLAGS) \
-o test-c++inline test.cpp zxcvbn-c++inline.o $(LDFLAGS) -lm
zxcvbn-c++inline.o: zxcvbn.c dict-src.h zxcvbn.h
if [ ! -e zxcvbn.cpp ]; then ln -s zxcvbn.c zxcvbn.cpp; fi
$(CXX) $(CPPFLAGS) $(CXXFLAGS) \
-c -o zxcvbn-c++inline.o zxcvbn.cpp
test-c++file: test.c zxcvbn-c++file.o
if [ ! -e test.cpp ]; then ln -s test.c test.cpp; fi
$(CXX) $(CPPFLAGS) $(CXXFLAGS) \
-DUSE_DICT_FILE -o test-c++file test.cpp zxcvbn-c++file.o $(LDFLAGS) -lm
zxcvbn-c++file.o: zxcvbn.c dict-crc.h zxcvbn.h
if [ ! -e zxcvbn.cpp ]; then ln -s zxcvbn.c zxcvbn.cpp; fi
$(CXX) $(CPPFLAGS) $(CXXFLAGS) \
-DUSE_DICT_FILE -c -o zxcvbn-c++file.o zxcvbn.cpp
test: test-file test-inline test-c++inline test-c++file test-shlib test-statlib testcases.txt
@echo Testing C build, dictionary from file
./test-file -t testcases.txt
@echo Testing C build, dictionary in executable
./test-inline -t testcases.txt
@echo Testing C shlib, dictionary in shlib
LD_LIBRARY_PATH=. ./test-shlib -t testcases.txt
@echo Testing C static lib, dictionary in lib
./test-statlib -t testcases.txt
@echo Testing C++ build, dictionary from file
./test-c++file -t testcases.txt
@echo Testing C++ build, dictionary in executable
./test-c++inline -t testcases.txt
@echo Finished
clean:
rm -f test-file zxcvbn-file.o test-c++file zxcvbn-c++file.o
rm -f test-inline zxcvbn-inline.o zxcvbn-inline-pic.o test-c++inline zxcvbn-c++inline.o
rm -f dict-*.h zxcvbn.dict zxcvbn.cpp test.cpp
rm -f dictgen
rm -f ${TARGET_LIB} ${SONAME} libzxcvbn.so test-shlib libzxcvbn.a test-statlib

View File

@@ -1,281 +0,0 @@
/**********************************************************************************
* Program to test the C implementation of the zxcvbn password strength estimator.
* Copyright (c) 2015, Tony Evans
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be
* used to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
**********************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
#include <zxcvbn.h>
const char *UsrDict[] =
{
"Onename.Twoname@example.com", "Onename", "Twoname", "example.com", "example",
0
};
static void CalcPass(const char *Pwd, int Quiet)
{
double e;
if (!Quiet)
{
/* Output the details of how the entropy figure was calculated */
int Len, ChkLen;
struct timeval t1, t2;
ZxcMatch_t *Info, *p;
double m = 0.0;
gettimeofday(&t1, 0);
e = ZxcvbnMatch(Pwd, UsrDict, &Info);
gettimeofday(&t2, 0);
for(p = Info; p; p = p->Next)
m += p->Entrpy;
Len = strlen(Pwd);
m = e - m;
printf("Pass %s \tLength %d\tEntropy bits=%.3f log10=%.3f\tMulti-word extra bits=%.1f\n", Pwd, Len, e, e * 0.301029996, m);
p = Info;
ChkLen = 0;
while(p)
{
int n;
switch((int)p->Type)
{
case BRUTE_MATCH: printf(" Type: Bruteforce "); break;
case DICTIONARY_MATCH: printf(" Type: Dictionary "); break;
case DICT_LEET_MATCH: printf(" Type: Dict+Leet "); break;
case USER_MATCH: printf(" Type: User Words "); break;
case USER_LEET_MATCH: printf(" Type: User+Leet "); break;
case REPEATS_MATCH: printf(" Type: Repeated "); break;
case SEQUENCE_MATCH: printf(" Type: Sequence "); break;
case SPATIAL_MATCH: printf(" Type: Spatial "); break;
case DATE_MATCH: printf(" Type: Date "); break;
case BRUTE_MATCH+MULTIPLE_MATCH: printf(" Type: Bruteforce(Rep)"); break;
case DICTIONARY_MATCH+MULTIPLE_MATCH: printf(" Type: Dictionary(Rep)"); break;
case DICT_LEET_MATCH+MULTIPLE_MATCH: printf(" Type: Dict+Leet(Rep) "); break;
case USER_MATCH+MULTIPLE_MATCH: printf(" Type: User Words(Rep)"); break;
case USER_LEET_MATCH+MULTIPLE_MATCH: printf(" Type: User+Leet(Rep) "); break;
case REPEATS_MATCH+MULTIPLE_MATCH: printf(" Type: Repeated(Rep) "); break;
case SEQUENCE_MATCH+MULTIPLE_MATCH: printf(" Type: Sequence(Rep) "); break;
case SPATIAL_MATCH+MULTIPLE_MATCH: printf(" Type: Spatial(Rep) "); break;
case DATE_MATCH+MULTIPLE_MATCH: printf(" Type: Date(Rep) "); break;
default: printf(" Type: Unknown%d ", p->Type); break;
}
ChkLen += p->Length;
printf(" Length %d Entropy %6.3f (%.2f) ", p->Length, p->Entrpy, p->Entrpy * 0.301029996);
for(n = 0; n < p->Length; ++n, ++Pwd)
printf("%c", *Pwd);
printf("\n");
p = p->Next;
}
ZxcvbnFreeInfo(Info);
t2.tv_sec -= t1.tv_sec;
t2.tv_usec -= t1.tv_usec;
t2.tv_usec += t2.tv_sec * 1000000;
printf(" Calculation Time %.2fms\n", t2.tv_usec/1000.0);
if (ChkLen != Len)
printf("*** Password length (%d) != sum of length of parts (%d) ***\n", Len, ChkLen);
}
else
{
/* Only get the final entropy figure */
e = ZxcvbnMatch(Pwd, UsrDict, 0);
printf("Pass %s \tEntropy %.3f\n", Pwd, e);
}
}
int DoChecks(char *file)
{
char Line[500];
int y = 0;
int w = 0;
int r = 0;
FILE *f = fopen(file, "r");
if (f == NULL)
{
printf("Failed to open %s\n", file);
return 1;
}
memset(Line, 0, sizeof Line);
while(fgets(Line, sizeof Line - 4, f))
{
/* Line is password + whitespace + expected entropy */
char *Pwd, *s, *t;
double Ent, e, x;
unsigned int i;
++y;
for(i = 0; i < sizeof Line - 5; ++i)
{
if (!Line[i] || (Line[i] == '\n'))
break;
}
/* Skip blank lines or those starting with # */
if ((i < 3) || (Line[0] == '#'))
continue;
memset(Line + i, 0, 4);
Pwd = Line;
/* Skip leading whitespace */
while(*Pwd && (*Pwd <= ' '))
++Pwd;
/* Make password null termnated */
s = Pwd;
t = strchr(s, '\t');
if (t == NULL)
t = strstr(s, " ");
if (t == NULL)
{
printf("Bad test condition on line %d\n", y);
r = 1;
break;
}
*t++ = 0;
/* Skip whitespace before entropy value */
while(*t && (*t <= ' '))
++t;
if (!*t)
{
printf("Bad test condition on line %d\n", y);
r = 1;
break;
}
Ent = atof(t);
if ((Ent < 0.0) || (Ent > 1000.0))
{
printf("Bad entropy value on line %d\n", y);
r = 1;
break;
}
e = ZxcvbnMatch(Pwd, UsrDict, 0);
x = e / Ent;
/* More than 1% difference is a fail. */
if ((x > 1.01) || (x < 1.0/1.01))
{
printf("Line %2d Calculated entropy %5.2f, expected %5.2f <%s>\n", y, e, Ent, Pwd);
r = 1;
break;
}
++w;
}
fclose(f);
if (!r)
printf("Tested %d words\n", w);
return r;
}
int main(int argc, char **argv)
{
int i, Quiet, Checks, White;
Quiet = 0;
Checks = 0;
White = 0;
if (!ZxcvbnInit("zxcvbn.dict"))
{
printf("Failed to open dictionary file\n");
return 1;
}
if ((argc > 1) && (argv[1][0] == '-'))
{
if (!strcmp(argv[1], "-qs") || !strcmp(argv[1], "-sq"))
Quiet = White = 1;
if (!strcmp(argv[1], "-t"))
Checks = 1;
if (!strcmp(argv[1], "-q"))
Quiet = 1;
if (!strcmp(argv[1], "-s"))
White = 1;
if ((Checks + Quiet + White) == 0)
{
char *s = strrchr(argv[0], '/');
if (s == NULL)
s = argv[0];
else
++s;
printf( "Usage: %s [ -q | -qs ] [ pwd1 pwd2 ... ]\n"
" Output entropy of given passwords. If no passwords on command line read\n"
" them from stdin.\n"
" -q option stops password analysis details from being output.\n"
" -s Ignore anything from space on a line when reading from stdin.\n"
" %s -t file\n"
" Read the file and check for correct results.\n", s, s);
return 1;
}
}
if (Checks)
{
for(i = 2; i < argc; ++i)
{
Checks = DoChecks(argv[i]);
if (Checks)
return 1;
}
return 0;
}
i = 1+Quiet;
if (i >= argc)
{
/* No test passwords on command line, so get them from stdin */
char Line[500];
while(fgets(Line, sizeof Line, stdin))
{
/* Drop the trailing newline character */
for(i = 0; i < (int)(sizeof Line - 1); ++i)
{
if (Line[i] < ' ')
{
Line[i] = 0;
break;
}
if (White && (Line[i] == ' '))
{
Line[i] = 0;
break;
}
}
if (Line[0])
CalcPass(Line, Quiet);
}
}
else
{
/* Do the test passwords on the command line */
for(; i < argc; ++i)
{
CalcPass(argv[i], Quiet);
}
}
ZxcvbnUnInit();
return 0;
}

View File

@@ -1,62 +0,0 @@
zxcvbn 5.83
qwER43@! 26.44
Tr0ub4dour&3 30.87
archi 13.61
D0g.................. 19.02
abcdefghijk987654321 8.53
neverforget13/3/1997 34.86
1qaz2wsx3edc 9.98
barbarbara 12.43
abarbarbara 16.18
temppass22 17.20
briansmith 5.32
htimsnairb 6.07
briansmith4mayor 21.63
password1 4.0
viking 7.93
thx1138 7.70
ScoRpi0ns 19.54
do you know 25.51
ryanhunter2000 20.8
rianhunter2000 28.25
asdfghju7654rewq 29.57
AOEUIDHG&*()LS_ 33.33
12345678 1.59
defghi6789 13.61
02468 3.32
adgjmpsvy 4.17
rosebud 8.09
Rosebud 9.09
ROSEBUD 9.09
rosebuD 9.09
R0$38uD 12.09
ros3bud99 14.41
r0s3bud99 14.41
R0$38uD99 17.41
verlineVANDERMARK 27.24
eheuczkqyq 41.24
rWibMFACxAUGZmxhVncy 111.0
illness 11.26
1llness 12.26
i1lness 12.84
11lness 22.44
ssenl1i 12.84
Ba9ZyWABu99[BK#6MBgbH88Tofv)vs$w 171.63
correcthorsebatterystaple 47.98
elpatsyrettabesrohtcerroc 48.98
coRrecth0rseba++ery9.23.2007staple$ 71.95
pass.word.pass.word.pass.word. 60.41
passpasswordword 17.28
quvpzquvpz 24.50
magicfavoriteunclepromisedpublicbotherislandjimseriouslycellleadknowingbrokenadvicesomehowpaidblairlosingpushhelpedkillingusuallyearlierbosslaurabeginninglikedinnocentdocruleselizabethsabrinasummerexcoplearnedthirtyrisklettingphillipspeakingofficerridiculoussupportafternoonericwithsobutallwellareheohaboutrightyou're 545.9

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -82,6 +82,7 @@ Rectangle {
property var m_wallet;
property alias wizardState: wizardStateView.state
property alias wizardStateView: wizardStateView
property alias wizardStackView: stackView
property int wizardSubViewWidth: 780
property int wizardSubViewTopMargin: persistentSettings.customDecorations ? 90 : 32

View File

@@ -45,11 +45,14 @@ Rectangle {
property string viewName: "wizardCreateDevice1"
property var deviceName: deviceNameModel.get(deviceNameDropdown.currentIndex).column2
property var ledgerType: deviceName == "Ledger" ? deviceNameModel.get(deviceNameDropdown.currentIndex).column1 : null
property var hardwareWalletType: wizardCreateDevice1.deviceName;
ListModel {
id: deviceNameModel
ListElement { column1: qsTr("Choose your hardware device"); column2: "";}
ListElement { column1: "Ledger Nano S/X"; column2: "Ledger";}
ListElement { column1: qsTr("Choose your hardware wallet"); column2: "";}
ListElement { column1: "Ledger Nano S"; column2: "Ledger";}
ListElement { column1: "Ledger Nano X"; column2: "Ledger";}
ListElement { column1: "Trezor Model T"; column2: "Trezor";}
}
@@ -78,35 +81,88 @@ Rectangle {
id: walletInput
}
ColumnLayout {
RowLayout {
id: mainRow
spacing: 0
Layout.topMargin: 10
Layout.topMargin: -10
Layout.fillWidth: true
MoneroComponents.RadioButton {
id: newDeviceWallet
text: qsTr("Create a new wallet from device.") + translationManager.emptyString
fontSize: 16
checked: true
onClicked: {
checked = true;
restoreDeviceWallet.checked = false;
wizardController.walletOptionsDeviceIsRestore = false;
}
}
ColumnLayout {
id: leftColumn
Layout.fillWidth: true
Layout.alignment: Qt.AlignTop
MoneroComponents.RadioButton {
id: restoreDeviceWallet
Layout.topMargin: 10
text: qsTr("Restore a wallet from device. Use this if you used your hardware wallet before.") + translationManager.emptyString
fontSize: 16
checked: false
onClicked: {
checked = true;
newDeviceWallet.checked = false;
wizardController.walletOptionsDeviceIsRestore = true;
}
}
MoneroComponents.TextPlain {
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
color: MoneroComponents.Style.defaultFontColor
wrapMode: Text.Wrap
Layout.fillWidth: true
text: qsTr("Hardware wallet model")
}
MoneroComponents.StandardDropdown {
id: deviceNameDropdown
dataModel: deviceNameModel
Layout.preferredWidth: 450
Layout.topMargin: 6
z: 3
}
MoneroComponents.RadioButton {
id: newDeviceWallet
Layout.topMargin: 20
text: qsTr("Create a new wallet from device.") + translationManager.emptyString
fontSize: 16
checked: true
onClicked: {
checked = true;
restoreDeviceWallet.checked = false;
wizardController.walletOptionsDeviceIsRestore = false;
}
}
MoneroComponents.RadioButton {
id: restoreDeviceWallet
Layout.topMargin: 10
text: qsTr("Restore a wallet from device. Use this if you used your hardware wallet before.") + translationManager.emptyString
fontSize: 16
checked: false
onClicked: {
checked = true;
newDeviceWallet.checked = false;
wizardController.walletOptionsDeviceIsRestore = true;
}
}
}
ColumnLayout {
id: rightColumn
Layout.alignment: Qt.AlignTop
Layout.preferredWidth: 305
Layout.minimumWidth: 120
Layout.preferredHeight: 165
Layout.maximumHeight: 165
Layout.leftMargin: 10
Layout.rightMargin: 10
Rectangle {
color: "transparent"
Layout.fillWidth: true
Layout.fillHeight: true
Layout.topMargin: 0
Image {
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
source: hardwareWalletType == "Trezor" ? "qrc:///images/trezor.png" : hardwareWalletType == "Ledger" ? (ledgerType == "Ledger Nano S" ? "qrc:///images/ledgerNanoS.png" : "qrc:///images/ledgerNanoX.png") : ""
z: parent.z + 1
width: parent.width
height: 165
fillMode: Image.PreserveAspectFit
mipmap: true
}
}
}
}
ColumnLayout {
@@ -127,14 +183,6 @@ Rectangle {
text: "0"
}
MoneroComponents.StandardDropdown {
id: deviceNameDropdown
dataModel: deviceNameModel
Layout.fillWidth: true
Layout.topMargin: 6
z: 3
}
CheckBox2 {
id: showAdvancedCheckbox
checked: false
@@ -183,15 +231,8 @@ Rectangle {
wizardController.walletOptionsDeviceName = wizardCreateDevice1.deviceName;
if(lookahead.text)
wizardController.walletOptionsSubaddressLookahead = lookahead.text;
var _restoreHeight = 0;
if(restoreHeight.text){
// Parse date string or restore height as integer
if(restoreHeight.text.indexOf('-') === 4 && restoreHeight.text.length === 10){
_restoreHeight = Wizard.getApproximateBlockchainHeight(restoreHeight.text, Utils.netTypeToString());
} else {
_restoreHeight = parseInt(restoreHeight.text)
}
wizardController.walletOptionsRestoreHeight = _restoreHeight;
wizardController.walletOptionsRestoreHeight = Utils.parseDateStringOrRestoreHeightAsInteger(restoreHeight.text);
}
wizardController.walletCreatedFromDevice.connect(onCreateWalletFromDeviceCompleted);

View File

@@ -71,7 +71,7 @@ Rectangle {
ColumnLayout {
spacing: 0
Layout.topMargin: 10
Layout.topMargin: -10
Layout.fillWidth: true
MoneroComponents.LineEditMulti {

View File

@@ -43,7 +43,6 @@ ColumnLayout {
Text {
text: title
Layout.fillWidth: true
font.family: MoneroComponents.Style.fontRegular.name
color: MoneroComponents.Style.defaultFontColor
opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.8
@@ -59,11 +58,16 @@ ColumnLayout {
leftPadding: 0
topPadding: 0
bottomPadding: 0
Rectangle {
anchors.fill: parent
color: parent.parent.focus ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
}
}
Text {
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Layout.alignment: Qt.AlignLeft
visible: parent.subtitle !== ""
color: MoneroComponents.Style.dimmedFontColor
@@ -81,5 +85,10 @@ ColumnLayout {
wrapMode: Text.WordWrap
leftPadding: 0
topPadding: 0
Rectangle {
anchors.fill: parent
color: parent.parent.focus ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
}
}
}

View File

@@ -120,6 +120,7 @@ Rectangle {
onMenuClicked: {
wizardStateView.state = "wizardOpenWallet1"
wizardStateView.wizardOpenWallet1View.pageRoot.forceActiveFocus();
}
}
@@ -181,43 +182,36 @@ Rectangle {
columns: 4
columnSpacing: 20
Layout.fillWidth: true
Layout.topMargin: 10
ColumnLayout {
Layout.topMargin: 4
MoneroComponents.StandardDropdown {
id: networkTypeDropdown
currentIndex: persistentSettings.nettype
dataModel: networkTypeModel
Layout.maximumWidth: 180
labelText: qsTr("Network") + ":" + translationManager.emptyString
labelFontSize: 14
MoneroComponents.Label {
text: qsTr("Change Network:") + translationManager.emptyString
fontSize: 14
}
MoneroComponents.StandardDropdown {
id: networkTypeDropdown
currentIndex: persistentSettings.nettype
dataModel: networkTypeModel
Layout.fillWidth: true
Layout.maximumWidth: 180
Layout.topMargin: 5
onChanged: {
var item = dataModel.get(currentIndex).nettype.toLowerCase();
if(item === "mainnet") {
persistentSettings.nettype = NetworkType.MAINNET
} else if(item === "stagenet"){
persistentSettings.nettype = NetworkType.STAGENET
} else if(item === "testnet"){
persistentSettings.nettype = NetworkType.TESTNET
}
appWindow.disconnectRemoteNode()
onChanged: {
var item = dataModel.get(currentIndex).nettype.toLowerCase();
if(item === "mainnet") {
persistentSettings.nettype = NetworkType.MAINNET
} else if(item === "stagenet"){
persistentSettings.nettype = NetworkType.STAGENET
} else if(item === "testnet"){
persistentSettings.nettype = NetworkType.TESTNET
}
appWindow.disconnectRemoteNode()
}
}
MoneroComponents.LineEdit {
id: kdfRoundsText
Layout.fillWidth: true
Layout.maximumWidth: 180
labelText: qsTr("Number of KDF rounds:") + translationManager.emptyString
labelFontSize: 14
fontSize: 16
placeholderFontSize: 16
placeholderText: "0"
validator: IntValidator { bottom: 1 }

View File

@@ -36,6 +36,8 @@ import "../components" as MoneroComponents
RowLayout {
id: menuNav
property alias progressEnabled: wizardProgress.visible
property var btnPrevKeyNavigationBackTab: btnNext
property var btnNextKeyNavigationTab: btnPrev
property int progressSteps: 0
property int progress: 0
property bool autoTransition: true
@@ -77,7 +79,18 @@ RowLayout {
onClicked: {
menuNav.m_prevClicked();
menuNav.prevClicked();
focus = false;
}
Accessible.role: Accessible.Button
Accessible.name: text
KeyNavigation.up: btnPrevKeyNavigationBackTab
KeyNavigation.backtab: btnPrevKeyNavigationBackTab
KeyNavigation.down: wizardProgress.visible ? wizardProgress
: btnNext.visible && btnNext.enabled ? btnNext
: btnNextKeyNavigationTab
KeyNavigation.tab: wizardProgress.visible ? wizardProgress
: btnNext.visible && btnNext.enabled ? btnNext
: btnNextKeyNavigationTab
}
}
@@ -101,6 +114,17 @@ RowLayout {
// @TODO: Qt 5.10+ replace === with <=
color: index === menuNav.progress ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.progressBarBackgroundColor
}
Accessible.role: Accessible.Indicator
Accessible.name: qsTr("Step (%1) of (%2)").arg(currentIndex + 1).arg(count) + translationManager.emptyString
KeyNavigation.up: btnPrev
KeyNavigation.backtab: btnPrev
KeyNavigation.down: btnNext
KeyNavigation.tab: btnNext
Rectangle {
anchors.fill: parent
color: wizardProgress.focus ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
}
}
}
@@ -119,7 +143,14 @@ RowLayout {
onClicked: {
menuNav.m_nextClicked();
menuNav.nextClicked();
focus = false;
}
Accessible.role: Accessible.Button
Accessible.name: text
KeyNavigation.up: wizardProgress.visible ? wizardProgress : btnPrev
KeyNavigation.backtab: wizardProgress.visible ? wizardProgress : btnPrev
KeyNavigation.down: btnNextKeyNavigationTab
KeyNavigation.tab: btnNextKeyNavigationTab
}
}
}

View File

@@ -45,6 +45,7 @@ Rectangle {
color: "transparent"
property alias pageHeight: pageRoot.height
property alias pageRoot: pageRoot
property string viewName: "wizardOpenWallet1"
property int walletCount: walletKeysFilesModel.rowCount()
@@ -58,6 +59,7 @@ Rectangle {
width: parent.width - 100
Layout.fillWidth: true
anchors.horizontalCenter: parent.horizontalCenter;
KeyNavigation.tab: openWalletFromFileHeader
spacing: 0
@@ -69,8 +71,15 @@ Rectangle {
spacing: 10
WizardHeader {
id: openWalletFromFileHeader
title: qsTr("Open a wallet from file") + translationManager.emptyString
subtitle: qsTr("Import an existing .keys wallet file from your computer.") + translationManager.emptyString
Accessible.role: Accessible.StaticText
Accessible.name: title + ". " + subtitle
Keys.onUpPressed: wizardNav.btnNext.forceActiveFocus();
Keys.onBacktabPressed: wizardNav.btnNext.forceActiveFocus();
Keys.onDownPressed: recentList.itemAt(0).forceActiveFocus();
Keys.onTabPressed: recentList.itemAt(0).forceActiveFocus();
}
GridLayout {
@@ -122,6 +131,27 @@ Rectangle {
Layout.minimumWidth: flow.itemHeight
Layout.preferredHeight: parent.height
function moveUp(itemIndex) {
if (itemIndex == 0) {
openWalletFromFileHeader.forceActiveFocus();
} else {
recentList.itemAt(itemIndex - 1).forceActiveFocus();
}
}
function moveDown(itemIndex) {
if (itemIndex + 1 == recentList.count) {
wizardNav.btnPrev.forceActiveFocus();
} else {
recentList.itemAt(itemIndex + 1).forceActiveFocus();
}
}
function openSelectedWalletFile(networktype, path) {
persistentSettings.nettype = parseInt(networktype);
wizardController.openWalletFile(path);
}
delegate: Rectangle {
// inherited roles from walletKeysFilesModel:
// index, fileName, modified, accessed, path, networktype, address
@@ -138,7 +168,24 @@ Rectangle {
else if(networktype === 2) return qsTr("Stagenet");
return "";
}
color: "transparent"
color: item.focus || itemMouseArea.containsMouse ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
border.width: item.focus ? 3 : 0
border.color: MoneroComponents.Style.inputBorderColorActive
Accessible.role: Accessible.ListItem
Accessible.name: {
if (networktype === 0) var networkTypeText = qsTr("Mainnet wallet") + translationManager.emptyString;
if (networktype === 1) var networkTypeText = qsTr("Testnet wallet") + translationManager.emptyString;
if (networktype === 2) var networkTypeText = qsTr("Stagenet wallet") + translationManager.emptyString;
return fileName + ". " + networkTypeText;
}
Keys.onUpPressed: recentList.moveUp(index);
Keys.onBacktabPressed: recentList.moveUp(index);
Keys.onDownPressed: recentList.moveDown(index);
Keys.onTabPressed: recentList.moveDown(index);
Keys.onEnterPressed: recentList.openSelectedWalletFile(networktype, path);
Keys.onReturnPressed: recentList.openSelectedWalletFile(networktype, path);
Rectangle {
height: 1
@@ -257,21 +304,11 @@ Rectangle {
}
MouseArea {
id: itemMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: {
parent.color = MoneroComponents.Style.titleBarButtonHoverColor;
}
onExited: {
parent.color = "transparent";
}
onClicked: {
persistentSettings.nettype = parseInt(networktype)
wizardController.openWalletFile(path);
}
onClicked: recentList.openSelectedWalletFile(networktype, path);
}
}
}
@@ -282,11 +319,15 @@ Rectangle {
}
WizardNav {
id: wizardNav
Layout.topMargin: 0
progressEnabled: false
btnPrev.text: qsTr("Back to menu") + translationManager.emptyString
btnNext.text: qsTr("Browse filesystem") + translationManager.emptyString
btnNext.visible: true
btnPrevKeyNavigationBackTab: recentList.itemAt(recentList.count - 1)
btnNextKeyNavigationTab: openWalletFromFileHeader
onPrevClicked: {
wizardStateView.state = "wizardHome";
}

View File

@@ -111,7 +111,7 @@ Rectangle {
}
RowLayout {
Layout.topMargin: 10
Layout.topMargin: -10
spacing: 30
Layout.fillWidth: true
@@ -314,16 +314,8 @@ Rectangle {
break;
}
var _restoreHeight = 0;
if(restoreHeight.text){
// Parse date string or restore height as integer
if(restoreHeight.text.indexOf('-') === 4 && restoreHeight.text.length === 10){
_restoreHeight = Wizard.getApproximateBlockchainHeight(restoreHeight.text, Utils.netTypeToString());
} else {
_restoreHeight = parseInt(restoreHeight.text)
}
wizardController.walletOptionsRestoreHeight = _restoreHeight;
wizardController.walletOptionsRestoreHeight = Utils.parseDateStringOrRestoreHeightAsInteger(restoreHeight.text);
}
wizardStateView.state = "wizardRestoreWallet2";

View File

@@ -65,7 +65,7 @@ Rectangle {
WizardNav {
Layout.topMargin: 24
btnNextText: "Open wallet"
btnNextText: qsTr("Create wallet") + translationManager.emptyString
progressSteps: appWindow.walletMode <= 1 ? 3 : 4
progress: appWindow.walletMode <= 1 ? 2 : 3

View File

@@ -30,22 +30,24 @@ import QtQuick 2.9
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.0
import FontAwesome 1.0
import "../js/Wizard.js" as Wizard
import "../components"
import "../components" as MoneroComponents
GridLayout {
id: grid
Layout.fillWidth: true
property alias walletName: walletName
property alias walletLocation: walletLocation
columnSpacing: 20
columns: 3
columns: 2
function verify() {
if(walletName.text !== '' && walletLocation.text !== ''){
if(!walletName.error){
if (walletName.text !== '' && walletLocation.text !== '') {
if (!walletName.error && !walletLocation.error) {
return true;
}
}
@@ -54,26 +56,41 @@ GridLayout {
function reset() {
walletName.error = !walletName.verify();
walletLocation.error = walletLocation.text === "";
walletLocation.error = !walletLocation.verify();
walletLocation.text = appWindow.accountsDir;
walletName.text = defaultAccountName;
walletName.text = Wizard.unusedWalletName(appWindow.accountsDir, defaultAccountName, walletManager);
}
MoneroComponents.LineEdit {
id: walletName
Layout.fillWidth: true
Layout.preferredWidth: grid.width/5
function verify(){
if(walletLocation === "" || /[\\\/]/.test(walletName.text)) return false;
var exists = Wizard.walletPathExists(appWindow.accountsDir, walletLocation.text, walletName.text, isIOS, walletManager);
return !exists && walletLocation.error === false;
if (walletName.text === "") {
errorMessageWalletName.text = qsTr("Wallet name is empty") + translationManager.emptyString;
return false;
}
if (/[\\\/]/.test(walletName.text)) {
errorMessageWalletName.text = qsTr("Wallet name is invalid") + translationManager.emptyString;
return false;
}
if (walletLocation.text !== "") {
var walletAlreadyExists = Wizard.walletPathExists(appWindow.accountsDir, walletLocation.text, walletName.text, isIOS, walletManager);
if (walletAlreadyExists) {
errorMessageWalletName.text = qsTr("Wallet already exists") + translationManager.emptyString;
return false;
}
}
errorMessageWalletName.text = "";
return true;
}
labelText: qsTr("Wallet name") + translationManager.emptyString
labelFontSize: 14
fontSize: 16
placeholderFontSize: 16
placeholderText: "-"
placeholderText: ""
errorWhenEmpty: true
text: defaultAccountName
onTextChanged: walletName.error = !walletName.verify();
@@ -82,20 +99,37 @@ GridLayout {
MoneroComponents.LineEdit {
id: walletLocation
Layout.fillWidth: true
Layout.preferredWidth: grid.width/3
function verify() {
if (walletLocation.text == "") {
errorMessageWalletLocation.text = qsTr("Wallet location is empty") + translationManager.emptyString;
return false;
}
errorMessageWalletLocation.text = "";
return true;
}
labelText: qsTr("Wallet location") + translationManager.emptyString
labelFontSize: 14
placeholderText: "..."
fontSize: 16
placeholderText: ""
placeholderFontSize: 16
errorWhenEmpty: true
text: appWindow.accountsDir + "/"
onTextChanged: {
walletLocation.error = walletLocation.text === "";
walletLocation.error = !walletLocation.verify();
walletName.error = !walletName.verify();
}
Component.onCompleted: walletLocation.error = !walletLocation.verify();
MoneroComponents.InlineButton {
small: true
text: qsTr("Browse") + translationManager.emptyString
fontFamily: FontAwesome.fontFamilySolid
fontStyleName: "Solid"
fontPixelSize: 18
text: FontAwesome.folderOpen
tooltip: qsTr("Browse") + translationManager.emptyString
tooltipLeft: true
onClicked: {
fileWalletDialog.folder = walletManager.localPathToUrl(walletLocation.text)
fileWalletDialog.open()
@@ -118,4 +152,50 @@ GridLayout {
fileWalletDialog.visible = false;
}
}
RowLayout {
Layout.preferredWidth: grid.width/5
MoneroComponents.TextPlain {
visible: errorMessageWalletName.text != ""
font.family: FontAwesome.fontFamilySolid
font.styleName: "Solid"
font.pixelSize: 15
text: FontAwesome.exclamationCircle
color: "#FF0000"
themeTransition: false
}
MoneroComponents.TextPlain {
id: errorMessageWalletName
textFormat: Text.PlainText
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
color: "#FF0000"
themeTransition: false
}
}
RowLayout {
Layout.preferredWidth: grid.width/3
MoneroComponents.TextPlain {
visible: errorMessageWalletLocation.text != ""
font.family: FontAwesome.fontFamilySolid
font.styleName: "Solid"
font.pixelSize: 15
text: FontAwesome.exclamationCircle
color: "#FF0000"
themeTransition: false
}
MoneroComponents.TextPlain {
id: errorMessageWalletLocation
textFormat: Text.PlainText
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
color: "#FF0000"
themeTransition: false
}
}
}