diff --git a/index.html b/index.html index e4f90a4..ca02f41 100644 --- a/index.html +++ b/index.html @@ -189,7 +189,7 @@ system-status, docs-viewer, - devtools-inspector { + developer-tooling { position: relative; top: 156px } @@ -215,14 +215,14 @@ app-router[data-load="docs-viewer"] a[href='/documentation'] app-router[data-load="docs-viewer"] a:active[href='/documentation'] app-router[data-load="docs-viewer"] a:visited[href='/documentation'], - app-router[data-load="devtools-inspector"] a[href='/devtools-insepctor'], - app-router[data-load="devtools-inspector"] a:active[href='/devtools-inspector'], - app-router[data-load="devtools-inspector"] a:visited[href='/devtools-inspector'] { + app-router[data-load="developer-tooling"] a[href='/developer-tooling'], + app-router[data-load="developer-tooling"] a:active[href='/developer-tooling'], + app-router[data-load="developer-tooling"] a:visited[href='/developer-tooling'] { color: rgb(78, 250, 92); }
- +
           __ \    _ \   _` |   __|
@@ -262,18 +262,18 @@
         
-
+
-
+
-
-
+
+
- + diff --git a/lib/app-router.js b/lib/app-router.js index 45d631f..d99b7fd 100644 --- a/lib/app-router.js +++ b/lib/app-router.js @@ -49,6 +49,8 @@ customElements.define('app-router', class AppRouter extends HTMLElement { window.addEventListener('load', () => { if (Pear.config.link.indexOf('pear://pulse') === 0) { this.load(Pear.config.link.slice(12)).catch(console.error) + } else { + this.load('/') } }) } diff --git a/lib/devtools-inspector.js b/lib/developer-tooling.js similarity index 97% rename from lib/devtools-inspector.js rename to lib/developer-tooling.js index 04af0a7..dbad931 100644 --- a/lib/devtools-inspector.js +++ b/lib/developer-tooling.js @@ -4,9 +4,12 @@ import { WebSocketServer } from 'ws' import { Session } from '@holepunchto/pear-inspect' import b4a from 'b4a' -customElements.define('devtools-inspector', class extends HTMLElement { +customElements.define('developer-tooling', class extends HTMLElement { + router = null + constructor () { super() + console.log('[developer-tooling] constructor') this.template = document.createElement('template') this.template.innerHTML = `
@@ -221,10 +224,12 @@ customElements.define('devtools-inspector', class extends HTMLElement { } load () { + console.log('load', this.style) this.style.display = '' } unload () { + console.log('unload', this.style) this.style.display = 'none' } })