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

Rework Overview and Sponsor

This commit is contained in:
AlphaX-Projects 2023-07-24 14:21:20 +02:00
parent 63bd6ac3c4
commit 360e82e621
21 changed files with 514 additions and 510 deletions

View File

@ -214,7 +214,8 @@
"wp1": "Prägung",
"wp2": "Nicht am Prägen",
"wp3": "Kerninformationen",
"wp4": "Synchronisiert"
"wp4": "Synchronisiert",
"wp5": "Synchronisierungsstatus"
},
"general": {
"yes": "Ja",

View File

@ -214,7 +214,8 @@
"wp1": "Acuñación",
"wp2": "Sin acuñar",
"wp3": "Información básica",
"wp4": "Sincronizado"
"wp4": "Sincronizado",
"wp5": "Estado de sincronización"
},
"general": {
"yes": "Sí",

View File

@ -214,7 +214,8 @@
"wp1": "Monnaie",
"wp2": "Pas de frappe",
"wp3": "Informations de base",
"wp4": "Synchronisé"
"wp4": "Synchronisé",
"wp5": "État de la synchronisation"
},
"general": {
"yes": "Oui",

View File

@ -215,7 +215,8 @@
"wp1": "खनन",
"wp2": "नॉट मिंटिंग",
"wp3": "मुख्य जानकारी",
"wp4": "सिंक्रोनाइज़्ड"
"wp4": "सिंक्रोनाइज़्ड",
"wp5": "सिंक स्थिति"
},
"general": {
"yes": "हाँ",

View File

@ -214,7 +214,8 @@
"wp1": "Kovanje",
"wp2": "Nije kovano",
"wp3": "Osnovne informacije",
"wp4": "Sinkronizirano"
"wp4": "Sinkronizirano",
"wp5": "Status sinkronizacije"
},
"general": {
"yes": "Da",

View File

@ -214,7 +214,8 @@
"wp1": "verés",
"wp2": "Nem pénzverés",
"wp3": "Alapinformációk",
"wp4": "Szinkronizált"
"wp4": "Szinkronizált",
"wp5": "Szinkronizálás állapota"
},
"general": {
"yes": "Igen",

View File

@ -214,7 +214,8 @@
"wp1": "Conio",
"wp2": "Non conio",
"wp3": "Informazioni principali",
"wp4": "Sincronizzato"
"wp4": "Sincronizzato",
"wp5": "Stato sincronizzazione"
},
"general": {
"yes": "Yes",

View File

@ -216,7 +216,8 @@
"wp1": "ミント",
"wp2": "鋳造しない",
"wp3": "コア情報",
"wp4": "同期済み"
"wp4": "同期済み",
"wp5": "同期ステータス"
},
"general": {
"yes": "はい",

View File

@ -214,7 +214,8 @@
"wp1": "조폐",
"wp2": "조폐되지 않음",
"wp3": "핵심 정보",
"wp4": "동기화됨"
"wp4": "동기화됨",
"wp5": "동기화 상태"
},
"general": {
"yes": "예",

View File

@ -214,7 +214,8 @@
"wp1": "Minting",
"wp2": "Ikke preging",
"wp3": "Kjerneinformasjon",
"wp4": "Synkronisert"
"wp4": "Synkronisert",
"wp5": "Synkroniseringsstatus"
},
"general": {
"yes": "Ja",

View File

@ -214,7 +214,8 @@
"wp1": "Bicie",
"wp2": "Nie bije",
"wp3": "Podstawowe informacje",
"wp4": "Zsynchronizowany"
"wp4": "Zsynchronizowany",
"wp5": "Stan synchronizacji"
},
"general": {
"yes": "Tak",

View File

@ -214,7 +214,8 @@
"wp1": "Criação",
"wp2": "Não está cunhando",
"wp3": "Informações essenciais",
"wp4": "Sincronizado"
"wp4": "Sincronizado",
"wp5": "Status da sincronização"
},
"general": {
"yes": "Sim",

View File

@ -214,7 +214,8 @@
"wp1": "Battering",
"wp2": "Nu se bate",
"wp3": "Informații de bază",
"wp4": "Sincronizat"
"wp4": "Sincronizat",
"wp5": "Stare sincronizare"
},
"general": {
"yes": "Da",

View File

@ -214,7 +214,8 @@
"wp1": "Kovanje",
"wp2": "Ne kuje",
"wp3": "Osnovne informacije",
"wp4": "Sinhronizovano"
"wp4": "Sinhronizovano",
"wp5": "Status sinhronizacije"
},
"general": {
"yes": "Da",

View File

@ -214,7 +214,8 @@
"wp1": "Чеканка",
"wp2": "Не чеканить",
"wp3": "Основная информация",
"wp4": "Синхронизировано"
"wp4": "Синхронизировано",
"wp5": "Статус синхронизации"
},
"general": {
"yes": "Да",

View File

@ -215,7 +215,8 @@
"wp1": "Minting",
"wp2": "Not Minting",
"wp3": "Core Information",
"wp4": "Synchronized"
"wp4": "Synchronized",
"wp5": "Sync Status"
},
"general": {
"yes": "Yes",

View File

@ -214,7 +214,8 @@
"wp1": "铸造",
"wp2": "不铸造",
"wp3": "核心信息",
"wp4": "已同步"
"wp4": "已同步",
"wp5": "同步状态"
},
"general": {
"yes": "是",

View File

@ -214,7 +214,8 @@
"wp1": "鑄造",
"wp2": "不鑄造",
"wp3": "核心信息",
"wp4": "已同步"
"wp4": "已同步",
"wp5": "同步狀態"
},
"general": {
"yes": "是",

View File

@ -79,6 +79,8 @@ a:not([href]):not([tabindex]):focus {
img {
vertical-align: middle;
border-style: none;
height: 128px;
width: 128px;
}
caption {

View File

@ -1,13 +1,15 @@
import { LitElement, html, css } from 'lit'
import { Epml } from '../../../epml.js'
import { use, get, translate, registerTranslateConfig } from 'lit-translate'
import isElectron from 'is-electron'
import { overviewStyle } from './overview-page-css.js'
import { asyncReplace } from 'lit/directives/async-replace.js'
import isElectron from 'is-electron'
import "@material/mwc-button"
import '@material/mwc-dialog'
import '@vaadin/button';
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@vaadin/button'
registerTranslateConfig({
loader: (lang) => fetch(`/language/${lang}.json`).then((res) => res.json()),
@ -15,8 +17,8 @@ registerTranslateConfig({
async function* countDown(count, callback) {
while (count > 0) {
yield count--;
await new Promise((r) => setTimeout(r, 1000));
yield count--
await new Promise((r) => setTimeout(r, 1000))
if (count === 0) {
callback()
}
@ -114,7 +116,7 @@ class OverviewPage extends LitElement {
</div>
<div>
<span class="heading"><span class="${this.cssStatus2}">${this.renderSyncStatus()}</span></span>
<span class="description">${translate("walletpage.wchange41")}</span>
<span class="description">${translate("walletprofile.wp5")}</span>
</div>
</div>
</div>
@ -168,14 +170,18 @@ class OverviewPage extends LitElement {
setInterval(() => {
this.refreshItems()
}, 60000)
setInterval(() => {
this.getAvatar()
}, 180000)
}
changeTheme() {
const checkTheme = localStorage.getItem('qortalTheme')
if (checkTheme === 'dark') {
this.theme = 'dark';
this.theme = 'dark'
} else {
this.theme = 'light';
this.theme = 'light'
}
document.querySelector('html').setAttribute('theme', this.theme)
}
@ -288,7 +294,7 @@ class StartMintingNow extends LitElement {
status: { type: Number },
timer: { type: Number },
privateRewardShareKey: { type: String }
};
}
}
static get styles() {
@ -424,24 +430,24 @@ class StartMintingNow extends LitElement {
color: var(--error);
}
`,
];
]
}
constructor() {
super();
this.mintingAccountData = [];
this.errorMsg = '';
this.openDialogRewardShare = false;
this.status = 0;
this.privateRewardShareKey = "";
super()
this.mintingAccountData = []
this.errorMsg = ''
this.openDialogRewardShare = false
this.status = 0
this.privateRewardShareKey = ""
}
render() {
return html` ${this.renderStartMintingButton()} `;
return html` ${this.renderStartMintingButton()} `
}
firstUpdated() {
this.getMintingAcccounts();
this.getMintingAcccounts()
}
renderErrorMsg1() {
@ -465,7 +471,7 @@ class StartMintingNow extends LitElement {
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
const url = `${nodeUrl}/admin/mintingaccounts`
try {
const res = await fetch(url);
const res = await fetch(url)
const mintingAccountData = await res.json()
this.mintingAccountData = mintingAccountData
@ -509,7 +515,7 @@ class StartMintingNow extends LitElement {
}
} catch (error) {
this.errorMsg = this.renderErrorMsg2()
return;
return
}
try {
@ -540,7 +546,7 @@ class StartMintingNow extends LitElement {
}
if (!stop) {
stop = true;
stop = true
try {
const address = window.parent.reduxStore.getState().app?.selectedAddress?.address
const myRewardShareArray = await rewardShares(address)
@ -554,7 +560,7 @@ class StartMintingNow extends LitElement {
}
stop = false
}
};
}
interval = setInterval(getAnswer, 5000)
}
@ -570,7 +576,7 @@ class StartMintingNow extends LitElement {
const isMinterButKeyMintingKeyNotAssigned = addressInfo?.error !== 124 && addressInfo?.level >= 1 && !findMintingAccount
const makeTransactionRequest = async (lastRef) => {
let mylastRef = lastRef;
let mylastRef = lastRef
let rewarddialog1 = get('transactions.rewarddialog1')
let rewarddialog2 = get('transactions.rewarddialog2')
let rewarddialog3 = get('transactions.rewarddialog3')
@ -594,18 +600,18 @@ class StartMintingNow extends LitElement {
}
const getTxnRequestResponse = (txnResponse) => {
let err6string = get('rewardsharepage.rchange21');
let err6string = get('rewardsharepage.rchange21')
if (txnResponse?.extraData?.rewardSharePrivateKey && (txnResponse?.data?.message?.includes('multiple') || txnResponse?.data?.message?.includes('SELF_SHARE_EXISTS'))) {
return err6string
}
if (txnResponse.success === false && txnResponse.message) {
throw (txnResponse);
throw (txnResponse)
} else if (
txnResponse.success === true &&
!txnResponse.data.error
) {
return err6string;
return err6string
} else {
throw (txnResponse)
}
@ -617,7 +623,7 @@ class StartMintingNow extends LitElement {
let myTransaction = await makeTransactionRequest(lastRef)
getTxnRequestResponse(myTransaction);
getTxnRequestResponse(myTransaction)
return myTransaction?.extraData?.rewardSharePrivateKey
}
@ -637,7 +643,7 @@ class StartMintingNow extends LitElement {
if(findMintingAccountsFromUser.length > 2){
this.errorMsg = translate("startminting.smchange10")
return;
return
}
try {
@ -646,7 +652,7 @@ class StartMintingNow extends LitElement {
} catch (error) {
console.log({ error })
this.errorMsg = error?.data?.message || this.renderErrorMsg4()
return;
return
}
}
@ -741,7 +747,7 @@ class StartMintingNow extends LitElement {
` : ""}
` : ''}
`;
`
}
}
window.customElements.define('start-minting-now', StartMintingNow)
@ -751,7 +757,7 @@ class MyButton extends LitElement {
onClick: { type: Function },
isLoading: { type: Boolean },
label: { type: String },
};
}
static styles = css`
vaadin-button {
@ -769,13 +775,13 @@ class MyButton extends LitElement {
vaadin-button:hover {
opacity: 0.9;
}
`;
`
constructor() {
super();
this.onClick = () => {};
this.isLoading = false;
this.label = '';
super()
this.onClick = () => {}
this.isLoading = false
this.label = ''
}
render() {
@ -788,7 +794,7 @@ class MyButton extends LitElement {
? html`${this.label}`
: html`<paper-spinner-lite active></paper-spinner-lite>`}
</vaadin-button>
`;
`
}
}
customElements.define('my-button', MyButton)

File diff suppressed because it is too large Load Diff