Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ui Feature: Global search #1832

Open
wants to merge 132 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
660faa7
working search field, no functionality
relativisticelectron Jul 10, 2022
89ddef2
working data structure
relativisticelectron Jul 10, 2022
44d4571
rough but working....
relativisticelectron Jul 10, 2022
9c64aa1
color reset works
relativisticelectron Jul 10, 2022
19dd23f
working solution for visibility based on url
relativisticelectron Jul 10, 2022
27245c7
extened to recieve
relativisticelectron Jul 10, 2022
5b300c6
partial address search
relativisticelectron Jul 10, 2022
13030a3
working tx search
relativisticelectron Jul 10, 2022
f1fcc61
working tx filter
relativisticelectron Jul 11, 2022
e49523f
bugfix
relativisticelectron Jul 11, 2022
fd06496
change and recieve sub highlighting works
relativisticelectron Jul 11, 2022
6699990
unsigned psbt search works
relativisticelectron Jul 11, 2022
263b3fd
changed to POST and device key search working
relativisticelectron Jul 11, 2022
487c249
fixed persistent color
relativisticelectron Jul 11, 2022
d5705f2
utxo search
relativisticelectron Jul 11, 2022
56bd036
lower case comparision and better keys highlighting
relativisticelectron Jul 11, 2022
c4ac959
corrected tx list call
relativisticelectron Jul 11, 2022
f051ab0
styling
relativisticelectron Jul 11, 2022
4cdc69e
styling
relativisticelectron Jul 11, 2022
176f81b
added search for wallet names
relativisticelectron Jul 11, 2022
893091f
better styling
relativisticelectron Jul 11, 2022
6458fcc
fix for strip
relativisticelectron Jul 11, 2022
3367005
working search delay to avoid lagging while rappidly typing
relativisticelectron Jul 11, 2022
391a5cf
doc
relativisticelectron Jul 11, 2022
52b121b
pytest fix
relativisticelectron Jul 12, 2022
5a72501
moved search bar to sidebar
relativisticelectron Jul 12, 2022
387f8e1
fix
relativisticelectron Jul 12, 2022
2017ffc
bugfix
relativisticelectron Jul 12, 2022
663e47a
title added
relativisticelectron Jul 12, 2022
4efe607
Merge remote-tracking branch 'cryptoadvance/master' into 20220710_search
relativisticelectron Jul 14, 2022
c903da4
moved robust_json_dumps
relativisticelectron Jul 15, 2022
f1c763a
Merge remote-tracking branch 'cryptoadvance/master' into 20220710_search
relativisticelectron Jul 15, 2022
284fd74
Merge branch 'master' into 20220710_search
relativisticelectron Aug 1, 2022
55d1378
added notes for dropdown
relativisticelectron Aug 1, 2022
008baab
Merge remote-tracking branch 'cryptoadvance/master' into 20220801_sea…
relativisticelectron Aug 2, 2022
ca44d2e
working template and class
relativisticelectron Aug 2, 2022
9792e7a
better
relativisticelectron Aug 2, 2022
b2c2a0d
add title
relativisticelectron Aug 2, 2022
c5d9a26
better
relativisticelectron Aug 2, 2022
0c1bf86
working endpoints for utxo
relativisticelectron Aug 2, 2022
0dbad31
working for change addresses
relativisticelectron Aug 2, 2022
7f002ec
slow...
relativisticelectron Aug 2, 2022
a45d90a
fast
relativisticelectron Aug 2, 2022
d6358f5
optimized
relativisticelectron Aug 2, 2022
5da31fd
working fully
relativisticelectron Aug 2, 2022
46dfb0d
refactor
relativisticelectron Aug 2, 2022
28fbd05
better
relativisticelectron Aug 2, 2022
e853d04
clickable div
relativisticelectron Aug 2, 2022
3aff57d
better hiding
relativisticelectron Aug 2, 2022
7ab7ae8
fix for emptying the search field fast
relativisticelectron Aug 2, 2022
19a6fc4
many optimizations and UI improvements
relativisticelectron Aug 3, 2022
b690ce9
better formatting
relativisticelectron Aug 3, 2022
24b49ec
formatting and result limiting
relativisticelectron Aug 3, 2022
071a1c5
user awareness
relativisticelectron Aug 3, 2022
2e608fd
added force option
relativisticelectron Aug 3, 2022
0b42f76
better title
relativisticelectron Aug 3, 2022
2b98bf6
restructuring to mnake the search results less convoluted
relativisticelectron Aug 3, 2022
3e2e514
cleanup
relativisticelectron Aug 3, 2022
631b529
added endpoints to test
relativisticelectron Aug 3, 2022
cfc7d7e
cleanup
relativisticelectron Aug 3, 2022
be9d3b3
better highlighting
relativisticelectron Aug 3, 2022
0c1c2ae
Merge remote-tracking branch 'cryptoadvance/master' into 20220801_sea…
relativisticelectron Aug 3, 2022
a029c62
Merge remote-tracking branch 'cryptoadvance/master' into 20220801_sea…
relativisticelectron Aug 9, 2022
b6d2bb3
more compact recursive search in structure
relativisticelectron Aug 9, 2022
0b075b1
doc
relativisticelectron Aug 9, 2022
ed61c92
added endpoint class
relativisticelectron Aug 10, 2022
fba238c
post request doesn't reload page
relativisticelectron Aug 10, 2022
b74c8dd
working endpoint
relativisticelectron Aug 10, 2022
a3746e1
doc
relativisticelectron Aug 10, 2022
9b09b57
Merge branch '20220810_try_with_endpoints' into 20220801_search_list
relativisticelectron Aug 10, 2022
1790401
remove print
relativisticelectron Aug 10, 2022
8fe1ec2
Merge remote-tracking branch 'cryptoadvance/master' into 20220801_sea…
relativisticelectron Aug 10, 2022
51dfbf3
added generators
relativisticelectron Aug 10, 2022
0d040d6
fixed bug with javascript loop var
relativisticelectron Aug 10, 2022
63967b2
simplified recursion massively, and made more robust
relativisticelectron Aug 10, 2022
1730e39
fix bug and simplified html-tree
relativisticelectron Aug 10, 2022
89e182d
removed ids, and added automatic list reloading
relativisticelectron Aug 10, 2022
729d97a
better text
relativisticelectron Aug 10, 2022
44317cd
changed max_number_of_main_results back to 100
relativisticelectron Aug 10, 2022
8472813
enabled opening of address details
relativisticelectron Aug 10, 2022
def2c56
enabled utxo details
relativisticelectron Aug 10, 2022
9ec1835
moved search functionality into its own class
relativisticelectron Aug 11, 2022
95e45ff
refactoring
relativisticelectron Aug 11, 2022
ffd341f
translations and ESC
relativisticelectron Aug 11, 2022
ebd627c
translations and typo
relativisticelectron Aug 11, 2022
b87b4dd
regex escape
relativisticelectron Aug 11, 2022
ca56139
fix
relativisticelectron Aug 11, 2022
ca68895
doc
relativisticelectron Aug 11, 2022
af14e40
reset lots of file changes back to master
relativisticelectron Aug 11, 2022
dd8b00b
doc
relativisticelectron Aug 11, 2022
e8c6eab
reverted helpers to master
relativisticelectron Aug 11, 2022
41c2907
refactor better names
relativisticelectron Aug 11, 2022
5c4fa46
include hide_sensitive_info by removing all sensitive parts from the …
relativisticelectron Aug 11, 2022
0712c4c
doc
relativisticelectron Aug 11, 2022
c9f820f
moved ESC event listener to document
relativisticelectron Aug 13, 2022
7dbf358
refactoring and replaced title_key by function
relativisticelectron Aug 14, 2022
57b045a
label for address search instead of address
relativisticelectron Aug 14, 2022
9727c33
avoid duplicate results
relativisticelectron Aug 14, 2022
52c7820
doc
relativisticelectron Aug 14, 2022
8b4ca0f
moved wallet_manager, device_manager to init
relativisticelectron Aug 14, 2022
ad5d5d7
add pytest
relativisticelectron Aug 14, 2022
7b8ddc0
better pytest
relativisticelectron Aug 14, 2022
d297e1a
added amount search and address search
relativisticelectron Aug 14, 2022
a41d6d7
test devices
relativisticelectron Aug 14, 2022
12da9c4
added wallet name search
relativisticelectron Aug 14, 2022
89bfe18
eliminate useless info in json
relativisticelectron Aug 14, 2022
ed42292
added cypress tests and included name and alias for wallets and devices
relativisticelectron Aug 15, 2022
8ee9189
improved Recieved Info
relativisticelectron Aug 15, 2022
e2965d0
cypress test works
relativisticelectron Aug 15, 2022
9417fd1
improved the timeoutids
relativisticelectron Aug 15, 2022
b00962a
fix pytest
relativisticelectron Aug 15, 2022
7c86e44
the wallet_manager and device_manager are not always the same instanc…
relativisticelectron Aug 15, 2022
3502dd2
undo deletion
relativisticelectron Aug 15, 2022
fb774db
undo info
relativisticelectron Aug 15, 2022
28c5963
added locale datetime search
relativisticelectron Aug 17, 2022
87cab6e
allow also timestamp search
relativisticelectron Aug 17, 2022
43db93d
add language_code also for devices, even though it is not yet needed
relativisticelectron Aug 17, 2022
d72a179
rename and bugfix
relativisticelectron Aug 17, 2022
a70f762
added cancel button for the search field
relativisticelectron Aug 17, 2022
8161942
doc
relativisticelectron Aug 17, 2022
e132b78
Merge remote-tracking branch 'cryptoadvance/master' into 20220801_sea…
relativisticelectron Aug 17, 2022
664119e
Merge branch 'master' into 20220801_search_list
relativisticelectron Aug 25, 2022
ebbd0cf
Merge remote-tracking branch 'cryptoadvance/master' into 20220801_sea…
relativisticelectron Sep 25, 2022
6970a05
Merge branch 'master' into 20220801_search_list
k9ert Sep 27, 2022
6f95891
Merge remote-tracking branch 'cryptoadvance/master' into 20220801_sea…
relativisticelectron Oct 2, 2022
493b43b
global search service (blank)
relativisticelectron Oct 2, 2022
52edd2b
undo some changes
relativisticelectron Oct 2, 2022
e87e64a
cleanup
relativisticelectron Oct 2, 2022
3e6e753
bugfix
relativisticelectron Oct 2, 2022
db9c92c
bugfix
relativisticelectron Oct 4, 2022
cf7d8be
fix pytest
relativisticelectron Oct 4, 2022
2515bbc
Merge branch 'master' into 20220801_search_list
k9ert Oct 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added search for wallet names
  • Loading branch information
