mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
Merge pull request #279 from AlphaX-Projects/master
Fix and cleanup code
This commit is contained in:
commit
41356d113f
@ -49,8 +49,6 @@ export const testApiKey = async (apiKey) => {
|
||||
let testRes = await api.request(testUrl, {
|
||||
method: "GET"
|
||||
});
|
||||
if (testRes === true) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return testRes === true;
|
||||
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ class AppInfo extends connect(store)(LitElement) {
|
||||
super()
|
||||
this.nodeInfo = []
|
||||
this.coreInfo = []
|
||||
this.nodeStatus = {}
|
||||
this.nodeConfig = {}
|
||||
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { css, html, LitElement } from 'lit'
|
||||
import { connect } from 'pwa-helpers'
|
||||
import { store } from '../store.js'
|
||||
import { Epml } from '../epml.js'
|
||||
import { addTradeBotRoutes } from '../tradebot/addTradeBotRoutes.js'
|
||||
import { get, translate } from '../../translate/index.js'
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {store} from '../store.js'
|
||||
import {Epml} from '../epml.js'
|
||||
import {addTradeBotRoutes} from '../tradebot/addTradeBotRoutes.js'
|
||||
import {get, translate} from '../../translate'
|
||||
import localForage from 'localforage'
|
||||
import { decryptData, encryptData } from '../lockScreen.js'
|
||||
import { setChatLastSeen } from '../redux/app/app-actions.js'
|
||||
import {decryptData, encryptData} from '../lockScreen.js'
|
||||
import {setChatLastSeen} from '../redux/app/app-actions.js'
|
||||
import isElectron from 'is-electron'
|
||||
import '@material/mwc-button'
|
||||
import '@material/mwc-icon'
|
||||
@ -746,7 +746,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
drawerTog.click()
|
||||
})
|
||||
|
||||
this.getNodeType()
|
||||
await this.getNodeType()
|
||||
|
||||
const myAppNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||
const nodeAppUrl = myAppNode.protocol + '://' + myAppNode.domain + ':' + myAppNode.port
|
||||
@ -915,7 +915,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
await filterOpenOfferBTC()
|
||||
await appDelay(1000)
|
||||
filterMyBotPriceTradesBTC()
|
||||
await filterMyBotPriceTradesBTC()
|
||||
setTimeout(getOpenTradesBTC, 150000)
|
||||
}
|
||||
}
|
||||
@ -923,11 +923,9 @@ class AppView extends connect(store)(LitElement) {
|
||||
const filterMyBotPriceTradesBTC = async () => {
|
||||
const tradeBotBtcUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=BITCOIN&apiKey=${this.getApiKey()}`
|
||||
|
||||
const tradeBotBtcAt = await fetch(tradeBotBtcUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
this.tradeBotBtcAt = tradeBotBtcAt
|
||||
this.tradeBotBtcAt = await fetch(tradeBotBtcUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
await appDelay(1000)
|
||||
|
||||
@ -965,7 +963,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
await appDelay(1000)
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotAvailableBtcQortal) === true) {
|
||||
return
|
||||
|
||||
} else {
|
||||
const botbtcprice = this.round(parseFloat(this.tradeBotBtcBook[0].botBtcPrice))
|
||||
const changebtcamount = parseFloat(this.tradeBotBtcBook[0].botBtcQortAmount)
|
||||
@ -996,7 +994,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
await appDelay(1000)
|
||||
|
||||
this.buyBtcAction()
|
||||
await this.buyBtcAction()
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotBtcBook) === true) {
|
||||
return
|
||||
@ -1009,7 +1007,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotBtcBook) === true) {
|
||||
return
|
||||
|
||||
} else {
|
||||
const checkBotBtcFunds = this.round(parseFloat(this.tradeBotBtcBook[0].botBtcQortAmount) * parseFloat(this.tradeBotBtcBook[0].botBtcPrice))
|
||||
const myBotBtcFunds = this.round(parseFloat(this.btcWalletBalance))
|
||||
@ -1112,7 +1110,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
await filterOpenOfferLTC()
|
||||
await appDelay(1000)
|
||||
filterMyBotPriceTradesLTC()
|
||||
await filterMyBotPriceTradesLTC()
|
||||
setTimeout(getOpenTradesLTC, 150000)
|
||||
}
|
||||
}
|
||||
@ -1120,11 +1118,9 @@ class AppView extends connect(store)(LitElement) {
|
||||
const filterMyBotPriceTradesLTC = async () => {
|
||||
const tradeBotLtcUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=LITECOIN&apiKey=${this.getApiKey()}`
|
||||
|
||||
const tradeBotLtcAt = await fetch(tradeBotLtcUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
this.tradeBotLtcAt = tradeBotLtcAt
|
||||
this.tradeBotLtcAt = await fetch(tradeBotLtcUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
await appDelay(1000)
|
||||
|
||||
@ -1162,7 +1158,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
await appDelay(1000)
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotAvailableLtcQortal) === true) {
|
||||
return
|
||||
|
||||
} else {
|
||||
const botltcprice = this.round(parseFloat(this.tradeBotLtcBook[0].botLtcPrice))
|
||||
const changeltcamount = parseFloat(this.tradeBotLtcBook[0].botLtcQortAmount)
|
||||
@ -1193,7 +1189,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
await appDelay(1000)
|
||||
|
||||
this.buyLtcAction()
|
||||
await this.buyLtcAction()
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotLtcBook) === true) {
|
||||
return
|
||||
@ -1206,7 +1202,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotLtcBook) === true) {
|
||||
return
|
||||
|
||||
} else {
|
||||
const checkBotLtcFunds = this.round(parseFloat(this.tradeBotLtcBook[0].botLtcQortAmount) * parseFloat(this.tradeBotLtcBook[0].botLtcPrice))
|
||||
const myBotLtcFunds = this.round(parseFloat(this.ltcWalletBalance))
|
||||
@ -1298,7 +1294,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
await filterOpenOfferDOGE()
|
||||
await appDelay(1000)
|
||||
filterMyBotPriceTradesDOGE()
|
||||
await filterMyBotPriceTradesDOGE()
|
||||
setTimeout(getOpenTradesDOGE, 150000)
|
||||
}
|
||||
}
|
||||
@ -1306,11 +1302,9 @@ class AppView extends connect(store)(LitElement) {
|
||||
const filterMyBotPriceTradesDOGE = async () => {
|
||||
const tradeBotDogeUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=DOGECOIN&apiKey=${this.getApiKey()}`
|
||||
|
||||
const tradeBotDogeAt = await fetch(tradeBotDogeUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
this.tradeBotDogeAt = tradeBotDogeAt
|
||||
this.tradeBotDogeAt = await fetch(tradeBotDogeUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
await appDelay(1000)
|
||||
|
||||
@ -1348,7 +1342,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
await appDelay(1000)
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotAvailableDogeQortal) === true) {
|
||||
return
|
||||
|
||||
} else {
|
||||
const botdogeprice = this.round(parseFloat(this.tradeBotDogeBook[0].botDogePrice))
|
||||
const changedogeamount = parseFloat(this.tradeBotDogeBook[0].botDogeQortAmount)
|
||||
@ -1379,7 +1373,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
await appDelay(1000)
|
||||
|
||||
this.buyDogeAction()
|
||||
await this.buyDogeAction()
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotDogeBook) === true) {
|
||||
return
|
||||
@ -1392,7 +1386,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotDogeBook) === true) {
|
||||
return
|
||||
|
||||
} else {
|
||||
const checkBotDogeFunds = this.round(parseFloat(this.tradeBotDogeBook[0].botDogeQortAmount) * parseFloat(this.tradeBotDogeBook[0].botDogePrice))
|
||||
const myBotDogeFunds = this.round(parseFloat(this.dogeWalletBalance))
|
||||
@ -1484,7 +1478,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
await filterOpenOfferDGB()
|
||||
await appDelay(1000)
|
||||
filterMyBotPriceTradesDGB()
|
||||
await filterMyBotPriceTradesDGB()
|
||||
setTimeout(getOpenTradesDGB, 150000)
|
||||
}
|
||||
}
|
||||
@ -1492,11 +1486,9 @@ class AppView extends connect(store)(LitElement) {
|
||||
const filterMyBotPriceTradesDGB = async () => {
|
||||
const tradeBotDgbUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=DIGIBYTE&apiKey=${this.getApiKey()}`
|
||||
|
||||
const tradeBotDgbAt = await fetch(tradeBotDgbUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
this.tradeBotDgbAt = tradeBotDgbAt
|
||||
this.tradeBotDgbAt = await fetch(tradeBotDgbUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
await appDelay(1000)
|
||||
|
||||
@ -1534,7 +1526,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
await appDelay(1000)
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotAvailableDgbQortal) === true) {
|
||||
return
|
||||
|
||||
} else {
|
||||
const botdgbprice = this.round(parseFloat(this.tradeBotDgbBook[0].botDgbPrice))
|
||||
const changedgbamount = parseFloat(this.tradeBotDgbBook[0].botDgbQortAmount)
|
||||
@ -1565,7 +1557,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
await appDelay(1000)
|
||||
|
||||
this.buyDgbAction()
|
||||
await this.buyDgbAction()
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotDgbBook) === true) {
|
||||
return
|
||||
@ -1578,7 +1570,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotDgbBook) === true) {
|
||||
return
|
||||
|
||||
} else {
|
||||
const checkBotDgbFunds = this.round(parseFloat(this.tradeBotDgbBook[0].botDgbQortAmount) * parseFloat(this.tradeBotDgbBook[0].botDgbPrice))
|
||||
const myBotDgbFunds = this.round(parseFloat(this.dgbWalletBalance))
|
||||
@ -1670,7 +1662,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
await filterOpenOfferRVN()
|
||||
await appDelay(1000)
|
||||
filterMyBotPriceTradesRVN()
|
||||
await filterMyBotPriceTradesRVN()
|
||||
setTimeout(getOpenTradesRVN, 150000)
|
||||
}
|
||||
}
|
||||
@ -1678,11 +1670,9 @@ class AppView extends connect(store)(LitElement) {
|
||||
const filterMyBotPriceTradesRVN = async () => {
|
||||
const tradeBotRvnUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=RAVENCOIN&apiKey=${this.getApiKey()}`
|
||||
|
||||
const tradeBotRvnAt = await fetch(tradeBotRvnUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
this.tradeBotRvnAt = tradeBotRvnAt
|
||||
this.tradeBotRvnAt = await fetch(tradeBotRvnUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
await appDelay(1000)
|
||||
|
||||
@ -1720,7 +1710,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
await appDelay(1000)
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotAvailableRvnQortal) === true) {
|
||||
return
|
||||
|
||||
} else {
|
||||
const botrvnprice = this.round(parseFloat(this.tradeBotRvnBook[0].botRvnPrice))
|
||||
const changervnamount = parseFloat(this.tradeBotRvnBook[0].botRvnQortAmount)
|
||||
@ -1751,7 +1741,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
await appDelay(1000)
|
||||
|
||||
this.buyRvnAction()
|
||||
await this.buyRvnAction()
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotRvnBook) === true) {
|
||||
return
|
||||
@ -1764,7 +1754,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotRvnBook) === true) {
|
||||
return
|
||||
|
||||
} else {
|
||||
const checkBotRvnFunds = this.round(parseFloat(this.tradeBotRvnBook[0].botRvnQortAmount) * parseFloat(this.tradeBotRvnBook[0].botRvnPrice))
|
||||
const myBotRvnFunds = this.round(parseFloat(this.rvnWalletBalance))
|
||||
@ -1856,7 +1846,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
await filterOpenOfferARRR()
|
||||
await appDelay(1000)
|
||||
filterMyBotPriceTradesARRR()
|
||||
await filterMyBotPriceTradesARRR()
|
||||
setTimeout(getOpenTradesARRR, 150000)
|
||||
}
|
||||
}
|
||||
@ -1864,11 +1854,9 @@ class AppView extends connect(store)(LitElement) {
|
||||
const filterMyBotPriceTradesARRR = async () => {
|
||||
const tradeBotArrrUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=PIRATECHAIN&apiKey=${this.getApiKey()}`
|
||||
|
||||
const tradeBotArrrAt = await fetch(tradeBotArrrUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
this.tradeBotArrrAt = tradeBotArrrAt
|
||||
this.tradeBotArrrAt = await fetch(tradeBotArrrUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
await appDelay(1000)
|
||||
|
||||
@ -1906,7 +1894,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
await appDelay(1000)
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotAvailableArrrQortal) === true) {
|
||||
return
|
||||
|
||||
} else {
|
||||
const botarrrprice = this.round(parseFloat(this.tradeBotArrrBook[0].botArrrPrice))
|
||||
const changearrramount = parseFloat(this.tradeBotArrrBook[0].botArrrQortAmount)
|
||||
@ -1937,7 +1925,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
await appDelay(1000)
|
||||
|
||||
this.buyArrrAction()
|
||||
await this.buyArrrAction()
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotArrrBook) === true) {
|
||||
return
|
||||
@ -1950,7 +1938,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
if (this.isEmptyArray(this.tradeBotArrrBook) === true) {
|
||||
return
|
||||
|
||||
} else {
|
||||
const checkBotArrrFunds = this.round(parseFloat(this.tradeBotArrrBook[0].botArrrQortAmount) * parseFloat(this.tradeBotArrrBook[0].botArrrPrice))
|
||||
const myBotArrrFunds = this.round(parseFloat(this.arrrWalletBalance))
|
||||
@ -2243,7 +2231,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
this.helperMessage = this.renderHelperErr()
|
||||
await errDelay(3000)
|
||||
this.helperMessage = this.renderHelperPass()
|
||||
return
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -2451,12 +2439,11 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
async buyBtcAction() {
|
||||
const makeRequest = async () => {
|
||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
||||
atAddress: this.botBtcBuyAtAddress,
|
||||
foreignKey: store.getState().app.selectedAddress.btcWallet.derivedMasterPrivateKey,
|
||||
receivingAddress: store.getState().app.selectedAddress.address,
|
||||
})
|
||||
return response
|
||||
return await parentEpml.request('tradeBotRespondRequest', {
|
||||
atAddress: this.botBtcBuyAtAddress,
|
||||
foreignKey: store.getState().app.selectedAddress.btcWallet.derivedMasterPrivateKey,
|
||||
receivingAddress: store.getState().app.selectedAddress.address,
|
||||
})
|
||||
}
|
||||
|
||||
const manageResponse = (response) => {
|
||||
@ -2509,12 +2496,11 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
async buyLtcAction() {
|
||||
const makeRequest = async () => {
|
||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
||||
atAddress: this.botLtcBuyAtAddress,
|
||||
foreignKey: store.getState().app.selectedAddress.ltcWallet.derivedMasterPrivateKey,
|
||||
receivingAddress: store.getState().app.selectedAddress.address,
|
||||
})
|
||||
return response
|
||||
return await parentEpml.request('tradeBotRespondRequest', {
|
||||
atAddress: this.botLtcBuyAtAddress,
|
||||
foreignKey: store.getState().app.selectedAddress.ltcWallet.derivedMasterPrivateKey,
|
||||
receivingAddress: store.getState().app.selectedAddress.address,
|
||||
})
|
||||
}
|
||||
|
||||
const manageResponse = (response) => {
|
||||
@ -2567,12 +2553,11 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
async buyDogeAction() {
|
||||
const makeRequest = async () => {
|
||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
||||
atAddress: this.botDogeBuyAtAddress,
|
||||
foreignKey: store.getState().app.selectedAddress.dogeWallet.derivedMasterPrivateKey,
|
||||
receivingAddress: store.getState().app.selectedAddress.address,
|
||||
})
|
||||
return response
|
||||
return await parentEpml.request('tradeBotRespondRequest', {
|
||||
atAddress: this.botDogeBuyAtAddress,
|
||||
foreignKey: store.getState().app.selectedAddress.dogeWallet.derivedMasterPrivateKey,
|
||||
receivingAddress: store.getState().app.selectedAddress.address,
|
||||
})
|
||||
}
|
||||
|
||||
const manageResponse = (response) => {
|
||||
@ -2625,12 +2610,11 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
async buyDgbAction() {
|
||||
const makeRequest = async () => {
|
||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
||||
atAddress: this.botDgbBuyAtAddress,
|
||||
foreignKey: store.getState().app.selectedAddress.dgbWallet.derivedMasterPrivateKey,
|
||||
receivingAddress: store.getState().app.selectedAddress.address,
|
||||
})
|
||||
return response
|
||||
return await parentEpml.request('tradeBotRespondRequest', {
|
||||
atAddress: this.botDgbBuyAtAddress,
|
||||
foreignKey: store.getState().app.selectedAddress.dgbWallet.derivedMasterPrivateKey,
|
||||
receivingAddress: store.getState().app.selectedAddress.address,
|
||||
})
|
||||
}
|
||||
|
||||
const manageResponse = (response) => {
|
||||
@ -2683,12 +2667,11 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
async buyRvnAction() {
|
||||
const makeRequest = async () => {
|
||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
||||
atAddress: this.botRvnBuyAtAddress,
|
||||
foreignKey: store.getState().app.selectedAddress.rvnWallet.derivedMasterPrivateKey,
|
||||
receivingAddress: store.getState().app.selectedAddress.address,
|
||||
})
|
||||
return response
|
||||
return await parentEpml.request('tradeBotRespondRequest', {
|
||||
atAddress: this.botRvnBuyAtAddress,
|
||||
foreignKey: store.getState().app.selectedAddress.rvnWallet.derivedMasterPrivateKey,
|
||||
receivingAddress: store.getState().app.selectedAddress.address,
|
||||
})
|
||||
}
|
||||
|
||||
const manageResponse = (response) => {
|
||||
@ -2741,12 +2724,11 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
async buyArrrAction() {
|
||||
const makeRequest = async () => {
|
||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
||||
atAddress: this.botArrrBuyAtAddress,
|
||||
foreignKey: store.getState().app.selectedAddress.arrrWallet.seed58,
|
||||
receivingAddress: store.getState().app.selectedAddress.address,
|
||||
})
|
||||
return response
|
||||
return await parentEpml.request('tradeBotRespondRequest', {
|
||||
atAddress: this.botArrrBuyAtAddress,
|
||||
foreignKey: store.getState().app.selectedAddress.arrrWallet.seed58,
|
||||
receivingAddress: store.getState().app.selectedAddress.address,
|
||||
})
|
||||
}
|
||||
|
||||
const manageResponse = (response) => {
|
||||
@ -3348,8 +3330,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
|
||||
getApiKey() {
|
||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||
let apiKey = apiNode.apiKey
|
||||
return apiKey
|
||||
return apiNode.apiKey
|
||||
}
|
||||
|
||||
isEmptyArray(arr) {
|
||||
@ -3360,8 +3341,7 @@ class AppView extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
round(number) {
|
||||
let result = (Math.round(parseFloat(number) * 1e8) / 1e8).toFixed(8)
|
||||
return result
|
||||
return (Math.round(parseFloat(number) * 1e8) / 1e8).toFixed(8)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,16 +1,18 @@
|
||||
import { LitElement, html, css } from 'lit'
|
||||
import { store } from '../../store'
|
||||
import { connect } from 'pwa-helpers'
|
||||
import { translate } from '../../../translate'
|
||||
import { parentEpml } from '../show-plugin'
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {store} from '../../store'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {translate} from '../../../translate'
|
||||
import {parentEpml} from '../show-plugin'
|
||||
|
||||
import '@material/mwc-icon'
|
||||
|
||||
class SyncIndicator extends connect(store)(LitElement) {
|
||||
static get properties() {
|
||||
return {
|
||||
isBehind: { type: Boolean },
|
||||
blocksBehind: { type: Number },
|
||||
nodeUrl: { type: String },
|
||||
address: { type: String },
|
||||
isBehind: { type: Boolean },
|
||||
isSynchronizing: { type: Boolean },
|
||||
hasCoreRunning: { type: Boolean }
|
||||
}
|
||||
@ -18,12 +20,13 @@ class SyncIndicator extends connect(store)(LitElement) {
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
this.isBehind = null
|
||||
this.blocksBehind = 0
|
||||
this.nodeUrl = this.getNodeUrl()
|
||||
this.myNode = this.getMyNode()
|
||||
this.interval = null
|
||||
this.nodeUrl = ''
|
||||
this.address = ''
|
||||
this.isBehind = false
|
||||
this.isSynchronizing = false
|
||||
this.hasCoreRunning = true
|
||||
this.interval = null
|
||||
this.seenWelcomeSync = false
|
||||
this.numberOfTries = 0
|
||||
this.hasOpened = false
|
||||
@ -68,6 +71,7 @@ class SyncIndicator extends connect(store)(LitElement) {
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.bootstrap-button {
|
||||
font-family: Roboto, sans-serif;
|
||||
font-size: 16px;
|
||||
@ -86,48 +90,82 @@ class SyncIndicator extends connect(store)(LitElement) {
|
||||
`
|
||||
}
|
||||
|
||||
async firstUpdated() {
|
||||
render() {
|
||||
return html`
|
||||
${!this.hasCoreRunning ? html`
|
||||
<div class="parent">
|
||||
<span>
|
||||
<mwc-icon id="notification-general-icon" style="color: red; cursor:pointer;user-select:none">
|
||||
priority_high
|
||||
</mwc-icon>
|
||||
</span>
|
||||
<p>
|
||||
${translate("tour.tour17")}
|
||||
</p>
|
||||
</div>
|
||||
` : (this.blocksBehind > 1050 && this.isSynchronizing) ? html`
|
||||
<div class="parent">
|
||||
<div class="column">
|
||||
<div class="row">
|
||||
<span>
|
||||
<img src="/img/syncing.png" style="height: 24px; width: 24px;" />
|
||||
</span>
|
||||
<p>
|
||||
${this.blocksBehind} ${translate("tour.tour20")}
|
||||
</p>
|
||||
</div>
|
||||
<div class="row" style="justify-content: center">
|
||||
<button class="bootstrap-button" @click="${() => {this.bootstrap()}}">
|
||||
${translate("tour.tour18")}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
` : this.isSynchronizing ? html`
|
||||
<div class="parent">
|
||||
<span>
|
||||
<img src="/img/syncing.png" style="height: 24px; width: 24px;" />
|
||||
</span>
|
||||
<p>
|
||||
${translate("tour.tour19")} ${this.blocksBehind ? this.blocksBehind : ""} ${this.blocksBehind ? translate("tour.tour21"): ""}
|
||||
</p>
|
||||
</div>
|
||||
` : "" }
|
||||
`
|
||||
}
|
||||
|
||||
firstUpdated() {
|
||||
this.getNodeUrl()
|
||||
this.address = store.getState().app.selectedAddress.address
|
||||
|
||||
const seenWelcomeSync = JSON.parse(
|
||||
this.seenWelcomeSync = JSON.parse(
|
||||
localStorage.getItem(`welcome-sync-${this.address}`) || 'false'
|
||||
)
|
||||
|
||||
this.seenWelcomeSync = seenWelcomeSync
|
||||
setInterval(() => {
|
||||
this.getNodeUrl()
|
||||
}, 60000)
|
||||
}
|
||||
|
||||
getNodeUrl() {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
]
|
||||
|
||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
return nodeUrl
|
||||
}
|
||||
|
||||
getMyNode() {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
]
|
||||
|
||||
return myNode
|
||||
const syncInfoNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||
const syncInfoUrl = syncInfoNode.protocol + '://' + syncInfoNode.domain + ':' + syncInfoNode.port
|
||||
this.nodeUrl = syncInfoUrl
|
||||
}
|
||||
|
||||
async getDaySummary() {
|
||||
try {
|
||||
this.fetchingSummary = true
|
||||
|
||||
|
||||
const endpointLastBlock = `${this.nodeUrl}/blocks/last`
|
||||
const resLastBlock = await fetch(endpointLastBlock)
|
||||
const dataLastBlock = await resLastBlock.json()
|
||||
const timestampNow = Date.now()
|
||||
const currentBlockTimestamp = dataLastBlock.timestamp
|
||||
|
||||
if (currentBlockTimestamp < timestampNow) {
|
||||
const diff = timestampNow - currentBlockTimestamp
|
||||
const inSeconds = diff / 1000 // millisecs to secs
|
||||
const inSeconds = diff / 1000
|
||||
const inBlocks = inSeconds / 70
|
||||
this.blocksBehind = parseInt(inBlocks)
|
||||
if (inBlocks >= 100) {
|
||||
@ -147,7 +185,7 @@ class SyncIndicator extends connect(store)(LitElement) {
|
||||
|
||||
async checkHowManyBlocksBehind() {
|
||||
try {
|
||||
this.getDaySummary();
|
||||
await this.getDaySummary()
|
||||
this.interval = setInterval(() => {
|
||||
if(this.fetchingSummary) return
|
||||
if (this.isBehind === false) {
|
||||
@ -156,12 +194,33 @@ class SyncIndicator extends connect(store)(LitElement) {
|
||||
}
|
||||
this.getDaySummary()
|
||||
}, 20000)
|
||||
} catch (error) {}
|
||||
} catch (error) {
|
||||
// ...
|
||||
}
|
||||
}
|
||||
|
||||
async bootstrap() {
|
||||
try {
|
||||
const endpoint = `${this.nodeUrl}/admin/bootstrap/?apiKey=${this.getApiKey()}`
|
||||
const res = await fetch(endpoint)
|
||||
const data = await res.json()
|
||||
if (data === true) {
|
||||
parentEpml.request('showSnackBar', get('tour.tour22'))
|
||||
}
|
||||
} catch (error) {
|
||||
// ...
|
||||
}
|
||||
}
|
||||
|
||||
getApiKey() {
|
||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||
return apiNode.apiKey
|
||||
}
|
||||
|
||||
stateChanged(state) {
|
||||
this.address = store.getState().app.selectedAddress.address
|
||||
|
||||
if(!this.seenWelcomeSync && state.app.nodeStatus && state.app.nodeStatus.syncPercent === 100 && this.hasOpened === false){
|
||||
if (!this.seenWelcomeSync && state.app.nodeStatus && state.app.nodeStatus.syncPercent === 100 && this.hasOpened === false) {
|
||||
this.hasOpened = true
|
||||
this.dispatchEvent(
|
||||
new CustomEvent('open-welcome-modal-sync', {
|
||||
@ -170,22 +229,17 @@ class SyncIndicator extends connect(store)(LitElement) {
|
||||
})
|
||||
)
|
||||
}
|
||||
if (
|
||||
state.app.nodeStatus &&
|
||||
Object.keys(state.app.nodeStatus).length === 0
|
||||
) {
|
||||
|
||||
if (state.app.nodeStatus && Object.keys(state.app.nodeStatus).length === 0) {
|
||||
if (this.numberOfTries > 5) {
|
||||
this.hasCoreRunning = false
|
||||
} else {
|
||||
this.numberOfTries = this.numberOfTries + 1
|
||||
}
|
||||
} else if(state.app.nodeStatus && state.app.nodeStatus.syncPercent === 100 && state.app.nodeStatus.syncPercent !== this.syncPercentage){
|
||||
} else if (state.app.nodeStatus && state.app.nodeStatus.syncPercent === 100 && state.app.nodeStatus.syncPercent !== this.syncPercentage) {
|
||||
this.syncPercentage = state.app.nodeStatus.syncPercent
|
||||
this.isSynchronizing = false
|
||||
|
||||
} else if (
|
||||
state.app.nodeStatus
|
||||
) {
|
||||
} else if (state.app.nodeStatus) {
|
||||
this.hasCoreRunning = true
|
||||
this.numberOfTries = 0
|
||||
this.syncPercentage = state.app.nodeStatus.syncPercent
|
||||
@ -194,95 +248,13 @@ class SyncIndicator extends connect(store)(LitElement) {
|
||||
this.isSynchronizing = true
|
||||
}
|
||||
|
||||
if (
|
||||
!this.interval &&
|
||||
this.isBehind === null &&
|
||||
state.app.nodeStatus.isSynchronizing &&
|
||||
state.app.nodeStatus.syncPercent !== 100
|
||||
) {
|
||||
if (!this.interval && this.isBehind === null && state.app.nodeStatus.isSynchronizing && state.app.nodeStatus.syncPercent !== 100) {
|
||||
this.checkHowManyBlocksBehind()
|
||||
}
|
||||
} else {
|
||||
this.hasCoreRunning = true
|
||||
}
|
||||
}
|
||||
|
||||
async bootstrap(){
|
||||
try {
|
||||
const endpoint = `${this.nodeUrl}/admin/bootstrap/?apiKey=${this.myNode.apiKey}`
|
||||
const res = await fetch(endpoint)
|
||||
const data = await res.json()
|
||||
if (data === true) {
|
||||
parentEpml.request('showSnackBar', get('tour.tour22'))
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
${!this.hasCoreRunning
|
||||
? html`
|
||||
<div class="parent">
|
||||
<span
|
||||
><mwc-icon
|
||||
id="notification-general-icon"
|
||||
style="color: red; cursor:pointer;user-select:none"
|
||||
>priority_high</mwc-icon
|
||||
></span
|
||||
>
|
||||
<p>
|
||||
${translate("tour.tour17")}
|
||||
</p>
|
||||
</div>
|
||||
`
|
||||
: (this.blocksBehind > 1050 && this.isSynchronizing)
|
||||
? html`
|
||||
<div class="parent">
|
||||
<div class="column">
|
||||
<div class="row">
|
||||
<span
|
||||
><img
|
||||
src="/img/syncing.png"
|
||||
style="height: 24px; width: 24px;"
|
||||
/></span>
|
||||
<p>
|
||||
${this.blocksBehind} ${translate("tour.tour20")}
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
class="row"
|
||||
style="justify-content: center"
|
||||
>
|
||||
<button
|
||||
class="bootstrap-button"
|
||||
@click="${() => {
|
||||
this.bootstrap()
|
||||
}}"
|
||||
>
|
||||
${translate("tour.tour18")}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
: this.isSynchronizing
|
||||
? html`
|
||||
<div class="parent">
|
||||
<span
|
||||
><img
|
||||
src="/img/syncing.png"
|
||||
style="height: 24px; width: 24px;"
|
||||
/></span>
|
||||
<p>
|
||||
${translate("tour.tour19")} ${this.blocksBehind ? this.blocksBehind : ""} ${this.blocksBehind ? translate("tour.tour21"): ""}
|
||||
</p>
|
||||
</div>
|
||||
`
|
||||
: "" }
|
||||
`
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define('sync-indicator', SyncIndicator)
|
@ -1,16 +1,17 @@
|
||||
import { LitElement, html, css } from 'lit';
|
||||
import { driver } from 'driver.js';
|
||||
import {css, html, LitElement} from 'lit';
|
||||
import {driver} from 'driver.js';
|
||||
import 'driver.js/dist/driver.css';
|
||||
import '@material/mwc-icon';
|
||||
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
||||
import '@vaadin/tooltip';
|
||||
import '@material/mwc-button';
|
||||
import { get, translate } from '../../../translate/index.js';
|
||||
import {get, translate} from '../../../translate';
|
||||
import '@polymer/paper-dialog/paper-dialog.js';
|
||||
import { setNewTab } from '../../redux/app/app-actions.js';
|
||||
import { store } from '../../store.js';
|
||||
import { connect } from 'pwa-helpers';
|
||||
import {setNewTab} from '../../redux/app/app-actions.js';
|
||||
import {store} from '../../store.js';
|
||||
import {connect} from 'pwa-helpers';
|
||||
import './tour.css';
|
||||
|
||||
class TourComponent extends connect(store)(LitElement) {
|
||||
static get properties() {
|
||||
return {
|
||||
@ -175,19 +176,14 @@ class TourComponent extends connect(store)(LitElement) {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
]
|
||||
|
||||
const nodeUrl =
|
||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
return nodeUrl;
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
}
|
||||
getMyNode() {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
return myNode;
|
||||
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
]
|
||||
}
|
||||
|
||||
async getName(recipient) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {translate} from '../../translate/index.js'
|
||||
import {translate} from '../../translate'
|
||||
import isElectron from 'is-electron'
|
||||
|
||||
import '@polymer/paper-icon-button/paper-icon-button.js'
|
||||
|
@ -27,19 +27,14 @@ class CoinBalancesController extends connect(store)(LitElement) {
|
||||
const myNode =
|
||||
store.getState().app.nodeConfig.knownNodes[
|
||||
store.getState().app.nodeConfig.node
|
||||
];
|
||||
]
|
||||
|
||||
const nodeUrl =
|
||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
return nodeUrl;
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
}
|
||||
getMyNode() {
|
||||
const myNode =
|
||||
store.getState().app.nodeConfig.knownNodes[
|
||||
store.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
return myNode;
|
||||
return store.getState().app.nodeConfig.knownNodes[
|
||||
store.getState().app.nodeConfig.node
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {get} from '../../../translate/index.js'
|
||||
import {get} from '../../../translate'
|
||||
import '@material/mwc-icon'
|
||||
import '@vaadin/tooltip';
|
||||
|
||||
@ -206,11 +206,9 @@ class ChatSideNavHeads extends LitElement {
|
||||
if(changedProperties.has('chatInfo')){
|
||||
return true
|
||||
}
|
||||
if(changedProperties.has('isImageLoaded')){
|
||||
return true
|
||||
}
|
||||
return !!changedProperties.has('isImageLoaded');
|
||||
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
getUrl(chatUrl) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {css, html, LitElement} from 'lit';
|
||||
import {translate,} from '../../../translate/index.js'
|
||||
import {translate,} from '../../../translate'
|
||||
import '@material/mwc-button';
|
||||
import '@material/mwc-dialog';
|
||||
import '@material/mwc-checkbox';
|
||||
@ -202,17 +202,12 @@ class AddFriendsModal extends connect(store)(LitElement) {
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
const nodeUrl =
|
||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
return nodeUrl;
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
}
|
||||
getMyNode() {
|
||||
const myNode =
|
||||
store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
return store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
return myNode;
|
||||
}
|
||||
|
||||
clearFields() {
|
||||
@ -267,7 +262,7 @@ class AddFriendsModal extends connect(store)(LitElement) {
|
||||
changedProperties &&
|
||||
changedProperties.has('isOpen') && this.isOpen
|
||||
) {
|
||||
this.getAvailableFeedSchemas()
|
||||
await this.getAvailableFeedSchemas()
|
||||
}
|
||||
|
||||
}
|
||||
@ -281,11 +276,9 @@ class AddFriendsModal extends connect(store)(LitElement) {
|
||||
if (data.error === 401) {
|
||||
this.availableFeeedSchemas = [];
|
||||
} else {
|
||||
const result = data.filter(
|
||||
this.availableFeeedSchemas = data.filter(
|
||||
(item) => item.identifier === 'ui_schema_feed'
|
||||
);
|
||||
|
||||
this.availableFeeedSchemas = result;
|
||||
}
|
||||
this.userFoundModalOpen = true;
|
||||
} catch (error) {} finally {
|
||||
|
@ -1,13 +1,11 @@
|
||||
import { LitElement, html, css } from 'lit';
|
||||
import { get, translate } from '../../../translate/index.js'
|
||||
import {css, html, LitElement} from 'lit';
|
||||
import axios from 'axios';
|
||||
import '@material/mwc-menu';
|
||||
import '@material/mwc-list/mwc-list-item.js';
|
||||
import { RequestQueueWithPromise } from '../../../../plugins/plugins/utils/queue';
|
||||
import {RequestQueueWithPromise} from '../../../../plugins/plugins/utils/queue';
|
||||
import '../../../../plugins/plugins/core/components/TimeAgo';
|
||||
import { connect } from 'pwa-helpers';
|
||||
import { store } from '../../store';
|
||||
import { setNewTab } from '../../redux/app/app-actions';
|
||||
import {connect} from 'pwa-helpers';
|
||||
import {store} from '../../store';
|
||||
import ShortUniqueId from 'short-unique-id';
|
||||
|
||||
const requestQueue = new RequestQueueWithPromise(3);
|
||||
@ -125,17 +123,12 @@ export class AvatarComponent extends connect(store)(LitElement) {
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
const nodeUrl =
|
||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
return nodeUrl;
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
}
|
||||
getMyNode() {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
return myNode;
|
||||
}
|
||||
|
||||
getApiKey() {
|
||||
@ -143,8 +136,7 @@ export class AvatarComponent extends connect(store)(LitElement) {
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
let apiKey = myNode.apiKey;
|
||||
return apiKey;
|
||||
return myNode.apiKey;
|
||||
}
|
||||
|
||||
async fetchResource() {
|
||||
@ -161,7 +153,7 @@ export class AvatarComponent extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
async fetchVideoUrl() {
|
||||
this.fetchResource();
|
||||
await this.fetchResource();
|
||||
}
|
||||
|
||||
async getRawData() {
|
||||
@ -249,7 +241,7 @@ export class AvatarComponent extends connect(store)(LitElement) {
|
||||
|
||||
this.status = res;
|
||||
if (this.status.status === 'DOWNLOADED') {
|
||||
this.fetchResource();
|
||||
await this.fetchResource();
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,8 +256,8 @@ export class AvatarComponent extends connect(store)(LitElement) {
|
||||
|
||||
async _fetchImage() {
|
||||
try {
|
||||
this.fetchVideoUrl();
|
||||
this.fetchStatus();
|
||||
await this.fetchVideoUrl();
|
||||
await this.fetchStatus();
|
||||
} catch (error) {
|
||||
/* empty */
|
||||
}
|
||||
|
@ -1,15 +1,14 @@
|
||||
import { css, html, LitElement } from 'lit';
|
||||
import { connect } from 'pwa-helpers';
|
||||
import {css, html, LitElement} from 'lit';
|
||||
import {connect} from 'pwa-helpers';
|
||||
|
||||
import '@vaadin/item';
|
||||
import '@vaadin/list-box';
|
||||
import '@polymer/paper-icon-button/paper-icon-button.js';
|
||||
import '@polymer/iron-icons/iron-icons.js';
|
||||
import { store } from '../../store.js';
|
||||
import { setNewTab } from '../../redux/app/app-actions.js';
|
||||
import {store} from '../../store.js';
|
||||
import {setNewTab} from '../../redux/app/app-actions.js';
|
||||
import '@material/mwc-icon';
|
||||
import { get, translate } from '../../../translate/index.js';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
import {get} from '../../../translate';
|
||||
import '../../../../plugins/plugins/core/components/TimeAgo.js';
|
||||
import '../notification-view/popover.js';
|
||||
import ShortUniqueId from 'short-unique-id';
|
||||
@ -74,17 +73,12 @@ class BeginnerChecklist extends connect(store)(LitElement) {
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
const nodeUrl =
|
||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
return nodeUrl;
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
}
|
||||
getMyNode() {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
return myNode;
|
||||
}
|
||||
|
||||
async getName(recipient) {
|
||||
@ -94,11 +88,7 @@ class BeginnerChecklist extends connect(store)(LitElement) {
|
||||
const res = await fetch(endpoint);
|
||||
const getNames = await res.json();
|
||||
|
||||
if (Array.isArray(getNames) && getNames.length > 0) {
|
||||
this.hasName = true;
|
||||
} else {
|
||||
this.hasName = false;
|
||||
}
|
||||
this.hasName = Array.isArray(getNames) && getNames.length > 0;
|
||||
} catch (error) {
|
||||
return '';
|
||||
}
|
||||
|
@ -1,128 +1,150 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {store} from '../../store'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {translate} from '../../../translate/index.js'
|
||||
import {translate} from '../../../translate'
|
||||
|
||||
class CoreSyncStatus extends connect(store)(LitElement) {
|
||||
static get properties() {
|
||||
return {
|
||||
nodeStatus: {type: Object},
|
||||
coreInfos: { type: Array }
|
||||
nodeInfos: { type: Array },
|
||||
coreInfos: { type: Array },
|
||||
theme: { type: String, reflect: true }
|
||||
}
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
this.nodeStatus = {}
|
||||
this.nodeInfos = []
|
||||
this.coreInfos = []
|
||||
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
|
||||
}
|
||||
|
||||
static styles = css`
|
||||
.lineHeight {
|
||||
line-height: 33%;
|
||||
}
|
||||
static get styles() {
|
||||
return css`
|
||||
.lineHeight {
|
||||
line-height: 33%;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
text-align: left;
|
||||
}
|
||||
.tooltip {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.tooltip .bottom {
|
||||
min-width: 200px;
|
||||
max-width: 250px;
|
||||
top: 35px;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
padding: 10px 10px;
|
||||
color: var(--black);
|
||||
background-color: var(--white);
|
||||
font-weight: normal;
|
||||
font-size: 13px;
|
||||
border-radius: 8px;
|
||||
position: absolute;
|
||||
z-index: 99999999;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 1px 8px rgba(0,0,0,0.5);
|
||||
border: 1px solid var(--black);
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: opacity 0.8s;
|
||||
}
|
||||
.tooltip .bottom {
|
||||
min-width: 200px;
|
||||
max-width: 250px;
|
||||
top: 35px;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
padding: 10px 10px;
|
||||
color: var(--black);
|
||||
background-color: var(--white);
|
||||
font-weight: normal;
|
||||
font-size: 13px;
|
||||
border-radius: 8px;
|
||||
position: absolute;
|
||||
z-index: 99999999;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 1px 8px rgba(0,0,0,0.5);
|
||||
border: 1px solid var(--black);
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: opacity 0.8s;
|
||||
}
|
||||
|
||||
.tooltip:hover .bottom {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
.tooltip:hover .bottom {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.tooltip .bottom i {
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: 50%;
|
||||
margin-left: -12px;
|
||||
width: 24px;
|
||||
height: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tooltip .bottom i {
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: 50%;
|
||||
margin-left: -12px;
|
||||
width: 24px;
|
||||
height: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tooltip .bottom i::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
left: 50%;
|
||||
transform: translate(-50%,50%) rotate(45deg);
|
||||
background-color: var(--white);
|
||||
border: 1px solid var(--black);
|
||||
box-shadow: 0 1px 8px rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
`
|
||||
.tooltip .bottom i::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
left: 50%;
|
||||
transform: translate(-50%,50%) rotate(45deg);
|
||||
background-color: var(--white);
|
||||
border: 1px solid var(--black);
|
||||
box-shadow: 0 1px 8px rgba(0,0,0,0.5);
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<div id="core-sync-status-id">
|
||||
${this.renderSyncStatusIcon()}
|
||||
${this.renderSyncStatusIcon()}
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
||||
firstUpdated() {
|
||||
this.getNodeInfos()
|
||||
this.getCoreInfos()
|
||||
|
||||
setInterval(() => {
|
||||
this.getNodeInfos()
|
||||
this.getCoreInfos()
|
||||
}, 60000)
|
||||
}, 30000)
|
||||
}
|
||||
|
||||
|
||||
async getNodeInfos() {
|
||||
const appInfoNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||
const appInfoUrl = appInfoNode.protocol + '://' + appInfoNode.domain + ':' + appInfoNode.port
|
||||
const nodeInfoUrl = `${appInfoUrl}/admin/status`
|
||||
|
||||
await fetch(nodeInfoUrl).then(response => {
|
||||
return response.json()
|
||||
}).then(data => {
|
||||
this.nodeInfos = data
|
||||
}).catch(err => {
|
||||
console.error('Request failed', err)
|
||||
})
|
||||
}
|
||||
|
||||
async getCoreInfos() {
|
||||
const corInfo = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||
const coreInfoUrl = corInfo.protocol + '://' + corInfo.domain + ':' + corInfo.port
|
||||
const infoUrl = `${coreInfoUrl}/admin/info`
|
||||
await fetch(infoUrl).then(response => {
|
||||
const appCoreNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||
const appCoreUrl = appCoreNode.protocol + '://' + appCoreNode.domain + ':' + appCoreNode.port
|
||||
const coreInfoUrl = `${appCoreUrl}/admin/info`
|
||||
|
||||
await fetch(coreInfoUrl).then(response => {
|
||||
return response.json()
|
||||
}).then(data => {
|
||||
this.coreInfos = data
|
||||
}).catch(err => {
|
||||
console.error('Request failed', err)
|
||||
})
|
||||
}
|
||||
|
||||
renderSyncStatusIcon() {
|
||||
if (this.nodeStatus.isSynchronizing === true && this.nodeStatus.syncPercent === 99) {
|
||||
if (this.nodeInfos.isSynchronizing === true && this.nodeInfos.syncPercent === 99) {
|
||||
return html`
|
||||
<div class="tooltip" style="display: inline;">
|
||||
<span><img src="/img/syncing.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
||||
<div class="bottom">
|
||||
<h3>${translate("walletprofile.wp3")}</h3>
|
||||
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.synchronizing")}... <span style="color: #03a9f4">${this.nodeStatus.syncPercent !== undefined ? this.nodeStatus.syncPercent + '%' : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeStatus.height ? this.nodeStatus.height : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeStatus.numberOfConnections ? this.nodeStatus.numberOfConnections : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.synchronizing")}... <span style="color: #03a9f4">${this.nodeInfos.syncPercent !== undefined ? this.nodeInfos.syncPercent + '%' : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.height : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
} else if (this.nodeStatus.isSynchronizing === true && this.nodeStatus.isMintingPossible === false && this.nodeStatus.syncPercent === 100) {
|
||||
} else if (this.nodeInfos.isSynchronizing === true && this.nodeInfos.isMintingPossible === false && this.nodeInfos.syncPercent === 100) {
|
||||
return html`
|
||||
<div class="tooltip" style="display: inline;">
|
||||
<span><img src="/img/synced.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
||||
@ -130,13 +152,13 @@ class CoreSyncStatus extends connect(store)(LitElement) {
|
||||
<h3>${translate("walletprofile.wp3")}</h3>
|
||||
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("walletprofile.wp4")} ${translate("walletprofile.wp2")}</h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeStatus.height ? this.nodeStatus.height : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeStatus.numberOfConnections ? this.nodeStatus.numberOfConnections : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.height : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
} else if (this.nodeStatus.isSynchronizing === false && this.nodeStatus.isMintingPossible === false && this.nodeStatus.syncPercent === 100) {
|
||||
} else if (this.nodeInfos.isSynchronizing === false && this.nodeInfos.isMintingPossible === false && this.nodeInfos.syncPercent === 100) {
|
||||
return html`
|
||||
<div class="tooltip" style="display: inline;">
|
||||
<span><img src="/img/synced.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
||||
@ -144,13 +166,13 @@ class CoreSyncStatus extends connect(store)(LitElement) {
|
||||
<h3>${translate("walletprofile.wp3")}</h3>
|
||||
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("walletprofile.wp4")} ${translate("walletprofile.wp2")}</h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeStatus.height ? this.nodeStatus.height : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeStatus.numberOfConnections ? this.nodeStatus.numberOfConnections : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.height : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
} else if (this.nodeStatus.isSynchronizing === true && this.nodeStatus.isMintingPossible === true && this.nodeStatus.syncPercent === 100) {
|
||||
} else if (this.nodeInfos.isSynchronizing === true && this.nodeInfos.isMintingPossible === true && this.nodeInfos.syncPercent === 100) {
|
||||
return html`
|
||||
<div class="tooltip" style="display: inline;">
|
||||
<span><img src="/img/synced_minting.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
||||
@ -158,13 +180,13 @@ class CoreSyncStatus extends connect(store)(LitElement) {
|
||||
<h3>${translate("walletprofile.wp3")}</h3>
|
||||
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("walletprofile.wp4")} <span style="color: #03a9f4">( ${translate("walletprofile.wp1")} )</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeStatus.height ? this.nodeStatus.height : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeStatus.numberOfConnections ? this.nodeStatus.numberOfConnections : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.height : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
} else if (this.nodeStatus.isSynchronizing === false && this.nodeStatus.isMintingPossible === true && this.nodeStatus.syncPercent === 100) {
|
||||
} else if (this.nodeInfos.isSynchronizing === false && this.nodeInfos.isMintingPossible === true && this.nodeInfos.syncPercent === 100) {
|
||||
return html`
|
||||
<div class="tooltip" style="display: inline;">
|
||||
<span><img src="/img/synced_minting.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
||||
@ -172,8 +194,8 @@ class CoreSyncStatus extends connect(store)(LitElement) {
|
||||
<h3>${translate("walletprofile.wp3")}</h3>
|
||||
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("walletprofile.wp4")} <span style="color: #03a9f4">( ${translate("walletprofile.wp1")} )</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeStatus.height ? this.nodeStatus.height : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeStatus.numberOfConnections ? this.nodeStatus.numberOfConnections : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.height : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
@ -185,9 +207,9 @@ class CoreSyncStatus extends connect(store)(LitElement) {
|
||||
<div class="bottom">
|
||||
<h3>${translate("walletprofile.wp3")}</h3>
|
||||
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.synchronizing")}... <span style="color: #03a9f4">${this.nodeStatus.syncPercent !== undefined ? this.nodeStatus.syncPercent + '%' : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeStatus.height ? this.nodeStatus.height : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeStatus.numberOfConnections ? this.nodeStatus.numberOfConnections : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.synchronizing")}... <span style="color: #03a9f4">${this.nodeInfos.syncPercent !== undefined ? this.nodeInfos.syncPercent + '%' : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.height : ''}</span></h4>
|
||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
@ -196,7 +218,7 @@ class CoreSyncStatus extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
stateChanged(state) {
|
||||
this.nodeStatus = state.app.nodeStatus
|
||||
// ...
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {css, html, LitElement} from 'lit';
|
||||
import {translate,} from '../../../translate/index.js'
|
||||
import {translate,} from '../../../translate'
|
||||
import axios from 'axios'
|
||||
import '@material/mwc-menu';
|
||||
import '@material/mwc-list/mwc-list-item.js'
|
||||
@ -174,13 +174,10 @@ export class FeedItem extends connect(store)(LitElement) {
|
||||
getNodeUrl(){
|
||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
|
||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
return nodeUrl
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
}
|
||||
getMyNode(){
|
||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
|
||||
return myNode
|
||||
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
}
|
||||
|
||||
getApiKey() {
|
||||
@ -188,8 +185,7 @@ getMyNode(){
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
let apiKey = myNode.apiKey;
|
||||
return apiKey;
|
||||
return myNode.apiKey;
|
||||
}
|
||||
|
||||
async fetchResource() {
|
||||
@ -206,7 +202,7 @@ getMyNode(){
|
||||
|
||||
async fetchVideoUrl() {
|
||||
|
||||
this.fetchResource()
|
||||
await this.fetchResource()
|
||||
|
||||
}
|
||||
|
||||
@ -311,7 +307,7 @@ getMyNode(){
|
||||
|
||||
this.status = res
|
||||
if(this.status.status === 'DOWNLOADED'){
|
||||
this.fetchResource()
|
||||
await this.fetchResource()
|
||||
}
|
||||
}
|
||||
|
||||
@ -332,8 +328,8 @@ getMyNode(){
|
||||
|
||||
async _fetchImage() {
|
||||
try {
|
||||
this.fetchVideoUrl()
|
||||
this.fetchStatus()
|
||||
await this.fetchVideoUrl()
|
||||
await this.fetchStatus()
|
||||
} catch (error) { /* empty */ }
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
// popover-component.js
|
||||
import { css, html, LitElement } from 'lit';
|
||||
import { createPopper } from '@popperjs/core';
|
||||
import {css, html, LitElement} from 'lit';
|
||||
import {createPopper} from '@popperjs/core';
|
||||
import '@material/mwc-icon';
|
||||
import { translate } from '../../../translate/index.js'
|
||||
import { store } from '../../store';
|
||||
import { connect } from 'pwa-helpers';
|
||||
import { setNewTab, setSideEffectAction } from '../../redux/app/app-actions';
|
||||
import {translate} from '../../../translate'
|
||||
import {store} from '../../store';
|
||||
import {connect} from 'pwa-helpers';
|
||||
import {setNewTab, setSideEffectAction} from '../../redux/app/app-actions';
|
||||
import ShortUniqueId from 'short-unique-id';
|
||||
|
||||
export class FriendItemActions extends connect(store)(LitElement) {
|
||||
@ -79,11 +79,9 @@ export class FriendItemActions extends connect(store)(LitElement) {
|
||||
const myNode =
|
||||
store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
]
|
||||
|
||||
const nodeUrl =
|
||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
return nodeUrl;
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
}
|
||||
|
||||
firstUpdated() {
|
||||
|
@ -5,7 +5,7 @@ import {friendsViewStyles} from './friends-view-css';
|
||||
import {connect} from 'pwa-helpers';
|
||||
import {store} from '../../store';
|
||||
import './feed-item'
|
||||
import {translate} from '../../../translate/index.js'
|
||||
import {translate} from '../../../translate'
|
||||
|
||||
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||
|
||||
@ -53,24 +53,18 @@ class FriendsFeed extends connect(store)(LitElement) {
|
||||
const myNode =
|
||||
store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
]
|
||||
|
||||
const nodeUrl =
|
||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
return nodeUrl;
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
}
|
||||
getMyNode() {
|
||||
const myNode =
|
||||
store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
return myNode;
|
||||
return store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
]
|
||||
}
|
||||
|
||||
_updateFeeds(event) {
|
||||
const detail = event.detail
|
||||
this.mySelectedFeeds = detail
|
||||
this.mySelectedFeeds = event.detail
|
||||
this.reFetchFeedData()
|
||||
this.requestUpdate()
|
||||
}
|
||||
@ -170,7 +164,7 @@ class FriendsFeed extends connect(store)(LitElement) {
|
||||
if(this.mySelectedFeeds.length === 0){
|
||||
await this.getEndpoints()
|
||||
|
||||
this.loadAndMergeData();
|
||||
await this.loadAndMergeData();
|
||||
}
|
||||
|
||||
this.getFeedOnInterval()
|
||||
@ -190,7 +184,7 @@ this.getFeedOnInterval()
|
||||
async refresh(){
|
||||
try {
|
||||
await this.getEndpoints()
|
||||
this.reFetchFeedData()
|
||||
await this.reFetchFeedData()
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
@ -216,7 +210,7 @@ this.getFeedOnInterval()
|
||||
|
||||
observerHandler(entries) {
|
||||
if (!entries[0].isIntersecting) {
|
||||
return;
|
||||
|
||||
} else {
|
||||
if (this.feedToRender.length < 20) {
|
||||
return;
|
||||
@ -326,8 +320,7 @@ this.getFeedOnInterval()
|
||||
|
||||
let clickValue1 = newItem.schema.click;
|
||||
|
||||
const resolvedClickValue1 = replacePlaceholders(clickValue1, resource, newItem.schema.customParams);
|
||||
newItem.link = resolvedClickValue1
|
||||
newItem.link = replacePlaceholders(clickValue1, resource, newItem.schema.customParams)
|
||||
newData.push(newItem)
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
||||
import '@material/mwc-icon'
|
||||
import './friends-side-panel.js'
|
||||
import '@vaadin/tooltip'
|
||||
import {translate} from '../../../translate/index.js'
|
||||
import {translate} from '../../../translate'
|
||||
|
||||
class FriendsSidePanelParent extends LitElement {
|
||||
static get properties() {
|
||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit';
|
||||
import '@material/mwc-icon';
|
||||
import './friends-view'
|
||||
import './friends-feed'
|
||||
import {translate} from '../../../translate/index.js'
|
||||
import {translate} from '../../../translate'
|
||||
|
||||
class FriendsSidePanel extends LitElement {
|
||||
static get properties() {
|
||||
|
@ -13,7 +13,7 @@ import './ChatSideNavHeads';
|
||||
import '../../../../plugins/plugins/core/components/ChatSearchResults'
|
||||
import './add-friends-modal'
|
||||
|
||||
import {translate,} from '../../../translate/index.js'
|
||||
import {translate,} from '../../../translate'
|
||||
import {store} from '../../store';
|
||||
import {friendsViewStyles} from './friends-view-css';
|
||||
import {parentEpml} from '../show-plugin';
|
||||
@ -74,19 +74,14 @@ class FriendsView extends connect(store)(LitElement) {
|
||||
const myNode =
|
||||
store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
]
|
||||
|
||||
const nodeUrl =
|
||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
return nodeUrl;
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
}
|
||||
getMyNode() {
|
||||
const myNode =
|
||||
store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
return myNode;
|
||||
return store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
]
|
||||
}
|
||||
|
||||
getMoreFriends() {}
|
||||
@ -105,12 +100,10 @@ class FriendsView extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
_updateFriends(event) {
|
||||
const detail = event.detail
|
||||
this.friendList = detail
|
||||
this.friendList = event.detail
|
||||
}
|
||||
_updateFeed(event) {
|
||||
const detail = event.detail
|
||||
this.mySelectedFeeds = detail
|
||||
this.mySelectedFeeds = event.detail
|
||||
this.requestUpdate()
|
||||
}
|
||||
_addFriend(event){
|
||||
@ -165,7 +158,7 @@ class FriendsView extends connect(store)(LitElement) {
|
||||
|
||||
observerHandler(entries) {
|
||||
if (!entries[0].isIntersecting) {
|
||||
return;
|
||||
|
||||
} else {
|
||||
if (this.friendList.length < 20) {
|
||||
return;
|
||||
@ -201,8 +194,7 @@ class FriendsView extends connect(store)(LitElement) {
|
||||
|
||||
getApiKey() {
|
||||
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
let apiKey = apiNode.apiKey
|
||||
return apiKey
|
||||
return apiNode.apiKey
|
||||
}
|
||||
|
||||
async myFollowName(name) {
|
||||
@ -211,7 +203,7 @@ class FriendsView extends connect(store)(LitElement) {
|
||||
]
|
||||
let namesJsonString = JSON.stringify({ "items": items })
|
||||
|
||||
let ret = await parentEpml.request('apiCall', {
|
||||
return await parentEpml.request('apiCall', {
|
||||
url: `/lists/followedNames?apiKey=${this.getApiKey()}`,
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@ -219,9 +211,6 @@ class FriendsView extends connect(store)(LitElement) {
|
||||
},
|
||||
body: `${namesJsonString}`
|
||||
})
|
||||
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
async unFollowName(name) {
|
||||
@ -230,7 +219,7 @@ class FriendsView extends connect(store)(LitElement) {
|
||||
]
|
||||
let namesJsonString = JSON.stringify({ "items": items })
|
||||
|
||||
let ret = await parentEpml.request('apiCall', {
|
||||
return await parentEpml.request('apiCall', {
|
||||
url: `/lists/followedNames?apiKey=${this.getApiKey()}`,
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
@ -238,9 +227,6 @@ class FriendsView extends connect(store)(LitElement) {
|
||||
},
|
||||
body: `${namesJsonString}`
|
||||
})
|
||||
|
||||
|
||||
return ret
|
||||
}
|
||||
async addToFriendList(val, isRemove){
|
||||
const copyVal = {...val}
|
||||
@ -260,9 +246,9 @@ class FriendsView extends connect(store)(LitElement) {
|
||||
this.friendList = [...this.friendList, copyVal]
|
||||
}
|
||||
if(!copyVal.willFollow || isRemove) {
|
||||
this.unFollowName(copyVal.name)
|
||||
await this.unFollowName(copyVal.name)
|
||||
} else if(copyVal.willFollow){
|
||||
this.myFollowName(copyVal.name)
|
||||
await this.myFollowName(copyVal.name)
|
||||
}
|
||||
this.setMySelectedFeeds(val.mySelectedFeeds)
|
||||
await new Promise((res)=> {
|
||||
|
@ -1,15 +1,14 @@
|
||||
import { LitElement, html, css } from 'lit';
|
||||
import { render } from 'lit/html.js';
|
||||
import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from '../../../translate/index.js'
|
||||
import {css, html, LitElement} from 'lit';
|
||||
import {get, translate} from '../../../translate'
|
||||
import '@material/mwc-button';
|
||||
import '@material/mwc-icon';
|
||||
import '@vaadin/tooltip';
|
||||
import '@material/mwc-dialog';
|
||||
import '@material/mwc-checkbox';
|
||||
import { connect } from 'pwa-helpers';
|
||||
import { store } from '../../store';
|
||||
import {connect} from 'pwa-helpers';
|
||||
import {store} from '../../store';
|
||||
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
||||
import { parentEpml } from '../show-plugin';
|
||||
import {parentEpml} from '../show-plugin';
|
||||
|
||||
class ProfileModalUpdate extends connect(store)(LitElement) {
|
||||
static get properties() {
|
||||
@ -335,19 +334,14 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
|
||||
const myNode =
|
||||
store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
]
|
||||
|
||||
const nodeUrl =
|
||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
return nodeUrl;
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
}
|
||||
getMyNode() {
|
||||
const myNode =
|
||||
store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
return myNode;
|
||||
return store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
]
|
||||
}
|
||||
|
||||
clearFields() {
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { LitElement, html, css } from 'lit';
|
||||
import {css, html, LitElement} from 'lit';
|
||||
import '@material/mwc-icon';
|
||||
import './friends-side-panel.js';
|
||||
import { connect } from 'pwa-helpers';
|
||||
import { store } from '../../store.js';
|
||||
import {connect} from 'pwa-helpers';
|
||||
import {store} from '../../store.js';
|
||||
import WebWorker2 from '../WebWorkerFile.js';
|
||||
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
||||
import '@vaadin/tooltip';
|
||||
import { get, translate } from '../../../translate/index.js'
|
||||
import {get, translate} from '../../../translate'
|
||||
import ShortUniqueId from 'short-unique-id';
|
||||
import '@polymer/paper-dialog/paper-dialog.js';
|
||||
|
||||
@ -14,20 +14,15 @@ import {
|
||||
decryptGroupData,
|
||||
encryptDataGroup,
|
||||
objectToBase64,
|
||||
uint8ArrayToBase64,
|
||||
uint8ArrayToObject,
|
||||
} from '../../../../plugins/plugins/core/components/qdn-action-encryption.js';
|
||||
import { publishData } from '../../../../plugins/plugins/utils/publish-image.js';
|
||||
import { parentEpml } from '../show-plugin.js';
|
||||
import {publishData} from '../../../../plugins/plugins/utils/publish-image.js';
|
||||
import {parentEpml} from '../show-plugin.js';
|
||||
import '../notification-view/popover.js';
|
||||
import './avatar.js';
|
||||
import {
|
||||
setNewTab,
|
||||
setProfileData,
|
||||
setSideEffectAction,
|
||||
} from '../../redux/app/app-actions.js';
|
||||
import {setNewTab, setProfileData, setSideEffectAction,} from '../../redux/app/app-actions.js';
|
||||
import './profile-modal-update.js';
|
||||
import { modalHelper } from '../../../../plugins/plugins/utils/publish-modal.js';
|
||||
import {modalHelper} from '../../../../plugins/plugins/utils/publish-modal.js';
|
||||
|
||||
class ProfileQdn extends connect(store)(LitElement) {
|
||||
static get properties() {
|
||||
@ -288,19 +283,14 @@ class ProfileQdn extends connect(store)(LitElement) {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
]
|
||||
|
||||
const nodeUrl =
|
||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
return nodeUrl;
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
}
|
||||
getMyNode() {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
return myNode;
|
||||
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
]
|
||||
}
|
||||
|
||||
async getRawData(dataItem) {
|
||||
@ -323,10 +313,9 @@ class ProfileQdn extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
async followNames(names) {
|
||||
let items = names;
|
||||
let namesJsonString = JSON.stringify({ items: items });
|
||||
let namesJsonString = JSON.stringify({ items: names });
|
||||
|
||||
let ret = await parentEpml.request('apiCall', {
|
||||
return await parentEpml.request('apiCall', {
|
||||
url: `/lists/followedNames?apiKey=${this.myNode.apiKey}`,
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@ -334,8 +323,6 @@ class ProfileQdn extends connect(store)(LitElement) {
|
||||
},
|
||||
body: `${namesJsonString}`,
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
async setValues(response, resource) {
|
||||
@ -426,8 +413,7 @@ class ProfileQdn extends connect(store)(LitElement) {
|
||||
async getProfile() {
|
||||
try {
|
||||
this.error = '';
|
||||
const arbFee = await this.getArbitraryFee();
|
||||
this.fee = arbFee;
|
||||
this.fee = await this.getArbitraryFee();
|
||||
this.hasAttemptedToFetchResource = true;
|
||||
let resource;
|
||||
|
||||
@ -459,7 +445,7 @@ class ProfileQdn extends connect(store)(LitElement) {
|
||||
try {
|
||||
const response = await this.getRawData(dataItem);
|
||||
if (response.wallets) {
|
||||
this.setValues(response, dataItem);
|
||||
await this.setValues(response, dataItem);
|
||||
} else {
|
||||
this.error = 'Cannot get saved user settings';
|
||||
}
|
||||
@ -574,11 +560,10 @@ class ProfileQdn extends connect(store)(LitElement) {
|
||||
const toBase64 = await objectToBase64(
|
||||
newObject.customData[key]
|
||||
);
|
||||
const encryptedData = encryptDataGroup({
|
||||
newObject['customData'][key] = encryptDataGroup({
|
||||
data64: toBase64,
|
||||
publicKeys: [],
|
||||
});
|
||||
newObject['customData'][key] = encryptedData;
|
||||
}
|
||||
} else {
|
||||
newObject['customData'][key] = newObject.customData[key];
|
||||
@ -814,11 +799,7 @@ class ProfileQdn extends connect(store)(LitElement) {
|
||||
const findIndex = friendList.findIndex(
|
||||
(friend) => friend.name === name
|
||||
);
|
||||
if (findIndex !== -1) {
|
||||
this.isFriend = true;
|
||||
} else {
|
||||
this.isFriend = false;
|
||||
}
|
||||
this.isFriend = findIndex !== -1;
|
||||
} catch (error) {}
|
||||
}
|
||||
render() {
|
||||
|
@ -1,17 +1,16 @@
|
||||
import {css, html, LitElement} from 'lit';
|
||||
import '@material/mwc-icon';
|
||||
import './friends-side-panel.js';
|
||||
import { connect } from 'pwa-helpers';
|
||||
import { store } from '../../store.js';
|
||||
import {connect} from 'pwa-helpers';
|
||||
import {store} from '../../store.js';
|
||||
import WebWorker from '../WebWorkerFile.js';
|
||||
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
||||
import '@vaadin/tooltip';
|
||||
import { get, translate } from '../../../translate/index.js'
|
||||
import {translate} from '../../../translate'
|
||||
import ShortUniqueId from 'short-unique-id';
|
||||
|
||||
import {
|
||||
decryptGroupData,
|
||||
|
||||
encryptDataGroup,
|
||||
objectToBase64,
|
||||
uint8ArrayToObject,
|
||||
@ -19,7 +18,7 @@ import {
|
||||
import {publishData} from '../../../../plugins/plugins/utils/publish-image.js';
|
||||
import {parentEpml} from '../show-plugin.js';
|
||||
import '../notification-view/popover.js';
|
||||
import { setNewTab } from '../../redux/app/app-actions.js';
|
||||
import {setNewTab} from '../../redux/app/app-actions.js';
|
||||
|
||||
class SaveSettingsQdn extends connect(store)(LitElement) {
|
||||
static get properties() {
|
||||
@ -144,19 +143,14 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
]
|
||||
|
||||
const nodeUrl =
|
||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
return nodeUrl;
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
}
|
||||
getMyNode() {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
return myNode;
|
||||
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
]
|
||||
}
|
||||
|
||||
async getRawData(dataItem) {
|
||||
@ -165,8 +159,7 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
||||
const data = await res.text();
|
||||
if (data.error) throw new Error('Cannot retrieve your data from qdn');
|
||||
const decryptedData = decryptGroupData(data);
|
||||
const decryptedDataToBase64 = uint8ArrayToObject(decryptedData);
|
||||
return decryptedDataToBase64;
|
||||
return uint8ArrayToObject(decryptedData);
|
||||
}
|
||||
|
||||
async getMyFollowedNames() {
|
||||
@ -184,10 +177,9 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
async followNames(names) {
|
||||
let items = names
|
||||
let namesJsonString = JSON.stringify({ "items": items })
|
||||
let namesJsonString = JSON.stringify({ "items": names })
|
||||
|
||||
let ret = await parentEpml.request('apiCall', {
|
||||
return await parentEpml.request('apiCall', {
|
||||
url: `/lists/followedNames?apiKey=${this.myNode.apiKey}`,
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@ -195,9 +187,6 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
||||
},
|
||||
body: `${namesJsonString}`
|
||||
})
|
||||
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
async setValues(response, resource) {
|
||||
@ -322,8 +311,7 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
||||
async getGeneralSettingsQdn() {
|
||||
try {
|
||||
this.error = ""
|
||||
const arbFee = await this.getArbitraryFee();
|
||||
this.fee = arbFee;
|
||||
this.fee = await this.getArbitraryFee();
|
||||
this.hasAttemptedToFetchResource = true;
|
||||
let resource;
|
||||
let nameObject
|
||||
@ -358,7 +346,7 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
||||
try {
|
||||
const response = await this.getRawData(dataItem);
|
||||
if (response.version) {
|
||||
this.setValues(response, dataItem);
|
||||
await this.setValues(response, dataItem);
|
||||
} else {
|
||||
this.error = 'Cannot get saved user settings';
|
||||
}
|
||||
@ -514,9 +502,9 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
||||
});
|
||||
|
||||
this.resourceExists = true;
|
||||
this.setValues(newObject, {
|
||||
updated: Date.now(),
|
||||
});
|
||||
await this.setValues(newObject, {
|
||||
updated: Date.now(),
|
||||
});
|
||||
localStorage.setItem('temp-settings-data', JSON.stringify({}));
|
||||
this.valuesToBeSavedOnQdn = {};
|
||||
worker.terminate();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {registerTranslateConfig, translate, use} from '../../translate/index.js'
|
||||
import {registerTranslateConfig, translate, use} from '../../translate'
|
||||
|
||||
registerTranslateConfig({
|
||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {store} from '../../store.js'
|
||||
import {get, translate} from '../../../translate/index.js'
|
||||
import {get, translate} from '../../../translate'
|
||||
|
||||
import {createWallet} from '../../../../crypto/api/createWallet.js'
|
||||
import {doLogin, doLogout, doSelectAddress} from '../../redux/app/app-actions.js'
|
||||
@ -593,7 +593,7 @@ class CreateAccountSection extends connect(store)(LitElement) {
|
||||
const dataString = JSON.stringify(data)
|
||||
const blob = new Blob([dataString], { type: 'text/plain;charset=utf-8' })
|
||||
backupname = "qortal_backup_" + wallet.addresses[0].address + ".json"
|
||||
this.saveFileToDisk(blob, backupname)
|
||||
await this.saveFileToDisk(blob, backupname)
|
||||
}
|
||||
|
||||
async downloadSeedphrase() {
|
||||
@ -601,7 +601,7 @@ class CreateAccountSection extends connect(store)(LitElement) {
|
||||
const seed = this.shadowRoot.getElementById('randSentence').parsedString
|
||||
const blob = new Blob([seed], { type: 'text/plain;charset=utf-8' })
|
||||
seedname = "qortal_seedphrase.txt"
|
||||
this.saveFileToDisk(blob, seedname)
|
||||
await this.saveFileToDisk(blob, seedname)
|
||||
}
|
||||
|
||||
async saveFileToDisk(blob, fileName) {
|
||||
|
@ -2,14 +2,21 @@ import {css, html, LitElement} from 'lit'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {store} from '../../store.js'
|
||||
import {checkApiKey} from '../../apiKeyUtils.js'
|
||||
import {translate} from '../../../translate/index.js'
|
||||
import {translate} from '../../../translate'
|
||||
import {doLogin, doSelectAddress} from '../../redux/app/app-actions.js'
|
||||
import {doRemoveWallet, doStoreWallet} from '../../redux/user/user-actions.js'
|
||||
import {createWallet} from '../../../../crypto/api/createWallet.js'
|
||||
import snackbar from '../../functional-components/snackbar.js'
|
||||
import '../../custom-elements/frag-file-input.js'
|
||||
import ripple from '../../functional-components/loading-ripple.js'
|
||||
|
||||
import '@material/mwc-button'
|
||||
import '@material/mwc-checkbox'
|
||||
import '@material/mwc-textfield'
|
||||
import '@material/mwc-icon'
|
||||
import '@material/mwc-dialog'
|
||||
import '@material/mwc-formfield'
|
||||
import '@material/mwc-icon'
|
||||
import '@material/mwc-icon-button'
|
||||
import '@material/mwc-textfield'
|
||||
import '@polymer/iron-pages'
|
||||
import '@polymer/paper-input/paper-input-container.js'
|
||||
import '@polymer/paper-input/paper-input.js'
|
||||
@ -18,12 +25,6 @@ import '@polymer/iron-collapse'
|
||||
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||
import '@vaadin/text-field/vaadin-text-field.js'
|
||||
import '@vaadin/password-field/vaadin-password-field.js'
|
||||
import {doLogin, doSelectAddress} from '../../redux/app/app-actions.js'
|
||||
import {doRemoveWallet, doStoreWallet} from '../../redux/user/user-actions.js'
|
||||
import {createWallet} from '../../../../crypto/api/createWallet.js'
|
||||
import snackbar from '../../functional-components/snackbar.js'
|
||||
import '../../custom-elements/frag-file-input.js'
|
||||
import ripple from '../../functional-components/loading-ripple.js'
|
||||
|
||||
class LoginSection extends connect(store)(LitElement) {
|
||||
static get properties() {
|
||||
@ -124,15 +125,15 @@ class LoginSection extends connect(store)(LitElement) {
|
||||
return html`
|
||||
<style>
|
||||
#loginSection {
|
||||
padding:0;
|
||||
text-align:left;
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
padding-top: 12px;
|
||||
--paper-spinner-color: var(--mdc-theme-primary);
|
||||
--paper-spinner-stroke-width: 2px;
|
||||
}
|
||||
|
||||
#loginPages{
|
||||
overflow:visible;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
#walletsPage {
|
||||
@ -167,7 +168,7 @@ class LoginSection extends connect(store)(LitElement) {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
margin:0;
|
||||
margin: 0;
|
||||
height: 20px;
|
||||
font-size: 15px;
|
||||
line-height: 20px;
|
||||
@ -213,21 +214,21 @@ class LoginSection extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
*[hidden] {
|
||||
display:none !important;
|
||||
display: none !important;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
h1 {
|
||||
padding: 24px;
|
||||
padding-top:0;
|
||||
margin:0;
|
||||
font-size:24px;
|
||||
font-weight:100;
|
||||
padding-top: 0;
|
||||
margin: 0;
|
||||
font-size: 24px;
|
||||
font-weight: 100;
|
||||
}
|
||||
|
||||
.accountIcon {
|
||||
font-size:42px;
|
||||
padding-top:8px;
|
||||
font-size: 42px;
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
#unlockStoredPage {
|
||||
@ -241,9 +242,9 @@ class LoginSection extends connect(store)(LitElement) {
|
||||
@media only screen and (max-width: ${getComputedStyle(document.body).getPropertyValue('--layout-breakpoint-tablet')}) {
|
||||
/* Mobile */
|
||||
#wallets {
|
||||
height:100%;
|
||||
overflow-y:auto;
|
||||
overflow-x:hidden;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#loginSection {
|
||||
@ -256,15 +257,15 @@ class LoginSection extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
.backButton {
|
||||
padding:14px;
|
||||
text-align:left;
|
||||
padding: 14px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#pagesContainer {
|
||||
max-height: calc(var(--window-height) - 184px);
|
||||
}
|
||||
|
||||
.checkboxLabel:hover{
|
||||
.checkboxLabel:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {store} from '../../store.js'
|
||||
import {stateAwait} from '../../stateAwait.js'
|
||||
import {get} from '../../../translate/index.js'
|
||||
import {get} from '../../../translate'
|
||||
|
||||
import '@material/mwc-button'
|
||||
import '@material/mwc-icon'
|
||||
|
@ -346,8 +346,7 @@ var pJS = function (tag_id, params) {
|
||||
var shape_type = pJS.particles.shape.type
|
||||
if (typeof (shape_type) === 'object') {
|
||||
if (shape_type instanceof Array) {
|
||||
var shape_selected = shape_type[Math.floor(Math.random() * shape_type.length)]
|
||||
this.shape = shape_selected
|
||||
this.shape = shape_type[Math.floor(Math.random() * shape_type.length)]
|
||||
}
|
||||
} else {
|
||||
this.shape = shape_type
|
||||
@ -1255,11 +1254,11 @@ function hexToRgb(hex) {
|
||||
g: parseInt(result[2], 16),
|
||||
b: parseInt(result[3], 16)
|
||||
} : null
|
||||
};
|
||||
}
|
||||
|
||||
function clamp(number, min, max) {
|
||||
return Math.min(Math.max(number, min), max)
|
||||
};
|
||||
}
|
||||
|
||||
function isInArray(value, array) {
|
||||
return array.indexOf(value) > -1
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {translate} from '../../../translate/index.js'
|
||||
import {translate} from '../../../translate'
|
||||
|
||||
import '@material/mwc-button'
|
||||
|
||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {store} from '../../store.js'
|
||||
import {doLogout} from '../../redux/app/app-actions.js'
|
||||
import {translate} from '../../../translate/index.js'
|
||||
import {translate} from '../../../translate'
|
||||
|
||||
import '@polymer/paper-dialog/paper-dialog.js'
|
||||
import '@material/mwc-button'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {registerTranslateConfig, translate, use} from '../../translate/index.js'
|
||||
import {registerTranslateConfig, translate, use} from '../../translate'
|
||||
|
||||
registerTranslateConfig({
|
||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
||||
|
@ -8,7 +8,7 @@ import '@polymer/iron-icons/iron-icons.js';
|
||||
import {store} from '../../store.js';
|
||||
import {setNewNotification} from '../../redux/app/app-actions.js';
|
||||
import '@material/mwc-icon';
|
||||
import {get, translate} from '../../../translate/index.js'
|
||||
import {get, translate} from '../../../translate'
|
||||
import {repeat} from 'lit/directives/repeat.js';
|
||||
import '../../../../plugins/plugins/core/components/TimeAgo.js';
|
||||
import './popover.js';
|
||||
@ -20,7 +20,6 @@ class NotificationBellGeneral extends connect(store)(LitElement) {
|
||||
showNotifications: { type: Boolean },
|
||||
notificationCount: { type: Boolean },
|
||||
theme: { type: String, reflect: true },
|
||||
notifications: { type: Array },
|
||||
currentNotification: { type: Object },
|
||||
};
|
||||
|
||||
@ -294,19 +293,14 @@ class NotificationItemTx extends connect(store)(LitElement) {
|
||||
const myNode =
|
||||
store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
]
|
||||
|
||||
const nodeUrl =
|
||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
return nodeUrl;
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
}
|
||||
getMyNode() {
|
||||
const myNode =
|
||||
store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
return myNode;
|
||||
return store.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
]
|
||||
}
|
||||
|
||||
async getStatus() {
|
||||
@ -314,11 +308,10 @@ class NotificationItemTx extends connect(store)(LitElement) {
|
||||
let stop = false;
|
||||
const getAnswer = async () => {
|
||||
const getTx = async (minterAddr) => {
|
||||
const url = `${this.nodeUrl}/transactions/signature/${this.signature}`;
|
||||
const res = await fetch(url);
|
||||
const data = await res.json();
|
||||
return data;
|
||||
};
|
||||
const url = `${this.nodeUrl}/transactions/signature/${this.signature}`
|
||||
const res = await fetch(url)
|
||||
return await res.json()
|
||||
}
|
||||
|
||||
if (!stop) {
|
||||
stop = true;
|
||||
|
@ -43,8 +43,7 @@ class NotificationBell extends connect(store)(LitElement) {
|
||||
|
||||
getApiKey() {
|
||||
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
let apiKey = apiNode.apiKey
|
||||
return apiKey
|
||||
return apiNode.apiKey
|
||||
}
|
||||
|
||||
async getNotifications() {
|
||||
@ -69,8 +68,7 @@ class NotificationBell extends connect(store)(LitElement) {
|
||||
}
|
||||
})
|
||||
|
||||
const data = await response.json()
|
||||
return data;
|
||||
return await response.json()
|
||||
}
|
||||
|
||||
if (!stop && !this.showNotifications) {
|
||||
@ -97,25 +95,41 @@ class NotificationBell extends connect(store)(LitElement) {
|
||||
if (!this.initialFetch && notificationsToShow.length > 0) {
|
||||
const mail = notificationsToShow[0]
|
||||
const urlPic = `${nodeUrl}/arbitrary/THUMBNAIL/${mail.name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||
routes.showNotification({
|
||||
data: { title: "New Q-Mail", type: "qapp", sound: config.messageAlert, url: "", options: { body: `You have an unread mail from ${mail.name}`, icon: urlPic, badge: urlPic } }
|
||||
await routes.showNotification({
|
||||
data: {
|
||||
title: "New Q-Mail",
|
||||
type: "qapp",
|
||||
sound: config.messageAlert,
|
||||
url: "",
|
||||
options: {
|
||||
body: `You have an unread mail from ${mail.name}`,
|
||||
icon: urlPic,
|
||||
badge: urlPic
|
||||
}
|
||||
}
|
||||
})
|
||||
} else if (notificationsToShow.length > 0) {
|
||||
if (notificationsToShow[0].created > (this.notifications[0]?.created || 0)) {
|
||||
const mail = notificationsToShow[0]
|
||||
const urlPic = `${nodeUrl}/arbitrary/THUMBNAIL/${mail.name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||
routes.showNotification({
|
||||
data: { title: "New Q-Mail", type: "qapp", sound: config.messageAlert, url: "", options: { body: `You have an unread mail from ${mail.name}`, icon: urlPic, badge: urlPic } }
|
||||
await routes.showNotification({
|
||||
data: {
|
||||
title: "New Q-Mail",
|
||||
type: "qapp",
|
||||
sound: config.messageAlert,
|
||||
url: "",
|
||||
options: {
|
||||
body: `You have an unread mail from ${mail.name}`,
|
||||
icon: urlPic,
|
||||
badge: urlPic
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
this.notifications = notificationsToShow
|
||||
|
||||
if (this.notifications.length === 0) {
|
||||
this.notificationCount = false
|
||||
} else {
|
||||
this.notificationCount = true
|
||||
}
|
||||
this.notificationCount = this.notifications.length !== 0;
|
||||
|
||||
if (!this.initialFetch) this.initialFetch = true
|
||||
} catch (error) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {get, translate} from '../../translate/index.js'
|
||||
import {get, translate} from '../../translate'
|
||||
import snackbar from '../functional-components/snackbar.js'
|
||||
|
||||
import '@polymer/paper-icon-button/paper-icon-button.js'
|
||||
@ -118,7 +118,7 @@ class SearchModal extends LitElement {
|
||||
dismiss: true
|
||||
})
|
||||
this.shadowRoot.getElementById('searchContent').value = this.searchContentString
|
||||
return
|
||||
|
||||
} else {
|
||||
let sendInfoAddress = this.shadowRoot.getElementById('searchContent').value
|
||||
const infoDialog = document.getElementById('main-app').shadowRoot.querySelector('app-view').shadowRoot.querySelector('user-info-view')
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { LitElement, html, css } from 'lit'
|
||||
import { connect } from 'pwa-helpers'
|
||||
import { store } from '../../store.js'
|
||||
import { get, translate } from '../../../translate/index.js'
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {store} from '../../store.js'
|
||||
import {get, translate} from '../../../translate'
|
||||
|
||||
class AccountView extends connect(store)(LitElement) {
|
||||
static get properties() {
|
||||
@ -127,8 +127,7 @@ class AccountView extends connect(store)(LitElement) {
|
||||
|
||||
getApiKey() {
|
||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||
let apiKey = apiNode.apiKey
|
||||
return apiKey
|
||||
return apiNode.apiKey
|
||||
}
|
||||
|
||||
stateChanged(state) {
|
||||
|
@ -1,9 +1,9 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {store} from '../../store.js'
|
||||
import { Epml } from '../../epml.js'
|
||||
import { addTradeBotRoutes } from '../../tradebot/addTradeBotRoutes.js'
|
||||
import {get, translate} from '../../../translate/index.js'
|
||||
import {Epml} from '../../epml.js'
|
||||
import {addTradeBotRoutes} from '../../tradebot/addTradeBotRoutes.js'
|
||||
import {get, translate} from '../../../translate'
|
||||
import snackbar from '../../functional-components/snackbar.js'
|
||||
import FileSaver from 'file-saver'
|
||||
|
||||
@ -427,7 +427,7 @@ class ExportKeys extends connect(store)(LitElement) {
|
||||
addTradeBotRoutes(parentEpml)
|
||||
parentEpml.imReady()
|
||||
await this.fetchArrrWalletAddress()
|
||||
this.checkArrrWalletPrivateKey()
|
||||
await this.checkArrrWalletPrivateKey()
|
||||
}
|
||||
|
||||
async fetchArrrWalletAddress() {
|
||||
@ -518,10 +518,10 @@ class ExportKeys extends connect(store)(LitElement) {
|
||||
|
||||
if (resRepair != null && resRepair.error != 128) {
|
||||
this.shadowRoot.querySelector('#pleaseWaitDialog').close()
|
||||
this.openOkDialog()
|
||||
await this.openOkDialog()
|
||||
} else {
|
||||
this.shadowRoot.querySelector('#pleaseWaitDialog').close()
|
||||
this.openErrorDialog()
|
||||
await this.openErrorDialog()
|
||||
}
|
||||
}
|
||||
|
||||
@ -558,7 +558,7 @@ class ExportKeys extends connect(store)(LitElement) {
|
||||
const myCoinAddress = cAddress
|
||||
const blob = new Blob([`${myPrivateMasterKey}`], { type: 'text/plain;charset=utf-8' })
|
||||
exportname = "Private_Master_Key_" + myCoinName + "_" + myCoinAddress + ".txt"
|
||||
this.saveFileToDisk(blob, exportname)
|
||||
await this.saveFileToDisk(blob, exportname)
|
||||
}
|
||||
|
||||
async saveFileToDisk(blob, fileName) {
|
||||
@ -590,8 +590,7 @@ class ExportKeys extends connect(store)(LitElement) {
|
||||
|
||||
getApiKey() {
|
||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||
let apiKey = apiNode.apiKey
|
||||
return apiKey
|
||||
return apiNode.apiKey
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ import {connect} from 'pwa-helpers'
|
||||
import {store} from '../../store.js'
|
||||
import {allowShowSyncIndicator, removeShowSyncIndicator} from '../../redux/app/app-actions.js'
|
||||
import {doSetQChatNotificationConfig} from '../../redux/user/user-actions.js'
|
||||
import {translate} from '../../../translate/index.js'
|
||||
import {translate} from '../../../translate'
|
||||
import isElectron from 'is-electron'
|
||||
|
||||
import '@material/mwc-checkbox'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {store} from '../../store.js'
|
||||
import {translate} from '../../../translate/index.js'
|
||||
import {translate} from '../../../translate'
|
||||
|
||||
import '@material/mwc-textfield'
|
||||
import '@material/mwc-icon'
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
removeQAPPAutoLists,
|
||||
setIsOpenDevDialog
|
||||
} from '../../redux/app/app-actions.js'
|
||||
import {get, translate} from '../../../translate/index.js'
|
||||
import {get, translate} from '../../../translate'
|
||||
import snackbar from '../../functional-components/snackbar.js'
|
||||
import FileSaver from 'file-saver'
|
||||
|
||||
@ -232,7 +232,7 @@ class SecurityView extends connect(store)(LitElement) {
|
||||
const dataString = JSON.stringify(data)
|
||||
const blob = new Blob([dataString], { type: 'text/plain;charset=utf-8' })
|
||||
backupname = "qortal_backup_" + state.app.selectedAddress.address + ".json"
|
||||
this.saveFileToDisk(blob, backupname)
|
||||
await this.saveFileToDisk(blob, backupname)
|
||||
}
|
||||
|
||||
async saveFileToDisk(blob, fileName) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {store} from '../../store.js'
|
||||
import {translate} from '../../../translate/index.js'
|
||||
import {translate} from '../../../translate'
|
||||
|
||||
import '@polymer/paper-dialog/paper-dialog.js'
|
||||
import '@material/mwc-button'
|
||||
|
@ -8,7 +8,7 @@ import {repeat} from 'lit/directives/repeat.js';
|
||||
import ShortUniqueId from 'short-unique-id';
|
||||
import {setIsOpenDevDialog, setNewTab} from '../redux/app/app-actions.js'
|
||||
import FileSaver from 'file-saver'
|
||||
import {get, registerTranslateConfig, translate, use} from '../../translate/index.js'
|
||||
import {get, registerTranslateConfig, translate, use} from '../../translate'
|
||||
import '@material/mwc-button'
|
||||
import '@material/mwc-dialog'
|
||||
import '@material/mwc-icon'
|
||||
@ -19,7 +19,7 @@ import '@polymer/paper-dialog/paper-dialog.js'
|
||||
import '@vaadin/grid'
|
||||
import '@vaadin/text-field'
|
||||
import '../custom-elements/frag-file-input.js'
|
||||
import { defaultQappsTabs } from '../data/defaultQapps.js'
|
||||
import {defaultQappsTabs} from '../data/defaultQapps.js'
|
||||
|
||||
registerTranslateConfig({
|
||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
||||
@ -842,7 +842,7 @@ class ShowPlugin extends connect(store)(LitElement) {
|
||||
|
||||
store.dispatch(setNewTab(null))
|
||||
} else if (!this.tabs.find((tab) => tab.id === newTab.id)) {
|
||||
this.addTab(newTab)
|
||||
await this.addTab(newTab)
|
||||
this.currentTab = this.tabs.length - 1
|
||||
store.dispatch(setNewTab(null))
|
||||
//clear newTab
|
||||
@ -1473,8 +1473,7 @@ class NavBar extends connect(store)(LitElement) {
|
||||
res()
|
||||
}, 1000);
|
||||
})
|
||||
const detail = event.detail
|
||||
this.myMenuPlugins = detail
|
||||
this.myMenuPlugins = event.detail
|
||||
const addressInfo = this.addressInfo
|
||||
const isMinter = addressInfo?.error !== 124 && +addressInfo?.level > 0
|
||||
const isSponsor = +addressInfo?.level >= 5
|
||||
@ -1588,11 +1587,9 @@ class NavBar extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
async getMyFollowedNames() {
|
||||
let myFollowedNames = await parentEpml.request('apiCall', {
|
||||
url: `/lists/followedNames?apiKey=${this.getApiKey()}`
|
||||
})
|
||||
|
||||
this.myFollowedNames = myFollowedNames
|
||||
this.myFollowedNames = await parentEpml.request('apiCall', {
|
||||
url: `/lists/followedNames?apiKey=${this.getApiKey()}`
|
||||
})
|
||||
}
|
||||
|
||||
searchNameKeyListener(e) {
|
||||
@ -1692,7 +1689,7 @@ class NavBar extends connect(store)(LitElement) {
|
||||
let err3string = get("appspage.schange22")
|
||||
parentEpml.request('showSnackBar', `${err3string}`)
|
||||
}
|
||||
this.getMyFollowedNamesList()
|
||||
await this.getMyFollowedNamesList()
|
||||
return ret
|
||||
}
|
||||
|
||||
@ -1718,7 +1715,7 @@ class NavBar extends connect(store)(LitElement) {
|
||||
let err4string = get("appspage.schange23")
|
||||
parentEpml.request('showSnackBar', `${err4string}`)
|
||||
}
|
||||
this.getMyFollowedNamesList()
|
||||
await this.getMyFollowedNamesList()
|
||||
return ret
|
||||
}
|
||||
|
||||
@ -1995,11 +1992,7 @@ class NavBar extends connect(store)(LitElement) {
|
||||
this.myPluginNameRes = res
|
||||
})
|
||||
|
||||
if (this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0) {
|
||||
myPluginName = false
|
||||
} else {
|
||||
myPluginName = true
|
||||
}
|
||||
myPluginName = !(this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0);
|
||||
return myPluginName
|
||||
}
|
||||
|
||||
@ -2060,11 +2053,7 @@ class NavBar extends connect(store)(LitElement) {
|
||||
this.myPluginNameRes = res
|
||||
})
|
||||
|
||||
if (this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0 ) {
|
||||
myPluginName = false
|
||||
} else {
|
||||
myPluginName = true
|
||||
}
|
||||
myPluginName = !(this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0);
|
||||
return myPluginName
|
||||
}
|
||||
|
||||
@ -2406,7 +2395,7 @@ class NavBar extends connect(store)(LitElement) {
|
||||
async handlePasteLink(e) {
|
||||
try {
|
||||
const value = this.shadowRoot.getElementById('linkInput').value
|
||||
this.getQuery(value)
|
||||
await this.getQuery(value)
|
||||
} catch (error) {
|
||||
}
|
||||
}
|
||||
@ -2415,7 +2404,7 @@ class NavBar extends connect(store)(LitElement) {
|
||||
if (e.key === 'Enter') {
|
||||
try {
|
||||
const value = this.shadowRoot.getElementById('linkInput').value
|
||||
this.getQuery(value)
|
||||
await this.getQuery(value)
|
||||
} catch (error) {
|
||||
}
|
||||
}
|
||||
@ -2423,8 +2412,7 @@ class NavBar extends connect(store)(LitElement) {
|
||||
|
||||
getApiKey() {
|
||||
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
let apiKey = apiNode.apiKey
|
||||
return apiKey
|
||||
return apiNode.apiKey
|
||||
}
|
||||
|
||||
isEmptyArray(arr) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {css, html, LitElement} from 'lit';
|
||||
import {connect} from 'pwa-helpers';
|
||||
import {store} from '../store.js';
|
||||
import {get, translate} from '../../translate/index.js'
|
||||
import {get, translate} from '../../translate'
|
||||
import {asyncReplace} from 'lit/directives/async-replace.js';
|
||||
|
||||
import '../functional-components/my-button.js';
|
||||
@ -235,9 +235,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
||||
const url = `${nodeUrl}/admin/mintingaccounts`;
|
||||
try {
|
||||
const res = await fetch(url);
|
||||
const mintingAccountData = await res.json();
|
||||
|
||||
this.mintingAccountData = mintingAccountData;
|
||||
this.mintingAccountData = await res.json();
|
||||
} catch (error) {
|
||||
this.errorMsg = this.renderErrorMsg1();
|
||||
}
|
||||
@ -286,14 +284,14 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
||||
|
||||
try {
|
||||
await addMintingAccount(this.privateRewardShareKey);
|
||||
routes.showSnackBar({
|
||||
await routes.showSnackBar({
|
||||
data: translate('becomeMinterPage.bchange19'),
|
||||
});
|
||||
this.status = 5;
|
||||
this.getMintingAcccounts();
|
||||
await this.getMintingAcccounts();
|
||||
} catch (error) {
|
||||
this.errorMsg = this.renderErrorMsg3();
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -311,8 +309,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
||||
const rewardShares = async (minterAddr) => {
|
||||
const url = `${nodeUrl}/addresses/rewardshares?minters=${minterAddr}&recipients=${minterAddr}`;
|
||||
const res = await fetch(url);
|
||||
const data = await res.json();
|
||||
return data;
|
||||
return await res.json();
|
||||
};
|
||||
|
||||
if (!stop) {
|
||||
@ -352,7 +349,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
||||
let rewarddialog3 = get('transactions.rewarddialog3');
|
||||
let rewarddialog4 = get('transactions.rewarddialog4');
|
||||
|
||||
let myTxnrequest = await routes.transaction({
|
||||
return await routes.transaction({
|
||||
data: {
|
||||
type: 38,
|
||||
nonce: nonce,
|
||||
@ -368,7 +365,6 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
||||
},
|
||||
disableModal: true,
|
||||
});
|
||||
return myTxnrequest;
|
||||
};
|
||||
|
||||
const getTxnRequestResponse = (txnResponse) => {
|
||||
@ -404,8 +400,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
||||
const getLastRef = async () => {
|
||||
const url = `${nodeUrl}/addresses/lastreference/${address}`;
|
||||
const res = await fetch(url);
|
||||
const data = await res.text();
|
||||
return data;
|
||||
return await res.text();
|
||||
};
|
||||
|
||||
const startMinting = async () => {
|
||||
@ -422,11 +417,11 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
||||
|
||||
try {
|
||||
this.privateRewardShareKey = await createSponsorshipKey();
|
||||
this.confirmRelationship(publicAddress)
|
||||
await this.confirmRelationship(publicAddress)
|
||||
} catch (error) {
|
||||
console.log({ error })
|
||||
this.errorMsg = (error && error.data && error.data.message) ? error.data.message : this.renderErrorMsg4();
|
||||
return;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@ -438,7 +433,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
||||
.onClick=${async () => {
|
||||
await startMinting();
|
||||
if (this.errorMsg) {
|
||||
routes.showSnackBar({
|
||||
await routes.showSnackBar({
|
||||
data: this.errorMsg,
|
||||
});
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {translate} from '../../translate/index.js'
|
||||
import {translate} from '../../translate'
|
||||
import '@polymer/paper-icon-button/paper-icon-button.js'
|
||||
import '@polymer/iron-icons/image-icons.js'
|
||||
import '@polymer/iron-icons/iron-icons.js'
|
||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
||||
import {render} from 'lit/html.js'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {store} from '../../store.js'
|
||||
import {get, translate} from '../../../translate/index.js'
|
||||
import {get, translate} from '../../../translate'
|
||||
|
||||
import '@polymer/paper-dialog/paper-dialog.js'
|
||||
import '@material/mwc-button'
|
||||
@ -1374,13 +1374,11 @@ class UserInfoView extends connect(store)(LitElement) {
|
||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
const fromNameUrl = `${nodeUrl}/names/${fromName}`
|
||||
|
||||
const qortalNameInfo = await fetch(fromNameUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
this.nameAddressResult = qortalNameInfo
|
||||
this.nameAddressResult = await fetch(fromNameUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
const nameAddress = this.nameAddressResult.owner
|
||||
this.getAllWithAddress(nameAddress)
|
||||
await this.getAllWithAddress(nameAddress)
|
||||
}
|
||||
|
||||
async getAllWithAddress(myAddress) {
|
||||
@ -1401,11 +1399,9 @@ class UserInfoView extends connect(store)(LitElement) {
|
||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
const infoAddressUrl = `${nodeUrl}/addresses/${infoAddress}`
|
||||
|
||||
const qortalAddressInfo = await fetch(infoAddressUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
this.addressResult = qortalAddressInfo
|
||||
this.addressResult = await fetch(infoAddressUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
}
|
||||
|
||||
async getAddressUserAvatar(avatarAddress) {
|
||||
@ -1427,8 +1423,7 @@ class UserInfoView extends connect(store)(LitElement) {
|
||||
}
|
||||
})
|
||||
|
||||
const myImageUrl = `${nodeUrl}/arbitrary/THUMBNAIL/${this.imageName}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||
this.imageUrl = myImageUrl
|
||||
this.imageUrl = `${nodeUrl}/arbitrary/THUMBNAIL/${this.imageName}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||
}
|
||||
|
||||
async getAddressUserBalance(balanceAddress) {
|
||||
@ -1451,19 +1446,15 @@ class UserInfoView extends connect(store)(LitElement) {
|
||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
|
||||
if (checkBlocks === 0) {
|
||||
let noMinterString = get("explorerpage.exp16")
|
||||
this.startMintTime = noMinterString
|
||||
this.startMintTime = get("explorerpage.exp16")
|
||||
} else {
|
||||
const rewardshareUrl = `${nodeUrl}/transactions/search?txType=REWARD_SHARE&address=${mintAddress}&confirmationStatus=CONFIRMED&limit=1&reverse=false`
|
||||
|
||||
const startMinting = await fetch(rewardshareUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
this.startMinting = await fetch(rewardshareUrl).then(response => {
|
||||
return response.json()
|
||||
})
|
||||
|
||||
this.startMinting = startMinting
|
||||
|
||||
const mintString = new Date(this.startMinting[0].timestamp).toLocaleDateString()
|
||||
this.startMintTime = mintString
|
||||
this.startMintTime = new Date(this.startMinting[0].timestamp).toLocaleDateString()
|
||||
}
|
||||
}
|
||||
|
||||
@ -1928,9 +1919,8 @@ class UserInfoView extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
getApiKey() {
|
||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node];
|
||||
let apiKey = apiNode.apiKey;
|
||||
return apiKey;
|
||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||
return apiNode.apiKey
|
||||
}
|
||||
|
||||
isEmptyArray(arr) {
|
||||
@ -1941,8 +1931,7 @@ class UserInfoView extends connect(store)(LitElement) {
|
||||
}
|
||||
|
||||
round(number) {
|
||||
let result = (Math.round(parseFloat(number) * 1e8) / 1e8).toFixed(8)
|
||||
return result
|
||||
return (Math.round(parseFloat(number) * 1e8) / 1e8).toFixed(8)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,8 +111,7 @@ class WalletProfile extends connect(store)(LitElement) {
|
||||
|
||||
getApiKey() {
|
||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||
let apiKey = apiNode.apiKey
|
||||
return apiKey
|
||||
return apiNode.apiKey
|
||||
}
|
||||
|
||||
stateChanged(state) {
|
||||
|
@ -3,7 +3,7 @@ import {css, html, LitElement} from 'lit'
|
||||
import '@material/mwc-button'
|
||||
import '@material/mwc-icon'
|
||||
|
||||
import {translate} from '../../translate/index.js'
|
||||
import {translate} from '../../translate'
|
||||
|
||||
class FragFileInput extends LitElement {
|
||||
static get properties () {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {store} from '../store.js'
|
||||
import {get, translate} from '../../translate/index.js'
|
||||
import {get, translate} from '../../translate'
|
||||
|
||||
import {listenForRequest} from '../transactionRequest.js'
|
||||
|
||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {store} from '../store.js'
|
||||
import {testApiKey} from '../apiKeyUtils.js'
|
||||
import {get, translate} from '../../translate/index.js'
|
||||
import {get, translate} from '../../translate'
|
||||
|
||||
import '@material/mwc-dialog'
|
||||
import '@material/mwc-button'
|
||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
||||
import {connect} from 'pwa-helpers'
|
||||
import {store} from '../store.js'
|
||||
import {doAddNode, doEditNode, doLoadNodeConfig, doRemoveNode, doSetNode} from '../redux/app/app-actions.js'
|
||||
import {get, registerTranslateConfig, translate, use} from '../../translate/index.js'
|
||||
import {get, registerTranslateConfig, translate, use} from '../../translate'
|
||||
import snackbar from './snackbar.js'
|
||||
import '../components/language-selector.js'
|
||||
import '../custom-elements/frag-file-input.js'
|
||||
@ -211,8 +211,7 @@ class SettingsPage extends connect(store)(LitElement) {
|
||||
|
||||
// Set the selected value for mwc-select
|
||||
const protocolList = dialog.querySelector('#protocolList')
|
||||
const desiredProtocol = currentValues.protocol
|
||||
protocolList.value = desiredProtocol
|
||||
protocolList.value = currentValues.protocol
|
||||
this.isBeingEdited = true
|
||||
this.isBeingEditedIndex = index
|
||||
this.shadowRoot.querySelector('#addNodeDialog').show()
|
||||
|
@ -171,9 +171,7 @@ export const newMessageNotificationQappLocal = (data) => {
|
||||
}
|
||||
|
||||
notify.onclick = async(e) => {
|
||||
const url = data?.url
|
||||
const value = url
|
||||
let newQuery = value;
|
||||
let newQuery = data?.url;
|
||||
if (newQuery.endsWith('/')) {
|
||||
newQuery = newQuery.slice(0, -1);
|
||||
}
|
||||
@ -217,9 +215,7 @@ export const newMessageNotificationQappLocal = (data) => {
|
||||
const notify = new Notification(data.title, data.options)
|
||||
|
||||
notify.onclick = async(e) => {
|
||||
const url = data?.url
|
||||
const value = url
|
||||
let newQuery = value;
|
||||
let newQuery = data?.url;
|
||||
if (newQuery.endsWith('/')) {
|
||||
newQuery = newQuery.slice(0, -1);
|
||||
}
|
||||
|
@ -198,11 +198,8 @@ export const routes = {
|
||||
|
||||
username: async (req) => {
|
||||
const state = store.getState()
|
||||
const username =
|
||||
state.user.storedWallets[state.app.wallet.addresses[0].address]
|
||||
.name
|
||||
|
||||
return username
|
||||
return state.user.storedWallets[state.app.wallet.addresses[0].address]
|
||||
.name
|
||||
},
|
||||
|
||||
chat: async (req) => {
|
||||
@ -343,9 +340,7 @@ export const routes = {
|
||||
tradeBotRespondRequest: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await tradeBotRespondRequest(req.data)
|
||||
|
||||
response = res
|
||||
response = await tradeBotRespondRequest(req.data)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -385,10 +380,9 @@ export const routes = {
|
||||
cancelAllOffers: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await cancelAllOffers(
|
||||
response = await cancelAllOffers(
|
||||
store.getState().app.selectedAddress
|
||||
)
|
||||
response = res
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -400,8 +394,7 @@ export const routes = {
|
||||
sendBtc: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await sendBtc(req.data)
|
||||
response = res
|
||||
response = await sendBtc(req.data)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -413,8 +406,7 @@ export const routes = {
|
||||
sendLtc: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await sendLtc(req.data)
|
||||
response = res
|
||||
response = await sendLtc(req.data)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -426,8 +418,7 @@ export const routes = {
|
||||
sendDoge: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await sendDoge(req.data)
|
||||
response = res
|
||||
response = await sendDoge(req.data)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -439,8 +430,7 @@ export const routes = {
|
||||
sendDgb: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await sendDgb(req.data)
|
||||
response = res
|
||||
response = await sendDgb(req.data)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -452,8 +442,7 @@ export const routes = {
|
||||
sendRvn: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await sendRvn(req.data)
|
||||
response = res
|
||||
response = await sendRvn(req.data)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -465,8 +454,7 @@ export const routes = {
|
||||
sendArrr: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await sendArrr(req.data)
|
||||
response = res
|
||||
response = await sendArrr(req.data)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
|
@ -114,8 +114,7 @@ export const routes = {
|
||||
store.getState().app.selectedAddress.keyPair
|
||||
)
|
||||
|
||||
const res = await processTransaction(signedTxnBytes)
|
||||
response = res
|
||||
response = await processTransaction(signedTxnBytes)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -127,8 +126,7 @@ export const routes = {
|
||||
tradeBotRespondRequest: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await tradeBotRespondRequest(req.data)
|
||||
response = res
|
||||
response = await tradeBotRespondRequest(req.data)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -147,9 +145,7 @@ export const routes = {
|
||||
store.getState().app.selectedAddress.keyPair
|
||||
)
|
||||
|
||||
const res = await processTransaction(signedTxnBytes)
|
||||
|
||||
response = res
|
||||
response = await processTransaction(signedTxnBytes)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -161,10 +157,9 @@ export const routes = {
|
||||
cancelAllOffers: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await cancelAllOffers(
|
||||
response = await cancelAllOffers(
|
||||
store.getState().app.selectedAddress
|
||||
)
|
||||
response = res
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -176,8 +171,7 @@ export const routes = {
|
||||
sendBtc: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await sendBtc(req.data)
|
||||
response = res
|
||||
response = await sendBtc(req.data)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -189,8 +183,7 @@ export const routes = {
|
||||
sendLtc: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await sendLtc(req.data)
|
||||
response = res
|
||||
response = await sendLtc(req.data)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -202,8 +195,7 @@ export const routes = {
|
||||
sendDoge: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await sendDoge(req.data)
|
||||
response = res
|
||||
response = await sendDoge(req.data)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -215,8 +207,7 @@ export const routes = {
|
||||
sendDgb: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await sendDgb(req.data)
|
||||
response = res
|
||||
response = await sendDgb(req.data)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -228,8 +219,7 @@ export const routes = {
|
||||
sendRvn: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await sendRvn(req.data)
|
||||
response = res
|
||||
response = await sendRvn(req.data)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
@ -241,8 +231,7 @@ export const routes = {
|
||||
sendArrr: async (req) => {
|
||||
let response
|
||||
try {
|
||||
const res = await sendArrr(req.data)
|
||||
response = res
|
||||
response = await sendArrr(req.data)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error(e.message)
|
||||
|
@ -17,20 +17,15 @@ const uiCoreController = (type) => {
|
||||
const { createServer } = require('./server/server.js')
|
||||
return createServer
|
||||
case BUILD:
|
||||
const build = require('./tooling/build.js')
|
||||
return build
|
||||
return require('./tooling/build.js')
|
||||
case WATCH:
|
||||
const watch = require('./tooling/watch.js')
|
||||
return watch
|
||||
return require('./tooling/watch.js')
|
||||
case WATCH_INLINE:
|
||||
const watchInlines = require('./tooling/watch-inlines.js')
|
||||
return watchInlines
|
||||
return require('./tooling/watch-inlines.js')
|
||||
case DEFAULT_CONFIG:
|
||||
const defaultConfig = require('./config/config.js')
|
||||
return defaultConfig
|
||||
return require('./config/config.js')
|
||||
case GENERATE_BUILD_CONFIG:
|
||||
const generateBuildConfig = require('./tooling/generateBuildConfig.js')
|
||||
return generateBuildConfig
|
||||
return require('./tooling/generateBuildConfig.js')
|
||||
default:
|
||||
return
|
||||
}
|
||||
|
@ -309,8 +309,7 @@ export default class AltcoinHDWallet {
|
||||
|
||||
// PublicKey Hash
|
||||
const publicKeySHA256 = new Sha256().process(new Uint8Array(this.publicKey)).finish().result
|
||||
const _publicKeyHash = new RIPEMD160().update(Buffer.from(publicKeySHA256)).digest('hex')
|
||||
this.publicKeyHash = _publicKeyHash
|
||||
this.publicKeyHash = new RIPEMD160().update(Buffer.from(publicKeySHA256)).digest('hex')
|
||||
}
|
||||
|
||||
generateMainnetMasterPrivateKey() {
|
||||
@ -505,8 +504,7 @@ export default class AltcoinHDWallet {
|
||||
|
||||
// PublicKey Hash
|
||||
const childPublicKeySHA256 = new Sha256().process(new Uint8Array(this.childPublicKey)).finish().result
|
||||
const _childPublicKeyHash = new RIPEMD160().update(Buffer.from(childPublicKeySHA256)).digest('hex')
|
||||
this.childPublicKeyHash = _childPublicKeyHash
|
||||
this.childPublicKeyHash = new RIPEMD160().update(Buffer.from(childPublicKeySHA256)).digest('hex')
|
||||
|
||||
|
||||
// Call deriveExtendedPublicChildKey // WIll be hardcoding the values...
|
||||
@ -658,8 +656,7 @@ export default class AltcoinHDWallet {
|
||||
|
||||
// PublicKey Hash
|
||||
const grandChildPublicKeySHA256 = new Sha256().process(new Uint8Array(this.grandChildPublicKey)).finish().result
|
||||
const _grandChildPublicKeyHash = new RIPEMD160().update(Buffer.from(grandChildPublicKeySHA256)).digest('hex')
|
||||
this.grandChildPublicKeyHash = _grandChildPublicKeyHash
|
||||
this.grandChildPublicKeyHash = new RIPEMD160().update(Buffer.from(grandChildPublicKeySHA256)).digest('hex')
|
||||
|
||||
|
||||
// Call deriveExtendedPublicChildKey // WIll be hardcoding the values...
|
||||
|
@ -24,6 +24,5 @@ export const createWallet = async (sourceType, source, statusUpdateFn) => {
|
||||
throw 'sourceType ' + sourceType + ' not recognized'
|
||||
}
|
||||
|
||||
const wallet = new PhraseWallet(seed, version)
|
||||
return wallet
|
||||
return new PhraseWallet(seed, version)
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Base58 from './deps/Base58.js'
|
||||
import {kdf} from './kdf.js'
|
||||
import {AES_CBC, HmacSha512} from 'asmcrypto.js'
|
||||
import {get, registerTranslateConfig} from '../../core/translate/index.js'
|
||||
import {get, registerTranslateConfig} from '../../core/translate'
|
||||
|
||||
registerTranslateConfig({
|
||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
||||
@ -27,6 +27,5 @@ export const decryptStoredWallet = async (password, wallet, statusFn = () => { }
|
||||
}
|
||||
const sfn5 = get("login.lp16")
|
||||
statusFn(sfn5)
|
||||
const decryptedBytes = AES_CBC.decrypt(encryptedSeedBytes, encryptionKey, false, iv)
|
||||
return decryptedBytes
|
||||
return AES_CBC.decrypt(encryptedSeedBytes, encryptionKey, false, iv)
|
||||
}
|
||||
|
@ -14,8 +14,7 @@ Base64.decode = function (string) {
|
||||
}
|
||||
|
||||
const decoder = new TextDecoder();
|
||||
const decodedString = decoder.decode(bytes);
|
||||
return decodedString;
|
||||
return decoder.decode(bytes);
|
||||
};
|
||||
|
||||
|
||||
|
@ -593,7 +593,7 @@
|
||||
}
|
||||
dst(c1);
|
||||
}
|
||||
if (c2 !== null) dst(c2);
|
||||
if (false) dst(c2);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -2378,7 +2378,7 @@ nacl.verify = function(x, y) {
|
||||
// Zero length arguments are considered not equal.
|
||||
if (x.length === 0 || y.length === 0) return false;
|
||||
if (x.length !== y.length) return false;
|
||||
return (vn(x, 0, y, 0, x.length) === 0) ? true : false;
|
||||
return (vn(x, 0, y, 0, x.length) === 0);
|
||||
};
|
||||
|
||||
nacl.setPRNG = function(fn) {
|
||||
|
@ -21,8 +21,7 @@ export async function request(url, options) {
|
||||
body,
|
||||
}).then(async (response) => {
|
||||
try {
|
||||
const json = await response.clone().json()
|
||||
return json
|
||||
return await response.clone().json()
|
||||
} catch (e) {
|
||||
return await response.text()
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import {store} from '../api_deps.js'
|
||||
import {stateAwait} from './utils/stateAwait.js'
|
||||
import {Sha512} from 'asmcrypto.js'
|
||||
import utils from '../api/deps/utils.js'
|
||||
import {get, registerTranslateConfig} from '../../core/translate/index.js'
|
||||
import {get, registerTranslateConfig} from '../../core/translate'
|
||||
|
||||
registerTranslateConfig({
|
||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
||||
|
@ -30,9 +30,7 @@ const signArbitrary = (arbitraryBytesBase58, arbitraryBytesForSigningBase58, non
|
||||
|
||||
const signature = nacl.sign.detached(arbitraryBytesForSigningBuffer, keyPair.privateKey)
|
||||
|
||||
const signedBytes = utils.appendBuffer(arbitraryBytesBuffer, signature)
|
||||
|
||||
return signedBytes
|
||||
return utils.appendBuffer(arbitraryBytesBuffer, signature)
|
||||
}
|
||||
|
||||
export default signArbitrary
|
||||
|
@ -25,9 +25,7 @@ const signArbitraryWithFee = (arbitraryBytesBase58, arbitraryBytesForSigningBase
|
||||
|
||||
const signature = nacl.sign.detached(arbitraryBytesForSigningBuffer, keyPair.privateKey)
|
||||
|
||||
const signedBytes = utils.appendBuffer(arbitraryBytesBuffer, signature)
|
||||
|
||||
return signedBytes
|
||||
return utils.appendBuffer(arbitraryBytesBuffer, signature)
|
||||
}
|
||||
|
||||
export default signArbitraryWithFee
|
||||
|
@ -25,18 +25,14 @@ const signChat = (chatBytes, nonce, keyPair) => {
|
||||
|
||||
const signature = nacl.sign.detached(chatBytesBuffer, keyPair.privateKey)
|
||||
|
||||
const signedBytes = utils.appendBuffer(chatBytesBuffer, signature)
|
||||
|
||||
return signedBytes
|
||||
return utils.appendBuffer(chatBytesBuffer, signature)
|
||||
} else {
|
||||
const chatBytesBuffer = new Uint8Array(chatBytes)
|
||||
chatBytesBuffer.set(_nonce, 112)
|
||||
|
||||
const signature = nacl.sign.detached(chatBytesBuffer, keyPair.privateKey)
|
||||
|
||||
const signedBytes = utils.appendBuffer(chatBytesBuffer, signature)
|
||||
|
||||
return signedBytes
|
||||
return utils.appendBuffer(chatBytesBuffer, signature)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,14 +17,10 @@ const signTradeBotTransaction = (unsignedTxn, keyPair) => {
|
||||
const _privateKey = Object.keys(keyPair.privateKey).map(function (key) { return keyPair.privateKey[key]; })
|
||||
const privateKey = new Uint8Array(_privateKey)
|
||||
const signature = nacl.sign.detached(txnBuffer, privateKey)
|
||||
const signedBytes = utils.appendBuffer(txnBuffer, signature)
|
||||
|
||||
return signedBytes
|
||||
return utils.appendBuffer(txnBuffer, signature)
|
||||
} else {
|
||||
const signature = nacl.sign.detached(txnBuffer, keyPair.privateKey)
|
||||
const signedBytes = utils.appendBuffer(txnBuffer, signature)
|
||||
|
||||
return signedBytes
|
||||
return utils.appendBuffer(txnBuffer, signature)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,8 +9,7 @@ export const cancelAllOffers = async (requestObject) => {
|
||||
|
||||
const getMyOpenOffers = async () => {
|
||||
const res = await request('/crosschain/tradeoffers')
|
||||
const myOpenTradeOrders = await res.filter(order => order.mode === "OFFERING" && order.qortalCreator === address)
|
||||
return myOpenTradeOrders
|
||||
return await res.filter(order => order.mode === "OFFERING" && order.qortalCreator === address)
|
||||
}
|
||||
|
||||
const myOpenOffers = await getMyOpenOffers()
|
||||
|
@ -3,6 +3,5 @@ import Base58 from '../deps/Base58.js'
|
||||
|
||||
export const base58PublicKeyToAddress = (base58pubkey, qora = false) => {
|
||||
const decodePubKey = Base58.decode(base58pubkey)
|
||||
const address = publicKeyToAddress(decodePubKey, qora)
|
||||
return address
|
||||
return publicKeyToAddress(decodePubKey, qora)
|
||||
}
|
||||
|
@ -3,8 +3,6 @@ import Base58 from '../deps/Base58.js'
|
||||
export const validateAddress = (address) => {
|
||||
const decodePubKey = Base58.decode(address)
|
||||
|
||||
if (!(decodePubKey instanceof Uint8Array && decodePubKey.length == 25)) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
return decodePubKey instanceof Uint8Array && decodePubKey.length == 25;
|
||||
|
||||
}
|
||||
|
38
electron.js
38
electron.js
@ -168,11 +168,7 @@ function doesFileExist(urlToJavaFile) {
|
||||
xhr.open('HEAD', urlToJavaFile, true)
|
||||
xhr.send()
|
||||
|
||||
if (xhr.status == "404") {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
return xhr.status != "404";
|
||||
}
|
||||
|
||||
async function checkWin() {
|
||||
@ -197,7 +193,7 @@ async function checkWin() {
|
||||
store.set('askingCore', returnValue.checkboxChecked)
|
||||
} else {
|
||||
store.set('askingCore', returnValue.checkboxChecked)
|
||||
return
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -215,7 +211,7 @@ async function checkWin() {
|
||||
if (returnValue.response === 0) {
|
||||
downloadWindows()
|
||||
} else {
|
||||
return
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -227,7 +223,7 @@ async function checkOsPlatform() {
|
||||
} else if (process.platform === 'linux' || process.platform === 'darwin') {
|
||||
startElectronUnix()
|
||||
} else {
|
||||
return
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -252,7 +248,7 @@ async function startElectronWin() {
|
||||
if (returnValue.response === 0) {
|
||||
downloadWindows()
|
||||
} else {
|
||||
return
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -279,7 +275,7 @@ function startElectronUnix() {
|
||||
if (returnValue.response === 0) {
|
||||
downloadQortal()
|
||||
} else {
|
||||
return
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -340,7 +336,7 @@ async function checkPort() {
|
||||
|
||||
async function checkResponseStatus(res) {
|
||||
if (res.ok) {
|
||||
return
|
||||
|
||||
} else if (process.platform === 'win32') {
|
||||
await checkWin()
|
||||
} else {
|
||||
@ -382,7 +378,7 @@ async function javaversion() {
|
||||
})
|
||||
|
||||
checkJava.stderr.on('end', () => {
|
||||
datres = Buffer.concat(stderrChunks).toString().split('\n')[0]
|
||||
let datres = Buffer.concat(stderrChunks).toString().split('\n')[0]
|
||||
const javaVersion = new RegExp('(java|openjdk) version').test(datres) ? datres.split(' ')[2].replace(/"/g, '') : false;
|
||||
log.info("Java Version", javaVersion)
|
||||
if (javaVersion != false) {
|
||||
@ -399,7 +395,7 @@ async function javaversion() {
|
||||
if (returnValue.response === 0) {
|
||||
installJava()
|
||||
} else {
|
||||
return
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -706,7 +702,7 @@ function checkQortal() {
|
||||
store.set('askingCore', returnValue.checkboxChecked)
|
||||
} else {
|
||||
store.set('askingCore', returnValue.checkboxChecked)
|
||||
return
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -724,7 +720,7 @@ function checkQortal() {
|
||||
if (returnValue.response === 0) {
|
||||
downloadQortal()
|
||||
} else {
|
||||
return
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -807,7 +803,7 @@ async function checkAndStart() {
|
||||
store.set('askingCore', returnValue.checkboxChecked)
|
||||
} else {
|
||||
store.set('askingCore', returnValue.checkboxChecked)
|
||||
return
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -986,7 +982,7 @@ const editMenu = Menu.buildFromTemplate([
|
||||
store.set('askingCore', returnValue.checkboxChecked)
|
||||
} else {
|
||||
store.set('askingCore', returnValue.checkboxChecked)
|
||||
return
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -1143,7 +1139,7 @@ const createTray = () => {
|
||||
store.set('askingCore', returnValue.checkboxChecked)
|
||||
} else {
|
||||
store.set('askingCore', returnValue.checkboxChecked)
|
||||
return
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -1243,7 +1239,7 @@ if (!isLock) {
|
||||
store.set('askingCore', returnValue.checkboxChecked)
|
||||
} else {
|
||||
store.set('askingCore', returnValue.checkboxChecked)
|
||||
return
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -1329,7 +1325,7 @@ if (!isLock) {
|
||||
})
|
||||
dl.show()
|
||||
} else {
|
||||
return
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -1351,7 +1347,7 @@ if (!isLock) {
|
||||
if (returnValue.response === 0) {
|
||||
autoUpdater.quitAndInstall()
|
||||
} else {
|
||||
return
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
|
536
package-lock.json
generated
536
package-lock.json
generated
@ -9,7 +9,7 @@
|
||||
"version": "4.5.1",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@hapi/hapi": "21.3.6",
|
||||
"@hapi/hapi": "21.3.7",
|
||||
"@hapi/inert": "7.1.0",
|
||||
"@lit-labs/motion": "1.0.6",
|
||||
"@popperjs/core": "2.11.8",
|
||||
@ -40,20 +40,20 @@
|
||||
"prosemirror-commands": "1.5.2",
|
||||
"prosemirror-dropcursor": "1.8.1",
|
||||
"prosemirror-gapcursor": "1.3.2",
|
||||
"prosemirror-history": "1.3.2",
|
||||
"prosemirror-history": "1.4.0",
|
||||
"prosemirror-keymap": "1.2.2",
|
||||
"prosemirror-model": "1.19.4",
|
||||
"prosemirror-schema-list": "1.3.0",
|
||||
"prosemirror-state": "1.4.3",
|
||||
"prosemirror-transform": "1.8.0",
|
||||
"prosemirror-view": "1.33.1",
|
||||
"prosemirror-view": "1.33.3",
|
||||
"sass": "1.72.0",
|
||||
"short-unique-id": "5.0.3",
|
||||
"xhr2": "0.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.24.0",
|
||||
"@electron/packager": "18.1.3",
|
||||
"@babel/core": "7.24.3",
|
||||
"@electron/packager": "18.3.2",
|
||||
"@material/mwc-button": "0.27.0",
|
||||
"@material/mwc-checkbox": "0.27.0",
|
||||
"@material/mwc-dialog": "0.27.0",
|
||||
@ -102,9 +102,9 @@
|
||||
"@vaadin/icons": "24.2.9",
|
||||
"@vaadin/password-field": "24.2.9",
|
||||
"@vaadin/tooltip": "24.2.9",
|
||||
"@zip.js/zip.js": "2.7.40",
|
||||
"@zip.js/zip.js": "2.7.41",
|
||||
"axios": "1.6.8",
|
||||
"electron": "27.3.6",
|
||||
"electron": "27.3.8",
|
||||
"electron-builder": "24.13.3",
|
||||
"epml": "0.3.3",
|
||||
"eslint": "8.57.0",
|
||||
@ -119,7 +119,7 @@
|
||||
"pwa-helpers": "0.9.1",
|
||||
"redux": "5.0.1",
|
||||
"redux-thunk": "3.1.0",
|
||||
"rollup": "4.13.0",
|
||||
"rollup": "4.13.2",
|
||||
"rollup-plugin-node-globals": "1.4.0",
|
||||
"rollup-plugin-progress": "1.1.2",
|
||||
"rollup-plugin-scss": "3.0.0",
|
||||
@ -152,42 +152,42 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
"version": "7.23.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz",
|
||||
"integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==",
|
||||
"version": "7.24.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz",
|
||||
"integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/highlight": "^7.23.4",
|
||||
"chalk": "^2.4.2"
|
||||
"@babel/highlight": "^7.24.2",
|
||||
"picocolors": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/compat-data": {
|
||||
"version": "7.23.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz",
|
||||
"integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==",
|
||||
"version": "7.24.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.1.tgz",
|
||||
"integrity": "sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/core": {
|
||||
"version": "7.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz",
|
||||
"integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==",
|
||||
"version": "7.24.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.3.tgz",
|
||||
"integrity": "sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@ampproject/remapping": "^2.2.0",
|
||||
"@babel/code-frame": "^7.23.5",
|
||||
"@babel/generator": "^7.23.6",
|
||||
"@babel/code-frame": "^7.24.2",
|
||||
"@babel/generator": "^7.24.1",
|
||||
"@babel/helper-compilation-targets": "^7.23.6",
|
||||
"@babel/helper-module-transforms": "^7.23.3",
|
||||
"@babel/helpers": "^7.24.0",
|
||||
"@babel/parser": "^7.24.0",
|
||||
"@babel/helpers": "^7.24.1",
|
||||
"@babel/parser": "^7.24.1",
|
||||
"@babel/template": "^7.24.0",
|
||||
"@babel/traverse": "^7.24.0",
|
||||
"@babel/traverse": "^7.24.1",
|
||||
"@babel/types": "^7.24.0",
|
||||
"convert-source-map": "^2.0.0",
|
||||
"debug": "^4.1.0",
|
||||
@ -204,14 +204,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/generator": {
|
||||
"version": "7.23.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz",
|
||||
"integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==",
|
||||
"version": "7.24.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.1.tgz",
|
||||
"integrity": "sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.23.6",
|
||||
"@jridgewell/gen-mapping": "^0.3.2",
|
||||
"@jridgewell/trace-mapping": "^0.3.17",
|
||||
"@babel/types": "^7.24.0",
|
||||
"@jridgewell/gen-mapping": "^0.3.5",
|
||||
"@jridgewell/trace-mapping": "^0.3.25",
|
||||
"jsesc": "^2.5.1"
|
||||
},
|
||||
"engines": {
|
||||
@ -269,12 +269,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-module-imports": {
|
||||
"version": "7.22.15",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz",
|
||||
"integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==",
|
||||
"version": "7.24.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz",
|
||||
"integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.22.15"
|
||||
"@babel/types": "^7.24.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@ -324,9 +324,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-string-parser": {
|
||||
"version": "7.23.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz",
|
||||
"integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==",
|
||||
"version": "7.24.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz",
|
||||
"integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@ -351,13 +351,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helpers": {
|
||||
"version": "7.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.0.tgz",
|
||||
"integrity": "sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA==",
|
||||
"version": "7.24.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.1.tgz",
|
||||
"integrity": "sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/template": "^7.24.0",
|
||||
"@babel/traverse": "^7.24.0",
|
||||
"@babel/traverse": "^7.24.1",
|
||||
"@babel/types": "^7.24.0"
|
||||
},
|
||||
"engines": {
|
||||
@ -365,23 +365,24 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/highlight": {
|
||||
"version": "7.23.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz",
|
||||
"integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==",
|
||||
"version": "7.24.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz",
|
||||
"integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-validator-identifier": "^7.22.20",
|
||||
"chalk": "^2.4.2",
|
||||
"js-tokens": "^4.0.0"
|
||||
"js-tokens": "^4.0.0",
|
||||
"picocolors": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz",
|
||||
"integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==",
|
||||
"version": "7.24.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.1.tgz",
|
||||
"integrity": "sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
@ -405,18 +406,18 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/traverse": {
|
||||
"version": "7.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz",
|
||||
"integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==",
|
||||
"version": "7.24.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz",
|
||||
"integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.23.5",
|
||||
"@babel/generator": "^7.23.6",
|
||||
"@babel/code-frame": "^7.24.1",
|
||||
"@babel/generator": "^7.24.1",
|
||||
"@babel/helper-environment-visitor": "^7.22.20",
|
||||
"@babel/helper-function-name": "^7.23.0",
|
||||
"@babel/helper-hoist-variables": "^7.22.5",
|
||||
"@babel/helper-split-export-declaration": "^7.22.6",
|
||||
"@babel/parser": "^7.24.0",
|
||||
"@babel/parser": "^7.24.1",
|
||||
"@babel/types": "^7.24.0",
|
||||
"debug": "^4.3.1",
|
||||
"globals": "^11.1.0"
|
||||
@ -556,9 +557,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@electron/osx-sign": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.0.5.tgz",
|
||||
"integrity": "sha512-k9ZzUQtamSoweGQDV2jILiRIHUu7lYlJ3c6IEmjv1hC17rclE+eb9U+f6UFlOOETo0JzY1HNlXy4YOlCvl+Lww==",
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.1.0.tgz",
|
||||
"integrity": "sha512-9xxNAyTu2YEAfn2TOQXC5fcTZ9hxVT/zAgWOONpOvxivv5rU97RldGbJrxz+OBKXGAiQRJUYOY07mJI++S/iYw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"compare-version": "^0.1.2",
|
||||
@ -591,9 +592,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@electron/packager": {
|
||||
"version": "18.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@electron/packager/-/packager-18.1.3.tgz",
|
||||
"integrity": "sha512-21T5MxUf7DwV07IIes3jO/571mXCjOGVPdmYJFPCVDTimFiHQSW0Oy+OIGQaKBiNIXfnP29KylsCQbmds6O6Iw==",
|
||||
"version": "18.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@electron/packager/-/packager-18.3.2.tgz",
|
||||
"integrity": "sha512-orjylavppgIh24qkNpWm2B/LQUpCS/YLOoKoU+eMK/hJgIhShLDsusPIQzgUGVwNCichu8/zPAGfdQZXHG0gtw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@electron/asar": "^3.2.1",
|
||||
@ -602,7 +603,6 @@
|
||||
"@electron/osx-sign": "^1.0.5",
|
||||
"@electron/universal": "^2.0.1",
|
||||
"@electron/windows-sign": "^1.0.0",
|
||||
"cross-spawn-windows-exe": "^1.2.0",
|
||||
"debug": "^4.0.1",
|
||||
"extract-zip": "^2.0.0",
|
||||
"filenamify": "^4.1.0",
|
||||
@ -612,7 +612,7 @@
|
||||
"junk": "^3.1.0",
|
||||
"parse-author": "^2.0.0",
|
||||
"plist": "^3.0.0",
|
||||
"rcedit": "^4.0.0",
|
||||
"resedit": "^2.0.0",
|
||||
"resolve": "^1.1.6",
|
||||
"semver": "^7.1.3",
|
||||
"yargs-parser": "^21.1.1"
|
||||
@ -688,9 +688,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@electron/universal/node_modules/minimatch": {
|
||||
"version": "9.0.3",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
|
||||
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
|
||||
"version": "9.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
|
||||
"integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
@ -950,9 +950,9 @@
|
||||
"integrity": "sha512-w+lKW+yRrLhJu620jT3y+5g2mHqnKfepreykvdOcl9/6up8GrQQn+l3FRTsjHTKbkbfQFkuksHpdv2EcpKcJ4Q=="
|
||||
},
|
||||
"node_modules/@hapi/hapi": {
|
||||
"version": "21.3.6",
|
||||
"resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-21.3.6.tgz",
|
||||
"integrity": "sha512-fbJ7QYQZl7Ixe6fmKjJbVO3zUrDa5aY+4xn7xBvJFXw6be76B4d28qknrD2la1aXo6GIhTUsJnqzU2awqmG0Sg==",
|
||||
"version": "21.3.7",
|
||||
"resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-21.3.7.tgz",
|
||||
"integrity": "sha512-33J0nreMfqkhY7wwRAZRy+9J+7J4QOH1JtICMjIUmxfaOYSJL/d8JJCtg57SX60944bhlCeu7isb7qyr2jT2oA==",
|
||||
"dependencies": {
|
||||
"@hapi/accept": "^6.0.1",
|
||||
"@hapi/ammo": "^6.0.1",
|
||||
@ -1185,9 +1185,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@humanwhocodes/object-schema": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz",
|
||||
"integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",
|
||||
"integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@isaacs/cliui": {
|
||||
@ -3039,9 +3039,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm-eabi": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.0.tgz",
|
||||
"integrity": "sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.2.tgz",
|
||||
"integrity": "sha512-3XFIDKWMFZrMnao1mJhnOT1h2g0169Os848NhhmGweEcfJ4rCi+3yMCOLG4zA61rbJdkcrM/DjVZm9Hg5p5w7g==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@ -3052,9 +3052,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm64": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.0.tgz",
|
||||
"integrity": "sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.2.tgz",
|
||||
"integrity": "sha512-GdxxXbAuM7Y/YQM9/TwwP+L0omeE/lJAR1J+olu36c3LqqZEBdsIWeQ91KBe6nxwOnb06Xh7JS2U5ooWU5/LgQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@ -3065,9 +3065,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-arm64": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.0.tgz",
|
||||
"integrity": "sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.2.tgz",
|
||||
"integrity": "sha512-mCMlpzlBgOTdaFs83I4XRr8wNPveJiJX1RLfv4hggyIVhfB5mJfN4P8Z6yKh+oE4Luz+qq1P3kVdWrCKcMYrrA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@ -3078,9 +3078,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-x64": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.0.tgz",
|
||||
"integrity": "sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.2.tgz",
|
||||
"integrity": "sha512-yUoEvnH0FBef/NbB1u6d3HNGyruAKnN74LrPAfDQL3O32e3k3OSfLrPgSJmgb3PJrBZWfPyt6m4ZhAFa2nZp2A==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@ -3091,9 +3091,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.0.tgz",
|
||||
"integrity": "sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.2.tgz",
|
||||
"integrity": "sha512-GYbLs5ErswU/Xs7aGXqzc3RrdEjKdmoCrgzhJWyFL0r5fL3qd1NPcDKDowDnmcoSiGJeU68/Vy+OMUluRxPiLQ==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@ -3104,9 +3104,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.0.tgz",
|
||||
"integrity": "sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.2.tgz",
|
||||
"integrity": "sha512-L1+D8/wqGnKQIlh4Zre9i4R4b4noxzH5DDciyahX4oOz62CphY7WDWqJoQ66zNR4oScLNOqQJfNSIAe/6TPUmQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@ -3117,9 +3117,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.0.tgz",
|
||||
"integrity": "sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.2.tgz",
|
||||
"integrity": "sha512-tK5eoKFkXdz6vjfkSTCupUzCo40xueTOiOO6PeEIadlNBkadH1wNOH8ILCPIl8by/Gmb5AGAeQOFeLev7iZDOA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@ -3129,10 +3129,23 @@
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.13.2.tgz",
|
||||
"integrity": "sha512-zvXvAUGGEYi6tYhcDmb9wlOckVbuD+7z3mzInCSTACJ4DQrdSLPNUeDIcAQW39M3q6PDquqLWu7pnO39uSMRzQ==",
|
||||
"cpu": [
|
||||
"ppc64le"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.0.tgz",
|
||||
"integrity": "sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.2.tgz",
|
||||
"integrity": "sha512-C3GSKvMtdudHCN5HdmAMSRYR2kkhgdOfye4w0xzyii7lebVr4riCgmM6lRiSCnJn2w1Xz7ZZzHKuLrjx5620kw==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
@ -3142,10 +3155,23 @@
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-s390x-gnu": {
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.13.2.tgz",
|
||||
"integrity": "sha512-l4U0KDFwzD36j7HdfJ5/TveEQ1fUTjFFQP5qIt9gBqBgu1G8/kCaq5Ok05kd5TG9F8Lltf3MoYsUMw3rNlJ0Yg==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.0.tgz",
|
||||
"integrity": "sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.2.tgz",
|
||||
"integrity": "sha512-xXMLUAMzrtsvh3cZ448vbXqlUa7ZL8z0MwHp63K2IIID2+DeP5iWIT6g1SN7hg1VxPzqx0xZdiDM9l4n9LRU1A==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@ -3156,9 +3182,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-x64-musl": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.0.tgz",
|
||||
"integrity": "sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.2.tgz",
|
||||
"integrity": "sha512-M/JYAWickafUijWPai4ehrjzVPKRCyDb1SLuO+ZyPfoXgeCEAlgPkNXewFZx0zcnoIe3ay4UjXIMdXQXOZXWqA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@ -3169,9 +3195,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.0.tgz",
|
||||
"integrity": "sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.2.tgz",
|
||||
"integrity": "sha512-2YWwoVg9KRkIKaXSh0mz3NmfurpmYoBBTAXA9qt7VXk0Xy12PoOP40EFuau+ajgALbbhi4uTj3tSG3tVseCjuA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@ -3182,9 +3208,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.0.tgz",
|
||||
"integrity": "sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.2.tgz",
|
||||
"integrity": "sha512-2FSsE9aQ6OWD20E498NYKEQLneShWes0NGMPQwxWOdws35qQXH+FplabOSP5zEe1pVjurSDOGEVCE2agFwSEsw==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@ -3195,9 +3221,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.0.tgz",
|
||||
"integrity": "sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.2.tgz",
|
||||
"integrity": "sha512-7h7J2nokcdPePdKykd8wtc8QqqkqxIrUz7MHj6aNr8waBRU//NLDVnNjQnqQO6fqtjrtCdftpbTuOKAyrAQETQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@ -3658,9 +3684,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "18.19.24",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.24.tgz",
|
||||
"integrity": "sha512-eghAz3gnbQbvnHqB+mgB2ZR3aH6RhdEmHGS48BnV75KceQPHqabkxKI0BbUSsqhqy2Ddhc2xD/VAR9ySZd57Lw==",
|
||||
"version": "18.19.28",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.28.tgz",
|
||||
"integrity": "sha512-J5cOGD9n4x3YGgVuaND6khm5x07MMdAKkRyXnjVR6KFhLMNh2yONGiP7Z+4+tBOt5mK+GvDTiacTOVGGpqiecw==",
|
||||
"devOptional": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
@ -4033,9 +4059,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@zip.js/zip.js": {
|
||||
"version": "2.7.40",
|
||||
"resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.40.tgz",
|
||||
"integrity": "sha512-kSYwO0Wth6G66QM4CejZqG0nRhBsVVTaR18M/Ta8EcqcvaV0dYrnDDyKAstfy0V5+ejK4b9w5xc1W0ECATJTvA==",
|
||||
"version": "2.7.41",
|
||||
"resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.41.tgz",
|
||||
"integrity": "sha512-EMxPWXlEqqvsK9jxPmNvEShrIXP2LYTdQnEfsBH6OQCnlZRVo/dJIgtzbKvtK9A8PBTDQdxwxulj+QKplmW2Xg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"bun": ">=0.7.0",
|
||||
@ -4253,6 +4279,39 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/app-builder-lib/node_modules/@electron/osx-sign": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.0.5.tgz",
|
||||
"integrity": "sha512-k9ZzUQtamSoweGQDV2jILiRIHUu7lYlJ3c6IEmjv1hC17rclE+eb9U+f6UFlOOETo0JzY1HNlXy4YOlCvl+Lww==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"compare-version": "^0.1.2",
|
||||
"debug": "^4.3.4",
|
||||
"fs-extra": "^10.0.0",
|
||||
"isbinaryfile": "^4.0.8",
|
||||
"minimist": "^1.2.6",
|
||||
"plist": "^3.0.5"
|
||||
},
|
||||
"bin": {
|
||||
"electron-osx-flat": "bin/electron-osx-flat.js",
|
||||
"electron-osx-sign": "bin/electron-osx-sign.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/app-builder-lib/node_modules/@electron/osx-sign/node_modules/isbinaryfile": {
|
||||
"version": "4.0.10",
|
||||
"resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz",
|
||||
"integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 8.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/gjtorikian/"
|
||||
}
|
||||
},
|
||||
"node_modules/app-builder-lib/node_modules/@electron/universal": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@electron/universal/-/universal-1.5.1.tgz",
|
||||
@ -4973,9 +5032,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001598",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001598.tgz",
|
||||
"integrity": "sha512-j8mQRDziG94uoBfeFuqsJUNECW37DXpnvhcMJMdlH2u3MRkq1sAI0LJcXP1i/Py0KbSIC4UDj8YHPrTn5YsL+Q==",
|
||||
"version": "1.0.30001605",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001605.tgz",
|
||||
"integrity": "sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@ -5288,16 +5347,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/config-file-ts/node_modules/glob": {
|
||||
"version": "10.3.10",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
|
||||
"integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
|
||||
"version": "10.3.12",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz",
|
||||
"integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"foreground-child": "^3.1.0",
|
||||
"jackspeak": "^2.3.5",
|
||||
"jackspeak": "^2.3.6",
|
||||
"minimatch": "^9.0.1",
|
||||
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
|
||||
"path-scurry": "^1.10.1"
|
||||
"minipass": "^7.0.4",
|
||||
"path-scurry": "^1.10.2"
|
||||
},
|
||||
"bin": {
|
||||
"glob": "dist/esm/bin.mjs"
|
||||
@ -5310,9 +5369,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/config-file-ts/node_modules/minimatch": {
|
||||
"version": "9.0.3",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
|
||||
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
|
||||
"version": "9.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
|
||||
"integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
@ -5324,6 +5383,15 @@
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/config-file-ts/node_modules/minipass": {
|
||||
"version": "7.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz",
|
||||
"integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/convert-source-map": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
|
||||
@ -5422,52 +5490,6 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/cross-spawn-windows-exe": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn-windows-exe/-/cross-spawn-windows-exe-1.2.0.tgz",
|
||||
"integrity": "sha512-mkLtJJcYbDCxEG7Js6eUnUNndWjyUZwJ3H7bErmmtOYU/Zb99DyUkpamuIZE0b3bhmJyZ7D90uS6f+CGxRRjOw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/malept"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/subscription/pkg/npm-cross-spawn-windows-exe?utm_medium=referral&utm_source=npm_fund"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@malept/cross-spawn-promise": "^1.1.0",
|
||||
"is-wsl": "^2.2.0",
|
||||
"which": "^2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/cross-spawn-windows-exe/node_modules/@malept/cross-spawn-promise": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz",
|
||||
"integrity": "sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/malept"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/subscription/pkg/npm-.malept-cross-spawn-promise?utm_medium=referral&utm_source=npm_fund"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"cross-spawn": "^7.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/crypto-js": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
|
||||
@ -5752,9 +5774,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/electron": {
|
||||
"version": "27.3.6",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-27.3.6.tgz",
|
||||
"integrity": "sha512-oLk99Euqa9EQKWJsPxi4rYV32OYmlbasHUZdvLGNzTn5S3U+jLlfhvca/9Tg1xUyIv2U/gyRnwjR37Ne9n4orA==",
|
||||
"version": "27.3.8",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-27.3.8.tgz",
|
||||
"integrity": "sha512-CLQ4rhFiXBzfYsEuxDHqQlnw4fI5tJVMA+xqW322LkfcP6iiFjAMh/gYe3a1JqGPNMO2bff2Ev7toAxP1opRnQ==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
@ -6043,9 +6065,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.4.708",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.708.tgz",
|
||||
"integrity": "sha512-iWgEEvREL4GTXXHKohhh33+6Y8XkPI5eHihDmm8zUk5Zo7HICEW+wI/j5kJ2tbuNUCXJ/sNXa03ajW635DiJXA==",
|
||||
"version": "1.4.723",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.723.tgz",
|
||||
"integrity": "sha512-rxFVtrMGMFROr4qqU6n95rUi9IlfIm+lIAt+hOToy/9r6CDv0XiEcQdC3VP71y1pE5CFTzKV0RvxOGYCPWWHPw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/electron-updater": {
|
||||
@ -7614,21 +7636,6 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-docker": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
|
||||
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"is-docker": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/is-electron": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz",
|
||||
@ -7737,18 +7744,6 @@
|
||||
"is-potential-custom-element-name": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-wsl": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
|
||||
"integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"is-docker": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/isarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
@ -8254,16 +8249,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/markdown-it": {
|
||||
"version": "14.0.0",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.0.0.tgz",
|
||||
"integrity": "sha512-seFjF0FIcPt4P9U39Bq1JYblX0KZCjDLFFQPHpL5AzHpqPEKtosxmdq/LTVZnjfH7tjt9BxStm+wXcDBNuYmzw==",
|
||||
"version": "14.1.0",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz",
|
||||
"integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==",
|
||||
"dependencies": {
|
||||
"argparse": "^2.0.1",
|
||||
"entities": "^4.4.0",
|
||||
"linkify-it": "^5.0.0",
|
||||
"mdurl": "^2.0.0",
|
||||
"punycode.js": "^2.3.1",
|
||||
"uc.micro": "^2.0.0"
|
||||
"uc.micro": "^2.1.0"
|
||||
},
|
||||
"bin": {
|
||||
"markdown-it": "bin/markdown-it.mjs"
|
||||
@ -8768,12 +8763,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/path-scurry": {
|
||||
"version": "1.10.1",
|
||||
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",
|
||||
"integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz",
|
||||
"integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lru-cache": "^9.1.1 || ^10.0.0",
|
||||
"lru-cache": "^10.2.0",
|
||||
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
@ -8804,6 +8799,16 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/pe-library": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pe-library/-/pe-library-1.0.0.tgz",
|
||||
"integrity": "sha512-yZ+4d3YHKUjO0BX03oXFfHRKLdYKDO2HmCt1RcApPxme/P5ASPbbKnuQkzFrmT482wi2kfO+sPgqasrz5QeU1w==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=14",
|
||||
"npm": ">=7"
|
||||
}
|
||||
},
|
||||
"node_modules/pend": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
||||
@ -9032,9 +9037,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/prosemirror-history": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.3.2.tgz",
|
||||
"integrity": "sha512-/zm0XoU/N/+u7i5zepjmZAEnpvjDtzoPWW6VmKptcAnPadN/SStsBjMImdCEbb3seiNTpveziPTIrXQbHLtU1g==",
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.4.0.tgz",
|
||||
"integrity": "sha512-UUiGzDVcqo1lovOPdi9YxxUps3oBFWAIYkXLu3Ot+JPv1qzVogRbcizxK3LhHmtaUxclohgiOVesRw5QSlMnbQ==",
|
||||
"dependencies": {
|
||||
"prosemirror-state": "^1.2.2",
|
||||
"prosemirror-transform": "^1.0.0",
|
||||
@ -9162,9 +9167,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/prosemirror-view": {
|
||||
"version": "1.33.1",
|
||||
"resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.33.1.tgz",
|
||||
"integrity": "sha512-62qkYgSJIkwIMMCpuGuPzc52DiK1Iod6TWoIMxP4ja6BTD4yO8kCUL64PZ/WhH/dJ9fW0CDO39FhH1EMyhUFEg==",
|
||||
"version": "1.33.3",
|
||||
"resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.33.3.tgz",
|
||||
"integrity": "sha512-P4Ao/bc4OrU/2yLIf8dL4lJaEtjLR3QjIvQHgJYp2jUS7kYM4bSR6okbBjkqzOs/FwUon6UGjTLdKMnPL1MZqw==",
|
||||
"dependencies": {
|
||||
"prosemirror-model": "^1.16.0",
|
||||
"prosemirror-state": "^1.0.0",
|
||||
@ -9260,18 +9265,6 @@
|
||||
"safe-buffer": "^5.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/rcedit": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/rcedit/-/rcedit-4.0.1.tgz",
|
||||
"integrity": "sha512-bZdaQi34krFWhrDn+O53ccBDw0MkAT2Vhu75SqhtvhQu4OPyFM4RoVheyYiVQYdjhUi6EJMVWQ0tR6bCIYVkUg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"cross-spawn-windows-exe": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/read-config-file": {
|
||||
"version": "6.3.2",
|
||||
"resolved": "https://registry.npmjs.org/read-config-file/-/read-config-file-6.3.2.tgz",
|
||||
@ -9495,6 +9488,19 @@
|
||||
"node": ">=0.10.5"
|
||||
}
|
||||
},
|
||||
"node_modules/resedit": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/resedit/-/resedit-2.0.0.tgz",
|
||||
"integrity": "sha512-vrrJCabKxAW4MT1QivtAAb0poGp8KT2qhnSzfN9tFIxb2rQu1hRHNn1VgGSZR7nmxGaW5Yz0YeW1bjgvRfNoKA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"pe-library": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14",
|
||||
"npm": ">=7"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.8",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
|
||||
@ -9592,9 +9598,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.0.tgz",
|
||||
"integrity": "sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.2.tgz",
|
||||
"integrity": "sha512-MIlLgsdMprDBXC+4hsPgzWUasLO9CE4zOkj/u6j+Z6j5A4zRY+CtiXAdJyPtgCsc42g658Aeh1DlrdVEJhsL2g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/estree": "1.0.5"
|
||||
@ -9607,19 +9613,21 @@
|
||||
"npm": ">=8.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-android-arm-eabi": "4.13.0",
|
||||
"@rollup/rollup-android-arm64": "4.13.0",
|
||||
"@rollup/rollup-darwin-arm64": "4.13.0",
|
||||
"@rollup/rollup-darwin-x64": "4.13.0",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.13.0",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.13.0",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.13.0",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.13.0",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.13.0",
|
||||
"@rollup/rollup-linux-x64-musl": "4.13.0",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.13.0",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.13.0",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.13.0",
|
||||
"@rollup/rollup-android-arm-eabi": "4.13.2",
|
||||
"@rollup/rollup-android-arm64": "4.13.2",
|
||||
"@rollup/rollup-darwin-arm64": "4.13.2",
|
||||
"@rollup/rollup-darwin-x64": "4.13.2",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.13.2",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.13.2",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.13.2",
|
||||
"@rollup/rollup-linux-powerpc64le-gnu": "4.13.2",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.13.2",
|
||||
"@rollup/rollup-linux-s390x-gnu": "4.13.2",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.13.2",
|
||||
"@rollup/rollup-linux-x64-musl": "4.13.2",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.13.2",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.13.2",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.13.2",
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
@ -10005,9 +10013,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/smob": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/smob/-/smob-1.4.1.tgz",
|
||||
"integrity": "sha512-9LK+E7Hv5R9u4g4C3p+jjLstaLe11MDsL21UpYaCNmapvMkYhqCV4A/f/3gyH8QjMyh6l68q9xC85vihY9ahMQ==",
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz",
|
||||
"integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/sort-keys": {
|
||||
@ -10042,9 +10050,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
||||
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
|
||||
"integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
@ -10254,9 +10262,9 @@
|
||||
"integrity": "sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA=="
|
||||
},
|
||||
"node_modules/tar": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz",
|
||||
"integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==",
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",
|
||||
"integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"chownr": "^2.0.0",
|
||||
@ -10318,9 +10326,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/terser": {
|
||||
"version": "5.29.2",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.29.2.tgz",
|
||||
"integrity": "sha512-ZiGkhUBIM+7LwkNjXYJq8svgkd+QK3UUr0wJqY4MieaezBSAIPgbSPZyIx0idM6XWK5CMzSWa8MJIzmRcB8Caw==",
|
||||
"version": "5.30.2",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.30.2.tgz",
|
||||
"integrity": "sha512-vTDjRKYKip4dOFL5VizdoxHTYDfEXPdz5t+FbxCC5Rp2s+KbEO8w5wqMDPgj7CtFKZuzq7PXv28fZoXfqqBVuw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/source-map": "^0.3.3",
|
||||
@ -10501,9 +10509,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.4.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
|
||||
"integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
|
||||
"version": "5.4.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz",
|
||||
"integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
|
16
package.json
16
package.json
@ -31,7 +31,7 @@
|
||||
"lint": "eslint './**/*.{js,mjs}'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hapi/hapi": "21.3.6",
|
||||
"@hapi/hapi": "21.3.7",
|
||||
"@hapi/inert": "7.1.0",
|
||||
"@lit-labs/motion": "1.0.6",
|
||||
"@popperjs/core": "2.11.8",
|
||||
@ -62,20 +62,20 @@
|
||||
"prosemirror-commands": "1.5.2",
|
||||
"prosemirror-dropcursor": "1.8.1",
|
||||
"prosemirror-gapcursor": "1.3.2",
|
||||
"prosemirror-history": "1.3.2",
|
||||
"prosemirror-history": "1.4.0",
|
||||
"prosemirror-keymap": "1.2.2",
|
||||
"prosemirror-model": "1.19.4",
|
||||
"prosemirror-schema-list": "1.3.0",
|
||||
"prosemirror-state": "1.4.3",
|
||||
"prosemirror-transform": "1.8.0",
|
||||
"prosemirror-view": "1.33.1",
|
||||
"prosemirror-view": "1.33.3",
|
||||
"sass": "1.72.0",
|
||||
"short-unique-id": "5.0.3",
|
||||
"xhr2": "0.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.24.0",
|
||||
"@electron/packager": "18.1.3",
|
||||
"@babel/core": "7.24.3",
|
||||
"@electron/packager": "18.3.2",
|
||||
"@material/mwc-button": "0.27.0",
|
||||
"@material/mwc-checkbox": "0.27.0",
|
||||
"@material/mwc-dialog": "0.27.0",
|
||||
@ -124,9 +124,9 @@
|
||||
"@vaadin/icons": "24.2.9",
|
||||
"@vaadin/password-field": "24.2.9",
|
||||
"@vaadin/tooltip": "24.2.9",
|
||||
"@zip.js/zip.js": "2.7.40",
|
||||
"@zip.js/zip.js": "2.7.41",
|
||||
"axios": "1.6.8",
|
||||
"electron": "27.3.6",
|
||||
"electron": "27.3.8",
|
||||
"electron-builder": "24.13.3",
|
||||
"epml": "0.3.3",
|
||||
"eslint": "8.57.0",
|
||||
@ -141,7 +141,7 @@
|
||||
"pwa-helpers": "0.9.1",
|
||||
"redux": "5.0.1",
|
||||
"redux-thunk": "3.1.0",
|
||||
"rollup": "4.13.0",
|
||||
"rollup": "4.13.2",
|
||||
"rollup-plugin-node-globals": "1.4.0",
|
||||
"rollup-plugin-progress": "1.1.2",
|
||||
"rollup-plugin-scss": "3.0.0",
|
||||
|
@ -63,7 +63,7 @@ const generateRollupConfig = (inputFile, outputFile) => {
|
||||
};
|
||||
|
||||
const generateForPlugins = () => {
|
||||
const configs = [
|
||||
return [
|
||||
{
|
||||
in: 'plugins/core/main.src.js',
|
||||
out: 'plugins/core/main.js',
|
||||
@ -162,7 +162,6 @@ const generateForPlugins = () => {
|
||||
path.join(__dirname, file.out)
|
||||
);
|
||||
});
|
||||
return configs;
|
||||
};
|
||||
|
||||
module.exports = generateForPlugins;
|
||||
|
@ -12,19 +12,16 @@ const pluginsController = (type) => {
|
||||
switch (type) {
|
||||
case PLUGINS:
|
||||
const path = require('path')
|
||||
const plugins = [
|
||||
{
|
||||
folder: path.join(__dirname, 'plugins/core'),
|
||||
name: 'core'
|
||||
}
|
||||
]
|
||||
return plugins
|
||||
return [
|
||||
{
|
||||
folder: path.join(__dirname, 'plugins/core'),
|
||||
name: 'core'
|
||||
}
|
||||
]
|
||||
case BUILD:
|
||||
const build = require('./build.js')
|
||||
return build
|
||||
return require('./build.js')
|
||||
case WATCH:
|
||||
const watch = require('./watch.js')
|
||||
return watch
|
||||
return require('./watch.js')
|
||||
default:
|
||||
return
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {html, LitElement} from 'lit'
|
||||
import {Epml} from '../../../epml.js'
|
||||
import '../components/ButtonIconCopy.js'
|
||||
import {registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
|
||||
import {registerTranslateConfig, translate, use} from '../../../../core/translate'
|
||||
import {blocksNeed} from '../../utils/blocks-needed.js'
|
||||
import isElectron from 'is-electron'
|
||||
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||
@ -80,18 +80,15 @@ class BecomeMinter extends LitElement {
|
||||
}
|
||||
|
||||
async getNodeInfo() {
|
||||
const nodeInfo = await parentEpml.request('apiCall', {
|
||||
return await parentEpml.request('apiCall', {
|
||||
url: `/admin/status`,
|
||||
})
|
||||
|
||||
return nodeInfo
|
||||
}
|
||||
|
||||
async getMintingAcccounts() {
|
||||
const mintingAccountData = await parentEpml.request('apiCall', {
|
||||
return await parentEpml.request('apiCall', {
|
||||
url: `/admin/mintingaccounts`,
|
||||
})
|
||||
return mintingAccountData
|
||||
}
|
||||
|
||||
async atMount() {
|
||||
@ -148,21 +145,18 @@ class BecomeMinter extends LitElement {
|
||||
}
|
||||
|
||||
async getRewardShareRelationship(recipientAddress) {
|
||||
const myRewardShareArray = await parentEpml.request('apiCall', {
|
||||
return await parentEpml.request('apiCall', {
|
||||
type: 'api',
|
||||
url: `/addresses/rewardshares?recipients=${recipientAddress}`,
|
||||
})
|
||||
|
||||
return myRewardShareArray
|
||||
}
|
||||
|
||||
_levelUpBlocks() {
|
||||
let countBlocksString = (
|
||||
return (
|
||||
blocksNeed(0) -
|
||||
(this.addressInfo?.blocksMinted +
|
||||
this.addressInfo?.blocksMintedAdjustment)
|
||||
).toString()
|
||||
return countBlocksString
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {html, LitElement} from 'lit'
|
||||
import {Epml} from '../../../../epml.js'
|
||||
import '../../components/ButtonIconCopy.js'
|
||||
import {translate} from '../../../../../core/translate/index.js'
|
||||
import {translate} from '../../../../../core/translate'
|
||||
|
||||
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||
import '@material/mwc-button'
|
||||
@ -41,9 +41,8 @@ class NotSponsored extends LitElement {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
let apiKey = myNode.apiKey
|
||||
return apiKey
|
||||
]
|
||||
return myNode.apiKey
|
||||
}
|
||||
|
||||
addMintingAccount(e) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {html, LitElement} from 'lit'
|
||||
import '../../components/ButtonIconCopy.js'
|
||||
import {translate} from '../../../../../core/translate/index.js'
|
||||
import {translate} from '../../../../../core/translate'
|
||||
|
||||
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||
import '@material/mwc-button'
|
||||
@ -28,12 +28,11 @@ class YesSponsored extends LitElement {
|
||||
static styles = [pageStyles]
|
||||
|
||||
_levelUpBlocks() {
|
||||
let countBlocksString = (
|
||||
return (
|
||||
blocksNeed(0) -
|
||||
(this.addressInfo?.blocksMinted +
|
||||
this.addressInfo?.blocksMintedAdjustment)
|
||||
).toString();
|
||||
return countBlocksString
|
||||
).toString()
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -9,7 +9,7 @@ import {bytesToMegabytes} from '../../../utils/bytesToMegabytes.js';
|
||||
import './ChatGifsExplore.js';
|
||||
import '../ImageComponent.js';
|
||||
import '@vaadin/tooltip';
|
||||
import {get, translate} from '../../../../../core/translate/index.js'
|
||||
import {get, translate} from '../../../../../core/translate'
|
||||
|
||||
const parentEpml = new Epml({type: 'WINDOW', source: window.parent});
|
||||
|
||||
@ -150,11 +150,7 @@ setOpenGifModal: { attribute: false }
|
||||
if (changedProperties && changedProperties.has('currentCollection')) {
|
||||
if (this.mode === 'explore') {
|
||||
const subbedCollection = this.mySubscribedCollections.find((collection) => ((collection.name === this.currentCollection.name) && (collection.identifier === this.currentCollection.identifier)));
|
||||
if (subbedCollection) {
|
||||
this.isSubscribed = true;
|
||||
} else {
|
||||
this.isSubscribed = false;
|
||||
}
|
||||
this.isSubscribed = !!subbedCollection;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -211,8 +207,7 @@ setOpenGifModal: { attribute: false }
|
||||
|
||||
getApiKey() {
|
||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node];
|
||||
let apiKey = myNode.apiKey;
|
||||
return apiKey;
|
||||
return myNode.apiKey;
|
||||
}
|
||||
|
||||
async getMoreExploreGifs() {
|
||||
@ -285,17 +280,14 @@ setOpenGifModal: { attribute: false }
|
||||
}
|
||||
|
||||
async getMyGifCollections() {
|
||||
const userName = await this.getName(this.selectedAddress.address);
|
||||
this.myAccountName = userName;
|
||||
this.myAccountName = await this.getName(this.selectedAddress.address);
|
||||
if (this.myAccountName) {
|
||||
const getMyGifCollections = await parentEpml.request('apiCall', {
|
||||
url: `/arbitrary/resources/search?service=GIF_REPOSITORY&query=${this.myAccountName}&apiKey=${this.getApiKey()}`,
|
||||
});
|
||||
const gifCollectionWithMetaData = await this.structureCollections(
|
||||
getMyGifCollections
|
||||
);
|
||||
|
||||
return gifCollectionWithMetaData;
|
||||
return await this.structureCollections(
|
||||
getMyGifCollections
|
||||
);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
@ -343,10 +335,9 @@ setOpenGifModal: { attribute: false }
|
||||
}
|
||||
);
|
||||
await Promise.all(getSavedGifRepos);
|
||||
const savedCollectionsWithMetaData = await this.structureCollections(
|
||||
savedCollections
|
||||
);
|
||||
return savedCollectionsWithMetaData;
|
||||
return await this.structureCollections(
|
||||
savedCollections
|
||||
);
|
||||
}
|
||||
|
||||
async getName(recipient) {
|
||||
@ -440,11 +431,7 @@ setOpenGifModal: { attribute: false }
|
||||
}
|
||||
}
|
||||
|
||||
if (invalidGifs.length > 0) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return invalidGifs.length <= 0;
|
||||
}
|
||||
|
||||
let validatedSize = validateGifSizes(this.gifsToBeAdded);
|
||||
@ -587,8 +574,7 @@ setOpenGifModal: { attribute: false }
|
||||
);
|
||||
parentEpml.request('showSnackBar', get('gifs.gchange20'));
|
||||
this.isSubscribed = true;
|
||||
const savedCollections = await this.getSavedCollections();
|
||||
this.mySubscribedCollections = savedCollections;
|
||||
this.mySubscribedCollections = await this.getSavedCollections();
|
||||
}
|
||||
|
||||
async unsubscribeToCollection() {
|
||||
@ -597,8 +583,7 @@ setOpenGifModal: { attribute: false }
|
||||
);
|
||||
parentEpml.request('showSnackBar', get('gifs.gchange21'));
|
||||
this.isSubscribed = false;
|
||||
const savedCollections = await this.getSavedCollections();
|
||||
this.mySubscribedCollections = savedCollections;
|
||||
this.mySubscribedCollections = await this.getSavedCollections();
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {html, LitElement} from 'lit'
|
||||
import {Epml} from '../../../../epml.js'
|
||||
import {chatGifsExploreStyles} from './ChatGifsExplore-css.js'
|
||||
import {get, translate} from '../../../../../core/translate/index.js'
|
||||
import {get, translate} from '../../../../../core/translate'
|
||||
import '@material/mwc-icon'
|
||||
|
||||
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
|
||||
@ -52,7 +52,7 @@ class ChatGifsExplore extends LitElement {
|
||||
|
||||
observerHandler(entries) {
|
||||
if (!entries[0].isIntersecting) {
|
||||
return;
|
||||
|
||||
} else {
|
||||
if (this.exploreCollections.length < 20) {
|
||||
return;
|
||||
@ -70,8 +70,7 @@ class ChatGifsExplore extends LitElement {
|
||||
}
|
||||
getApiKey() {
|
||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
let apiKey = myNode.apiKey
|
||||
return apiKey
|
||||
return myNode.apiKey
|
||||
}
|
||||
|
||||
async searchCollections() {
|
||||
@ -120,8 +119,7 @@ class ChatGifsExplore extends LitElement {
|
||||
class='clear-search-icon'
|
||||
@click=${async () => {
|
||||
if (this.isLoading) return;
|
||||
const latestCollections = await this.getAllCollections();
|
||||
this.exploreCollections = latestCollections;
|
||||
this.exploreCollections = await this.getAllCollections();
|
||||
this.searchCollectionName = '';
|
||||
this.isSearched = false;
|
||||
}}
|
||||
|
@ -5,7 +5,7 @@ import "@material/mwc-dialog"
|
||||
import "@polymer/paper-spinner/paper-spinner-lite.js"
|
||||
import "@material/mwc-icon"
|
||||
import "./WrapperModal"
|
||||
import {translate} from '../../../../core/translate/index.js'
|
||||
import {translate} from '../../../../core/translate'
|
||||
|
||||
const parentEpml = new Epml({ type: "WINDOW", source: window.parent })
|
||||
|
||||
@ -105,11 +105,10 @@ class ChatGroupInvites extends LitElement {
|
||||
}
|
||||
|
||||
async getLastRef() {
|
||||
let myRef = await parentEpml.request("apiCall", {
|
||||
return await parentEpml.request("apiCall", {
|
||||
type: "api",
|
||||
url: `/addresses/lastreference/${this.selectedAddress.address}`,
|
||||
})
|
||||
return myRef
|
||||
}
|
||||
|
||||
getTxnRequestResponse(txnResponse, reference) {
|
||||
@ -125,13 +124,12 @@ class ChatGroupInvites extends LitElement {
|
||||
}
|
||||
|
||||
async convertBytesForSigning(transactionBytesBase58) {
|
||||
let convertedBytes = await parentEpml.request("apiCall", {
|
||||
return await parentEpml.request("apiCall", {
|
||||
type: "api",
|
||||
method: "POST",
|
||||
url: `/transactions/convert`,
|
||||
body: `${transactionBytesBase58}`,
|
||||
})
|
||||
return convertedBytes
|
||||
}
|
||||
|
||||
async signTx(body){
|
||||
@ -204,11 +202,10 @@ class ChatGroupInvites extends LitElement {
|
||||
}
|
||||
const bodyToString2 = JSON.stringify(body2)
|
||||
let signTransaction = await this.signTx(bodyToString2)
|
||||
let processTransaction = await this.process(signTransaction)
|
||||
return processTransaction
|
||||
return await this.process(signTransaction)
|
||||
}
|
||||
|
||||
validateReceiver()
|
||||
await validateReceiver()
|
||||
}
|
||||
|
||||
async _removeAdmin(groupId) {
|
||||
@ -261,11 +258,10 @@ class ChatGroupInvites extends LitElement {
|
||||
}
|
||||
const bodyToString2 = JSON.stringify(body2)
|
||||
let signTransaction = await this.signTx(bodyToString2)
|
||||
let processTransaction = await this.process(signTransaction)
|
||||
return processTransaction
|
||||
return await this.process(signTransaction)
|
||||
}
|
||||
|
||||
validateReceiver()
|
||||
await validateReceiver()
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -11,7 +11,7 @@ import './TipUser';
|
||||
import './UserInfo/UserInfo';
|
||||
import './ChatImage';
|
||||
import './ReusableImage';
|
||||
import {get} from '../../../../core/translate/index.js'
|
||||
import {get} from '../../../../core/translate'
|
||||
|
||||
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
|
||||
|
||||
@ -242,14 +242,10 @@ class ChatGroupsManager extends LitElement {
|
||||
let endpoint = `/groups`
|
||||
|
||||
|
||||
const groups = await parentEpml.request('apiCall', {
|
||||
this.groups = await parentEpml.request('apiCall', {
|
||||
type: 'api',
|
||||
url: endpoint,
|
||||
});
|
||||
|
||||
let list = groups
|
||||
|
||||
this.groups = list
|
||||
})
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
@ -284,7 +280,7 @@ class ChatGroupsManager extends LitElement {
|
||||
|
||||
observerHandler(entries) {
|
||||
if (!entries[0].isIntersecting) {
|
||||
return;
|
||||
|
||||
} else {
|
||||
if (this.images.length < 20) {
|
||||
return;
|
||||
@ -294,19 +290,11 @@ class ChatGroupsManager extends LitElement {
|
||||
}
|
||||
|
||||
selectAuto(e) {
|
||||
if (e.target.checked) {
|
||||
this.autoView = false
|
||||
} else {
|
||||
this.autoView = true
|
||||
}
|
||||
this.autoView = !e.target.checked;
|
||||
}
|
||||
|
||||
selectMyImages(e) {
|
||||
if (e.target.checked) {
|
||||
this.onlyMyImages = false
|
||||
} else {
|
||||
this.onlyMyImages = true
|
||||
}
|
||||
this.onlyMyImages = !e.target.checked;
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -5,7 +5,7 @@ import '@material/mwc-dialog'
|
||||
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||
import '@material/mwc-icon'
|
||||
import './WrapperModal'
|
||||
import {get, translate} from '../../../../core/translate/index.js'
|
||||
import {get, translate} from '../../../../core/translate'
|
||||
|
||||
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
|
||||
|
||||
@ -115,11 +115,10 @@ class ChatGroupSettings extends LitElement {
|
||||
|
||||
// Get Last Ref
|
||||
const getLastRef = async () => {
|
||||
let myRef = await parentEpml.request('apiCall', {
|
||||
type: 'api',
|
||||
url: `/addresses/lastreference/${this.selectedAddress.address}`
|
||||
})
|
||||
return myRef
|
||||
return await parentEpml.request('apiCall', {
|
||||
type: 'api',
|
||||
url: `/addresses/lastreference/${this.selectedAddress.address}`
|
||||
})
|
||||
};
|
||||
|
||||
const validateReceiver = async () => {
|
||||
@ -129,13 +128,12 @@ class ChatGroupSettings extends LitElement {
|
||||
|
||||
}
|
||||
const convertBytesForSigning = async (transactionBytesBase58) => {
|
||||
let convertedBytes = await parentEpml.request("apiCall", {
|
||||
type: "api",
|
||||
method: "POST",
|
||||
url: `/transactions/convert`,
|
||||
body: `${transactionBytesBase58}`,
|
||||
})
|
||||
return convertedBytes
|
||||
return await parentEpml.request("apiCall", {
|
||||
type: "api",
|
||||
method: "POST",
|
||||
url: `/transactions/convert`,
|
||||
body: `${transactionBytesBase58}`,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -193,22 +191,21 @@ class ChatGroupSettings extends LitElement {
|
||||
// })
|
||||
// return processTransaction
|
||||
console.log('this.selectedAddress.nonce', this.selectedAddress.nonce)
|
||||
let myTxnrequest = await parentEpml.request('transaction', {
|
||||
type: 23,
|
||||
nonce: this.selectedAddress.nonce,
|
||||
params: {
|
||||
_groupId: groupId,
|
||||
lastReference: lastRef,
|
||||
fee: leaveFeeInput,
|
||||
"newOwner": "QdR4bQ1fJFnSZgswtW27eE8ToXwHqUQyaU",
|
||||
"newIsOpen": false,
|
||||
"newDescription": "my group for accounts I like",
|
||||
"newApprovalThreshold": "NONE",
|
||||
"newMinimumBlockDelay": 5,
|
||||
"newMaximumBlockDelay": 60
|
||||
}
|
||||
})
|
||||
return myTxnrequest
|
||||
return await parentEpml.request('transaction', {
|
||||
type: 23,
|
||||
nonce: this.selectedAddress.nonce,
|
||||
params: {
|
||||
_groupId: groupId,
|
||||
lastReference: lastRef,
|
||||
fee: leaveFeeInput,
|
||||
"newOwner": "QdR4bQ1fJFnSZgswtW27eE8ToXwHqUQyaU",
|
||||
"newIsOpen": false,
|
||||
"newDescription": "my group for accounts I like",
|
||||
"newApprovalThreshold": "NONE",
|
||||
"newMinimumBlockDelay": 5,
|
||||
"newMaximumBlockDelay": 60
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const getTxnRequestResponse = (txnResponse) => {
|
||||
@ -223,7 +220,7 @@ class ChatGroupSettings extends LitElement {
|
||||
throw new Error(txnResponse)
|
||||
}
|
||||
}
|
||||
validateReceiver()
|
||||
await validateReceiver()
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -10,7 +10,7 @@ import '@vaadin/tabs/theme/material/vaadin-tabs.js'
|
||||
import '@vaadin/avatar'
|
||||
import '@vaadin/grid'
|
||||
import '@vaadin/grid/vaadin-grid-filter-column.js'
|
||||
import {get, translate} from '../../../../core/translate/index.js'
|
||||
import {get, translate} from '../../../../core/translate'
|
||||
|
||||
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
|
||||
|
||||
@ -68,17 +68,15 @@ class ChatGroupsManagement extends LitElement {
|
||||
}
|
||||
|
||||
async getJoinedGroups(){
|
||||
let joinedG = await parentEpml.request('apiCall', {
|
||||
url: `/groups/member/${this.selectedAddress.address}`
|
||||
})
|
||||
return joinedG
|
||||
return await parentEpml.request('apiCall', {
|
||||
url: `/groups/member/${this.selectedAddress.address}`
|
||||
})
|
||||
}
|
||||
|
||||
async firstUpdated() {
|
||||
|
||||
try {
|
||||
let _joinedGroups = await this.getJoinedGroups()
|
||||
this.joinedGroups = _joinedGroups
|
||||
this.joinedGroups = await this.getJoinedGroups()
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
@ -161,11 +159,10 @@ class ChatGroupsManagement extends LitElement {
|
||||
|
||||
// Get Last Ref
|
||||
const getLastRef = async () => {
|
||||
let myRef = await parentEpml.request('apiCall', {
|
||||
type: 'api',
|
||||
url: `/addresses/lastreference/${this.selectedAddress.address}`
|
||||
})
|
||||
return myRef
|
||||
return await parentEpml.request('apiCall', {
|
||||
type: 'api',
|
||||
url: `/addresses/lastreference/${this.selectedAddress.address}`
|
||||
})
|
||||
};
|
||||
|
||||
const validateReceiver = async () => {
|
||||
@ -179,20 +176,19 @@ class ChatGroupsManagement extends LitElement {
|
||||
const makeTransactionRequest = async (lastRef) => {
|
||||
let groupdialog3 = get("transactions.groupdialog3")
|
||||
let groupdialog4 = get("transactions.groupdialog4")
|
||||
let myTxnrequest = await parentEpml.request('transaction', {
|
||||
type: 32,
|
||||
nonce: this.selectedAddress.nonce,
|
||||
params: {
|
||||
fee: leaveFeeInput,
|
||||
registrantAddress: this.selectedAddress.address,
|
||||
rGroupName: groupName,
|
||||
rGroupId: groupId,
|
||||
lastReference: lastRef,
|
||||
groupdialog3: groupdialog3,
|
||||
groupdialog4: groupdialog4,
|
||||
}
|
||||
})
|
||||
return myTxnrequest
|
||||
return await parentEpml.request('transaction', {
|
||||
type: 32,
|
||||
nonce: this.selectedAddress.nonce,
|
||||
params: {
|
||||
fee: leaveFeeInput,
|
||||
registrantAddress: this.selectedAddress.address,
|
||||
rGroupName: groupName,
|
||||
rGroupId: groupId,
|
||||
lastReference: lastRef,
|
||||
groupdialog3: groupdialog3,
|
||||
groupdialog4: groupdialog4,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const getTxnRequestResponse = (txnResponse) => {
|
||||
@ -211,7 +207,7 @@ class ChatGroupsManagement extends LitElement {
|
||||
throw new Error(txnResponse)
|
||||
}
|
||||
}
|
||||
validateReceiver()
|
||||
await validateReceiver()
|
||||
}
|
||||
|
||||
nameRenderer(person){
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {css, html, LitElement} from 'lit';
|
||||
import {translate,} from '../../../../core/translate/index.js'
|
||||
import {translate,} from '../../../../core/translate'
|
||||
import '@material/mwc-menu';
|
||||
import '@material/mwc-list/mwc-list-item.js';
|
||||
import '@material/mwc-dialog'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {css, html, LitElement} from 'lit';
|
||||
import {get, translate,} from '../../../../core/translate/index.js'
|
||||
import {get, translate,} from '../../../../core/translate'
|
||||
import axios from 'axios'
|
||||
import {RequestQueueWithPromise} from '../../utils/queue';
|
||||
import '@material/mwc-menu';
|
||||
@ -116,13 +116,10 @@ export class ChatImage extends LitElement {
|
||||
getNodeUrl(){
|
||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
|
||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
return nodeUrl
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
}
|
||||
getMyNode(){
|
||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
|
||||
return myNode
|
||||
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
}
|
||||
|
||||
getApiKey() {
|
||||
@ -130,8 +127,7 @@ getMyNode(){
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
let apiKey = myNode.apiKey;
|
||||
return apiKey;
|
||||
return myNode.apiKey;
|
||||
}
|
||||
|
||||
async fetchResource() {
|
||||
@ -148,7 +144,7 @@ getMyNode(){
|
||||
|
||||
async fetchVideoUrl() {
|
||||
|
||||
this.fetchResource()
|
||||
await this.fetchResource()
|
||||
this.url = `${this.nodeUrl}/arbitrary/${this.resource.service}/${this.resource.name}/${this.resource.identifier}?async=true&apiKey=${this.myNode.apiKey}`
|
||||
|
||||
}
|
||||
@ -201,7 +197,7 @@ getMyNode(){
|
||||
|
||||
this.status = res
|
||||
if(this.status.status === 'DOWNLOADED'){
|
||||
this.fetchResource()
|
||||
await this.fetchResource()
|
||||
}
|
||||
}
|
||||
|
||||
@ -216,12 +212,12 @@ getMyNode(){
|
||||
|
||||
async _fetchImage() {
|
||||
try {
|
||||
this.fetchVideoUrl({
|
||||
name: this.resource.name,
|
||||
service: this.resource.service,
|
||||
identifier: this.resource.identifier
|
||||
})
|
||||
this.fetchStatus()
|
||||
await this.fetchVideoUrl({
|
||||
name: this.resource.name,
|
||||
service: this.resource.service,
|
||||
identifier: this.resource.identifier
|
||||
})
|
||||
await this.fetchStatus()
|
||||
} catch (error) { /* empty */ }
|
||||
}
|
||||
|
||||
@ -231,11 +227,9 @@ getMyNode(){
|
||||
}
|
||||
|
||||
shouldUpdate(changedProperties) {
|
||||
if (changedProperties.has('setOpenDialogImage') && changedProperties.size === 1) {
|
||||
return false;
|
||||
}
|
||||
return !(changedProperties.has('setOpenDialogImage') && changedProperties.size === 1);
|
||||
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@ import '@material/mwc-dialog'
|
||||
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||
import '@material/mwc-icon'
|
||||
import './WrapperModal'
|
||||
import {get, translate} from '../../../../core/translate/index.js'
|
||||
import {get, translate} from '../../../../core/translate'
|
||||
|
||||
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
|
||||
|
||||
@ -134,11 +134,10 @@ class ChatLeaveGroup extends LitElement {
|
||||
|
||||
// Get Last Ref
|
||||
const getLastRef = async () => {
|
||||
let myRef = await parentEpml.request('apiCall', {
|
||||
type: 'api',
|
||||
url: `/addresses/lastreference/${this.selectedAddress.address}`
|
||||
})
|
||||
return myRef
|
||||
return await parentEpml.request('apiCall', {
|
||||
type: 'api',
|
||||
url: `/addresses/lastreference/${this.selectedAddress.address}`
|
||||
})
|
||||
};
|
||||
|
||||
const validateReceiver = async () => {
|
||||
@ -152,20 +151,19 @@ class ChatLeaveGroup extends LitElement {
|
||||
const makeTransactionRequest = async (lastRef) => {
|
||||
let groupdialog3 = get("transactions.groupdialog3")
|
||||
let groupdialog4 = get("transactions.groupdialog4")
|
||||
let myTxnrequest = await parentEpml.request('transaction', {
|
||||
type: 32,
|
||||
nonce: this.selectedAddress.nonce,
|
||||
params: {
|
||||
fee: leaveFeeInput,
|
||||
registrantAddress: this.selectedAddress.address,
|
||||
rGroupName: groupName,
|
||||
rGroupId: groupId,
|
||||
lastReference: lastRef,
|
||||
groupdialog3: groupdialog3,
|
||||
groupdialog4: groupdialog4,
|
||||
}
|
||||
})
|
||||
return myTxnrequest
|
||||
return await parentEpml.request('transaction', {
|
||||
type: 32,
|
||||
nonce: this.selectedAddress.nonce,
|
||||
params: {
|
||||
fee: leaveFeeInput,
|
||||
registrantAddress: this.selectedAddress.address,
|
||||
rGroupName: groupName,
|
||||
rGroupId: groupId,
|
||||
lastReference: lastRef,
|
||||
groupdialog3: groupdialog3,
|
||||
groupdialog4: groupdialog4,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const getTxnRequestResponse = (txnResponse) => {
|
||||
@ -184,7 +182,7 @@ class ChatLeaveGroup extends LitElement {
|
||||
throw new Error(txnResponse)
|
||||
}
|
||||
}
|
||||
validateReceiver()
|
||||
await validateReceiver()
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {Epml} from '../../../epml'
|
||||
import snackbar from './snackbar.js'
|
||||
import {get, translate} from '../../../../core/translate/index.js'
|
||||
import {get, translate} from '../../../../core/translate'
|
||||
import '@material/mwc-button'
|
||||
import '@material/mwc-dialog'
|
||||
|
||||
@ -159,11 +159,11 @@ class ChatModals extends LitElement {
|
||||
} else if (addressPublicKey !== false) {
|
||||
isEncrypted = 1
|
||||
_publicKey = addressPublicKey
|
||||
sendMessageRequest(isEncrypted, _publicKey)
|
||||
await sendMessageRequest(isEncrypted, _publicKey)
|
||||
} else {
|
||||
isEncrypted = 0
|
||||
_publicKey = this.selectedAddress.address
|
||||
sendMessageRequest(isEncrypted, _publicKey)
|
||||
await sendMessageRequest(isEncrypted, _publicKey)
|
||||
}
|
||||
};
|
||||
|
||||
@ -190,7 +190,7 @@ class ChatModals extends LitElement {
|
||||
isText: 1
|
||||
}
|
||||
})
|
||||
_computePow(chatResponse)
|
||||
await _computePow(chatResponse)
|
||||
}
|
||||
|
||||
const _computePow = async (chatBytes) => {
|
||||
@ -237,7 +237,7 @@ class ChatModals extends LitElement {
|
||||
}
|
||||
|
||||
}
|
||||
getAddressPublicKey()
|
||||
await getAddressPublicKey()
|
||||
}
|
||||
|
||||
_textArea(e) {
|
||||
@ -246,8 +246,7 @@ class ChatModals extends LitElement {
|
||||
|
||||
getApiKey() {
|
||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
let apiKey = myNode.apiKey
|
||||
return apiKey
|
||||
return myNode.apiKey
|
||||
}
|
||||
|
||||
getChatBlockedList() {
|
||||
@ -291,10 +290,9 @@ class ChatModals extends LitElement {
|
||||
}
|
||||
|
||||
async getChatBlockedAdresses() {
|
||||
const chatBlockedAdresses = await parentEpml.request('apiCall', {
|
||||
url: `/lists/blockedAddresses?apiKey=${this.getApiKey()}`
|
||||
})
|
||||
this.chatBlockedAdresses = chatBlockedAdresses
|
||||
this.chatBlockedAdresses = await parentEpml.request('apiCall', {
|
||||
url: `/lists/blockedAddresses?apiKey=${this.getApiKey()}`
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {html, LitElement} from 'lit'
|
||||
import {animate} from '@lit-labs/motion'
|
||||
import {Epml} from '../../../epml.js'
|
||||
import {get, translate} from '../../../../core/translate/index.js'
|
||||
import {get, translate} from '../../../../core/translate'
|
||||
import {Editor, Extension, generateHTML} from '@tiptap/core'
|
||||
import {unsafeHTML} from 'lit/directives/unsafe-html.js'
|
||||
import {escape} from 'html-escaper'
|
||||
@ -245,17 +245,12 @@ class ChatPage extends LitElement {
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
const nodeUrl =
|
||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
return nodeUrl;
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
}
|
||||
getMyNode() {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
|
||||
return myNode;
|
||||
}
|
||||
|
||||
setOpenGifModal(value) {
|
||||
@ -263,11 +258,11 @@ class ChatPage extends LitElement {
|
||||
}
|
||||
|
||||
_toggle(value) {
|
||||
this.shifted = value === (false || true) ? value : !this.shifted
|
||||
this.shifted = value === true ? value : !this.shifted
|
||||
this.requestUpdate()
|
||||
}
|
||||
_toggleResources(value) {
|
||||
this.shiftedResources = value === (false || true) ? value : !this.shiftedResources
|
||||
this.shiftedResources = value === true ? value : !this.shiftedResources
|
||||
this.requestUpdate()
|
||||
}
|
||||
|
||||
@ -362,7 +357,7 @@ class ChatPage extends LitElement {
|
||||
})
|
||||
|
||||
}
|
||||
this.processMessages(getInitialMessages, true, false)
|
||||
await this.processMessages(getInitialMessages, true, false)
|
||||
} catch (error) { /* empty */ }
|
||||
}
|
||||
|
||||
@ -1105,8 +1100,7 @@ class ChatPage extends LitElement {
|
||||
const handleTransferIntoURL = (dataTransfer) => {
|
||||
try {
|
||||
const [firstItem] = dataTransfer.items
|
||||
const blob = firstItem.getAsFile()
|
||||
return blob
|
||||
return firstItem.getAsFile()
|
||||
} catch (error) { /* empty */ }
|
||||
}
|
||||
if (event.clipboardData) {
|
||||
@ -1114,7 +1108,7 @@ class ChatPage extends LitElement {
|
||||
if (blobFound) {
|
||||
this.insertFile(blobFound)
|
||||
e.preventDefault();
|
||||
return
|
||||
|
||||
} else {
|
||||
const item_list = await navigator.clipboard.read()
|
||||
let image_type
|
||||
@ -1140,7 +1134,7 @@ class ChatPage extends LitElement {
|
||||
parentEpml.request('showSnackBar', `${errorMsg}`)
|
||||
}
|
||||
} else {
|
||||
return
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1267,7 +1261,7 @@ class ChatPage extends LitElement {
|
||||
}
|
||||
delete message.reactions
|
||||
const stringifyMessageObject = JSON.stringify(message)
|
||||
this.sendMessage({messageText: stringifyMessageObject, chatReference: undefined, isForward: true})
|
||||
await this.sendMessage({messageText: stringifyMessageObject, chatReference: undefined, isForward: true})
|
||||
} catch (error) { /* empty */ }
|
||||
}
|
||||
|
||||
@ -1279,16 +1273,16 @@ class ChatPage extends LitElement {
|
||||
if(file.identifier){
|
||||
this.imageFile = file
|
||||
this.currentEditor = 'newChat'
|
||||
return
|
||||
|
||||
}else
|
||||
if (file.type.includes('image')) {
|
||||
this.imageFile = file
|
||||
this.currentEditor = 'newChat'
|
||||
return
|
||||
|
||||
} else {
|
||||
this.attachment = file
|
||||
this.currentEditor = "newAttachmentChat"
|
||||
return
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1343,13 +1337,12 @@ class ChatPage extends LitElement {
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
const isRecipient = this.chatId.includes('direct') === true ? true : false
|
||||
const isRecipient = this.chatId.includes('direct') === true
|
||||
this.chatId.includes('direct') === true ? this.isReceipient = true : this.isReceipient = false
|
||||
this._chatId = this.chatId.split('/')[1]
|
||||
|
||||
const mstring = get("chatpage.cchange8")
|
||||
const placeholder = isRecipient === true ? `Message ${this._chatId}` : `${mstring}`
|
||||
this.chatEditorPlaceholder = placeholder
|
||||
this.chatEditorPlaceholder = isRecipient === true ? `Message ${this._chatId}` : `${mstring}`
|
||||
|
||||
isRecipient ? getAddressPublicKey() : this.fetchChatMessages(this._chatId)
|
||||
|
||||
@ -1358,7 +1351,7 @@ class ChatPage extends LitElement {
|
||||
}, 100)
|
||||
|
||||
|
||||
const isRecipient = this.chatId.includes('direct') === true ? true : false
|
||||
const isRecipient = this.chatId.includes('direct') === true
|
||||
const groupId = this.chatId.split('/')[1]
|
||||
if (!isRecipient && groupId.toString() !== '0') {
|
||||
|
||||
@ -1438,7 +1431,7 @@ class ChatPage extends LitElement {
|
||||
const isEnabledChatEnter = localStorage.getItem('isEnabledChatEnter')
|
||||
|
||||
if (isEnabledChatEnter) {
|
||||
this.isEnabledChatEnter = isEnabledChatEnter === 'false' ? false : true
|
||||
this.isEnabledChatEnter = isEnabledChatEnter !== 'false'
|
||||
}
|
||||
|
||||
}
|
||||
@ -1474,7 +1467,7 @@ class ChatPage extends LitElement {
|
||||
const previousChatId = changedProperties.get('chatId');
|
||||
|
||||
this.isLoadingMessages = true
|
||||
this.initUpdate()
|
||||
await this.initUpdate()
|
||||
|
||||
|
||||
if (previousChatId) {
|
||||
@ -1494,11 +1487,9 @@ class ChatPage extends LitElement {
|
||||
if (changedProperties.has('setActiveChatHeadUrl')) {
|
||||
return false
|
||||
}
|
||||
if (changedProperties.has('setOpenPrivateMessage')) {
|
||||
return false
|
||||
}
|
||||
return !changedProperties.has('setOpenPrivateMessage');
|
||||
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
@ -1543,8 +1534,7 @@ class ChatPage extends LitElement {
|
||||
userName = await getName(this._chatId)
|
||||
}
|
||||
const mstring = get("chatpage.cchange8")
|
||||
const placeholder = this.isReceipient === true ? `Message ${userName ? userName : this._chatId}` : `${mstring}`
|
||||
return placeholder
|
||||
return this.isReceipient === true ? `Message ${userName ? userName : this._chatId}` : `${mstring}`
|
||||
}
|
||||
|
||||
renderChatScroller() {
|
||||
@ -1651,14 +1641,14 @@ class ChatPage extends LitElement {
|
||||
})
|
||||
|
||||
|
||||
queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodeMsgs,
|
||||
parentEpml,
|
||||
isReceipient: this.isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
await queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodeMsgs,
|
||||
parentEpml,
|
||||
isReceipient: this.isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
|
||||
|
||||
let list = [...decodeMsgs]
|
||||
@ -1717,14 +1707,14 @@ class ChatPage extends LitElement {
|
||||
}
|
||||
})
|
||||
|
||||
queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodeMsgs,
|
||||
parentEpml,
|
||||
isReceipient: this.isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
await queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodeMsgs,
|
||||
parentEpml,
|
||||
isReceipient: this.isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
|
||||
|
||||
let list = [...decodeMsgs]
|
||||
@ -1791,14 +1781,14 @@ class ChatPage extends LitElement {
|
||||
}
|
||||
})
|
||||
|
||||
queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodeMsgs,
|
||||
parentEpml,
|
||||
isReceipient: this.isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
await queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodeMsgs,
|
||||
parentEpml,
|
||||
isReceipient: this.isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
|
||||
let list = [...decodeMsgs]
|
||||
|
||||
@ -1843,14 +1833,14 @@ class ChatPage extends LitElement {
|
||||
})
|
||||
|
||||
|
||||
queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodeMsgs,
|
||||
parentEpml,
|
||||
isReceipient: this.isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
await queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodeMsgs,
|
||||
parentEpml,
|
||||
isReceipient: this.isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
let list = [...decodeMsgs]
|
||||
|
||||
|
||||
@ -1902,14 +1892,14 @@ class ChatPage extends LitElement {
|
||||
})
|
||||
|
||||
|
||||
queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodeMsgs,
|
||||
parentEpml,
|
||||
isReceipient: this.isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
await queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodeMsgs,
|
||||
parentEpml,
|
||||
isReceipient: this.isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
|
||||
let list = [ ...decodeMsgs]
|
||||
|
||||
@ -1961,14 +1951,14 @@ class ChatPage extends LitElement {
|
||||
})
|
||||
|
||||
|
||||
queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodeMsgs,
|
||||
parentEpml,
|
||||
isReceipient: this.isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
await queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodeMsgs,
|
||||
parentEpml,
|
||||
isReceipient: this.isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
|
||||
|
||||
|
||||
@ -2074,14 +2064,14 @@ class ChatPage extends LitElement {
|
||||
|
||||
|
||||
try {
|
||||
queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodedMessages,
|
||||
parentEpml,
|
||||
isReceipient: isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
await queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodedMessages,
|
||||
parentEpml,
|
||||
isReceipient: isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
} catch (error) {
|
||||
console.log({error})
|
||||
}
|
||||
@ -2135,15 +2125,15 @@ class ChatPage extends LitElement {
|
||||
setTimeout(() => this.downElementObserver(), 500)
|
||||
} else {
|
||||
|
||||
queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodedMessages,
|
||||
parentEpml,
|
||||
isReceipient: isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
isNotInitial: true,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
await queue.push(() => replaceMessagesEdited({
|
||||
decodedMessages: decodedMessages,
|
||||
parentEpml,
|
||||
isReceipient: isReceipient,
|
||||
decodeMessageFunc: this.decodeMessage,
|
||||
_publicKey: this._publicKey,
|
||||
isNotInitial: true,
|
||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||
}));
|
||||
|
||||
const renderEachMessage = decodedMessages.map(async (msg) => {
|
||||
await this.renderNewMessage(msg)
|
||||
@ -2366,14 +2356,14 @@ class ChatPage extends LitElement {
|
||||
|
||||
|
||||
|
||||
this.processMessages(getInitialMessages, true, isUnread, count)
|
||||
await this.processMessages(getInitialMessages, true, isUnread, count)
|
||||
|
||||
initial = initial + 1
|
||||
|
||||
} else {
|
||||
try {
|
||||
if (e.data) {
|
||||
this.processMessages(JSON.parse(e.data), false)
|
||||
await this.processMessages(JSON.parse(e.data), false)
|
||||
}
|
||||
} catch (error) { /* empty */ }
|
||||
}
|
||||
@ -2494,13 +2484,13 @@ class ChatPage extends LitElement {
|
||||
|
||||
|
||||
|
||||
this.processMessages(getInitialMessages, true, isUnread, count)
|
||||
await this.processMessages(getInitialMessages, true, isUnread, count)
|
||||
|
||||
initial = initial + 1
|
||||
} else {
|
||||
try {
|
||||
if (e.data) {
|
||||
this.processMessages(JSON.parse(e.data), false)
|
||||
await this.processMessages(JSON.parse(e.data), false)
|
||||
}
|
||||
} catch (error) { /* empty */ }
|
||||
}
|
||||
@ -2530,7 +2520,7 @@ class ChatPage extends LitElement {
|
||||
|
||||
if (chatId !== undefined) {
|
||||
if (this.isReceipient) {
|
||||
initDirect(chatId)
|
||||
await initDirect(chatId)
|
||||
} else {
|
||||
let groupChatId = Number(chatId)
|
||||
initGroup(groupChatId)
|
||||
@ -2648,8 +2638,7 @@ class ChatPage extends LitElement {
|
||||
byteArrays.push(byteArray)
|
||||
}
|
||||
|
||||
const blob = new Blob(byteArrays, { type: contentType })
|
||||
return blob
|
||||
return new Blob(byteArrays, {type: contentType})
|
||||
}
|
||||
const blob = b64toBlob(str, 'image/png')
|
||||
await new Promise(resolve => {
|
||||
@ -2657,11 +2646,9 @@ class ChatPage extends LitElement {
|
||||
quality: 0.6,
|
||||
maxWidth: 500,
|
||||
success(result) {
|
||||
const file = new File([result], "name", {
|
||||
type: 'image/png'
|
||||
})
|
||||
|
||||
compressedFile = file
|
||||
compressedFile = new File([result], "name", {
|
||||
type: 'image/png'
|
||||
})
|
||||
resolve()
|
||||
},
|
||||
error() {
|
||||
@ -2703,8 +2690,7 @@ class ChatPage extends LitElement {
|
||||
|
||||
let message = ""
|
||||
try {
|
||||
const parsedMessageObj = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
|
||||
message = parsedMessageObj
|
||||
message = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
|
||||
} catch (error) {
|
||||
message = outSideMsg.editedMessageObj.decodedMessage
|
||||
}
|
||||
@ -2744,8 +2730,7 @@ class ChatPage extends LitElement {
|
||||
byteArrays.push(byteArray)
|
||||
}
|
||||
|
||||
const blob = new Blob(byteArrays, { type: contentType })
|
||||
return blob
|
||||
return new Blob(byteArrays, {type: contentType})
|
||||
}
|
||||
|
||||
const blob = b64toBlob(str, 'image/png')
|
||||
@ -2754,11 +2739,9 @@ class ChatPage extends LitElement {
|
||||
quality: 0.6,
|
||||
maxWidth: 500,
|
||||
success(result) {
|
||||
const file = new File([result], "name", {
|
||||
type: 'image/png'
|
||||
})
|
||||
|
||||
compressedFile = file
|
||||
compressedFile = new File([result], "name", {
|
||||
type: 'image/png'
|
||||
})
|
||||
resolve()
|
||||
},
|
||||
error() {
|
||||
@ -2800,8 +2783,7 @@ class ChatPage extends LitElement {
|
||||
|
||||
let message = ""
|
||||
try {
|
||||
const parsedMessageObj = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
|
||||
message = parsedMessageObj
|
||||
message = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
|
||||
|
||||
} catch (error) {
|
||||
message = outSideMsg.editedMessageObj.decodedMessage
|
||||
@ -2864,10 +2846,9 @@ class ChatPage extends LitElement {
|
||||
maxWidth: 1200,
|
||||
mimeType: 'image/webp',
|
||||
success(result) {
|
||||
const file = new File([result], "name", {
|
||||
type: 'image/webp'
|
||||
})
|
||||
compressedFile = file
|
||||
compressedFile = new File([result], "name", {
|
||||
type: 'image/webp'
|
||||
})
|
||||
resolve()
|
||||
},
|
||||
error() {
|
||||
@ -3023,8 +3004,7 @@ class ChatPage extends LitElement {
|
||||
let message = ""
|
||||
|
||||
try {
|
||||
const parsedMessageObj = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
|
||||
message = parsedMessageObj
|
||||
message = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
|
||||
} catch (error) {
|
||||
message = outSideMsg.editedMessageObj.decodedMessage
|
||||
}
|
||||
@ -3092,8 +3072,7 @@ class ChatPage extends LitElement {
|
||||
|
||||
let message = ""
|
||||
try {
|
||||
const parsedMessageObj = JSON.parse(this.editedMessageObj.decodedMessage)
|
||||
message = parsedMessageObj
|
||||
message = JSON.parse(this.editedMessageObj.decodedMessage)
|
||||
|
||||
} catch (error) {
|
||||
message = this.editedMessageObj.decodedMessage
|
||||
@ -3125,7 +3104,7 @@ class ChatPage extends LitElement {
|
||||
} catch (error) {
|
||||
this.isLoading = false
|
||||
this.isUploadingImage = false
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -3288,7 +3267,7 @@ class ChatPage extends LitElement {
|
||||
} catch (error) { /* empty */ }
|
||||
}
|
||||
|
||||
const isRecipient = this.forwardActiveChatHeadUrl.url.includes('direct') === true ? true : false
|
||||
const isRecipient = this.forwardActiveChatHeadUrl.url.includes('direct') === true
|
||||
|
||||
const recipientAddress = this.forwardActiveChatHeadUrl.url.split('/')[1]
|
||||
this.openForwardOpen = false
|
||||
@ -3315,7 +3294,7 @@ class ChatPage extends LitElement {
|
||||
isText: 1
|
||||
}
|
||||
})
|
||||
_computePow(chatResponse, true)
|
||||
await _computePow(chatResponse, true)
|
||||
} else {
|
||||
let groupResponse = await parentEpml.request('chat', {
|
||||
type: 181,
|
||||
@ -3333,7 +3312,7 @@ class ChatPage extends LitElement {
|
||||
isText: 1
|
||||
}
|
||||
})
|
||||
_computePow(groupResponse, true)
|
||||
await _computePow(groupResponse, true)
|
||||
}
|
||||
}
|
||||
|
||||
@ -3413,7 +3392,7 @@ class ChatPage extends LitElement {
|
||||
}
|
||||
|
||||
if (isForward) {
|
||||
sendForwardRequest()
|
||||
await sendForwardRequest()
|
||||
return
|
||||
}
|
||||
return sendMessageRequest()
|
||||
|
@ -194,8 +194,7 @@ class ChatRightPanel extends LitElement {
|
||||
async updated(changedProperties) {
|
||||
if (changedProperties && changedProperties.has('selectedHead')) {
|
||||
if (this.selectedHead !== {}) {
|
||||
const userName = await getUserNameFromAddress(this.selectedHead.address);
|
||||
this.userName = userName;
|
||||
this.userName = await getUserNameFromAddress(this.selectedHead.address);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -217,7 +216,7 @@ class ChatRightPanel extends LitElement {
|
||||
|
||||
observerHandler(entries) {
|
||||
if (!entries[0].isIntersecting) {
|
||||
return
|
||||
|
||||
} else {
|
||||
if(this.groupMembers.length < 20){
|
||||
return
|
||||
|
@ -11,7 +11,7 @@ import './TipUser';
|
||||
import './UserInfo/UserInfo';
|
||||
import './ChatImage';
|
||||
import './ReusableImage';
|
||||
import {get, translate,} from '../../../../core/translate/index.js'
|
||||
import {get, translate,} from '../../../../core/translate'
|
||||
import {generateIdFromAddresses} from '../../utils/id-generation';
|
||||
|
||||
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
|
||||
@ -279,11 +279,11 @@ class ChatRightPanelResources extends LitElement {
|
||||
async updated(changedProperties) {
|
||||
if (changedProperties && changedProperties.has('_chatId')) {
|
||||
this.images = [];
|
||||
this.getMoreImages(true);
|
||||
await this.getMoreImages(true);
|
||||
}
|
||||
|
||||
if (changedProperties && changedProperties.has('onlyMyImages')) {
|
||||
this.getMoreImages(true)
|
||||
await this.getMoreImages(true)
|
||||
}
|
||||
}
|
||||
|
||||
@ -307,7 +307,7 @@ class ChatRightPanelResources extends LitElement {
|
||||
|
||||
observerHandler(entries) {
|
||||
if (!entries[0].isIntersecting) {
|
||||
return;
|
||||
|
||||
} else {
|
||||
if (this.images.length < 20) {
|
||||
return;
|
||||
@ -317,19 +317,11 @@ class ChatRightPanelResources extends LitElement {
|
||||
}
|
||||
|
||||
selectAuto(e) {
|
||||
if (e.target.checked) {
|
||||
this.autoView = false
|
||||
} else {
|
||||
this.autoView = true
|
||||
}
|
||||
this.autoView = !e.target.checked;
|
||||
}
|
||||
|
||||
selectMyImages(e) {
|
||||
if (e.target.checked) {
|
||||
this.onlyMyImages = false
|
||||
} else {
|
||||
this.onlyMyImages = true
|
||||
}
|
||||
this.onlyMyImages = !e.target.checked;
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {html, LitElement,} from 'lit';
|
||||
import {repeat} from 'lit/directives/repeat.js';
|
||||
import {get, translate,} from '../../../../core/translate/index.js'
|
||||
import {get, translate,} from '../../../../core/translate'
|
||||
import {unsafeHTML} from 'lit/directives/unsafe-html.js';
|
||||
import {chatStyles} from './ChatScroller-css.js';
|
||||
import {Epml} from '../../../epml';
|
||||
@ -40,8 +40,7 @@ const getApiKey = () => {
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
let apiKey = myNode.apiKey;
|
||||
return apiKey;
|
||||
return myNode.apiKey;
|
||||
};
|
||||
|
||||
const extractComponents = async (url) => {
|
||||
@ -559,11 +558,11 @@ class ChatScroller extends LitElement {
|
||||
|
||||
|
||||
// Using map to return a new array, rather than mutating the old one
|
||||
const newMessagesToRender = this.messagesToRender.map((group) => {
|
||||
this.messagesToRender = this.messagesToRender.map((group) => {
|
||||
// For each message, return the updated message if it exists, otherwise return the original message
|
||||
const updatedGroupMessages = group.messages.map((message) => {
|
||||
return updatedMessages[message.signature]
|
||||
? { ...message, ...updatedMessages[message.signature] }
|
||||
? {...message, ...updatedMessages[message.signature]}
|
||||
: message;
|
||||
});
|
||||
|
||||
@ -573,8 +572,6 @@ class ChatScroller extends LitElement {
|
||||
messages: updatedGroupMessages,
|
||||
};
|
||||
});
|
||||
|
||||
this.messagesToRender = newMessagesToRender;
|
||||
this.requestUpdate();
|
||||
await this.updateComplete;
|
||||
|
||||
@ -627,34 +624,34 @@ class ChatScroller extends LitElement {
|
||||
async updated(changedProperties) {
|
||||
if (changedProperties && changedProperties.has('messages')) {
|
||||
if (this.messages.type === 'initial') {
|
||||
this.addNewMessages(this.messages.messages, 'initial');
|
||||
await this.addNewMessages(this.messages.messages, 'initial');
|
||||
} else if (this.messages.type === 'initialLastSeen') {
|
||||
this.newListMessagesUnreadMessages(
|
||||
await this.newListMessagesUnreadMessages(
|
||||
this.messages.messages,
|
||||
'initialLastSeen',
|
||||
this.messages.lastReadMessageTimestamp,
|
||||
this.messages.count
|
||||
);
|
||||
} else if (this.messages.type === 'new')
|
||||
this.addNewMessages(this.messages.messages);
|
||||
await this.addNewMessages(this.messages.messages);
|
||||
else if (this.messages.type === 'newComingInAuto')
|
||||
this.addNewMessages(this.messages.messages, 'newComingInAuto');
|
||||
await this.addNewMessages(this.messages.messages, 'newComingInAuto');
|
||||
else if (this.messages.type === 'old')
|
||||
this.prependOldMessages(this.messages.messages);
|
||||
await this.prependOldMessages(this.messages.messages);
|
||||
else if (this.messages.type === 'inBetween')
|
||||
this.newListMessages(
|
||||
await this.newListMessages(
|
||||
this.messages.messages,
|
||||
this.messages.count
|
||||
);
|
||||
else if (this.messages.type === 'update')
|
||||
this.replaceMessagesWithUpdateByArray(this.messages.messages);
|
||||
await this.replaceMessagesWithUpdateByArray(this.messages.messages);
|
||||
}
|
||||
if (
|
||||
changedProperties &&
|
||||
changedProperties.has('updateMessageHash') &&
|
||||
Object.keys(this.updateMessageHash).length > 0
|
||||
) {
|
||||
this.replaceMessagesWithUpdate(this.updateMessageHash);
|
||||
await this.replaceMessagesWithUpdate(this.updateMessageHash);
|
||||
}
|
||||
if (
|
||||
changedProperties &&
|
||||
@ -676,13 +673,9 @@ class ChatScroller extends LitElement {
|
||||
|
||||
isLastMessageBeforeUnread(message, formattedMessages) {
|
||||
// if the message is the last one in the older messages list and its timestamp is before the user's last seen timestamp
|
||||
if (
|
||||
message.timestamp < this.lastReadMessageTimestamp &&
|
||||
formattedMessages.indexOf(message) === formattedMessages.length - 21
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return message.timestamp < this.lastReadMessageTimestamp &&
|
||||
formattedMessages.indexOf(message) === formattedMessages.length - 21;
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
@ -1097,11 +1090,7 @@ class MessageTemplate extends LitElement {
|
||||
}
|
||||
|
||||
showBlockIconFunc(bool) {
|
||||
if (bool) {
|
||||
this.showBlockAddressIcon = true;
|
||||
} else {
|
||||
this.showBlockAddressIcon = false;
|
||||
}
|
||||
this.showBlockAddressIcon = !!bool;
|
||||
}
|
||||
|
||||
async downloadAttachment(attachment) {
|
||||
@ -1206,10 +1195,8 @@ class MessageTemplate extends LitElement {
|
||||
if (changedProperties.has('openDialogGif')) {
|
||||
return true;
|
||||
}
|
||||
if (changedProperties.has('isGifLoaded')) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return !!changedProperties.has('isGifLoaded');
|
||||
|
||||
}
|
||||
|
||||
clearConsole() {
|
||||
@ -1411,8 +1398,7 @@ class MessageTemplate extends LitElement {
|
||||
|
||||
if (repliedToData) {
|
||||
try {
|
||||
const parsedMsg = JSON.parse(repliedToData.decodedMessage);
|
||||
repliedToData.decodedMessage = parsedMsg;
|
||||
repliedToData.decodedMessage = JSON.parse(repliedToData.decodedMessage);
|
||||
} catch (error) { /* empty */ }
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {html, LitElement} from 'lit';
|
||||
import {chatSearchResultsStyles} from './ChatSearchResults-css.js'
|
||||
import {translate} from '../../../../core/translate/index.js'
|
||||
import {translate} from '../../../../core/translate'
|
||||
|
||||
export class ChatSearchResults extends LitElement {
|
||||
static get properties() {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {html, LitElement} from 'lit'
|
||||
import {chatSearchResultsStyles} from './ChatSearchResults-css.js'
|
||||
import {translate} from '../../../../core/translate/index.js'
|
||||
import {translate} from '../../../../core/translate'
|
||||
import '@vaadin/icon'
|
||||
import '@vaadin/icons'
|
||||
|
||||
|
@ -210,11 +210,9 @@ class ChatSelect extends LitElement {
|
||||
if(changedProperties.has('activeChatHeadUrl')){
|
||||
return true
|
||||
}
|
||||
if(changedProperties.has('chatInfo')){
|
||||
return true
|
||||
}
|
||||
return !!changedProperties.has('chatInfo');
|
||||
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
getUrl(chatUrl) {
|
||||
|
@ -185,11 +185,9 @@ class ChatSideNavHeads extends LitElement {
|
||||
if(changedProperties.has('chatInfo')){
|
||||
return true
|
||||
}
|
||||
if(changedProperties.has('isImageLoaded')){
|
||||
return true
|
||||
}
|
||||
return !!changedProperties.has('isImageLoaded');
|
||||
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
getUrl(chatUrl) {
|
||||
|
@ -3,7 +3,7 @@ import {escape, unescape} from 'html-escaper'
|
||||
import {EmojiPicker} from 'emoji-picker-js'
|
||||
import {inputKeyCodes} from '../../utils/keyCodes.js'
|
||||
import {Epml} from '../../../epml.js'
|
||||
import {get} from '../../../../core/translate/index.js'
|
||||
import {get} from '../../../../core/translate'
|
||||
|
||||
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
|
||||
|
||||
@ -268,7 +268,7 @@ class ChatTextEditor extends LitElement {
|
||||
if (!this.userName) {
|
||||
e.preventDefault();
|
||||
parentEpml.request('showSnackBar', get("chatpage.cchange27"));
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
initialChat(e) {
|
||||
@ -360,15 +360,15 @@ class ChatTextEditor extends LitElement {
|
||||
|
||||
shouldUpdate(changedProperties) {
|
||||
// Only update element if prop1 changed.
|
||||
if(changedProperties.has('setChatEditor') && changedProperties.size === 1) return false
|
||||
return true
|
||||
return !(changedProperties.has('setChatEditor') && changedProperties.size === 1);
|
||||
|
||||
}
|
||||
|
||||
sendMessageFunc(props) {
|
||||
if (this.chatMessageSize > 1000 ) {
|
||||
parentEpml.request('showSnackBar', get("chatpage.cchange29"))
|
||||
return
|
||||
};
|
||||
}
|
||||
this.chatMessageSize = 0
|
||||
this.chatEditor.updateMirror()
|
||||
this._sendMessage(props)
|
||||
@ -376,9 +376,8 @@ class ChatTextEditor extends LitElement {
|
||||
|
||||
getMessageSize(message){
|
||||
try {
|
||||
const messageText = message;
|
||||
// Format and Sanitize Message
|
||||
const sanitizedMessage = messageText.replace(/ /gi, ' ').replace(/<br\s*[\/]?>/gi, '\n');
|
||||
// Format and Sanitize Message
|
||||
const sanitizedMessage = message.replace(/ /gi, ' ').replace(/<br\s*[\/]?>/gi, '\n');
|
||||
const trimmedMessage = sanitizedMessage.trim();
|
||||
let messageObject = {};
|
||||
|
||||
@ -396,8 +395,7 @@ class ChatTextEditor extends LitElement {
|
||||
} else if (this.editedMessageObj) {
|
||||
let message = "";
|
||||
try {
|
||||
const parsedMessageObj = JSON.parse(this.editedMessageObj.decodedMessage);
|
||||
message = parsedMessageObj;
|
||||
message = JSON.parse(this.editedMessageObj.decodedMessage);
|
||||
} catch (error) {
|
||||
message = this.messageObj.decodedMessage
|
||||
}
|
||||
@ -426,8 +424,7 @@ class ChatTextEditor extends LitElement {
|
||||
}
|
||||
|
||||
const stringified = JSON.stringify(messageObject);
|
||||
const size = new Blob([stringified]).size;
|
||||
this.chatMessageSize = size;
|
||||
this.chatMessageSize = new Blob([stringified]).size;
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
@ -626,8 +623,7 @@ class ChatTextEditor extends LitElement {
|
||||
const chatInputValue = editor.getValue();
|
||||
const filteredValue = chatInputValue.replace(/<img.*?alt=".*?/g, '').replace(/".?src=.*?>/g, '');
|
||||
|
||||
let unescapedValue = editorConfig.unescape(filteredValue);
|
||||
editor.mirror.value = unescapedValue;
|
||||
editor.mirror.value = editorConfig.unescape(filteredValue);
|
||||
};
|
||||
|
||||
ChatEditor.prototype.listenChanges = function () {
|
||||
|
@ -3,7 +3,7 @@ import {EmojiPicker} from 'emoji-picker-js'
|
||||
import {Epml} from '../../../epml.js'
|
||||
import '@material/mwc-icon'
|
||||
import '@material/mwc-checkbox'
|
||||
import {get, translate} from '../../../../core/translate/index.js'
|
||||
import {get, translate} from '../../../../core/translate'
|
||||
|
||||
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
|
||||
|
||||
@ -358,10 +358,9 @@ class ChatTextEditor extends LitElement {
|
||||
.hide-styling {
|
||||
display: none;
|
||||
}
|
||||
mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::before {
|
||||
background-color:var(--mdc-theme-primary)
|
||||
mwc-checkbox::shadow, mdc-checkbox::after, mwc-checkbox::shadow, mdc-checkbox::before {
|
||||
background-color: var(--mdc-theme-primary)
|
||||
}
|
||||
--mdc-checkbox-unchecked-color
|
||||
`
|
||||
}
|
||||
|
||||
@ -665,8 +664,8 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
|
||||
|
||||
shouldUpdate(changedProperties) {
|
||||
// Only update element if prop1 changed.
|
||||
if(changedProperties.has('setChatEditor') && changedProperties.size === 1) return false
|
||||
return true
|
||||
return !(changedProperties.has('setChatEditor') && changedProperties.size === 1);
|
||||
|
||||
}
|
||||
|
||||
sendMessageFunc(props) {
|
||||
@ -700,8 +699,7 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
|
||||
} else if (this.editedMessageObj) {
|
||||
let message = "";
|
||||
try {
|
||||
const parsedMessageObj = JSON.parse(this.editedMessageObj.decodedMessage);
|
||||
message = parsedMessageObj;
|
||||
message = JSON.parse(this.editedMessageObj.decodedMessage);
|
||||
} catch (error) {
|
||||
message = this.messageObj.decodedMessage
|
||||
}
|
||||
@ -743,8 +741,7 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
|
||||
}
|
||||
|
||||
const stringified = JSON.stringify(messageObject);
|
||||
const size = new Blob([stringified]).size;
|
||||
this.chatMessageSize = size;
|
||||
this.chatMessageSize = new Blob([stringified]).size;
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {Epml} from '../../../epml.js'
|
||||
import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
|
||||
import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
|
||||
import isElectron from 'is-electron'
|
||||
|
||||
import '@material/mwc-icon'
|
||||
@ -145,7 +145,7 @@ class ChatWelcomePage extends LitElement {
|
||||
}
|
||||
|
||||
h2, h3, h4, h5 {
|
||||
color:# var(--black);
|
||||
color: var(--black);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
@ -369,7 +369,7 @@ class ChatWelcomePage extends LitElement {
|
||||
myRes = false;
|
||||
} else {
|
||||
myRes = myNameRes;
|
||||
};
|
||||
}
|
||||
return myRes;
|
||||
};
|
||||
|
||||
@ -379,7 +379,7 @@ class ChatWelcomePage extends LitElement {
|
||||
recipient = _recipient;
|
||||
} else {
|
||||
recipient = myNameRes.owner;
|
||||
};
|
||||
}
|
||||
|
||||
let _reference = new Uint8Array(64);
|
||||
window.crypto.getRandomValues(_reference);
|
||||
@ -406,12 +406,12 @@ class ChatWelcomePage extends LitElement {
|
||||
} else if (addressPublicKey !== false) {
|
||||
isEncrypted = 1;
|
||||
_publicKey = addressPublicKey;
|
||||
sendMessageRequest(isEncrypted, _publicKey);
|
||||
await sendMessageRequest(isEncrypted, _publicKey);
|
||||
} else {
|
||||
isEncrypted = 0;
|
||||
_publicKey = this.selectedAddress.address;
|
||||
sendMessageRequest(isEncrypted, _publicKey);
|
||||
};
|
||||
await sendMessageRequest(isEncrypted, _publicKey);
|
||||
}
|
||||
};
|
||||
|
||||
const sendMessageRequest = async (isEncrypted, _publicKey) => {
|
||||
@ -437,7 +437,7 @@ class ChatWelcomePage extends LitElement {
|
||||
isText: 1
|
||||
}
|
||||
})
|
||||
_computePow(chatResponse)
|
||||
await _computePow(chatResponse)
|
||||
}
|
||||
|
||||
const _computePow = async (chatBytes) => {
|
||||
@ -482,7 +482,7 @@ class ChatWelcomePage extends LitElement {
|
||||
}
|
||||
|
||||
}
|
||||
getAddressPublicKey()
|
||||
await getAddressPublicKey()
|
||||
}
|
||||
|
||||
_textArea(e) {
|
||||
@ -495,9 +495,8 @@ class ChatWelcomePage extends LitElement {
|
||||
}
|
||||
|
||||
getApiKey() {
|
||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node];
|
||||
let apiKey = myNode.apiKey;
|
||||
return apiKey;
|
||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
return myNode.apiKey
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {css, html, LitElement} from 'lit';
|
||||
import {translate,} from '../../../../core/translate/index.js'
|
||||
import {translate,} from '../../../../core/translate'
|
||||
|
||||
export class ImageComponent extends LitElement {
|
||||
static get properties() {
|
||||
@ -55,9 +55,8 @@ export class ImageComponent extends LitElement {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
let apiKey = myNode.apiKey;
|
||||
return apiKey;
|
||||
]
|
||||
return myNode.apiKey
|
||||
}
|
||||
|
||||
async _fetchImage() {
|
||||
@ -78,15 +77,11 @@ export class ImageComponent extends LitElement {
|
||||
url: data.src,
|
||||
};
|
||||
this.requestUpdate();
|
||||
} else if (!data.ok || data.error) {
|
||||
this.error = true;
|
||||
} else {
|
||||
this.error = false;
|
||||
}
|
||||
} else this.error = !data.ok || data.error;
|
||||
} catch (error) {
|
||||
this.error = true;
|
||||
console.error(error);
|
||||
this._fetchImage();
|
||||
await this._fetchImage();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {Epml} from '../../../epml.js'
|
||||
import {translate} from '../../../../core/translate/index.js'
|
||||
import {translate} from '../../../../core/translate'
|
||||
import '@polymer/paper-tooltip/paper-tooltip.js'
|
||||
import {RequestQueue} from '../../utils/queue.js'
|
||||
|
||||
@ -107,10 +107,9 @@ class LevelFounder extends LitElement {
|
||||
async checkAddressInfo() {
|
||||
try {
|
||||
let toCheck = this.checkleveladdress
|
||||
const memberInfo = await parentEpml.request('apiCall', {
|
||||
url: `/addresses/${toCheck}`
|
||||
})
|
||||
this.memberInfo = memberInfo
|
||||
this.memberInfo = await parentEpml.request('apiCall', {
|
||||
url: `/addresses/${toCheck}`
|
||||
})
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
@ -146,8 +145,7 @@ class LevelFounder extends LitElement {
|
||||
|
||||
getApiKey() {
|
||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
let apiKey = myNode.apiKey
|
||||
return apiKey
|
||||
return myNode.apiKey
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {Epml} from '../../../epml.js'
|
||||
import snackbar from './snackbar.js'
|
||||
import {get, translate} from '../../../../core/translate/index.js'
|
||||
import {get, translate} from '../../../../core/translate'
|
||||
import '@material/mwc-snackbar'
|
||||
import '@material/mwc-button'
|
||||
import '@material/mwc-dialog'
|
||||
@ -90,7 +90,7 @@ class NameMenu extends LitElement {
|
||||
}
|
||||
|
||||
h2, h3, h4, h5 {
|
||||
color:# var(--black);
|
||||
color: var(--black);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
@ -333,10 +333,9 @@ class NameMenu extends LitElement {
|
||||
}
|
||||
|
||||
async getChatBlockedAdresses() {
|
||||
const chatBlockedAdresses = await parentEpml.request('apiCall', {
|
||||
url: `/lists/blockedAddresses?apiKey=${this.getApiKey()}`
|
||||
})
|
||||
this.chatBlockedAdresses = chatBlockedAdresses
|
||||
this.chatBlockedAdresses = await parentEpml.request('apiCall', {
|
||||
url: `/lists/blockedAddresses?apiKey=${this.getApiKey()}`
|
||||
})
|
||||
}
|
||||
|
||||
async chatBlockAddress() {
|
||||
@ -490,11 +489,11 @@ class NameMenu extends LitElement {
|
||||
} else if (addressPublicKey !== false) {
|
||||
isEncrypted = 1
|
||||
_publicKey = addressPublicKey
|
||||
sendMessageRequest(isEncrypted, _publicKey)
|
||||
await sendMessageRequest(isEncrypted, _publicKey)
|
||||
} else {
|
||||
isEncrypted = 0
|
||||
_publicKey = this.selectedAddress.address
|
||||
sendMessageRequest(isEncrypted, _publicKey)
|
||||
await sendMessageRequest(isEncrypted, _publicKey)
|
||||
}
|
||||
};
|
||||
|
||||
@ -521,7 +520,7 @@ class NameMenu extends LitElement {
|
||||
isText: 1
|
||||
}
|
||||
})
|
||||
_computePow(chatResponse)
|
||||
await _computePow(chatResponse)
|
||||
}
|
||||
|
||||
const _computePow = async (chatBytes) => {
|
||||
@ -568,7 +567,7 @@ class NameMenu extends LitElement {
|
||||
}
|
||||
|
||||
}
|
||||
getAddressPublicKey()
|
||||
await getAddressPublicKey()
|
||||
}
|
||||
|
||||
_textMenu(event) {
|
||||
@ -603,9 +602,8 @@ class NameMenu extends LitElement {
|
||||
}
|
||||
|
||||
getApiKey() {
|
||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node];
|
||||
let apiKey = myNode.apiKey;
|
||||
return apiKey;
|
||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
return myNode.apiKey
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,7 @@ var encode = function(ver, mode, data, maxbuflen) {
|
||||
pack(data[i], 8);
|
||||
}
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
pack(MODE_TERMINATOR, 4);
|
||||
if (remaining < 8) buf.push(bits);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {css, html, LitElement} from 'lit'
|
||||
import {translate,} from '../../../../core/translate/index.js'
|
||||
import {translate,} from '../../../../core/translate'
|
||||
import axios from 'axios'
|
||||
import {RequestQueueWithPromise} from '../../utils/queue'
|
||||
import '@material/mwc-menu'
|
||||
@ -121,26 +121,20 @@ export class ResuableImage extends LitElement {
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
]
|
||||
|
||||
const nodeUrl =
|
||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
return nodeUrl
|
||||
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||
}
|
||||
getMyNode() {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
]
|
||||
|
||||
return myNode
|
||||
}
|
||||
|
||||
getApiKey() {
|
||||
const myNode =
|
||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||
];
|
||||
let apiKey = myNode.apiKey
|
||||
return apiKey
|
||||
]
|
||||
return myNode.apiKey
|
||||
}
|
||||
|
||||
async fetchResource() {
|
||||
@ -160,7 +154,7 @@ export class ResuableImage extends LitElement {
|
||||
}
|
||||
|
||||
async fetchVideoUrl() {
|
||||
this.fetchResource();
|
||||
await this.fetchResource();
|
||||
this.url = `${this.nodeUrl}/arbitrary/${this.resource.service}/${this.resource.name}/${this.resource.identifier}?async=true&apiKey=${this.myNode.apiKey}`
|
||||
}
|
||||
|
||||
@ -217,7 +211,7 @@ export class ResuableImage extends LitElement {
|
||||
|
||||
this.status = res
|
||||
if (this.status.status === 'DOWNLOADED') {
|
||||
this.fetchResource()
|
||||
await this.fetchResource()
|
||||
}
|
||||
}
|
||||
|
||||
@ -239,12 +233,12 @@ export class ResuableImage extends LitElement {
|
||||
|
||||
async _fetchImage() {
|
||||
try {
|
||||
this.fetchVideoUrl({
|
||||
await this.fetchVideoUrl({
|
||||
name: this.resource.name,
|
||||
service: this.resource.service,
|
||||
identifier: this.resource.identifier,
|
||||
});
|
||||
this.fetchStatus()
|
||||
await this.fetchStatus()
|
||||
} catch (error) { /* empty */ }
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user