Hide button if we are not on electron
This commit is contained in:
parent
8cbf12bec4
commit
981ec74f49
@ -3,6 +3,7 @@ import { connect } from 'pwa-helpers'
|
|||||||
import { store } from '../../store.js'
|
import { store } from '../../store.js'
|
||||||
import { doSetQChatNotificationConfig } from '../../redux/user/user-actions.js'
|
import { doSetQChatNotificationConfig } from '../../redux/user/user-actions.js'
|
||||||
import { translate, translateUnsafeHTML } from 'lit-translate'
|
import { translate, translateUnsafeHTML } from 'lit-translate'
|
||||||
|
import isElectron from 'is-electron'
|
||||||
|
|
||||||
import '@material/mwc-checkbox'
|
import '@material/mwc-checkbox'
|
||||||
|
|
||||||
@ -145,13 +146,23 @@ class NotificationsView extends connect(store)(LitElement) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="max-width: 500px; display: flex; justify-content: center; margin: auto;">
|
${this.renderSetCoreButton()}
|
||||||
<div @click=${() => this.checkCoreSettings()} class="q-button"> ${translate("settings.core")} </div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderSetCoreButton() {
|
||||||
|
if (!isElectron) {
|
||||||
|
return html`
|
||||||
|
<div style="max-width: 500px; display: flex; justify-content: center; margin: auto;">
|
||||||
|
<div @click=${() => this.checkCoreSettings()} class="q-button"> ${translate("settings.core")} </div>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
} else {
|
||||||
|
return html``
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
checkCoreSettings() {
|
checkCoreSettings() {
|
||||||
window.electronAPI.setStartCore()
|
window.electronAPI.setStartCore()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user