ui tweaks:

- show pages found in sidebar if in desktop mode
- allow refresh on search views, just do reload
This commit is contained in:
Ilya Kreymer
2020-08-05 23:05:53 -07:00
parent 849f8ff4eb
commit 69e7982d31
4 changed files with 50 additions and 54 deletions
+4 -2
View File
@@ -427,7 +427,7 @@ class Coll extends LitElement
<fa-icon size="1.0em" class="has-text-grey" .svg="${fasRight}"></fa-icon> <fa-icon size="1.0em" class="has-text-grey" .svg="${fasRight}"></fa-icon>
</span> </span>
</button> </button>
<button id="refresh" class="button is-borderless ${!isReplay ? 'grey-disabled' : ''} ${this.isLoading ? 'is-loading' : 'is-hidden-mobile'}" @click="${this.onRefresh}"> <button id="refresh" class="button is-borderless ${this.isLoading ? 'is-loading' : 'is-hidden-mobile'}" @click="${this.onRefresh}">
<span class="icon is-small"> <span class="icon is-small">
${!this.isLoading ? html` ${!this.isLoading ? html`
<fa-icon size="1.0em" class="has-text-grey" .svg="${fasRefresh}"></fa-icon> <fa-icon size="1.0em" class="has-text-grey" .svg="${fasRefresh}"></fa-icon>
@@ -474,7 +474,7 @@ class Coll extends LitElement
</span> </span>
<span>Forward</span> <span>Forward</span>
</a> </a>
<a class="dropdown-item is-hidden-tablet ${!isReplay ? 'grey-disabled' : 'has-text-grey'}" @click="${this.onRefresh}"> <a class="dropdown-item is-hidden-tablet has-text-grey" @click="${this.onRefresh}">
<span class="icon is-small"> <span class="icon is-small">
<fa-icon size="1.0em" class="" .svg="${fasRefresh}"></fa-icon> <fa-icon size="1.0em" class="" .svg="${fasRefresh}"></fa-icon>
</span> </span>
@@ -693,6 +693,8 @@ class Coll extends LitElement
if (replay) { if (replay) {
replay.refresh(); replay.refresh();
} }
} else {
window.location.reload();
} }
} }
} }
+7 -10
View File
@@ -232,8 +232,6 @@ class Pages extends LitElement
} }
.num-results { .num-results {
position: absolute;
right: 16px;
font-style: italic; font-style: italic;
font-weight: normal; font-weight: normal;
} }
@@ -287,12 +285,10 @@ class Pages extends LitElement
.mobile-header { .mobile-header {
margin: 0.5rem; margin: 0.5rem;
display: flex; display: flex;
justify-content: space-between;
flex-direction: row; flex-direction: row;
min-height: 24px; min-height: 24px;
} width: 100%;
.num-results {
top: 8px;
} }
.menu { .menu {
@@ -360,6 +356,8 @@ class Pages extends LitElement
<div class="column sidebar is-one-fifth is-hidden-mobile"> <div class="column sidebar is-one-fifth is-hidden-mobile">
<div class="sidebar-title">${this.collInfo.title}</div> <div class="sidebar-title">${this.collInfo.title}</div>
<span class="num-results">${this.formatResults()}</span>
${this.editable ? html` ${this.editable ? html`
<div class="sidebar-actions"> <div class="sidebar-actions">
${this.renderDownloadMenu()} ${this.renderDownloadMenu()}
@@ -435,6 +433,7 @@ class Pages extends LitElement
</div> </div>
<div class="is-hidden-tablet mobile-header"> <div class="is-hidden-tablet mobile-header">
<span class="num-results">${this.formatResults()}</span>
<wr-sorter id="pages" <wr-sorter id="pages"
.sortKey="${this.sortKey}" .sortKey="${this.sortKey}"
.sortDesc="${this.sortDesc}" .sortDesc="${this.sortDesc}"
@@ -444,8 +443,6 @@ class Pages extends LitElement
class="${this.filteredPages.length ? '' : 'is-hidden'}"> class="${this.filteredPages.length ? '' : 'is-hidden'}">
</wr-sorter> </wr-sorter>
</div> </div>
<span class="num-results">${this.formatResults()}</span>
`; `;
} }
@@ -565,9 +562,9 @@ class Pages extends LitElement
if (!this.sortedPages.length) { if (!this.sortedPages.length) {
return this.query ? "No Pages Found. Try changing the search query." : "No Pages Found"; return this.query ? "No Pages Found. Try changing the search query." : "No Pages Found";
} else if (this.sortedPages.length === 1) { } else if (this.sortedPages.length === 1) {
return "1 Page"; return "1 Page Found";
} else { } else {
return `${this.sortedPages.length} Pages`; return `${this.sortedPages.length} Pages Found`;
} }
} }
+15 -15
View File
File diff suppressed because one or more lines are too long
+24 -27
View File
File diff suppressed because one or more lines are too long