From e8cd96c779186eb75f9341ab9cf2ac642261763a Mon Sep 17 00:00:00 2001 From: Anton Chupak Date: Tue, 13 Nov 2018 18:46:09 +0200 Subject: [PATCH] add copy-wallet button --- src/gui/qt-daemon/html/files/copy-content.svg | 7 ++++++ src/gui/qt-daemon/html/files/main.js | 5 ++++ src/gui/qt-daemon/html/files/style.css | 25 ++++++++++++++----- src/gui/qt-daemon/html/index.html | 6 ++++- 4 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 src/gui/qt-daemon/html/files/copy-content.svg diff --git a/src/gui/qt-daemon/html/files/copy-content.svg b/src/gui/qt-daemon/html/files/copy-content.svg new file mode 100644 index 00000000..681ab303 --- /dev/null +++ b/src/gui/qt-daemon/html/files/copy-content.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/src/gui/qt-daemon/html/files/main.js b/src/gui/qt-daemon/html/files/main.js index 29cab9de..a702ff87 100644 --- a/src/gui/qt-daemon/html/files/main.js +++ b/src/gui/qt-daemon/html/files/main.js @@ -441,6 +441,11 @@ function on_close_wallet() Qt_parent.close_wallet(); } +function on_copy_wallet () { + var $addressValue = $('#wallet_address').text(); + Qt_parent.place_to_clipboard($addressValue); + alert('Wallet address was copy.') +} var last_timerId; diff --git a/src/gui/qt-daemon/html/files/style.css b/src/gui/qt-daemon/html/files/style.css index 4fdc3fda..bb461aff 100644 --- a/src/gui/qt-daemon/html/files/style.css +++ b/src/gui/qt-daemon/html/files/style.css @@ -445,12 +445,6 @@ span.daemon_view_general_status_value_fail_text animation-iteration-count: infinite; } -#close_wallet_button_id -{ - float: right; - margin-left: 480px; -} - .details { margin-top: 35px; padding-bottom: 12px; @@ -743,6 +737,25 @@ input:focus { .btn:focus { outline: none; } + +.btn-icon { + position: relative; + top: 8px; + margin-right: 10px; + display: inline-block; + width: 22px; + height: 22px; + background-image: url('../files/copy-content.svg'); + background-size: cover; + background-position: center; + cursor: pointer; +} + +.btn-group { + float: right; + margin-left: 480px; +} + .wrap { width: 50%; } diff --git a/src/gui/qt-daemon/html/index.html b/src/gui/qt-daemon/html/index.html index 98bdf46f..a0b191e2 100644 --- a/src/gui/qt-daemon/html/index.html +++ b/src/gui/qt-daemon/html/index.html @@ -123,7 +123,11 @@ done-icon Synced -
Close wallet
+ +
+ +
Close wallet
+