Skip to content

Commit e4f85b2

Browse files
committedSep 3, 2022
Further ux improvements
1 parent e1e8528 commit e4f85b2

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed
 

‎popup.css

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
display: grid;
33
grid-template-columns: 1fr 180px 65px;
44
gap: 1px 0;
5-
background-color: #000;
5+
background-color: #bbb;
66
width: 500px;
77
}
88

@@ -23,7 +23,6 @@
2323
#content > #no-data-placeholder {
2424
grid-area: 3 / 1 / 3 / -1;
2525
text-align: center;
26-
display: none;
2726
font-size: 15px;
2827
font-weight: bold;
2928
}

‎popup.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div></div>
1818
<div></div>
1919
</div>
20-
<div id="no-data-placeholder">no data</div>
20+
<div id="no-data-placeholder">no data to display</div>
2121
<div id="token-table">
2222
</div>
2323
</div>

‎popup.js

+6
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ function loadTokenTable(filterUrl) {
3838
tokenTable.appendChild(copyButtonDiv);
3939
}
4040

41+
toggleSearchContainer(filterUrl, tokensPresent);
4142
toggleNoDataPlaceholder(tokensPresent);
4243
});
4344

@@ -91,6 +92,11 @@ function loadTokenTable(filterUrl) {
9192
return buttonDiv;
9293
}
9394

95+
function toggleSearchContainer(filterUrl, tokensPresent) {
96+
const searchContainer = document.getElementById("search-container");
97+
searchContainer.style.display = !filterUrl && !tokensPresent ? "none" : "contents";
98+
}
99+
94100
function toggleNoDataPlaceholder(tokensPresent) {
95101
const noDataPlaceholder = document.getElementById("no-data-placeholder");
96102
noDataPlaceholder.style.display = tokensPresent ? "none" : "block";

0 commit comments

Comments
 (0)
Please sign in to comment.