4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-11 17:55:51 +00:00

Hide button if we are not on electron

This commit is contained in:
AlphaX-Projects 2023-05-07 17:55:24 +02:00
parent 8cbf12bec4
commit 981ec74f49

View File

@ -3,6 +3,7 @@ import { connect } from 'pwa-helpers'
import { store } from '../../store.js'
import { doSetQChatNotificationConfig } from '../../redux/user/user-actions.js'
import { translate, translateUnsafeHTML } from 'lit-translate'
import isElectron from 'is-electron'
import '@material/mwc-checkbox'
@ -145,13 +146,23 @@ class NotificationsView extends connect(store)(LitElement) {
</div>
</div>
</div>
<div style="max-width: 500px; display: flex; justify-content: center; margin: auto;">
<div @click=${() => this.checkCoreSettings()} class="q-button"> ${translate("settings.core")} </div>
</div>
${this.renderSetCoreButton()}
</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() {
window.electronAPI.setStartCore()
}