relativisticelectron committed Jul 11, 2022
commit 176f81bb068f0b35ef117ac232e8508d79b66008
Original file line number Diff line number Diff line change
@@ -92,6 +92,14 @@ def search_in_structure(search_term, l):

def add_all_in_wallet(wallet):
sidebar_wallet = HtmlElement(wallets, id=f"{wallet.alias}-sidebar-list-item")
wallet_names = HtmlElement(
sidebar_wallet,
id="title",
function=lambda x: search_in_structure(x, [wallet.alias]),
visible_on_endpoints=[
url_for("wallets_endpoint.wallet", wallet_alias=wallet.alias)
],
)
transactions = HtmlElement(
sidebar_wallet,
id="btn_transactions",
6 changes: 2 additions & 4 deletions src/cryptoadvance/specter/server_endpoints/wallets_api.py
Original file line number Diff line number Diff line change
@@ -31,6 +31,8 @@
from ..util.price_providers import get_price_at
from ..util.tx import decoderawtransaction
from embit.descriptor.checksum import add_checksum
from ..global_search import do_global_search
from ..helpers import robust_json_dumps

logger = logging.getLogger(__name__)

@@ -98,10 +100,6 @@ def fees_old(blocks):
return app.specter.estimatesmartfee(int(blocks))


from ..globalsearch import do_global_search
from ..helpers import robust_json_dumps


@wallets_endpoint_api.route("/global_search", methods=["POST"])
@login_required
def global_search():
Original file line number Diff line number Diff line change
@@ -73,8 +73,7 @@
if (!element_already_exists){
changed_elements.push({element:found_element, old_style:found_element.style});
}
found_element.style.backgroundColor = 'green';

found_element.style.backgroundColor = 'var(--cmap-blue-darker)';
}

function process_found_element(html_element, search_term){