mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 09:45:52 +00:00
Fix empty file and add core settings
This commit is contained in:
parent
767101eee7
commit
c5d6159ef2
33
electron.js
33
electron.js
@ -13,6 +13,7 @@ const execFile = require('child_process').execFile
|
||||
const exec = require('child_process').exec
|
||||
const spawn = require('child_process').spawn
|
||||
|
||||
app.commandLine.appendSwitch('enable-experimental-web-platform-features')
|
||||
app.disableHardwareAcceleration()
|
||||
app.enableSandbox()
|
||||
electronDl()
|
||||
@ -760,10 +761,13 @@ function createWindow() {
|
||||
title: "Qortal UI",
|
||||
autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
nodeIntegrationInWorker: true,
|
||||
partition: 'persist:webviewsession',
|
||||
enableRemoteModule: false
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
enableRemoteModule: false,
|
||||
allowRunningInsecureContent: false,
|
||||
experimentalFeatures: false,
|
||||
preload: path.join(__dirname, '/lib/preload.js')
|
||||
},
|
||||
show: false
|
||||
})
|
||||
@ -900,6 +904,29 @@ if (!isLock) {
|
||||
log.info(app.getVersion())
|
||||
myWindow.webContents.send('app_version', { version: app.getVersion() })
|
||||
})
|
||||
ipcMain.on('set-start-core', (event) => {
|
||||
const dialogOpts = {
|
||||
type: 'info',
|
||||
noLink: true,
|
||||
buttons: [i18n.__("electron_translate_29"), i18n.__("electron_translate_30")],
|
||||
title: i18n.__("electron_translate_31"),
|
||||
message: i18n.__("electron_translate_32"),
|
||||
detail: i18n.__("electron_translate_33"),
|
||||
checkboxLabel: i18n.__("electron_translate_28"),
|
||||
checkboxChecked: store.get('askingCore')
|
||||
}
|
||||
dialog.showMessageBox(dialogOpts).then((returnValue) => {
|
||||
if (returnValue.response === 0) {
|
||||
store.set('askingCore', returnValue.checkboxChecked)
|
||||
} else {
|
||||
store.set('askingCore', returnValue.checkboxChecked)
|
||||
return
|
||||
}
|
||||
})
|
||||
})
|
||||
ipcMain.on('check-for-update', (event) => {
|
||||
autoUpdater.checkForUpdatesAndNotify()
|
||||
})
|
||||
autoUpdater.on('update-available', (event) => {
|
||||
const downloadOpts = {
|
||||
type: 'info',
|
||||
|
6
lib/preload.js
Normal file
6
lib/preload.js
Normal file
@ -0,0 +1,6 @@
|
||||
const { contextBridge, ipcRenderer } = require('electron')
|
||||
|
||||
contextBridge.exposeInMainWorld('electronAPI', {
|
||||
setStartCore: () => ipcRenderer.send('set-start-core'),
|
||||
checkForUpdate: () => ipcRenderer.send('check-for-update')
|
||||
})
|
@ -33,5 +33,6 @@
|
||||
"electron_translate_30": "ABBRECHEN",
|
||||
"electron_translate_31": "Core-Einstellungen starten",
|
||||
"electron_translate_32": "Ändern Sie den aktuellen Status der Aufforderung, den Core zu starten, wenn er nicht läuft",
|
||||
"electron_translate_33": "(Aktivieren oder deaktivieren Sie das Kontrollkästchen Frag mich nie wieder)"
|
||||
"electron_translate_33": "(Aktivieren oder deaktivieren Sie das Kontrollkästchen Frag mich nie wieder)",
|
||||
"electron_translate_34": "Einstellungen"
|
||||
}
|
@ -33,5 +33,6 @@
|
||||
"electron_translate_30": "CANCEL",
|
||||
"electron_translate_31": "Start Core Setiings",
|
||||
"electron_translate_32": "Change the current status of asking to start the core if it is not running",
|
||||
"electron_translate_33": "(Check or Uncheck the never ask me again checkbox)"
|
||||
"electron_translate_33": "(Check or Uncheck the never ask me again checkbox)",
|
||||
"electron_translate_34": "Settings"
|
||||
}
|
@ -33,5 +33,6 @@
|
||||
"electron_translate_30": "CANCEL",
|
||||
"electron_translate_31": "Start Core Setiings",
|
||||
"electron_translate_32": "Change the current status of asking to start the core if it is not running",
|
||||
"electron_translate_33": "(Check or Uncheck the never ask me again checkbox)"
|
||||
"electron_translate_33": "(Check or Uncheck the never ask me again checkbox)",
|
||||
"electron_translate_34": "Settings"
|
||||
}
|
@ -135,7 +135,8 @@
|
||||
"exp1": "Privaten Hauptschlüssel exportieren",
|
||||
"exp2": "Hauptschlüssel exportieren",
|
||||
"exp3": "Exportieren",
|
||||
"exp4": "Bitte wählen Sie eine Brieftasche aus, um den privaten Hauptschlüssel zu sichern."
|
||||
"exp4": "Bitte wählen Sie eine Brieftasche aus, um den privaten Hauptschlüssel zu sichern.",
|
||||
"core": "Core-Einstellungen starten"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "Blockhöhe",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "Exportar clave maestra privada",
|
||||
"exp2": "Exportar clave maestra",
|
||||
"exp3": "Exportar",
|
||||
"exp4": "Elija una billetera para hacer una copia de seguridad de la clave maestra privada."
|
||||
"exp4": "Elija una billetera para hacer una copia de seguridad de la clave maestra privada.",
|
||||
"core": "Iniciar configuración básica"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "Altura del Bloque",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "Exporter la clé principale privée",
|
||||
"exp2": "Exporter la clé principale",
|
||||
"exp3": "Exporter",
|
||||
"exp4": "Veuillez choisir un portefeuille pour sauvegarder la clé principale privée."
|
||||
"exp4": "Veuillez choisir un portefeuille pour sauvegarder la clé principale privée.",
|
||||
"core": "Démarrer les paramètres du noyau"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "Hauteur de bloc",
|
||||
|
@ -136,7 +136,8 @@
|
||||
"exp1": "निजी मास्टर कुंजी निर्यात करें",
|
||||
"exp2": "निर्यात मास्टर कुंजी",
|
||||
"exp3": "निर्यात",
|
||||
"exp4": "निजी मास्टर कुंजी का बैकअप लेने के लिए कृपया एक वॉलेट चुनें।"
|
||||
"exp4": "निजी मास्टर कुंजी का बैकअप लेने के लिए कृपया एक वॉलेट चुनें।",
|
||||
"core": "कोर सेटिंग प्रारंभ करें"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "ब्लॉक ऊँचाई",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "Izvezi privatni glavni ključ",
|
||||
"exp2": "Glavni ključ izvoza",
|
||||
"exp3": "Izvoz",
|
||||
"exp4": "Odaberite novčanik za sigurnosnu kopiju privatnog glavnog ključa."
|
||||
"exp4": "Odaberite novčanik za sigurnosnu kopiju privatnog glavnog ključa.",
|
||||
"core": "Pokreni osnovne postavke"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "Visina bloka",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "Privát főkulcs exportálása",
|
||||
"exp2": "Főkulcs exportálása",
|
||||
"exp3": "Exportálás",
|
||||
"exp4": "Kérjük, válasszon egy tárcát a privát főkulcs biztonsági mentéséhez."
|
||||
"exp4": "Kérjük, válasszon egy tárcát a privát főkulcs biztonsági mentéséhez.",
|
||||
"core": "Alapbeállítások indítása"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "Blokk Magassága",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "Esporta chiave master privata",
|
||||
"exp2": "Esporta chiave master",
|
||||
"exp3": "Esporta",
|
||||
"exp4": "Scegli un portafoglio per il backup della chiave master privata."
|
||||
"exp4": "Scegli un portafoglio per il backup della chiave master privata.",
|
||||
"core": "Avvia impostazioni principali"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "Altezza blocco",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "개인 마스터 키 내보내기",
|
||||
"exp2": "마스터 키 내보내기",
|
||||
"exp3": "내보내기",
|
||||
"exp4": "개인 마스터 키를 백업할 지갑을 선택하세요."
|
||||
"exp4": "개인 마스터 키를 백업할 지갑을 선택하세요.",
|
||||
"core": "코어 설정 시작"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "블록 높이",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "Eksporter privat hovednøkkel",
|
||||
"exp2": "Eksporter hovednøkkel",
|
||||
"exp3": "Eksporter",
|
||||
"exp4": "Velg en lommebok for å sikkerhetskopiere den private hovednøkkelen."
|
||||
"exp4": "Velg en lommebok for å sikkerhetskopiere den private hovednøkkelen.",
|
||||
"core": "Start kjerneinnstillinger"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "Blokkhøyde",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "Eksportuj prywatny klucz główny",
|
||||
"exp2": "Eksportuj klucz główny",
|
||||
"exp3": "Eksportuj",
|
||||
"exp4": "Wybierz portfel do wykonania kopii zapasowej prywatnego klucza głównego."
|
||||
"exp4": "Wybierz portfel do wykonania kopii zapasowej prywatnego klucza głównego.",
|
||||
"core": "Uruchom podstawowe ustawienia"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "Wysokość bloku",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "Exportar Chave Mestra Privada",
|
||||
"exp2": "Exportar Chave Mestra",
|
||||
"exp3": "Exportar",
|
||||
"exp4": "Por favor, escolha uma carteira para fazer backup da chave mestra privada."
|
||||
"exp4": "Por favor, escolha uma carteira para fazer backup da chave mestra privada.",
|
||||
"core": "Iniciar configurações do núcleo"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "Altura do Bloco",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "Exportați cheia principală privată",
|
||||
"exp2": "Exportați cheia principală",
|
||||
"exp3": "Export",
|
||||
"exp4": "Vă rugăm să alegeți un portofel pentru a face backup cheii master private."
|
||||
"exp4": "Vă rugăm să alegeți un portofel pentru a face backup cheii master private.",
|
||||
"core": "Porniți setările de bază"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "Dimensiunea blocului",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "Izvezi privatni glavni ključ",
|
||||
"exp2": "Izvezi glavni ključ",
|
||||
"exp3": "Izvoz",
|
||||
"exp4": "Molimo izaberite novčanik za rezervnu kopiju privatnog glavnog ključa."
|
||||
"exp4": "Molimo izaberite novčanik za rezervnu kopiju privatnog glavnog ključa.",
|
||||
"core": "Pokreni podešavanja jezgra"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "Visina Bloka",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "Экспорт закрытого мастер-ключа",
|
||||
"exp2": "Экспорт мастер-ключа",
|
||||
"exp3": "Экспорт",
|
||||
"exp4": "Пожалуйста, выберите кошелек для резервного копирования приватного главного ключа."
|
||||
"exp4": "Пожалуйста, выберите кошелек для резервного копирования приватного главного ключа.",
|
||||
"core": "Начать основные настройки"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "Высота блока",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "Export Private Master Key",
|
||||
"exp2": "Export Master Key",
|
||||
"exp3": "Export",
|
||||
"exp4": "Please choose a wallet to backup the private master key."
|
||||
"exp4": "Please choose a wallet to backup the private master key.",
|
||||
"core": "Start Core Setiings"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "Block Height",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "导出主密钥",
|
||||
"exp2": "导出主密钥",
|
||||
"exp3": "导出",
|
||||
"exp4": "请选择一个钱包来备份私钥。"
|
||||
"exp4": "请选择一个钱包来备份私钥。",
|
||||
"core": "开始核心设置"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "区块高度",
|
||||
|
@ -135,7 +135,8 @@
|
||||
"exp1": "導出主密鑰",
|
||||
"exp2": "導出主密鑰",
|
||||
"exp3": "導出",
|
||||
"exp4": "請選擇一個錢包來備份私鑰。"
|
||||
"exp4": "請選擇一個錢包來備份私鑰。",
|
||||
"core": "開始核心設置"
|
||||
},
|
||||
"appinfo": {
|
||||
"blockheight": "區塊高度",
|
||||
|
@ -28,6 +28,7 @@ import './qort-theme-toggle.js'
|
||||
import './language-selector.js'
|
||||
import './settings-view/user-settings.js'
|
||||
import './logout-view/logout-view.js'
|
||||
import './check-for-update.js'
|
||||
import './user-info-view/user-info-view.js'
|
||||
import '../functional-components/side-menu.js'
|
||||
import '../functional-components/side-menu-item.js'
|
||||
@ -502,6 +503,8 @@ class AppView extends connect(store)(LitElement) {
|
||||
<paper-icon-button icon="icons:settings" @click=${() => this.openSettings()} title="${translate("settings.settings")}"></paper-icon-button>
|
||||
</div>
|
||||
<div> </div>
|
||||
<check-for-update></check-for-update>
|
||||
<div> </div>
|
||||
<div style="display: inline;">
|
||||
<paper-icon-button icon="icons:exit-to-app" @click=${() => this.openLogout()} title="${translate("logout.logout")}"></paper-icon-button>
|
||||
</div>
|
||||
|
41
qortal-ui-core/src/components/check-for-update.js
Normal file
41
qortal-ui-core/src/components/check-for-update.js
Normal file
@ -0,0 +1,41 @@
|
||||
import { LitElement, html, css } from 'lit'
|
||||
import { get, translate, translateUnsafeHTML } from 'lit-translate'
|
||||
|
||||
import '@polymer/paper-icon-button/paper-icon-button.js'
|
||||
import '@polymer/iron-icons/iron-icons.js'
|
||||
|
||||
class CheckForUpdate extends LitElement {
|
||||
static get properties() {
|
||||
return {
|
||||
theme: { type: String, reflect: true }
|
||||
}
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
|
||||
}
|
||||
|
||||
static styles = [
|
||||
css`
|
||||
`
|
||||
]
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<div style="display: inline;">
|
||||
<paper-icon-button icon="icons:get-app" @click=${() => this.checkupdate()} title="${translate("appspage.schange38")} UI"></paper-icon-button>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
||||
firstUpdated() {
|
||||
}
|
||||
|
||||
|
||||
checkupdate() {
|
||||
window.electronAPI.checkForUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
window.customElements.define('check-for-update', CheckForUpdate)
|
@ -83,6 +83,28 @@ class NotificationsView extends connect(store)(LitElement) {
|
||||
font-size: 16px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.q-button {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
border: none;
|
||||
border-radius: 20px;
|
||||
padding-left: 25px;
|
||||
padding-right: 25px;
|
||||
color: white;
|
||||
background: #03a9f4;
|
||||
width: 50%;
|
||||
font-size: 17px;
|
||||
cursor: pointer;
|
||||
height: 50px;
|
||||
margin-top: 1rem;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
transition: all .2s;
|
||||
position: relative;
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
@ -123,10 +145,17 @@ 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>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
||||
checkCoreSettings() {
|
||||
window.electronAPI.setStartCore()
|
||||
}
|
||||
|
||||
stateChanged(state) {
|
||||
this.notificationConfig = state.user.notifications
|
||||
this.q_chatConfig = this.notificationConfig.q_chat
|
||||
|
Loading…
x
Reference in New Issue
Block a user