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

clear memory

This commit is contained in:
AlphaX-Projects 2023-08-01 19:25:57 +02:00
parent 89923caa61
commit 5c2ce14f2a
27 changed files with 370 additions and 99 deletions

View File

@ -134,6 +134,18 @@ class BecomeMinter extends LitElement {
window.parent.electronAPI.showMyMenu() window.parent.electronAPI.showMyMenu()
}) })
} }
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
async getRewardShareRelationship(recipientAddress) { async getRewardShareRelationship(recipientAddress) {

View File

@ -1,19 +1,15 @@
import { LitElement, html } from 'lit'; import { LitElement, html } from 'lit'
import { Epml } from '../../../../epml.js'; import { Epml } from '../../../../epml.js'
import '../../components/ButtonIconCopy.js'; import '../../components/ButtonIconCopy.js'
import { use, translate, registerTranslateConfig } from 'lit-translate'; import { use, get, translate, registerTranslateConfig } from 'lit-translate'
registerTranslateConfig({ import '@polymer/paper-spinner/paper-spinner-lite.js'
loader: (lang) => fetch(`/language/${lang}.json`).then((res) => res.json()), import '@material/mwc-button'
}); import '@material/mwc-textfield'
import '@vaadin/button'
import { pageStyles } from '../become-minter-css.src.js'
import '@polymer/paper-spinner/paper-spinner-lite.js'; const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
import '@material/mwc-button';
import '@material/mwc-textfield';
import '@vaadin/button';
import { pageStyles } from '../become-minter-css.src.js';
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
class NotSponsored extends LitElement { class NotSponsored extends LitElement {
static properties = { static properties = {
@ -27,18 +23,18 @@ class NotSponsored extends LitElement {
constructor() { constructor() {
super(); super();
this.isLoadingSponsorshipKeySubmit = false; this.isLoadingSponsorshipKeySubmit = false
this.sponsorshipKeyValue = ''; this.sponsorshipKeyValue = ''
this.addMintingAccountMessage = ''; this.addMintingAccountMessage = ''
this.atMount = () => {}; this.atMount = () => {}
} }
renderErr1Text() { renderErr1Text() {
return html`${translate('nodepage.nchange27')}`; return html`${translate('nodepage.nchange27')}`
} }
renderErr2Text() { renderErr2Text() {
return html`${translate('nodepage.nchange28')}`; return html`${translate('nodepage.nchange28')}`
} }
getApiKey() { getApiKey() {
@ -46,13 +42,13 @@ class NotSponsored extends LitElement {
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[ window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
window.parent.reduxStore.getState().app.nodeConfig.node window.parent.reduxStore.getState().app.nodeConfig.node
]; ];
let apiKey = myNode.apiKey; let apiKey = myNode.apiKey
return apiKey; return apiKey
} }
addMintingAccount(e) { addMintingAccount(e) {
this.isLoadingSponsorshipKeySubmit = true; this.isLoadingSponsorshipKeySubmit = true
this.addMintingAccountMessage = 'Loading...'; this.addMintingAccountMessage = 'Loading...'
parentEpml parentEpml
.request('apiCall', { .request('apiCall', {
@ -63,20 +59,20 @@ class NotSponsored extends LitElement {
.then((res) => { .then((res) => {
if (res === true) { if (res === true) {
// refetch data // refetch data
this.atMount(); this.atMount()
this.sponsorshipKeyValue = ''; this.sponsorshipKeyValue = ''
this.addMintingAccountMessage = this.renderErr1Text(); this.addMintingAccountMessage = this.renderErr1Text()
this.isLoadingSponsorshipKeySubmit = false; this.isLoadingSponsorshipKeySubmit = false
} else { } else {
this.sponsorshipKeyValue = ''; this.sponsorshipKeyValue = '';
this.addMintingAccountMessage = this.renderErr2Text(); this.addMintingAccountMessage = this.renderErr2Text()
this.isLoadingSponsorshipKeySubmit = false; this.isLoadingSponsorshipKeySubmit = false
} }
}); })
} }
inputHandler(e) { inputHandler(e) {
this.sponsorshipKeyValue = e.target.value; this.sponsorshipKeyValue = e.target.value
} }
render() { render() {
@ -130,8 +126,8 @@ class NotSponsored extends LitElement {
</div> </div>
</div> </div>
</div> </div>
`; `
} }
} }
window.customElements.define('not-sponsored', NotSponsored); window.customElements.define('not-sponsored', NotSponsored)

View File

@ -1,18 +1,14 @@
import { LitElement, html } from 'lit'; import { LitElement, html } from 'lit'
import { Epml } from '../../../../epml.js'; import { Epml } from '../../../../epml.js'
import '../../components/ButtonIconCopy.js'; import '../../components/ButtonIconCopy.js'
import { use, translate, registerTranslateConfig } from 'lit-translate'; import { use, get, translate, registerTranslateConfig } from 'lit-translate'
registerTranslateConfig({ import '@polymer/paper-spinner/paper-spinner-lite.js'
loader: (lang) => fetch(`/language/${lang}.json`).then((res) => res.json()), import '@material/mwc-button'
}); import '@material/mwc-textfield'
import '@vaadin/button'
import '@polymer/paper-spinner/paper-spinner-lite.js'; import { blocksNeed } from '../../../utils/blocks-needed.js'
import '@material/mwc-button'; import { pageStyles } from '../become-minter-css.src.js'
import '@material/mwc-textfield';
import '@vaadin/button';
import { blocksNeed } from '../../../utils/blocks-needed.js';
import { pageStyles } from '../become-minter-css.src.js';
class YesSponsored extends LitElement { class YesSponsored extends LitElement {
static get properties() { static get properties() {
@ -24,14 +20,13 @@ class YesSponsored extends LitElement {
} }
constructor() { constructor() {
super(); super()
this.addressInfo = {}
this.addressInfo = {}; this.rewardSharePublicKey = ''
this.rewardSharePublicKey = '';
this.isMinting = false this.isMinting = false
} }
static styles = [pageStyles]; static styles = [pageStyles]
_levelUpBlocks() { _levelUpBlocks() {
let countBlocksString = ( let countBlocksString = (
@ -39,7 +34,7 @@ class YesSponsored extends LitElement {
(this.addressInfo?.blocksMinted + (this.addressInfo?.blocksMinted +
this.addressInfo?.blocksMintedAdjustment) this.addressInfo?.blocksMintedAdjustment)
).toString(); ).toString();
return countBlocksString; return countBlocksString
} }
render() { render() {
@ -107,8 +102,8 @@ class YesSponsored extends LitElement {
</div> </div>
</div> </div>
</div> </div>
`; `
} }
} }
window.customElements.define('yes-sponsored', YesSponsored); window.customElements.define('yes-sponsored', YesSponsored)

View File

@ -9,6 +9,7 @@ import { cropAddress } from "../../utils/cropAddress"
import { roundToNearestDecimal } from '../../utils/roundToNearestDecimal.js' import { roundToNearestDecimal } from '../../utils/roundToNearestDecimal.js'
import { EmojiPicker } from 'emoji-picker-js' import { EmojiPicker } from 'emoji-picker-js'
import { generateHTML } from '@tiptap/core' import { generateHTML } from '@tiptap/core'
import isElectron from 'is-electron'
import axios from 'axios' import axios from 'axios'
import Highlight from '@tiptap/extension-highlight' import Highlight from '@tiptap/extension-highlight'
@ -362,6 +363,19 @@ class ChatScroller extends LitElement {
this.downElementObserver() this.downElementObserver()
await this.getUpdateComplete() await this.getUpdateComplete()
this.viewElement.scrollTop = this.viewElement.scrollHeight + 50 this.viewElement.scrollTop = this.viewElement.scrollHeight + 50
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
changeTheme() { changeTheme() {
@ -568,6 +582,18 @@ class MessageTemplate extends LitElement {
overlay.shadowRoot.getElementById("overlay").style.cssText = "background-color: transparent; box-shadow: rgb(50 50 93 / 25%) 0px 2px 5px -1px, rgb(0 0 0 / 30%) 0px 1px 3px -1px" overlay.shadowRoot.getElementById("overlay").style.cssText = "background-color: transparent; box-shadow: rgb(50 50 93 / 25%) 0px 2px 5px -1px, rgb(0 0 0 / 30%) 0px 1px 3px -1px"
overlay.shadowRoot.getElementById('content').style.cssText = "background-color: var(--reactions-tooltip-bg); color: var(--chat-bubble-msg-color); text-align: center; padding: 20px 10px; border-radius: 8px; font-family: Roboto, sans-serif; letter-spacing: 0.3px; font-weight: 300; font-size: 13.5px; transition: all 0.3s ease-in-out;" overlay.shadowRoot.getElementById('content').style.cssText = "background-color: var(--reactions-tooltip-bg); color: var(--chat-bubble-msg-color); text-align: center; padding: 20px 10px; border-radius: 8px; font-family: Roboto, sans-serif; letter-spacing: 0.3px; font-weight: 300; font-size: 13.5px; transition: all 0.3s ease-in-out;"
}) })
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
render() { render() {

View File

@ -177,7 +177,7 @@ class ChatSideNavHeads extends LitElement {
this.config = JSON.parse(c) this.config = JSON.parse(c)
}) })
}) })
parentEpml.imReady(); parentEpml.imReady()
} }
shouldUpdate(changedProperties) { shouldUpdate(changedProperties) {

View File

@ -2,6 +2,7 @@ import { LitElement, html, css } from 'lit'
import { render } from 'lit/html.js' import { render } from 'lit/html.js'
import { Epml } from '../../../epml.js' import { Epml } from '../../../epml.js'
import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
import isElectron from 'is-electron'
import '@material/mwc-icon' import '@material/mwc-icon'
import '@material/mwc-button' import '@material/mwc-button'
@ -314,7 +315,11 @@ class ChatWelcomePage extends LitElement {
} }
clearConsole() { clearConsole() {
console.clear() if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
changeTheme() { changeTheme() {

View File

@ -1849,6 +1849,18 @@ class GroupManagement extends LitElement {
}) })
}) })
parentEpml.imReady() parentEpml.imReady()
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
changeTheme() { changeTheme() {

View File

@ -1,8 +1,8 @@
import { parentEpml } from './connect.js'; import { parentEpml } from './connect.js';
import './streams/streams.js'; import './streams/streams.js';
let config = {}; let config = {}
let haveRegisteredNodeManagement = false; let haveRegisteredNodeManagement = false
parentEpml.ready().then(() => { parentEpml.ready().then(() => {
// pluginUrlsConf // pluginUrlsConf
@ -186,20 +186,20 @@ parentEpml.ready().then(() => {
]; ];
const registerPlugins = (pluginInfo) => { const registerPlugins = (pluginInfo) => {
parentEpml.request('registerUrl', pluginInfo); parentEpml.request('registerUrl', pluginInfo)
}; };
const checkNode = const checkNode =
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[ window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
window.parent.reduxStore.getState().app.nodeConfig.node window.parent.reduxStore.getState().app.nodeConfig.node
]; ]
parentEpml.subscribe('config', (c) => { parentEpml.subscribe('config', (c) => {
config = JSON.parse(c); config = JSON.parse(c)
// Only register node management if node management is enabled and it hasn't already been registered // Only register node management if node management is enabled and it hasn't already been registered
if (!haveRegisteredNodeManagement && checkNode.enableManagement) { if (!haveRegisteredNodeManagement && checkNode.enableManagement) {
haveRegisteredNodeManagement = true; haveRegisteredNodeManagement = true
let nodeManagementConf = { let nodeManagementConf = {
url: 'node-management', url: 'node-management',
@ -213,10 +213,10 @@ parentEpml.ready().then(() => {
parent: false, parent: false,
}; };
let _pluginUrlsConf = [...pluginUrlsConf, nodeManagementConf]; let _pluginUrlsConf = [...pluginUrlsConf, nodeManagementConf]
registerPlugins(_pluginUrlsConf); registerPlugins(_pluginUrlsConf)
} else { } else {
registerPlugins(pluginUrlsConf); registerPlugins(pluginUrlsConf)
} }
}); })
}); })

View File

@ -1,6 +1,10 @@
import { LitElement, html, css } from 'lit' import { LitElement, html, css } from 'lit'
import { render } from 'lit/html.js'
import { Epml } from '../../../../epml.js'
import isElectron from 'is-electron' import isElectron from 'is-electron'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
class ChainMessaging extends LitElement { class ChainMessaging extends LitElement {
static get properties() { static get properties() {
return { return {
@ -44,12 +48,18 @@ class ChainMessaging extends LitElement {
} }
firstUpdated() { firstUpdated() {
this.changeTheme() this.changeTheme()
setInterval(() => { window.addEventListener('storage', () => {
this.changeTheme(); const checkTheme = localStorage.getItem('qortalTheme')
}, 100)
if (checkTheme === 'dark') {
this.theme = 'dark'
} else {
this.theme = 'light'
}
document.querySelector('html').setAttribute('theme', this.theme)
})
if (!isElectron()) { if (!isElectron()) {
} else { } else {
@ -60,6 +70,14 @@ class ChainMessaging extends LitElement {
} }
} }
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
}
changeTheme() { changeTheme() {
const checkTheme = localStorage.getItem('qortalTheme') const checkTheme = localStorage.getItem('qortalTheme')
if (checkTheme === 'dark') { if (checkTheme === 'dark') {

View File

@ -138,13 +138,8 @@ class Messaging extends LitElement {
} }
firstUpdated() { firstUpdated() {
this.changeTheme() this.changeTheme()
setInterval(() => {
this.changeTheme();
}, 100)
if (!isElectron()) { if (!isElectron()) {
} else { } else {
window.addEventListener('contextmenu', (event) => { window.addEventListener('contextmenu', (event) => {
@ -170,6 +165,18 @@ class Messaging extends LitElement {
}) })
}) })
parentEpml.imReady() parentEpml.imReady()
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
changeTheme() { changeTheme() {

View File

@ -468,6 +468,18 @@ class Chat extends LitElement {
}) })
}) })
parentEpml.imReady() parentEpml.imReady()
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
setOpenPrivateMessage(props) { setOpenPrivateMessage(props) {

View File

@ -347,7 +347,6 @@ class MintingInfo extends LitElement {
} }
async firstUpdated() { async firstUpdated() {
this.changeTheme() this.changeTheme()
this.changeLanguage() this.changeLanguage()
@ -429,6 +428,18 @@ class MintingInfo extends LitElement {
}) })
}) })
parentEpml.imReady() parentEpml.imReady()
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
async getAddressLevel() { async getAddressLevel() {

View File

@ -537,7 +537,6 @@ class NameRegistration extends LitElement {
} }
firstUpdated() { firstUpdated() {
this.changeTheme() this.changeTheme()
this.changeLanguage() this.changeLanguage()
this.unitFee() this.unitFee()
@ -604,6 +603,18 @@ class NameRegistration extends LitElement {
}) })
}) })
parentEpml.imReady() parentEpml.imReady()
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
changeTheme() { changeTheme() {

View File

@ -609,6 +609,18 @@ class NamesMarket extends LitElement {
}) })
}) })
parentEpml.imReady() parentEpml.imReady()
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
displayTabContent(tab) { displayTabContent(tab) {

View File

@ -278,7 +278,6 @@ class NodeManagement extends LitElement {
} }
firstUpdated() { firstUpdated() {
this.changeTheme() this.changeTheme()
this.changeLanguage() this.changeLanguage()
this.updateMintingAccounts() this.updateMintingAccounts()
@ -363,6 +362,18 @@ class NodeManagement extends LitElement {
}) })
}) })
parentEpml.imReady() parentEpml.imReady()
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
changeTheme() { changeTheme() {

View File

@ -180,6 +180,19 @@ class OverviewPage extends LitElement {
setInterval(() => { setInterval(() => {
this.getAvatar() this.getAvatar()
}, 180000) }, 180000)
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
changeTheme() { changeTheme() {

View File

@ -180,7 +180,6 @@ class Puzzles extends LitElement {
} }
firstUpdated() { firstUpdated() {
this.changeTheme() this.changeTheme()
this.changeLanguage() this.changeLanguage()
@ -308,7 +307,7 @@ class Puzzles extends LitElement {
this.puzzles = _puzzles; this.puzzles = _puzzles;
setTimeout(updatePuzzles, 20000) setTimeout(updatePuzzles, 60000)
} }
let configLoaded = false let configLoaded = false
@ -330,6 +329,18 @@ class Puzzles extends LitElement {
}) })
}) })
parentEpml.imReady() parentEpml.imReady()
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
changeTheme() { changeTheme() {

View File

@ -544,7 +544,6 @@ class QApps extends LitElement {
} }
firstUpdated() { firstUpdated() {
this.changeTheme() this.changeTheme()
this.changeLanguage() this.changeLanguage()
this.showapps() this.showapps()
@ -624,6 +623,18 @@ class QApps extends LitElement {
}) })
}) })
parentEpml.imReady() parentEpml.imReady()
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
changeTheme() { changeTheme() {

View File

@ -2657,6 +2657,18 @@ class WebBrowser extends LitElement {
}); });
} }
}); });
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
changeTheme() { changeTheme() {

View File

@ -441,7 +441,6 @@ class DataManagement extends LitElement {
} }
firstUpdated() { firstUpdated() {
this.changeTheme() this.changeTheme()
this.changeLanguage() this.changeLanguage()
this.showManagement() this.showManagement()
@ -494,6 +493,18 @@ class DataManagement extends LitElement {
}) })
}) })
parentEpml.imReady() parentEpml.imReady()
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
changeTheme() { changeTheme() {

View File

@ -318,7 +318,6 @@ class PublishData extends LitElement {
} }
firstUpdated() { firstUpdated() {
this.changeTheme() this.changeTheme()
this.changeLanguage() this.changeLanguage()
@ -343,6 +342,18 @@ class PublishData extends LitElement {
window.parent.electronAPI.showMyMenu() window.parent.electronAPI.showMyMenu()
}) })
} }
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
changeTheme() { changeTheme() {

View File

@ -398,7 +398,6 @@ class Websites extends LitElement {
} }
firstUpdated() { firstUpdated() {
this.changeTheme() this.changeTheme()
this.changeLanguage() this.changeLanguage()
this.showWebsites() this.showWebsites()
@ -478,6 +477,18 @@ class Websites extends LitElement {
}) })
}) })
parentEpml.imReady() parentEpml.imReady()
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
changeTheme() { changeTheme() {

View File

@ -211,7 +211,6 @@ class RewardShare extends LitElement {
} }
firstUpdated() { firstUpdated() {
this.changeTheme() this.changeTheme()
this.changeLanguage() this.changeLanguage()
@ -238,12 +237,13 @@ class RewardShare extends LitElement {
} }
const updateRewardshares = () => { const updateRewardshares = () => {
this.rewardShares = []
parentEpml.request('apiCall', { parentEpml.request('apiCall', {
url: `/addresses/rewardshares?involving=${this.selectedAddress.address}` url: `/addresses/rewardshares?involving=${this.selectedAddress.address}`
}).then(res => { }).then(res => {
setTimeout(() => { this.rewardShares = res }, 1) this.rewardShares = res
}) })
setTimeout(updateRewardshares, this.config.user.nodeSettings.pingInterval) setTimeout(updateRewardshares, 60000)
} }
let configLoaded = false let configLoaded = false
@ -266,6 +266,18 @@ class RewardShare extends LitElement {
}) })
parentEpml.imReady() parentEpml.imReady()
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
changeTheme() { changeTheme() {

View File

@ -406,6 +406,23 @@ class SponsorshipList extends LitElement {
window.parent.electronAPI.showMyMenu() window.parent.electronAPI.showMyMenu()
}) })
} }
setInterval(() => {
this.atMount()
}, 180000)
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
renderCopyMsg() { renderCopyMsg() {

View File

@ -2100,7 +2100,6 @@ class TradeBotPortal extends LitElement {
} }
firstUpdated() { firstUpdated() {
let _this = this let _this = this
this.changeTheme() this.changeTheme()
@ -2281,6 +2280,18 @@ class TradeBotPortal extends LitElement {
this.dgbTradebook() this.dgbTradebook()
this.rvnTradebook() this.rvnTradebook()
this.arrrTradebook() this.arrrTradebook()
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
renderAutoLockButton() { renderAutoLockButton() {

View File

@ -1417,7 +1417,6 @@ class TradePortal extends LitElement {
} }
firstUpdated() { firstUpdated() {
let _this = this let _this = this
this.changeTheme() this.changeTheme()
@ -1505,42 +1504,42 @@ class TradePortal extends LitElement {
const getQortBtcPrice = () => { const getQortBtcPrice = () => {
parentEpml.request("apiCall", { url: `/crosschain/price/BITCOIN?inverse=true` }).then((res) => { parentEpml.request("apiCall", { url: `/crosschain/price/BITCOIN?inverse=true` }).then((res) => {
setTimeout(() => { this.qortbtc = (Number(res) / 1e8).toFixed(8) }, 1) this.qortbtc = (Number(res) / 1e8).toFixed(8)
}) })
setTimeout(getQortBtcPrice, 300000) setTimeout(getQortBtcPrice, 300000)
} }
const getQortLtcPrice = () => { const getQortLtcPrice = () => {
parentEpml.request("apiCall", { url: `/crosschain/price/LITECOIN?inverse=true` }).then((res) => { parentEpml.request("apiCall", { url: `/crosschain/price/LITECOIN?inverse=true` }).then((res) => {
setTimeout(() => { this.qortltc = (Number(res) / 1e8).toFixed(8) }, 1) this.qortltc = (Number(res) / 1e8).toFixed(8)
}) })
setTimeout(getQortLtcPrice, 300000) setTimeout(getQortLtcPrice, 300000)
} }
const getQortDogePrice = () => { const getQortDogePrice = () => {
parentEpml.request("apiCall", { url: `/crosschain/price/DOGECOIN?inverse=true` }).then((res) => { parentEpml.request("apiCall", { url: `/crosschain/price/DOGECOIN?inverse=true` }).then((res) => {
setTimeout(() => { this.qortdoge = (Number(res) / 1e8).toFixed(8) }, 1) this.qortdoge = (Number(res) / 1e8).toFixed(8)
}) })
setTimeout(getQortDogePrice, 300000) setTimeout(getQortDogePrice, 300000)
} }
const getQortDgbPrice = () => { const getQortDgbPrice = () => {
parentEpml.request("apiCall", { url: `/crosschain/price/DIGIBYTE?inverse=true` }).then((res) => { parentEpml.request("apiCall", { url: `/crosschain/price/DIGIBYTE?inverse=true` }).then((res) => {
setTimeout(() => { this.qortdgb = (Number(res) / 1e8).toFixed(8) }, 1) this.qortdgb = (Number(res) / 1e8).toFixed(8)
}) })
setTimeout(getQortDgbPrice, 300000) setTimeout(getQortDgbPrice, 300000)
} }
const getQortRvnPrice = () => { const getQortRvnPrice = () => {
parentEpml.request("apiCall", { url: `/crosschain/price/RAVENCOIN?inverse=true` }).then((res) => { parentEpml.request("apiCall", { url: `/crosschain/price/RAVENCOIN?inverse=true` }).then((res) => {
setTimeout(() => { this.qortrvn = (Number(res) / 1e8).toFixed(8) }, 1) this.qortrvn = (Number(res) / 1e8).toFixed(8)
}) })
setTimeout(getQortRvnPrice, 300000) setTimeout(getQortRvnPrice, 300000)
} }
const getQortArrrPrice = () => { const getQortArrrPrice = () => {
parentEpml.request("apiCall", { url: `/crosschain/price/PIRATECHAIN?inverse=true` }).then((res) => { parentEpml.request("apiCall", { url: `/crosschain/price/PIRATECHAIN?inverse=true` }).then((res) => {
setTimeout(() => { this.qortarrr = (Number(res) / 1e8).toFixed(8) }, 1) this.qortarrr = (Number(res) / 1e8).toFixed(8)
}) })
setTimeout(getQortArrrPrice, 300000) setTimeout(getQortArrrPrice, 300000)
} }
@ -1614,6 +1613,18 @@ class TradePortal extends LitElement {
parentEpml.imReady() parentEpml.imReady()
setTimeout(() => this.shadowRoot.querySelector('[slot="vaadin-grid-cell-content-3"]').setAttribute('title', 'Last Seen'), 3000) setTimeout(() => this.shadowRoot.querySelector('[slot="vaadin-grid-cell-content-3"]').setAttribute('title', 'Last Seen'), 3000)
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
renderTradeLockButton() { renderTradeLockButton() {

View File

@ -2819,7 +2819,6 @@ class MultiWallet extends LitElement {
} }
firstUpdated() { firstUpdated() {
this.changeTheme() this.changeTheme()
this.changeLanguage() this.changeLanguage()
@ -2902,6 +2901,19 @@ class MultiWallet extends LitElement {
window.parent.electronAPI.showMyMenu() window.parent.electronAPI.showMyMenu()
}) })
} }
this.clearConsole()
setInterval(() => {
this.clearConsole()
}, 60000)
}
clearConsole() {
if (!isElectron()) {
} else {
console.clear()
window.parent.electronAPI.clearCache()
}
} }
renderWalletLockButton() { renderWalletLockButton() {