diff --git a/index.html b/index.html index dc4ed91..036d75e 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ FLO Ethereum - + - + +
@@ -385,6 +399,7 @@ this.routingStart(this.state) } if (this.routes[page]) { + //Actual routing step await this.routes[page](this.state) this.lastPage = page } else { @@ -411,6 +426,8 @@ else page = path this.state = { page, wildcards, lastPage: this.lastPage, params } + + if (queryString) { params = new URLSearchParams(queryString) this.state.params = Object.fromEntries(params) @@ -428,6 +445,39 @@ } } } + +//Moving notification draw so that it does not overlap the menu item +(function placeToasts() { + const drawer = document.getElementById('notification_drawer'); + const panel = drawer?.shadowRoot?.querySelector('.notification-panel'); + if (!panel) return; + + const apply = () => { + if (window.matchMedia('(min-width: 640px)').matches) { + // Desktop: offset from left navbar + Object.assign(panel.style, { + left: 'calc(10rem + 1rem)', + bottom: '1rem', + top: 'auto', + right: '1rem', // optional, lets long toasts wrap before content edge + zIndex: '1000' + }); + } else { + // Mobile: keep top-right or top-left as you prefer + Object.assign(panel.style, { + left: '0.5rem', + top: '0.5rem', + right: '0.5rem', + bottom: 'auto', + zIndex: '1000' + }); + } + }; + + apply(); + window.addEventListener('resize', apply); +})(); + - \ No newline at end of file +