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

Fix app info add translate

This commit is contained in:
AlphaX-Projects 2022-09-03 13:10:04 +02:00
parent 1d0ce60348
commit 988dc74ae9
18 changed files with 81 additions and 28 deletions

View File

@ -152,7 +152,8 @@
"smchange6":"Warten auf Bestätigung in der Blockchain",
"smchange7":"Beziehung beenden",
"smchange8":"Prägeschlüssel zum Knoten hinzufügen",
"smchange9":"Vollständig"
"smchange9":"Vollständig",
"smchange10":"Pro Node sind nur 2 Minting Keys erlaubt, Sie versuchen 3 Keys zuzuweisen, gehen Sie bitte zu Management - Node Management und entfernen Sie den Key, den Sie diesem Node nicht zuweisen möchten, danke!"
},
"mintingpage":{
"mchange1":"Allgemeine Prägedetails",

View File

@ -152,7 +152,8 @@
"smchange6":"En espera de confirmación en blockchain",
"smchange7":"Terminando la relación",
"smchange8":"Agregar clave de acuñación al nodo",
"smchange9":"Completo"
"smchange9":"Completo",
"smchange10":"Solo se permiten 2 claves de acuñación por nodo, está intentando asignar 3 claves, vaya a administración - administración de nodos y elimine la clave que no desea asignar a este nodo, gracias!"
},
"mintingpage":{
"mchange1":"Detalles Generales de Acuñación",

View File

@ -152,7 +152,8 @@
"smchange6":"En attente de confirmation sur blockchain",
"smchange7":"Finir la relation",
"smchange8":"Ajout de la clé de frappe au nœud",
"smchange9":"Complet"
"smchange9":"Complet",
"smchange10":"Seules 2 clés de frappe sont autorisées par nœud, vous tentez d'attribuer 3 clés, veuillez vous rendre dans gestion - gestion des nœuds, et retirer la clé que vous ne souhaitez pas attribuer à ce nœud, merci !"
},
"mintingpage":{
"mchange1":"Détails généraux sur la frappe",

View File

@ -153,7 +153,8 @@
"smchange6":"ब्लॉकचेन पर पुष्टि की प्रतीक्षा में",
"smchange7":"रिश्ता खत्म करना",
"smchange8":"नोड में टकसाल कुंजी जोड़ना",
"smchange9":"पूरा"
"smchange9":"पूरा",
"smchange10":"प्रति नोड केवल 2 मिंटिंग कुंजियों की अनुमति है, आप 3 कुंजी असाइन करने का प्रयास कर रहे हैं, कृपया प्रबंधन - नोड प्रबंधन पर जाएं, और उस कुंजी को हटा दें जिसे आप इस नोड को असाइन नहीं करना चाहते हैं, धन्यवाद!"
},
"mintingpage":{
"mchange1":"सामान्य खनन विवरण",

View File

@ -152,7 +152,8 @@
"smchange6":"Čeka se potvrda na blockchainu",
"smchange7":"Završetak veze",
"smchange8":"Dodavanje ključa kovanja u čvor",
"smchange9":"Kompletan"
"smchange9":"Kompletan",
"smchange10":"Dopuštena su samo 2 ključa za kovanje po čvoru, pokušavate dodijeliti 3 ključa, idite na upravljanje - upravljanje čvorom i uklonite ključ koji ne želite dodijeliti ovom čvoru, hvala!"
},
"mintingpage":{
"mchange1":"Opći detalji o mintanju",

View File

@ -152,7 +152,8 @@
"smchange6":"Megerősítésre vár a blokkláncon",
"smchange7":"A kapcsolat befejezése",
"smchange8":"Mentőkulcs hozzáadása a csomóponthoz",
"smchange9":"Teljes"
"smchange9":"Teljes",
"smchange10":"Csomópontonként csak 2 kulcsverés engedélyezett, Ön 3 kulcsot próbál hozzárendelni. Kérjük, lépjen a menedzsment - csomópontkezelés oldalra, és távolítsa el azt a kulcsot, amelyet nem szeretne ehhez a csomóponthoz rendelni, köszönöm!"
},
"mintingpage":{
"mchange1":"Általános Pénzverés Részletei",

View File

@ -152,7 +152,8 @@
"smchange6":"In attesa di conferma su blockchain",
"smchange7":"Finire la relazione",
"smchange8":"Aggiunta della chiave di conio al nodo",
"smchange9":"Completare"
"smchange9":"Completare",
"smchange10":"Sono consentite solo 2 chiavi di conio per nodo, stai tentando di assegnare 3 chiavi, vai su gestione - gestione del nodo e rimuovi la chiave che non vuoi assegnare a questo nodo, grazie!"
},
"mintingpage":{
"mchange1":"Dettagli generali di Minazione",

View File

@ -152,7 +152,8 @@
"smchange6":"블록체인에서 확인 대기 중",
"smchange7":"관계 마무리",
"smchange8":"노드에 발행 키 추가",
"smchange9":"완벽한"
"smchange9":"완벽한",
"smchange10":"노드당 발행 키 2개만 허용됩니다. 키 3개를 할당하려고 합니다. 관리 - 노드 관리로 이동하여 이 노드에 할당하고 싶지 않은 키를 제거하십시오. 감사합니다!"
},
"mintingpage":{
"mchange1":"일반 민팅 정보",

View File

@ -152,7 +152,8 @@
"smchange6":"Venter på bekreftelse på blockchain",
"smchange7":"Fullføre forholdet",
"smchange8":"Legger til myntnøkkel til node",
"smchange9":"Fullstendig"
"smchange9":"Fullstendig",
"smchange10":"Bare 2 pregenøkler er tillatt per node, du prøver å tildele 3 nøkler, vennligst gå til ledelse - nodeadministrasjon, og fjern nøkkelen du ikke vil tilordne denne noden, takk!"
},
"mintingpage":{
"mchange1":"Generelle mintedetaljer",

View File

@ -152,7 +152,8 @@
"smchange6":"Oczekiwanie na potwierdzenie na blockchain",
"smchange7":"Kończąc związek",
"smchange8":"Dodawanie klucza bicia do węzła",
"smchange9":"Kompletny"
"smchange9":"Kompletny",
"smchange10":"Tylko 2 klucze są dozwolone na węzeł, próbujesz przypisać 3 klucze, przejdź do zarządzania - zarządzanie węzłami i usuń klucz, którego nie chcesz przypisać do tego węzła, dziękuję!"
},
"mintingpage":{
"mchange1":"Ogólne szczegóły mintowania",

View File

@ -152,7 +152,8 @@
"smchange6":"Aguardando confirmação no blockchain",
"smchange7":"Terminando o relacionamento",
"smchange8":"Adicionando a chave de cunhagem ao nó",
"smchange9":"Completo"
"smchange9":"Completo",
"smchange10":"Apenas 2 chaves de cunhagem são permitidas por nó, você está tentando atribuir 3 chaves, vá para gerenciamento - gerenciamento de nó e remova a chave que você não deseja atribuir a este nó, obrigado!"
},
"mintingpage":{
"mchange1":"Detalhes gerais da mineração",

View File

@ -152,7 +152,8 @@
"smchange6":"Se asteapta confirmarea pe blockchain",
"smchange7":"Terminarea relatiei",
"smchange8":"Adaugarea cheii de batere la nod",
"smchange9":"Complet"
"smchange9":"Complet",
"smchange10":"Sunt permise doar 2 chei de batere per nod, incercati sa atribuiti 3 chei, va rugam sa mergeti la management - management nod si eliminati cheia pe care nu doriti să o atribuiti acestui nod, va multumesc!"
},
"mintingpage":{
"mchange1":"Detalii generale de producere a monedei",

View File

@ -152,7 +152,8 @@
"smchange6":"Čeka se potvrda na blokčejnu",
"smchange7":"Završavanje veze",
"smchange8":"Dodavanje ključa za kovanje čvoru",
"smchange9":"Kompletan"
"smchange9":"Kompletan",
"smchange10":"Dozvoljena su samo 2 ključa za kovanje po čvoru, pokušavate da dodelite 3 ključa, idite na upravljanje - upravljanje čvorovima i uklonite ključ koji ne želite da dodelite ovom čvoru, hvala!"
},
"mintingpage":{
"mchange1":"Opšti Detalji Mintovanja",

View File

@ -152,7 +152,8 @@
"smchange6":"Ожидание подтверждения на блокчейне",
"smchange7":"Завершение отношений",
"smchange8":"Добавление ключа чеканки на узел",
"smchange9":"Полный"
"smchange9":"Полный",
"smchange10":"На узел разрешено только 2 ключа минтинга, вы пытаетесь назначить 3 ключа, перейдите в управление — управление узлом и удалите ключ, который вы не хотите назначать этому узлу, спасибо!"
},
"mintingpage":{
"mchange1":"Общие сведения о чеканке",

View File

@ -153,7 +153,7 @@
"smchange7":"Finishing up relationship",
"smchange8":"Adding minting key to node",
"smchange9":"Complete",
"smchange10": "Only 2 minting keys are allowed per node, you are attempting to assign 3 keys, please go to management - node management, and remove the key you do not want to assign to this node, thank you!"
"smchange10":"Only 2 minting keys are allowed per node, you are attempting to assign 3 keys, please go to management - node management, and remove the key you do not want to assign to this node, thank you!"
},
"mintingpage":{
"mchange1":"General Minting Details",

View File

@ -152,7 +152,8 @@
"smchange6":"等待区块链确认",
"smchange7":"结束关系",
"smchange8":"向节点添加铸币密钥",
"smchange9":"完全的"
"smchange9":"完全的",
"smchange10":"每个节点只允许 2 个铸币密钥,您正在尝试分配 3 个密钥,请进入管理 - 节点管理,并删除您不想分配给该节点的密钥,谢谢!"
},
"mintingpage":{
"mchange1":"一般铸币信息",

View File

@ -152,7 +152,8 @@
"smchange6":"等待區塊鏈確認",
"smchange7":"結束關係",
"smchange8":"向節點添加鑄幣密鑰",
"smchange9":"完全的"
"smchange9":"完全的",
"smchange10":"每個節點只允許 2 個鑄幣密鑰,您正在嘗試分配 3 個密鑰,請進入管理 - 節點管理,並刪除您不想分配給該節點的密鑰,謝謝!"
},
"mintingpage":{
"mchange1":"一般鑄幣信息",

View File

@ -12,7 +12,8 @@ class AppInfo extends connect(store)(LitElement) {
return {
blockInfo: { type: Object },
nodeStatus: { type: Object },
nodeInfo: { type: Object },
nodeInfo: { type: Array },
coreInfo: { type: Array },
nodeConfig: { type: Object },
pageUrl: { type: String },
theme: { type: String, reflect: true }
@ -88,7 +89,8 @@ class AppInfo extends connect(store)(LitElement) {
constructor() {
super()
this.blockInfo = {}
this.nodeInfo = {}
this.nodeInfo = []
this.coreInfo = []
this.nodeStatus = {}
this.pageUrl = ''
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
@ -97,7 +99,7 @@ class AppInfo extends connect(store)(LitElement) {
render() {
return html`
<div id="profileInMenu">
<span class="info">${translate("appinfo.blockheight")}: ${this.blockInfo.height ? this.blockInfo.height : ''} <span class=${this.cssStatus}>${this._renderStatus()}</span></span>
<span class="info">${translate("appinfo.blockheight")}: ${this.nodeInfo.height ? this.nodeInfo.height : ''} <span class=${this.cssStatus}>${this._renderStatus()}</span></span>
<span class="info">${translate("appinfo.uiversion")}: ${this.nodeConfig.version ? this.nodeConfig.version : ''}</span>
${this._renderCoreVersion()}
<a id="pageLink"></a>
@ -106,19 +108,56 @@ class AppInfo extends connect(store)(LitElement) {
}
firstUpdated() {
this.getNodeInfo()
this.getCoreInfo()
setInterval(() => {
this.getNodeInfo()
this.getCoreInfo()
}, 60000)
}
async getNodeInfo() {
const appinfoNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
const appinfoUrl = appinfoNode.protocol + '://' + appinfoNode.domain + ':' + appinfoNode.port
const url = `${appinfoUrl}/admin/status`
await fetch(url).then(response => {
return response.json()
})
.then(data => {
this.nodeInfo = data
})
.catch(err => {
console.error('Request failed', err)
})
}
async getCoreInfo() {
const appinfoNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
const appinfoUrl = appinfoNode.protocol + '://' + appinfoNode.domain + ':' + appinfoNode.port
const url = `${appinfoUrl}/admin/info`
await fetch(url).then(response => {
return response.json()
})
.then(data => {
this.coreInfo = data
})
.catch(err => {
console.error('Request failed', err)
})
}
_renderStatus() {
if (this.nodeStatus.isMintingPossible === true && this.nodeStatus.isSynchronizing === true) {
if (this.nodeInfo.isMintingPossible === true && this.nodeInfo.isSynchronizing === true) {
this.cssStatus = 'blue'
return html`${translate("appinfo.minting")}`
} else if (this.nodeStatus.isMintingPossible === true && this.nodeStatus.isSynchronizing === false) {
} else if (this.nodeInfo.isMintingPossible === true && this.nodeInfo.isSynchronizing === false) {
this.cssStatus = 'blue'
return html`${translate("appinfo.minting")}`
} else if (this.nodeStatus.isMintingPossible === false && this.nodeStatus.isSynchronizing === true) {
} else if (this.nodeInfo.isMintingPossible === false && this.nodeInfo.isSynchronizing === true) {
this.cssStatus = 'black'
return html`(${translate("appinfo.synchronizing")}... ${this.nodeStatus.syncPercent !== undefined ? this.nodeStatus.syncPercent + '%' : ''})`
} else if (this.nodeStatus.isMintingPossible === false && this.nodeStatus.isSynchronizing === false) {
return html`(${translate("appinfo.synchronizing")}... ${this.nodeInfo.syncPercent !== undefined ? this.nodeInfo.syncPercent + '%' : ''})`
} else if (this.nodeInfo.isMintingPossible === false && this.nodeInfo.isSynchronizing === false) {
this.cssStatus = 'black'
return ''
} else {
@ -127,8 +166,7 @@ class AppInfo extends connect(store)(LitElement) {
}
_renderCoreVersion() {
return html`<span class="info">${translate("appinfo.coreversion")}: ${this.nodeInfo.buildVersion ? this.nodeInfo.buildVersion : ''}</span>`
setTimeout(_renderCoreVersion(), 60000)
return html`<span class="info">${translate("appinfo.coreversion")}: ${this.coreInfo.buildVersion ? this.coreInfo.buildVersion : ''}</span>`
}
gotoPage(url) {
@ -141,7 +179,6 @@ class AppInfo extends connect(store)(LitElement) {
stateChanged(state) {
this.blockInfo = state.app.blockInfo
this.nodeStatus = state.app.nodeStatus
this.nodeInfo = state.app.nodeInfo
this.nodeConfig = state.app.nodeConfig
this.pageUrl = state.app.pageUrl
if (this.pageUrl.length > 5) {