diff --git a/app/background-process/ui/view-manager.js b/app/background-process/ui/view-manager.js index b21088ca46..79051a1ed7 100644 --- a/app/background-process/ui/view-manager.js +++ b/app/background-process/ui/view-manager.js @@ -99,8 +99,7 @@ const STATE_VARS = [ 'donateLinkHref', 'isLiveReloading', 'previewMode', - 'uncommittedChanges', - 'applicationState' + 'uncommittedChanges' ] // globals @@ -163,7 +162,6 @@ class View { this.availableAlternative = '' // tracks if there's alternative protocol available for the site this.wasDatTimeout = false // did the last navigation result in a timed-out dat? this.uncommittedChanges = false // does the preview have uncommitted changes? - this.applicationState = '' // if an application, is 'installable' or 'needs-update' // wire up events this.webContents.on('did-start-loading', this.onDidStartLoading.bind(this)) @@ -618,7 +616,6 @@ class View { this.numFollowers = 0 this.donateLinkHref = null this.uncommittedChanges = false - this.applicationState = '' if (!this.url.startsWith('dat://')) { this.datInfo = null @@ -641,16 +638,6 @@ class View { let siteFollowers = await beakerCore.crawler.follows.list({filters: {topics: this.datInfo.url, authors: followAuthors}}) this.numFollowers = siteFollowers.length if (!noEmit) this.emitUpdateState() - - if (this.datInfo.type && this.datInfo.type.includes('application')) { - let userId = (await beakerCore.users.get(userSession.url)).id - let appState = await beakerCore.applications.getApplicationState({userId, url: this.url}) - if (!appState.installed) { - this.applicationState = 'installable' - } - // TODO check for 'needs-update' - if (!noEmit) this.emitUpdateState() - } } async getPageMetadata () { diff --git a/app/new-shell-window/navbar.js b/app/new-shell-window/navbar.js index 522d1f5f01..bfa54bb8b2 100644 --- a/app/new-shell-window/navbar.js +++ b/app/new-shell-window/navbar.js @@ -76,7 +76,6 @@ class ShellWindowNavbar extends LitElement { ?is-live-reloading=${_get(this, 'activeTab.isLiveReloading')} ?preview-mode=${_get(this, 'activeTab.previewMode')} uncommitted-changes=${_get(this, 'activeTab.uncommittedChanges', 0)} - application-state=${_get(this, 'activeTab.applicationState', '')} ?is-bookmarked=${_get(this, 'activeTab.isBookmarked', false)} > ${this.numComments} - ${this.renderApplicationBtn()} ${this.renderSiteToolsBtn()} ${this.renderAvailableAlternativeBtn()} ${this.renderDonateBtn()} @@ -290,32 +287,6 @@ class NavbarLocation extends LitElement { ` } - renderApplicationBtn () { - if (this.applicationState === 'needs-update') { - const cls = classMap({ - 'application-btn': true, - update: true - }) - return html` - - ` - } - if (this.applicationState === 'installable') { - const cls = classMap({ - 'application-btn': true, - install: true - }) - return html` - - ` - } - return '' - } - // events // = @@ -494,11 +465,6 @@ class NavbarLocation extends LitElement { }) } - async onClickInstall () { - if (await bg.applications.requestInstall(this.url)) { - bg.views.loadURL(this.activeTabIndex, this.url) // refresh page - } - } } NavbarLocation.styles = [buttonResetCSS, css` :host { @@ -615,47 +581,6 @@ button.live-reload .fa { -webkit-text-stroke: 1px #daba47; } -button.application-btn { - width: auto; - padding: 0 5px; - font-size: 11px; - line-height: 12px; - margin: 2px; - border-radius: 2px; -} - -button.application-btn.install { - border: 1px solid #2864dc; - background: #5289f7; - color: #fff; - box-shadow: 0 1px 1px rgba(0,0,0,.1); -} - -button.application-btn.install:hover { - background: rgb(64, 119, 230); -} - -button.application-btn.update { - border: 1px solid rgb(11, 150, 11); - background: rgb(12, 185, 12); - color: #fff; - box-shadow: 0 1px 1px rgba(0,0,0,.1); -} - -button.application-btn.update:hover { - background: rgb(24, 171, 24); -} - -button.application-btn .fa-download { - font-size: 12px; - margin: 0 2px; -} - -button.application-btn .fa-arrow-alt-circle-up { - font-size: 10px; - margin: 0 1px; -} - .input-container { position: relative; flex: 1;