ui tweaks for mobile:

- fix url chooser cut-off in mobile (#14)
- sidebar toggle goes directly to full view (no sidebar) in mobile mode
This commit is contained in:
Ilya Kreymer
2020-09-09 09:41:47 -07:00
parent 851ce9bf90
commit d0cc1acb71
4 changed files with 21 additions and 10 deletions
+7 -1
View File
@@ -62,6 +62,9 @@ class Chooser extends LitElement
static get styles() {
return wrapCss(css`
:host {
min-width: 0;
}
.extra-padding {
padding: 2em;
}
@@ -79,13 +82,16 @@ class Chooser extends LitElement
flex-grow: 1;
flex-shrink: 0;
}
p.control.is-expanded {
width: min-content;
}
input.input.file-name:invalid {
border: 1px dashed red;
}
input.input.file-name {
max-width: 100%;
border-width: 1px;
margin-left: -1px;
max-width: 100%;
}
@media screen and (max-width: 1023px) {
.file-icon {
+1
View File
@@ -136,6 +136,7 @@ class CollIndex extends LitElement
return wrapCss(css`
:host {
overflow-y: auto;
min-width: 0;
}
.size {
margin-right: 20px;
+4 -7
View File
@@ -803,16 +803,13 @@ class Coll extends LitElement
onShowPages(event) {
event.preventDefault();
// show sidebar if table or greater
// show sidebar for tablet or wider, or hide sidebar
if (this.showSidebar || (document.documentElement.clientWidth >= 769)) {
this.showSidebar = !this.showSidebar;
//this.updateTabData({showSidebar: !this.showSidebar});
} else {
// otherwise, just go to full pages view
//this.showSidebar = false;
// if (this.tabData && this.tabData.view === "replay") {
// this.updateTabData({view: "pages"});
// }
// otherwise, just go to full pages view
this.showSidebar = false;
this.updateTabData({url: "", ts: ""});
}
}