various tweaks for pages:

- support page column size, page deletion
- page deletion only enabled if has size, for now
- sorter can default to desc, tweak color for pages panel, default sort by time, descending
This commit is contained in:
Ilya Kreymer
2020-06-01 13:45:59 -07:00
parent fb3d137d24
commit 149558f647
6 changed files with 262 additions and 128 deletions
+5 -1
View File
@@ -15,12 +15,15 @@ class Sorter extends LitElement
this.data = [];
this.numResults = DEFAULT_RESULTS;
this.defaultDesc = false;
}
static get properties() {
return {
id: { type: String },
defaultKey: {type: String },
defaultDesc: { type: Boolean },
//numResults: {type: Number},
@@ -34,7 +37,8 @@ class Sorter extends LitElement
firstUpdated() {
this.sortKey = localStorage.getItem(`${this.id}:sortKey`) || this.defaultKey;
this.sortDesc = localStorage.getItem(`${this.id}:sortDesc`) === "1";
const sortDesc = localStorage.getItem(`${this.id}:sortDesc`);
this.sortDesc = !sortDesc ? this.defaultDesc : sortDesc === "1";
}
updated(changedProperties) {