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, {
|
let testRes = await api.request(testUrl, {
|
||||||
method: "GET"
|
method: "GET"
|
||||||
});
|
});
|
||||||
if (testRes === true) {
|
return testRes === true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ class AppInfo extends connect(store)(LitElement) {
|
|||||||
super()
|
super()
|
||||||
this.nodeInfo = []
|
this.nodeInfo = []
|
||||||
this.coreInfo = []
|
this.coreInfo = []
|
||||||
this.nodeStatus = {}
|
this.nodeConfig = {}
|
||||||
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
|
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { css, html, LitElement } from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import { connect } from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import { store } from '../store.js'
|
import {store} from '../store.js'
|
||||||
import { Epml } from '../epml.js'
|
import {Epml} from '../epml.js'
|
||||||
import { addTradeBotRoutes } from '../tradebot/addTradeBotRoutes.js'
|
import {addTradeBotRoutes} from '../tradebot/addTradeBotRoutes.js'
|
||||||
import { get, translate } from '../../translate/index.js'
|
import {get, translate} from '../../translate'
|
||||||
import localForage from 'localforage'
|
import localForage from 'localforage'
|
||||||
import { decryptData, encryptData } from '../lockScreen.js'
|
import {decryptData, encryptData} from '../lockScreen.js'
|
||||||
import { setChatLastSeen } from '../redux/app/app-actions.js'
|
import {setChatLastSeen} from '../redux/app/app-actions.js'
|
||||||
import isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
@ -560,7 +560,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
if(el3) {
|
if(el3) {
|
||||||
els['checklist'] = el3
|
els['checklist'] = el3
|
||||||
}
|
}
|
||||||
|
|
||||||
return els
|
return els
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -746,7 +746,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
drawerTog.click()
|
drawerTog.click()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.getNodeType()
|
await this.getNodeType()
|
||||||
|
|
||||||
const myAppNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const myAppNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
const nodeAppUrl = myAppNode.protocol + '://' + myAppNode.domain + ':' + myAppNode.port
|
const nodeAppUrl = myAppNode.protocol + '://' + myAppNode.domain + ':' + myAppNode.port
|
||||||
@ -915,7 +915,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await filterOpenOfferBTC()
|
await filterOpenOfferBTC()
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
filterMyBotPriceTradesBTC()
|
await filterMyBotPriceTradesBTC()
|
||||||
setTimeout(getOpenTradesBTC, 150000)
|
setTimeout(getOpenTradesBTC, 150000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -923,11 +923,9 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
const filterMyBotPriceTradesBTC = async () => {
|
const filterMyBotPriceTradesBTC = async () => {
|
||||||
const tradeBotBtcUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=BITCOIN&apiKey=${this.getApiKey()}`
|
const tradeBotBtcUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=BITCOIN&apiKey=${this.getApiKey()}`
|
||||||
|
|
||||||
const tradeBotBtcAt = await fetch(tradeBotBtcUrl).then(response => {
|
this.tradeBotBtcAt = await fetch(tradeBotBtcUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.tradeBotBtcAt = tradeBotBtcAt
|
|
||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
@ -965,7 +963,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotAvailableBtcQortal) === true) {
|
if (this.isEmptyArray(this.tradeBotAvailableBtcQortal) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const botbtcprice = this.round(parseFloat(this.tradeBotBtcBook[0].botBtcPrice))
|
const botbtcprice = this.round(parseFloat(this.tradeBotBtcBook[0].botBtcPrice))
|
||||||
const changebtcamount = parseFloat(this.tradeBotBtcBook[0].botBtcQortAmount)
|
const changebtcamount = parseFloat(this.tradeBotBtcBook[0].botBtcQortAmount)
|
||||||
@ -996,7 +994,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
this.buyBtcAction()
|
await this.buyBtcAction()
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotBtcBook) === true) {
|
if (this.isEmptyArray(this.tradeBotBtcBook) === true) {
|
||||||
return
|
return
|
||||||
@ -1009,7 +1007,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotBtcBook) === true) {
|
if (this.isEmptyArray(this.tradeBotBtcBook) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const checkBotBtcFunds = this.round(parseFloat(this.tradeBotBtcBook[0].botBtcQortAmount) * parseFloat(this.tradeBotBtcBook[0].botBtcPrice))
|
const checkBotBtcFunds = this.round(parseFloat(this.tradeBotBtcBook[0].botBtcQortAmount) * parseFloat(this.tradeBotBtcBook[0].botBtcPrice))
|
||||||
const myBotBtcFunds = this.round(parseFloat(this.btcWalletBalance))
|
const myBotBtcFunds = this.round(parseFloat(this.btcWalletBalance))
|
||||||
@ -1112,7 +1110,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await filterOpenOfferLTC()
|
await filterOpenOfferLTC()
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
filterMyBotPriceTradesLTC()
|
await filterMyBotPriceTradesLTC()
|
||||||
setTimeout(getOpenTradesLTC, 150000)
|
setTimeout(getOpenTradesLTC, 150000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1120,11 +1118,9 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
const filterMyBotPriceTradesLTC = async () => {
|
const filterMyBotPriceTradesLTC = async () => {
|
||||||
const tradeBotLtcUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=LITECOIN&apiKey=${this.getApiKey()}`
|
const tradeBotLtcUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=LITECOIN&apiKey=${this.getApiKey()}`
|
||||||
|
|
||||||
const tradeBotLtcAt = await fetch(tradeBotLtcUrl).then(response => {
|
this.tradeBotLtcAt = await fetch(tradeBotLtcUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.tradeBotLtcAt = tradeBotLtcAt
|
|
||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
@ -1162,7 +1158,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotAvailableLtcQortal) === true) {
|
if (this.isEmptyArray(this.tradeBotAvailableLtcQortal) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const botltcprice = this.round(parseFloat(this.tradeBotLtcBook[0].botLtcPrice))
|
const botltcprice = this.round(parseFloat(this.tradeBotLtcBook[0].botLtcPrice))
|
||||||
const changeltcamount = parseFloat(this.tradeBotLtcBook[0].botLtcQortAmount)
|
const changeltcamount = parseFloat(this.tradeBotLtcBook[0].botLtcQortAmount)
|
||||||
@ -1193,7 +1189,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
this.buyLtcAction()
|
await this.buyLtcAction()
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotLtcBook) === true) {
|
if (this.isEmptyArray(this.tradeBotLtcBook) === true) {
|
||||||
return
|
return
|
||||||
@ -1206,7 +1202,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotLtcBook) === true) {
|
if (this.isEmptyArray(this.tradeBotLtcBook) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const checkBotLtcFunds = this.round(parseFloat(this.tradeBotLtcBook[0].botLtcQortAmount) * parseFloat(this.tradeBotLtcBook[0].botLtcPrice))
|
const checkBotLtcFunds = this.round(parseFloat(this.tradeBotLtcBook[0].botLtcQortAmount) * parseFloat(this.tradeBotLtcBook[0].botLtcPrice))
|
||||||
const myBotLtcFunds = this.round(parseFloat(this.ltcWalletBalance))
|
const myBotLtcFunds = this.round(parseFloat(this.ltcWalletBalance))
|
||||||
@ -1298,7 +1294,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await filterOpenOfferDOGE()
|
await filterOpenOfferDOGE()
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
filterMyBotPriceTradesDOGE()
|
await filterMyBotPriceTradesDOGE()
|
||||||
setTimeout(getOpenTradesDOGE, 150000)
|
setTimeout(getOpenTradesDOGE, 150000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1306,11 +1302,9 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
const filterMyBotPriceTradesDOGE = async () => {
|
const filterMyBotPriceTradesDOGE = async () => {
|
||||||
const tradeBotDogeUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=DOGECOIN&apiKey=${this.getApiKey()}`
|
const tradeBotDogeUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=DOGECOIN&apiKey=${this.getApiKey()}`
|
||||||
|
|
||||||
const tradeBotDogeAt = await fetch(tradeBotDogeUrl).then(response => {
|
this.tradeBotDogeAt = await fetch(tradeBotDogeUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.tradeBotDogeAt = tradeBotDogeAt
|
|
||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
@ -1348,7 +1342,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotAvailableDogeQortal) === true) {
|
if (this.isEmptyArray(this.tradeBotAvailableDogeQortal) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const botdogeprice = this.round(parseFloat(this.tradeBotDogeBook[0].botDogePrice))
|
const botdogeprice = this.round(parseFloat(this.tradeBotDogeBook[0].botDogePrice))
|
||||||
const changedogeamount = parseFloat(this.tradeBotDogeBook[0].botDogeQortAmount)
|
const changedogeamount = parseFloat(this.tradeBotDogeBook[0].botDogeQortAmount)
|
||||||
@ -1379,7 +1373,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
this.buyDogeAction()
|
await this.buyDogeAction()
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotDogeBook) === true) {
|
if (this.isEmptyArray(this.tradeBotDogeBook) === true) {
|
||||||
return
|
return
|
||||||
@ -1392,7 +1386,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotDogeBook) === true) {
|
if (this.isEmptyArray(this.tradeBotDogeBook) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const checkBotDogeFunds = this.round(parseFloat(this.tradeBotDogeBook[0].botDogeQortAmount) * parseFloat(this.tradeBotDogeBook[0].botDogePrice))
|
const checkBotDogeFunds = this.round(parseFloat(this.tradeBotDogeBook[0].botDogeQortAmount) * parseFloat(this.tradeBotDogeBook[0].botDogePrice))
|
||||||
const myBotDogeFunds = this.round(parseFloat(this.dogeWalletBalance))
|
const myBotDogeFunds = this.round(parseFloat(this.dogeWalletBalance))
|
||||||
@ -1484,7 +1478,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await filterOpenOfferDGB()
|
await filterOpenOfferDGB()
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
filterMyBotPriceTradesDGB()
|
await filterMyBotPriceTradesDGB()
|
||||||
setTimeout(getOpenTradesDGB, 150000)
|
setTimeout(getOpenTradesDGB, 150000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1492,11 +1486,9 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
const filterMyBotPriceTradesDGB = async () => {
|
const filterMyBotPriceTradesDGB = async () => {
|
||||||
const tradeBotDgbUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=DIGIBYTE&apiKey=${this.getApiKey()}`
|
const tradeBotDgbUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=DIGIBYTE&apiKey=${this.getApiKey()}`
|
||||||
|
|
||||||
const tradeBotDgbAt = await fetch(tradeBotDgbUrl).then(response => {
|
this.tradeBotDgbAt = await fetch(tradeBotDgbUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.tradeBotDgbAt = tradeBotDgbAt
|
|
||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
@ -1534,7 +1526,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotAvailableDgbQortal) === true) {
|
if (this.isEmptyArray(this.tradeBotAvailableDgbQortal) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const botdgbprice = this.round(parseFloat(this.tradeBotDgbBook[0].botDgbPrice))
|
const botdgbprice = this.round(parseFloat(this.tradeBotDgbBook[0].botDgbPrice))
|
||||||
const changedgbamount = parseFloat(this.tradeBotDgbBook[0].botDgbQortAmount)
|
const changedgbamount = parseFloat(this.tradeBotDgbBook[0].botDgbQortAmount)
|
||||||
@ -1565,7 +1557,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
this.buyDgbAction()
|
await this.buyDgbAction()
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotDgbBook) === true) {
|
if (this.isEmptyArray(this.tradeBotDgbBook) === true) {
|
||||||
return
|
return
|
||||||
@ -1578,7 +1570,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotDgbBook) === true) {
|
if (this.isEmptyArray(this.tradeBotDgbBook) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const checkBotDgbFunds = this.round(parseFloat(this.tradeBotDgbBook[0].botDgbQortAmount) * parseFloat(this.tradeBotDgbBook[0].botDgbPrice))
|
const checkBotDgbFunds = this.round(parseFloat(this.tradeBotDgbBook[0].botDgbQortAmount) * parseFloat(this.tradeBotDgbBook[0].botDgbPrice))
|
||||||
const myBotDgbFunds = this.round(parseFloat(this.dgbWalletBalance))
|
const myBotDgbFunds = this.round(parseFloat(this.dgbWalletBalance))
|
||||||
@ -1670,7 +1662,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await filterOpenOfferRVN()
|
await filterOpenOfferRVN()
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
filterMyBotPriceTradesRVN()
|
await filterMyBotPriceTradesRVN()
|
||||||
setTimeout(getOpenTradesRVN, 150000)
|
setTimeout(getOpenTradesRVN, 150000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1678,11 +1670,9 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
const filterMyBotPriceTradesRVN = async () => {
|
const filterMyBotPriceTradesRVN = async () => {
|
||||||
const tradeBotRvnUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=RAVENCOIN&apiKey=${this.getApiKey()}`
|
const tradeBotRvnUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=RAVENCOIN&apiKey=${this.getApiKey()}`
|
||||||
|
|
||||||
const tradeBotRvnAt = await fetch(tradeBotRvnUrl).then(response => {
|
this.tradeBotRvnAt = await fetch(tradeBotRvnUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.tradeBotRvnAt = tradeBotRvnAt
|
|
||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
@ -1720,7 +1710,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotAvailableRvnQortal) === true) {
|
if (this.isEmptyArray(this.tradeBotAvailableRvnQortal) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const botrvnprice = this.round(parseFloat(this.tradeBotRvnBook[0].botRvnPrice))
|
const botrvnprice = this.round(parseFloat(this.tradeBotRvnBook[0].botRvnPrice))
|
||||||
const changervnamount = parseFloat(this.tradeBotRvnBook[0].botRvnQortAmount)
|
const changervnamount = parseFloat(this.tradeBotRvnBook[0].botRvnQortAmount)
|
||||||
@ -1751,7 +1741,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
this.buyRvnAction()
|
await this.buyRvnAction()
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotRvnBook) === true) {
|
if (this.isEmptyArray(this.tradeBotRvnBook) === true) {
|
||||||
return
|
return
|
||||||
@ -1764,7 +1754,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotRvnBook) === true) {
|
if (this.isEmptyArray(this.tradeBotRvnBook) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const checkBotRvnFunds = this.round(parseFloat(this.tradeBotRvnBook[0].botRvnQortAmount) * parseFloat(this.tradeBotRvnBook[0].botRvnPrice))
|
const checkBotRvnFunds = this.round(parseFloat(this.tradeBotRvnBook[0].botRvnQortAmount) * parseFloat(this.tradeBotRvnBook[0].botRvnPrice))
|
||||||
const myBotRvnFunds = this.round(parseFloat(this.rvnWalletBalance))
|
const myBotRvnFunds = this.round(parseFloat(this.rvnWalletBalance))
|
||||||
@ -1856,7 +1846,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await filterOpenOfferARRR()
|
await filterOpenOfferARRR()
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
filterMyBotPriceTradesARRR()
|
await filterMyBotPriceTradesARRR()
|
||||||
setTimeout(getOpenTradesARRR, 150000)
|
setTimeout(getOpenTradesARRR, 150000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1864,11 +1854,9 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
const filterMyBotPriceTradesARRR = async () => {
|
const filterMyBotPriceTradesARRR = async () => {
|
||||||
const tradeBotArrrUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=PIRATECHAIN&apiKey=${this.getApiKey()}`
|
const tradeBotArrrUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=PIRATECHAIN&apiKey=${this.getApiKey()}`
|
||||||
|
|
||||||
const tradeBotArrrAt = await fetch(tradeBotArrrUrl).then(response => {
|
this.tradeBotArrrAt = await fetch(tradeBotArrrUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.tradeBotArrrAt = tradeBotArrrAt
|
|
||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
@ -1906,7 +1894,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotAvailableArrrQortal) === true) {
|
if (this.isEmptyArray(this.tradeBotAvailableArrrQortal) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const botarrrprice = this.round(parseFloat(this.tradeBotArrrBook[0].botArrrPrice))
|
const botarrrprice = this.round(parseFloat(this.tradeBotArrrBook[0].botArrrPrice))
|
||||||
const changearrramount = parseFloat(this.tradeBotArrrBook[0].botArrrQortAmount)
|
const changearrramount = parseFloat(this.tradeBotArrrBook[0].botArrrQortAmount)
|
||||||
@ -1937,7 +1925,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
this.buyArrrAction()
|
await this.buyArrrAction()
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotArrrBook) === true) {
|
if (this.isEmptyArray(this.tradeBotArrrBook) === true) {
|
||||||
return
|
return
|
||||||
@ -1950,7 +1938,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotArrrBook) === true) {
|
if (this.isEmptyArray(this.tradeBotArrrBook) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const checkBotArrrFunds = this.round(parseFloat(this.tradeBotArrrBook[0].botArrrQortAmount) * parseFloat(this.tradeBotArrrBook[0].botArrrPrice))
|
const checkBotArrrFunds = this.round(parseFloat(this.tradeBotArrrBook[0].botArrrQortAmount) * parseFloat(this.tradeBotArrrBook[0].botArrrPrice))
|
||||||
const myBotArrrFunds = this.round(parseFloat(this.arrrWalletBalance))
|
const myBotArrrFunds = this.round(parseFloat(this.arrrWalletBalance))
|
||||||
@ -2243,7 +2231,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
this.helperMessage = this.renderHelperErr()
|
this.helperMessage = this.renderHelperErr()
|
||||||
await errDelay(3000)
|
await errDelay(3000)
|
||||||
this.helperMessage = this.renderHelperPass()
|
this.helperMessage = this.renderHelperPass()
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2451,12 +2439,11 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async buyBtcAction() {
|
async buyBtcAction() {
|
||||||
const makeRequest = async () => {
|
const makeRequest = async () => {
|
||||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
return await parentEpml.request('tradeBotRespondRequest', {
|
||||||
atAddress: this.botBtcBuyAtAddress,
|
atAddress: this.botBtcBuyAtAddress,
|
||||||
foreignKey: store.getState().app.selectedAddress.btcWallet.derivedMasterPrivateKey,
|
foreignKey: store.getState().app.selectedAddress.btcWallet.derivedMasterPrivateKey,
|
||||||
receivingAddress: store.getState().app.selectedAddress.address,
|
receivingAddress: store.getState().app.selectedAddress.address,
|
||||||
})
|
})
|
||||||
return response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const manageResponse = (response) => {
|
const manageResponse = (response) => {
|
||||||
@ -2509,12 +2496,11 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async buyLtcAction() {
|
async buyLtcAction() {
|
||||||
const makeRequest = async () => {
|
const makeRequest = async () => {
|
||||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
return await parentEpml.request('tradeBotRespondRequest', {
|
||||||
atAddress: this.botLtcBuyAtAddress,
|
atAddress: this.botLtcBuyAtAddress,
|
||||||
foreignKey: store.getState().app.selectedAddress.ltcWallet.derivedMasterPrivateKey,
|
foreignKey: store.getState().app.selectedAddress.ltcWallet.derivedMasterPrivateKey,
|
||||||
receivingAddress: store.getState().app.selectedAddress.address,
|
receivingAddress: store.getState().app.selectedAddress.address,
|
||||||
})
|
})
|
||||||
return response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const manageResponse = (response) => {
|
const manageResponse = (response) => {
|
||||||
@ -2567,12 +2553,11 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async buyDogeAction() {
|
async buyDogeAction() {
|
||||||
const makeRequest = async () => {
|
const makeRequest = async () => {
|
||||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
return await parentEpml.request('tradeBotRespondRequest', {
|
||||||
atAddress: this.botDogeBuyAtAddress,
|
atAddress: this.botDogeBuyAtAddress,
|
||||||
foreignKey: store.getState().app.selectedAddress.dogeWallet.derivedMasterPrivateKey,
|
foreignKey: store.getState().app.selectedAddress.dogeWallet.derivedMasterPrivateKey,
|
||||||
receivingAddress: store.getState().app.selectedAddress.address,
|
receivingAddress: store.getState().app.selectedAddress.address,
|
||||||
})
|
})
|
||||||
return response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const manageResponse = (response) => {
|
const manageResponse = (response) => {
|
||||||
@ -2625,12 +2610,11 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async buyDgbAction() {
|
async buyDgbAction() {
|
||||||
const makeRequest = async () => {
|
const makeRequest = async () => {
|
||||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
return await parentEpml.request('tradeBotRespondRequest', {
|
||||||
atAddress: this.botDgbBuyAtAddress,
|
atAddress: this.botDgbBuyAtAddress,
|
||||||
foreignKey: store.getState().app.selectedAddress.dgbWallet.derivedMasterPrivateKey,
|
foreignKey: store.getState().app.selectedAddress.dgbWallet.derivedMasterPrivateKey,
|
||||||
receivingAddress: store.getState().app.selectedAddress.address,
|
receivingAddress: store.getState().app.selectedAddress.address,
|
||||||
})
|
})
|
||||||
return response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const manageResponse = (response) => {
|
const manageResponse = (response) => {
|
||||||
@ -2683,12 +2667,11 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async buyRvnAction() {
|
async buyRvnAction() {
|
||||||
const makeRequest = async () => {
|
const makeRequest = async () => {
|
||||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
return await parentEpml.request('tradeBotRespondRequest', {
|
||||||
atAddress: this.botRvnBuyAtAddress,
|
atAddress: this.botRvnBuyAtAddress,
|
||||||
foreignKey: store.getState().app.selectedAddress.rvnWallet.derivedMasterPrivateKey,
|
foreignKey: store.getState().app.selectedAddress.rvnWallet.derivedMasterPrivateKey,
|
||||||
receivingAddress: store.getState().app.selectedAddress.address,
|
receivingAddress: store.getState().app.selectedAddress.address,
|
||||||
})
|
})
|
||||||
return response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const manageResponse = (response) => {
|
const manageResponse = (response) => {
|
||||||
@ -2741,12 +2724,11 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async buyArrrAction() {
|
async buyArrrAction() {
|
||||||
const makeRequest = async () => {
|
const makeRequest = async () => {
|
||||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
return await parentEpml.request('tradeBotRespondRequest', {
|
||||||
atAddress: this.botArrrBuyAtAddress,
|
atAddress: this.botArrrBuyAtAddress,
|
||||||
foreignKey: store.getState().app.selectedAddress.arrrWallet.seed58,
|
foreignKey: store.getState().app.selectedAddress.arrrWallet.seed58,
|
||||||
receivingAddress: store.getState().app.selectedAddress.address,
|
receivingAddress: store.getState().app.selectedAddress.address,
|
||||||
})
|
})
|
||||||
return response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const manageResponse = (response) => {
|
const manageResponse = (response) => {
|
||||||
@ -3348,8 +3330,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey
|
return apiNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isEmptyArray(arr) {
|
isEmptyArray(arr) {
|
||||||
@ -3360,9 +3341,8 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
round(number) {
|
round(number) {
|
||||||
let result = (Math.round(parseFloat(number) * 1e8) / 1e8).toFixed(8)
|
return (Math.round(parseFloat(number) * 1e8) / 1e8).toFixed(8)
|
||||||
return result
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.customElements.define('app-view', AppView)
|
window.customElements.define('app-view', AppView)
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
import { LitElement, html, css } from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import { store } from '../../store'
|
import {store} from '../../store'
|
||||||
import { connect } from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import { translate } from '../../../translate'
|
import {translate} from '../../../translate'
|
||||||
import { parentEpml } from '../show-plugin'
|
import {parentEpml} from '../show-plugin'
|
||||||
|
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
|
|
||||||
class SyncIndicator extends connect(store)(LitElement) {
|
class SyncIndicator extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
isBehind: { type: Boolean },
|
|
||||||
blocksBehind: { type: Number },
|
blocksBehind: { type: Number },
|
||||||
|
nodeUrl: { type: String },
|
||||||
|
address: { type: String },
|
||||||
|
isBehind: { type: Boolean },
|
||||||
isSynchronizing: { type: Boolean },
|
isSynchronizing: { type: Boolean },
|
||||||
hasCoreRunning: { type: Boolean }
|
hasCoreRunning: { type: Boolean }
|
||||||
}
|
}
|
||||||
@ -18,12 +20,13 @@ class SyncIndicator extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
this.isBehind = null
|
|
||||||
this.blocksBehind = 0
|
this.blocksBehind = 0
|
||||||
this.nodeUrl = this.getNodeUrl()
|
this.nodeUrl = ''
|
||||||
this.myNode = this.getMyNode()
|
this.address = ''
|
||||||
this.interval = null
|
this.isBehind = false
|
||||||
|
this.isSynchronizing = false
|
||||||
this.hasCoreRunning = true
|
this.hasCoreRunning = true
|
||||||
|
this.interval = null
|
||||||
this.seenWelcomeSync = false
|
this.seenWelcomeSync = false
|
||||||
this.numberOfTries = 0
|
this.numberOfTries = 0
|
||||||
this.hasOpened = false
|
this.hasOpened = false
|
||||||
@ -68,6 +71,7 @@ class SyncIndicator extends connect(store)(LitElement) {
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bootstrap-button {
|
.bootstrap-button {
|
||||||
font-family: Roboto, sans-serif;
|
font-family: Roboto, sans-serif;
|
||||||
font-size: 16px;
|
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
|
this.address = store.getState().app.selectedAddress.address
|
||||||
|
|
||||||
const seenWelcomeSync = JSON.parse(
|
this.seenWelcomeSync = JSON.parse(
|
||||||
localStorage.getItem(`welcome-sync-${this.address}`) || 'false'
|
localStorage.getItem(`welcome-sync-${this.address}`) || 'false'
|
||||||
)
|
)
|
||||||
|
|
||||||
this.seenWelcomeSync = seenWelcomeSync
|
setInterval(() => {
|
||||||
|
this.getNodeUrl()
|
||||||
|
}, 60000)
|
||||||
}
|
}
|
||||||
|
|
||||||
getNodeUrl() {
|
getNodeUrl() {
|
||||||
const myNode =
|
const syncInfoNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
const syncInfoUrl = syncInfoNode.protocol + '://' + syncInfoNode.domain + ':' + syncInfoNode.port
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
this.nodeUrl = syncInfoUrl
|
||||||
]
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getDaySummary() {
|
async getDaySummary() {
|
||||||
try {
|
try {
|
||||||
this.fetchingSummary = true
|
this.fetchingSummary = true
|
||||||
|
|
||||||
|
|
||||||
const endpointLastBlock = `${this.nodeUrl}/blocks/last`
|
const endpointLastBlock = `${this.nodeUrl}/blocks/last`
|
||||||
const resLastBlock = await fetch(endpointLastBlock)
|
const resLastBlock = await fetch(endpointLastBlock)
|
||||||
const dataLastBlock = await resLastBlock.json()
|
const dataLastBlock = await resLastBlock.json()
|
||||||
const timestampNow = Date.now()
|
const timestampNow = Date.now()
|
||||||
const currentBlockTimestamp = dataLastBlock.timestamp
|
const currentBlockTimestamp = dataLastBlock.timestamp
|
||||||
|
|
||||||
if (currentBlockTimestamp < timestampNow) {
|
if (currentBlockTimestamp < timestampNow) {
|
||||||
const diff = timestampNow - currentBlockTimestamp
|
const diff = timestampNow - currentBlockTimestamp
|
||||||
const inSeconds = diff / 1000 // millisecs to secs
|
const inSeconds = diff / 1000
|
||||||
const inBlocks = inSeconds / 70
|
const inBlocks = inSeconds / 70
|
||||||
this.blocksBehind = parseInt(inBlocks)
|
this.blocksBehind = parseInt(inBlocks)
|
||||||
if (inBlocks >= 100) {
|
if (inBlocks >= 100) {
|
||||||
@ -147,7 +185,7 @@ class SyncIndicator extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async checkHowManyBlocksBehind() {
|
async checkHowManyBlocksBehind() {
|
||||||
try {
|
try {
|
||||||
this.getDaySummary();
|
await this.getDaySummary()
|
||||||
this.interval = setInterval(() => {
|
this.interval = setInterval(() => {
|
||||||
if(this.fetchingSummary) return
|
if(this.fetchingSummary) return
|
||||||
if (this.isBehind === false) {
|
if (this.isBehind === false) {
|
||||||
@ -156,12 +194,33 @@ class SyncIndicator extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
this.getDaySummary()
|
this.getDaySummary()
|
||||||
}, 20000)
|
}, 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) {
|
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.hasOpened = true
|
||||||
this.dispatchEvent(
|
this.dispatchEvent(
|
||||||
new CustomEvent('open-welcome-modal-sync', {
|
new CustomEvent('open-welcome-modal-sync', {
|
||||||
@ -170,119 +229,32 @@ class SyncIndicator extends connect(store)(LitElement) {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (
|
|
||||||
state.app.nodeStatus &&
|
if (state.app.nodeStatus && Object.keys(state.app.nodeStatus).length === 0) {
|
||||||
Object.keys(state.app.nodeStatus).length === 0
|
|
||||||
) {
|
|
||||||
if (this.numberOfTries > 5) {
|
if (this.numberOfTries > 5) {
|
||||||
this.hasCoreRunning = false
|
this.hasCoreRunning = false
|
||||||
} else {
|
} else {
|
||||||
this.numberOfTries = this.numberOfTries + 1
|
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.syncPercentage = state.app.nodeStatus.syncPercent
|
||||||
this.isSynchronizing = false
|
this.isSynchronizing = false
|
||||||
|
} else if (state.app.nodeStatus) {
|
||||||
} else if (
|
|
||||||
state.app.nodeStatus
|
|
||||||
) {
|
|
||||||
this.hasCoreRunning = true
|
this.hasCoreRunning = true
|
||||||
this.numberOfTries = 0
|
this.numberOfTries = 0
|
||||||
this.syncPercentage = state.app.nodeStatus.syncPercent
|
this.syncPercentage = state.app.nodeStatus.syncPercent
|
||||||
|
|
||||||
if (state.app.nodeStatus.syncPercent !== 100) {
|
if (state.app.nodeStatus.syncPercent !== 100) {
|
||||||
this.isSynchronizing = true
|
this.isSynchronizing = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (!this.interval && this.isBehind === null && state.app.nodeStatus.isSynchronizing && state.app.nodeStatus.syncPercent !== 100) {
|
||||||
!this.interval &&
|
|
||||||
this.isBehind === null &&
|
|
||||||
state.app.nodeStatus.isSynchronizing &&
|
|
||||||
state.app.nodeStatus.syncPercent !== 100
|
|
||||||
) {
|
|
||||||
this.checkHowManyBlocksBehind()
|
this.checkHowManyBlocksBehind()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.hasCoreRunning = true
|
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)
|
customElements.define('sync-indicator', SyncIndicator)
|
@ -1,16 +1,17 @@
|
|||||||
import { LitElement, html, css } from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import { driver } from 'driver.js';
|
import {driver} from 'driver.js';
|
||||||
import 'driver.js/dist/driver.css';
|
import 'driver.js/dist/driver.css';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
||||||
import '@vaadin/tooltip';
|
import '@vaadin/tooltip';
|
||||||
import '@material/mwc-button';
|
import '@material/mwc-button';
|
||||||
import { get, translate } from '../../../translate/index.js';
|
import {get, translate} from '../../../translate';
|
||||||
import '@polymer/paper-dialog/paper-dialog.js';
|
import '@polymer/paper-dialog/paper-dialog.js';
|
||||||
import { setNewTab } from '../../redux/app/app-actions.js';
|
import {setNewTab} from '../../redux/app/app-actions.js';
|
||||||
import { store } from '../../store.js';
|
import {store} from '../../store.js';
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import './tour.css';
|
import './tour.css';
|
||||||
|
|
||||||
class TourComponent extends connect(store)(LitElement) {
|
class TourComponent extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
@ -116,7 +117,7 @@ class TourComponent extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
_controlOpenWelcomeModal() {
|
_controlOpenWelcomeModal() {
|
||||||
this.isSynced = true
|
this.isSynced = true
|
||||||
|
|
||||||
const seenWelcomeSync = JSON.parse(
|
const seenWelcomeSync = JSON.parse(
|
||||||
localStorage.getItem('welcome-sync') || 'false'
|
localStorage.getItem('welcome-sync') || 'false'
|
||||||
);
|
);
|
||||||
@ -175,19 +176,14 @@ class TourComponent extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getName(recipient) {
|
async getName(recipient) {
|
||||||
@ -280,7 +276,7 @@ class TourComponent extends connect(store)(LitElement) {
|
|||||||
<span><img src="/img/syncing.png" style="height: 24px; width: 24px; padding-top: 4px;" /></span>
|
<span><img src="/img/syncing.png" style="height: 24px; width: 24px; padding-top: 4px;" /></span>
|
||||||
<p style="margin:0px;padding:0px">${get("tour.tour4")}</p>
|
<p style="margin:0px;padding:0px">${get("tour.tour4")}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -397,7 +393,7 @@ class TourComponent extends connect(store)(LitElement) {
|
|||||||
class="close-button"
|
class="close-button"
|
||||||
@click=${()=> {
|
@click=${()=> {
|
||||||
this.onClose()
|
this.onClose()
|
||||||
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
${translate("general.close")}
|
${translate("general.close")}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {translate} from '../../translate/index.js'
|
import {translate} from '../../translate'
|
||||||
import isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
|
|
||||||
import '@polymer/paper-icon-button/paper-icon-button.js'
|
import '@polymer/paper-icon-button/paper-icon-button.js'
|
||||||
|
@ -27,19 +27,14 @@ class CoinBalancesController extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
store.getState().app.nodeConfig.knownNodes[
|
||||||
store.getState().app.nodeConfig.node
|
store.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return store.getState().app.nodeConfig.knownNodes[
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
store.getState().app.nodeConfig.node
|
||||||
store.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {get} from '../../../translate/index.js'
|
import {get} from '../../../translate'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
import '@vaadin/tooltip';
|
import '@vaadin/tooltip';
|
||||||
|
|
||||||
@ -206,11 +206,9 @@ class ChatSideNavHeads extends LitElement {
|
|||||||
if(changedProperties.has('chatInfo')){
|
if(changedProperties.has('chatInfo')){
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if(changedProperties.has('isImageLoaded')){
|
return !!changedProperties.has('isImageLoaded');
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getUrl(chatUrl) {
|
getUrl(chatUrl) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import {translate,} from '../../../translate/index.js'
|
import {translate,} from '../../../translate'
|
||||||
import '@material/mwc-button';
|
import '@material/mwc-button';
|
||||||
import '@material/mwc-dialog';
|
import '@material/mwc-dialog';
|
||||||
import '@material/mwc-checkbox';
|
import '@material/mwc-checkbox';
|
||||||
@ -202,17 +202,12 @@ class AddFriendsModal extends connect(store)(LitElement) {
|
|||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
];
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return store.getState().app.nodeConfig.knownNodes[
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clearFields() {
|
clearFields() {
|
||||||
@ -267,7 +262,7 @@ class AddFriendsModal extends connect(store)(LitElement) {
|
|||||||
changedProperties &&
|
changedProperties &&
|
||||||
changedProperties.has('isOpen') && this.isOpen
|
changedProperties.has('isOpen') && this.isOpen
|
||||||
) {
|
) {
|
||||||
this.getAvailableFeedSchemas()
|
await this.getAvailableFeedSchemas()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -281,11 +276,9 @@ class AddFriendsModal extends connect(store)(LitElement) {
|
|||||||
if (data.error === 401) {
|
if (data.error === 401) {
|
||||||
this.availableFeeedSchemas = [];
|
this.availableFeeedSchemas = [];
|
||||||
} else {
|
} else {
|
||||||
const result = data.filter(
|
this.availableFeeedSchemas = data.filter(
|
||||||
(item) => item.identifier === 'ui_schema_feed'
|
(item) => item.identifier === 'ui_schema_feed'
|
||||||
);
|
);
|
||||||
|
|
||||||
this.availableFeeedSchemas = result;
|
|
||||||
}
|
}
|
||||||
this.userFoundModalOpen = true;
|
this.userFoundModalOpen = true;
|
||||||
} catch (error) {} finally {
|
} catch (error) {} finally {
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
import { LitElement, html, css } from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import { get, translate } from '../../../translate/index.js'
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import '@material/mwc-menu';
|
import '@material/mwc-menu';
|
||||||
import '@material/mwc-list/mwc-list-item.js';
|
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 '../../../../plugins/plugins/core/components/TimeAgo';
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import { store } from '../../store';
|
import {store} from '../../store';
|
||||||
import { setNewTab } from '../../redux/app/app-actions';
|
|
||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
|
|
||||||
const requestQueue = new RequestQueueWithPromise(3);
|
const requestQueue = new RequestQueueWithPromise(3);
|
||||||
@ -125,17 +123,12 @@ export class AvatarComponent extends connect(store)(LitElement) {
|
|||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
];
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getApiKey() {
|
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.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
];
|
||||||
let apiKey = myNode.apiKey;
|
return myNode.apiKey;
|
||||||
return apiKey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fetchResource() {
|
async fetchResource() {
|
||||||
@ -161,7 +153,7 @@ export class AvatarComponent extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fetchVideoUrl() {
|
async fetchVideoUrl() {
|
||||||
this.fetchResource();
|
await this.fetchResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
async getRawData() {
|
async getRawData() {
|
||||||
@ -249,7 +241,7 @@ export class AvatarComponent extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
this.status = res;
|
this.status = res;
|
||||||
if (this.status.status === 'DOWNLOADED') {
|
if (this.status.status === 'DOWNLOADED') {
|
||||||
this.fetchResource();
|
await this.fetchResource();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,8 +256,8 @@ export class AvatarComponent extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async _fetchImage() {
|
async _fetchImage() {
|
||||||
try {
|
try {
|
||||||
this.fetchVideoUrl();
|
await this.fetchVideoUrl();
|
||||||
this.fetchStatus();
|
await this.fetchStatus();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
/* empty */
|
/* empty */
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
import { css, html, LitElement } from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
|
|
||||||
import '@vaadin/item';
|
import '@vaadin/item';
|
||||||
import '@vaadin/list-box';
|
import '@vaadin/list-box';
|
||||||
import '@polymer/paper-icon-button/paper-icon-button.js';
|
import '@polymer/paper-icon-button/paper-icon-button.js';
|
||||||
import '@polymer/iron-icons/iron-icons.js';
|
import '@polymer/iron-icons/iron-icons.js';
|
||||||
import { store } from '../../store.js';
|
import {store} from '../../store.js';
|
||||||
import { setNewTab } from '../../redux/app/app-actions.js';
|
import {setNewTab} from '../../redux/app/app-actions.js';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import { get, translate } from '../../../translate/index.js';
|
import {get} from '../../../translate';
|
||||||
import { repeat } from 'lit/directives/repeat.js';
|
|
||||||
import '../../../../plugins/plugins/core/components/TimeAgo.js';
|
import '../../../../plugins/plugins/core/components/TimeAgo.js';
|
||||||
import '../notification-view/popover.js';
|
import '../notification-view/popover.js';
|
||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
@ -74,17 +73,12 @@ class BeginnerChecklist extends connect(store)(LitElement) {
|
|||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
];
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getName(recipient) {
|
async getName(recipient) {
|
||||||
@ -94,11 +88,7 @@ class BeginnerChecklist extends connect(store)(LitElement) {
|
|||||||
const res = await fetch(endpoint);
|
const res = await fetch(endpoint);
|
||||||
const getNames = await res.json();
|
const getNames = await res.json();
|
||||||
|
|
||||||
if (Array.isArray(getNames) && getNames.length > 0) {
|
this.hasName = Array.isArray(getNames) && getNames.length > 0;
|
||||||
this.hasName = true;
|
|
||||||
} else {
|
|
||||||
this.hasName = false;
|
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@ -132,7 +122,7 @@ class BeginnerChecklist extends connect(store)(LitElement) {
|
|||||||
state.app.accountInfo.names.length > 0
|
state.app.accountInfo.names.length > 0
|
||||||
) {
|
) {
|
||||||
this.hasName = true;
|
this.hasName = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleBlur() {
|
handleBlur() {
|
||||||
|
@ -1,128 +1,150 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {store} from '../../store'
|
import {store} from '../../store'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
class CoreSyncStatus extends connect(store)(LitElement) {
|
class CoreSyncStatus extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
nodeStatus: {type: Object},
|
nodeInfos: { type: Array },
|
||||||
coreInfos: { type: Array }
|
coreInfos: { type: Array },
|
||||||
|
theme: { type: String, reflect: true }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
this.nodeStatus = {}
|
this.nodeInfos = []
|
||||||
this.coreInfos = []
|
this.coreInfos = []
|
||||||
|
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
|
||||||
}
|
}
|
||||||
|
|
||||||
static styles = css`
|
static get styles() {
|
||||||
.lineHeight {
|
return css`
|
||||||
line-height: 33%;
|
.lineHeight {
|
||||||
}
|
line-height: 33%;
|
||||||
|
}
|
||||||
|
|
||||||
.tooltip {
|
.tooltip {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip .bottom {
|
.tooltip .bottom {
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
max-width: 250px;
|
max-width: 250px;
|
||||||
top: 35px;
|
top: 35px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, 0);
|
transform: translate(-50%, 0);
|
||||||
padding: 10px 10px;
|
padding: 10px 10px;
|
||||||
color: var(--black);
|
color: var(--black);
|
||||||
background-color: var(--white);
|
background-color: var(--white);
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 99999999;
|
z-index: 99999999;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
box-shadow: 0 1px 8px rgba(0,0,0,0.5);
|
box-shadow: 0 1px 8px rgba(0,0,0,0.5);
|
||||||
border: 1px solid var(--black);
|
border: 1px solid var(--black);
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.8s;
|
transition: opacity 0.8s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip:hover .bottom {
|
.tooltip:hover .bottom {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip .bottom i {
|
.tooltip .bottom i {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 100%;
|
bottom: 100%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin-left: -12px;
|
margin-left: -12px;
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 12px;
|
height: 12px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip .bottom i::after {
|
.tooltip .bottom i::after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 12px;
|
width: 12px;
|
||||||
height: 12px;
|
height: 12px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%,50%) rotate(45deg);
|
transform: translate(-50%,50%) rotate(45deg);
|
||||||
background-color: var(--white);
|
background-color: var(--white);
|
||||||
border: 1px solid var(--black);
|
border: 1px solid var(--black);
|
||||||
box-shadow: 0 1px 8px rgba(0,0,0,0.5);
|
box-shadow: 0 1px 8px rgba(0,0,0,0.5);
|
||||||
}
|
}
|
||||||
|
`
|
||||||
`
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return html`
|
return html`
|
||||||
<div id="core-sync-status-id">
|
<div id="core-sync-status-id">
|
||||||
${this.renderSyncStatusIcon()}
|
${this.renderSyncStatusIcon()}
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
firstUpdated() {
|
firstUpdated() {
|
||||||
|
this.getNodeInfos()
|
||||||
this.getCoreInfos()
|
this.getCoreInfos()
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
|
this.getNodeInfos()
|
||||||
this.getCoreInfos()
|
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() {
|
async getCoreInfos() {
|
||||||
const corInfo = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const appCoreNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
const coreInfoUrl = corInfo.protocol + '://' + corInfo.domain + ':' + corInfo.port
|
const appCoreUrl = appCoreNode.protocol + '://' + appCoreNode.domain + ':' + appCoreNode.port
|
||||||
const infoUrl = `${coreInfoUrl}/admin/info`
|
const coreInfoUrl = `${appCoreUrl}/admin/info`
|
||||||
await fetch(infoUrl).then(response => {
|
|
||||||
|
await fetch(coreInfoUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
this.coreInfos = data
|
this.coreInfos = data
|
||||||
|
}).catch(err => {
|
||||||
|
console.error('Request failed', err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
renderSyncStatusIcon() {
|
renderSyncStatusIcon() {
|
||||||
if (this.nodeStatus.isSynchronizing === true && this.nodeStatus.syncPercent === 99) {
|
if (this.nodeInfos.isSynchronizing === true && this.nodeInfos.syncPercent === 99) {
|
||||||
return html`
|
return html`
|
||||||
<div class="tooltip" style="display: inline;">
|
<div class="tooltip" style="display: inline;">
|
||||||
<span><img src="/img/syncing.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
<span><img src="/img/syncing.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<h3>${translate("walletprofile.wp3")}</h3>
|
<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.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.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.nodeStatus.height ? this.nodeStatus.height : ''}</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.nodeStatus.numberOfConnections ? this.nodeStatus.numberOfConnections : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
</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`
|
return html`
|
||||||
<div class="tooltip" style="display: inline;">
|
<div class="tooltip" style="display: inline;">
|
||||||
<span><img src="/img/synced.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
<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>
|
<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.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("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.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.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.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
</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`
|
return html`
|
||||||
<div class="tooltip" style="display: inline;">
|
<div class="tooltip" style="display: inline;">
|
||||||
<span><img src="/img/synced.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
<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>
|
<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.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("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.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.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.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
</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`
|
return html`
|
||||||
<div class="tooltip" style="display: inline;">
|
<div class="tooltip" style="display: inline;">
|
||||||
<span><img src="/img/synced_minting.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
<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>
|
<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.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("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.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.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.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
</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`
|
return html`
|
||||||
<div class="tooltip" style="display: inline;">
|
<div class="tooltip" style="display: inline;">
|
||||||
<span><img src="/img/synced_minting.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
<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>
|
<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.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("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.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.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.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -185,9 +207,9 @@ class CoreSyncStatus extends connect(store)(LitElement) {
|
|||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<h3>${translate("walletprofile.wp3")}</h3>
|
<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.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.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.nodeStatus.height ? this.nodeStatus.height : ''}</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.nodeStatus.numberOfConnections ? this.nodeStatus.numberOfConnections : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -196,7 +218,7 @@ class CoreSyncStatus extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stateChanged(state) {
|
stateChanged(state) {
|
||||||
this.nodeStatus = state.app.nodeStatus
|
// ...
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import {translate,} from '../../../translate/index.js'
|
import {translate,} from '../../../translate'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import '@material/mwc-menu';
|
import '@material/mwc-menu';
|
||||||
import '@material/mwc-list/mwc-list-item.js'
|
import '@material/mwc-list/mwc-list-item.js'
|
||||||
@ -174,13 +174,10 @@ export class FeedItem extends connect(store)(LitElement) {
|
|||||||
getNodeUrl(){
|
getNodeUrl(){
|
||||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
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 myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
return nodeUrl
|
|
||||||
}
|
}
|
||||||
getMyNode(){
|
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() {
|
getApiKey() {
|
||||||
@ -188,8 +185,7 @@ getMyNode(){
|
|||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
];
|
||||||
let apiKey = myNode.apiKey;
|
return myNode.apiKey;
|
||||||
return apiKey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fetchResource() {
|
async fetchResource() {
|
||||||
@ -206,7 +202,7 @@ getMyNode(){
|
|||||||
|
|
||||||
async fetchVideoUrl() {
|
async fetchVideoUrl() {
|
||||||
|
|
||||||
this.fetchResource()
|
await this.fetchResource()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,7 +307,7 @@ getMyNode(){
|
|||||||
|
|
||||||
this.status = res
|
this.status = res
|
||||||
if(this.status.status === 'DOWNLOADED'){
|
if(this.status.status === 'DOWNLOADED'){
|
||||||
this.fetchResource()
|
await this.fetchResource()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,8 +328,8 @@ getMyNode(){
|
|||||||
|
|
||||||
async _fetchImage() {
|
async _fetchImage() {
|
||||||
try {
|
try {
|
||||||
this.fetchVideoUrl()
|
await this.fetchVideoUrl()
|
||||||
this.fetchStatus()
|
await this.fetchStatus()
|
||||||
} catch (error) { /* empty */ }
|
} catch (error) { /* empty */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
// popover-component.js
|
// popover-component.js
|
||||||
import { css, html, LitElement } from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import { createPopper } from '@popperjs/core';
|
import {createPopper} from '@popperjs/core';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import { translate } from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
import { store } from '../../store';
|
import {store} from '../../store';
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import { setNewTab, setSideEffectAction } from '../../redux/app/app-actions';
|
import {setNewTab, setSideEffectAction} from '../../redux/app/app-actions';
|
||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
|
|
||||||
export class FriendItemActions extends connect(store)(LitElement) {
|
export class FriendItemActions extends connect(store)(LitElement) {
|
||||||
@ -79,11 +79,9 @@ export class FriendItemActions extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
store.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
firstUpdated() {
|
firstUpdated() {
|
||||||
|
@ -5,7 +5,7 @@ import {friendsViewStyles} from './friends-view-css';
|
|||||||
import {connect} from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import {store} from '../../store';
|
import {store} from '../../store';
|
||||||
import './feed-item'
|
import './feed-item'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||||
|
|
||||||
@ -53,24 +53,18 @@ class FriendsFeed extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
store.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return store.getState().app.nodeConfig.knownNodes[
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateFeeds(event) {
|
_updateFeeds(event) {
|
||||||
const detail = event.detail
|
this.mySelectedFeeds = event.detail
|
||||||
this.mySelectedFeeds = detail
|
|
||||||
this.reFetchFeedData()
|
this.reFetchFeedData()
|
||||||
this.requestUpdate()
|
this.requestUpdate()
|
||||||
}
|
}
|
||||||
@ -170,7 +164,7 @@ class FriendsFeed extends connect(store)(LitElement) {
|
|||||||
if(this.mySelectedFeeds.length === 0){
|
if(this.mySelectedFeeds.length === 0){
|
||||||
await this.getEndpoints()
|
await this.getEndpoints()
|
||||||
|
|
||||||
this.loadAndMergeData();
|
await this.loadAndMergeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getFeedOnInterval()
|
this.getFeedOnInterval()
|
||||||
@ -190,7 +184,7 @@ this.getFeedOnInterval()
|
|||||||
async refresh(){
|
async refresh(){
|
||||||
try {
|
try {
|
||||||
await this.getEndpoints()
|
await this.getEndpoints()
|
||||||
this.reFetchFeedData()
|
await this.reFetchFeedData()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -216,7 +210,7 @@ this.getFeedOnInterval()
|
|||||||
|
|
||||||
observerHandler(entries) {
|
observerHandler(entries) {
|
||||||
if (!entries[0].isIntersecting) {
|
if (!entries[0].isIntersecting) {
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
if (this.feedToRender.length < 20) {
|
if (this.feedToRender.length < 20) {
|
||||||
return;
|
return;
|
||||||
@ -326,8 +320,7 @@ this.getFeedOnInterval()
|
|||||||
|
|
||||||
let clickValue1 = newItem.schema.click;
|
let clickValue1 = newItem.schema.click;
|
||||||
|
|
||||||
const resolvedClickValue1 = replacePlaceholders(clickValue1, resource, newItem.schema.customParams);
|
newItem.link = replacePlaceholders(clickValue1, resource, newItem.schema.customParams)
|
||||||
newItem.link = resolvedClickValue1
|
|
||||||
newData.push(newItem)
|
newData.push(newItem)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -375,7 +368,7 @@ this.getFeedOnInterval()
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async loadAndMergeData() {
|
async loadAndMergeData() {
|
||||||
let allData = this.feed
|
let allData = this.feed
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
import './friends-side-panel.js'
|
import './friends-side-panel.js'
|
||||||
import '@vaadin/tooltip'
|
import '@vaadin/tooltip'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
class FriendsSidePanelParent extends LitElement {
|
class FriendsSidePanelParent extends LitElement {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit';
|
|||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import './friends-view'
|
import './friends-view'
|
||||||
import './friends-feed'
|
import './friends-feed'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
class FriendsSidePanel extends LitElement {
|
class FriendsSidePanel extends LitElement {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -13,7 +13,7 @@ import './ChatSideNavHeads';
|
|||||||
import '../../../../plugins/plugins/core/components/ChatSearchResults'
|
import '../../../../plugins/plugins/core/components/ChatSearchResults'
|
||||||
import './add-friends-modal'
|
import './add-friends-modal'
|
||||||
|
|
||||||
import {translate,} from '../../../translate/index.js'
|
import {translate,} from '../../../translate'
|
||||||
import {store} from '../../store';
|
import {store} from '../../store';
|
||||||
import {friendsViewStyles} from './friends-view-css';
|
import {friendsViewStyles} from './friends-view-css';
|
||||||
import {parentEpml} from '../show-plugin';
|
import {parentEpml} from '../show-plugin';
|
||||||
@ -74,19 +74,14 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
store.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return store.getState().app.nodeConfig.knownNodes[
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getMoreFriends() {}
|
getMoreFriends() {}
|
||||||
@ -105,12 +100,10 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_updateFriends(event) {
|
_updateFriends(event) {
|
||||||
const detail = event.detail
|
this.friendList = event.detail
|
||||||
this.friendList = detail
|
|
||||||
}
|
}
|
||||||
_updateFeed(event) {
|
_updateFeed(event) {
|
||||||
const detail = event.detail
|
this.mySelectedFeeds = event.detail
|
||||||
this.mySelectedFeeds = detail
|
|
||||||
this.requestUpdate()
|
this.requestUpdate()
|
||||||
}
|
}
|
||||||
_addFriend(event){
|
_addFriend(event){
|
||||||
@ -125,7 +118,7 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
name
|
name
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isOpenAddFriendsModal = true
|
this.isOpenAddFriendsModal = true
|
||||||
this.openSidePanel()
|
this.openSidePanel()
|
||||||
}
|
}
|
||||||
@ -165,7 +158,7 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
observerHandler(entries) {
|
observerHandler(entries) {
|
||||||
if (!entries[0].isIntersecting) {
|
if (!entries[0].isIntersecting) {
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
if (this.friendList.length < 20) {
|
if (this.friendList.length < 20) {
|
||||||
return;
|
return;
|
||||||
@ -201,8 +194,7 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey
|
return apiNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async myFollowName(name) {
|
async myFollowName(name) {
|
||||||
@ -211,7 +203,7 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
]
|
]
|
||||||
let namesJsonString = JSON.stringify({ "items": items })
|
let namesJsonString = JSON.stringify({ "items": items })
|
||||||
|
|
||||||
let ret = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
url: `/lists/followedNames?apiKey=${this.getApiKey()}`,
|
url: `/lists/followedNames?apiKey=${this.getApiKey()}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
@ -219,9 +211,6 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
},
|
},
|
||||||
body: `${namesJsonString}`
|
body: `${namesJsonString}`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
return ret
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async unFollowName(name) {
|
async unFollowName(name) {
|
||||||
@ -230,7 +219,7 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
]
|
]
|
||||||
let namesJsonString = JSON.stringify({ "items": items })
|
let namesJsonString = JSON.stringify({ "items": items })
|
||||||
|
|
||||||
let ret = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
url: `/lists/followedNames?apiKey=${this.getApiKey()}`,
|
url: `/lists/followedNames?apiKey=${this.getApiKey()}`,
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: {
|
headers: {
|
||||||
@ -238,9 +227,6 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
},
|
},
|
||||||
body: `${namesJsonString}`
|
body: `${namesJsonString}`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
return ret
|
|
||||||
}
|
}
|
||||||
async addToFriendList(val, isRemove){
|
async addToFriendList(val, isRemove){
|
||||||
const copyVal = {...val}
|
const copyVal = {...val}
|
||||||
@ -260,9 +246,9 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
this.friendList = [...this.friendList, copyVal]
|
this.friendList = [...this.friendList, copyVal]
|
||||||
}
|
}
|
||||||
if(!copyVal.willFollow || isRemove) {
|
if(!copyVal.willFollow || isRemove) {
|
||||||
this.unFollowName(copyVal.name)
|
await this.unFollowName(copyVal.name)
|
||||||
} else if(copyVal.willFollow){
|
} else if(copyVal.willFollow){
|
||||||
this.myFollowName(copyVal.name)
|
await this.myFollowName(copyVal.name)
|
||||||
}
|
}
|
||||||
this.setMySelectedFeeds(val.mySelectedFeeds)
|
this.setMySelectedFeeds(val.mySelectedFeeds)
|
||||||
await new Promise((res)=> {
|
await new Promise((res)=> {
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
import { LitElement, html, css } from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import { render } from 'lit/html.js';
|
import {get, translate} from '../../../translate'
|
||||||
import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from '../../../translate/index.js'
|
|
||||||
import '@material/mwc-button';
|
import '@material/mwc-button';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import '@vaadin/tooltip';
|
import '@vaadin/tooltip';
|
||||||
import '@material/mwc-dialog';
|
import '@material/mwc-dialog';
|
||||||
import '@material/mwc-checkbox';
|
import '@material/mwc-checkbox';
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import { store } from '../../store';
|
import {store} from '../../store';
|
||||||
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
||||||
import { parentEpml } from '../show-plugin';
|
import {parentEpml} from '../show-plugin';
|
||||||
|
|
||||||
class ProfileModalUpdate extends connect(store)(LitElement) {
|
class ProfileModalUpdate extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -274,7 +273,7 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
|
|||||||
this.requestUpdate();
|
this.requestUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async firstUpdated() {
|
async firstUpdated() {
|
||||||
@ -335,19 +334,14 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
store.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return store.getState().app.nodeConfig.knownNodes[
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clearFields() {
|
clearFields() {
|
||||||
@ -549,12 +543,12 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
|
|||||||
<div
|
<div
|
||||||
style="display:flex;justify-content:center;flex-direction:column;gap:25px"
|
style="display:flex;justify-content:center;flex-direction:column;gap:25px"
|
||||||
>
|
>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style="display:flex;gap:15px;align-items:center"
|
style="display:flex;gap:15px;align-items:center"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
|
|
||||||
style="color: var(--black);font-size:16px"
|
style="color: var(--black);font-size:16px"
|
||||||
>
|
>
|
||||||
${key}
|
${key}
|
||||||
@ -592,9 +586,9 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
|
|||||||
>
|
>
|
||||||
${translate('general.close')}
|
${translate('general.close')}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div style="display:flex;gap:10px;align-items:center">
|
<div style="display:flex;gap:10px;align-items:center">
|
||||||
|
|
||||||
<button
|
<button
|
||||||
?disabled="${this.isLoading}"
|
?disabled="${this.isLoading}"
|
||||||
class="modal-button"
|
class="modal-button"
|
||||||
@ -718,7 +712,7 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
|
|||||||
class="input"
|
class="input"
|
||||||
.value=${this.newFieldName}
|
.value=${this.newFieldName}
|
||||||
@change=${(e) => {
|
@change=${(e) => {
|
||||||
this.newFieldName = e.target.value
|
this.newFieldName = e.target.value
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { LitElement, html, css } from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import './friends-side-panel.js';
|
import './friends-side-panel.js';
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import { store } from '../../store.js';
|
import {store} from '../../store.js';
|
||||||
import WebWorker2 from '../WebWorkerFile.js';
|
import WebWorker2 from '../WebWorkerFile.js';
|
||||||
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
||||||
import '@vaadin/tooltip';
|
import '@vaadin/tooltip';
|
||||||
import { get, translate } from '../../../translate/index.js'
|
import {get, translate} from '../../../translate'
|
||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
import '@polymer/paper-dialog/paper-dialog.js';
|
import '@polymer/paper-dialog/paper-dialog.js';
|
||||||
|
|
||||||
@ -14,20 +14,15 @@ import {
|
|||||||
decryptGroupData,
|
decryptGroupData,
|
||||||
encryptDataGroup,
|
encryptDataGroup,
|
||||||
objectToBase64,
|
objectToBase64,
|
||||||
uint8ArrayToBase64,
|
|
||||||
uint8ArrayToObject,
|
uint8ArrayToObject,
|
||||||
} from '../../../../plugins/plugins/core/components/qdn-action-encryption.js';
|
} from '../../../../plugins/plugins/core/components/qdn-action-encryption.js';
|
||||||
import { publishData } from '../../../../plugins/plugins/utils/publish-image.js';
|
import {publishData} from '../../../../plugins/plugins/utils/publish-image.js';
|
||||||
import { parentEpml } from '../show-plugin.js';
|
import {parentEpml} from '../show-plugin.js';
|
||||||
import '../notification-view/popover.js';
|
import '../notification-view/popover.js';
|
||||||
import './avatar.js';
|
import './avatar.js';
|
||||||
import {
|
import {setNewTab, setProfileData, setSideEffectAction,} from '../../redux/app/app-actions.js';
|
||||||
setNewTab,
|
|
||||||
setProfileData,
|
|
||||||
setSideEffectAction,
|
|
||||||
} from '../../redux/app/app-actions.js';
|
|
||||||
import './profile-modal-update.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) {
|
class ProfileQdn extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -288,19 +283,14 @@ class ProfileQdn extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getRawData(dataItem) {
|
async getRawData(dataItem) {
|
||||||
@ -323,10 +313,9 @@ class ProfileQdn extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async followNames(names) {
|
async followNames(names) {
|
||||||
let items = names;
|
let namesJsonString = JSON.stringify({ items: names });
|
||||||
let namesJsonString = JSON.stringify({ items: items });
|
|
||||||
|
|
||||||
let ret = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
url: `/lists/followedNames?apiKey=${this.myNode.apiKey}`,
|
url: `/lists/followedNames?apiKey=${this.myNode.apiKey}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
@ -334,8 +323,6 @@ class ProfileQdn extends connect(store)(LitElement) {
|
|||||||
},
|
},
|
||||||
body: `${namesJsonString}`,
|
body: `${namesJsonString}`,
|
||||||
});
|
});
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async setValues(response, resource) {
|
async setValues(response, resource) {
|
||||||
@ -426,8 +413,7 @@ class ProfileQdn extends connect(store)(LitElement) {
|
|||||||
async getProfile() {
|
async getProfile() {
|
||||||
try {
|
try {
|
||||||
this.error = '';
|
this.error = '';
|
||||||
const arbFee = await this.getArbitraryFee();
|
this.fee = await this.getArbitraryFee();
|
||||||
this.fee = arbFee;
|
|
||||||
this.hasAttemptedToFetchResource = true;
|
this.hasAttemptedToFetchResource = true;
|
||||||
let resource;
|
let resource;
|
||||||
|
|
||||||
@ -459,7 +445,7 @@ class ProfileQdn extends connect(store)(LitElement) {
|
|||||||
try {
|
try {
|
||||||
const response = await this.getRawData(dataItem);
|
const response = await this.getRawData(dataItem);
|
||||||
if (response.wallets) {
|
if (response.wallets) {
|
||||||
this.setValues(response, dataItem);
|
await this.setValues(response, dataItem);
|
||||||
} else {
|
} else {
|
||||||
this.error = 'Cannot get saved user settings';
|
this.error = 'Cannot get saved user settings';
|
||||||
}
|
}
|
||||||
@ -574,11 +560,10 @@ class ProfileQdn extends connect(store)(LitElement) {
|
|||||||
const toBase64 = await objectToBase64(
|
const toBase64 = await objectToBase64(
|
||||||
newObject.customData[key]
|
newObject.customData[key]
|
||||||
);
|
);
|
||||||
const encryptedData = encryptDataGroup({
|
newObject['customData'][key] = encryptDataGroup({
|
||||||
data64: toBase64,
|
data64: toBase64,
|
||||||
publicKeys: [],
|
publicKeys: [],
|
||||||
});
|
});
|
||||||
newObject['customData'][key] = encryptedData;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
newObject['customData'][key] = newObject.customData[key];
|
newObject['customData'][key] = newObject.customData[key];
|
||||||
@ -814,11 +799,7 @@ class ProfileQdn extends connect(store)(LitElement) {
|
|||||||
const findIndex = friendList.findIndex(
|
const findIndex = friendList.findIndex(
|
||||||
(friend) => friend.name === name
|
(friend) => friend.name === name
|
||||||
);
|
);
|
||||||
if (findIndex !== -1) {
|
this.isFriend = findIndex !== -1;
|
||||||
this.isFriend = true;
|
|
||||||
} else {
|
|
||||||
this.isFriend = false;
|
|
||||||
}
|
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
import {css, html, LitElement} from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import './friends-side-panel.js';
|
import './friends-side-panel.js';
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import { store } from '../../store.js';
|
import {store} from '../../store.js';
|
||||||
import WebWorker from '../WebWorkerFile.js';
|
import WebWorker from '../WebWorkerFile.js';
|
||||||
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
||||||
import '@vaadin/tooltip';
|
import '@vaadin/tooltip';
|
||||||
import { get, translate } from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
decryptGroupData,
|
decryptGroupData,
|
||||||
|
|
||||||
encryptDataGroup,
|
encryptDataGroup,
|
||||||
objectToBase64,
|
objectToBase64,
|
||||||
uint8ArrayToObject,
|
uint8ArrayToObject,
|
||||||
@ -19,7 +18,7 @@ import {
|
|||||||
import {publishData} from '../../../../plugins/plugins/utils/publish-image.js';
|
import {publishData} from '../../../../plugins/plugins/utils/publish-image.js';
|
||||||
import {parentEpml} from '../show-plugin.js';
|
import {parentEpml} from '../show-plugin.js';
|
||||||
import '../notification-view/popover.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) {
|
class SaveSettingsQdn extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -144,19 +143,14 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getRawData(dataItem) {
|
async getRawData(dataItem) {
|
||||||
@ -165,8 +159,7 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
const data = await res.text();
|
const data = await res.text();
|
||||||
if (data.error) throw new Error('Cannot retrieve your data from qdn');
|
if (data.error) throw new Error('Cannot retrieve your data from qdn');
|
||||||
const decryptedData = decryptGroupData(data);
|
const decryptedData = decryptGroupData(data);
|
||||||
const decryptedDataToBase64 = uint8ArrayToObject(decryptedData);
|
return uint8ArrayToObject(decryptedData);
|
||||||
return decryptedDataToBase64;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getMyFollowedNames() {
|
async getMyFollowedNames() {
|
||||||
@ -184,10 +177,9 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async followNames(names) {
|
async followNames(names) {
|
||||||
let items = names
|
let namesJsonString = JSON.stringify({ "items": names })
|
||||||
let namesJsonString = JSON.stringify({ "items": items })
|
|
||||||
|
|
||||||
let ret = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
url: `/lists/followedNames?apiKey=${this.myNode.apiKey}`,
|
url: `/lists/followedNames?apiKey=${this.myNode.apiKey}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
@ -195,9 +187,6 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
},
|
},
|
||||||
body: `${namesJsonString}`
|
body: `${namesJsonString}`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
return ret
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async setValues(response, resource) {
|
async setValues(response, resource) {
|
||||||
@ -322,8 +311,7 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
async getGeneralSettingsQdn() {
|
async getGeneralSettingsQdn() {
|
||||||
try {
|
try {
|
||||||
this.error = ""
|
this.error = ""
|
||||||
const arbFee = await this.getArbitraryFee();
|
this.fee = await this.getArbitraryFee();
|
||||||
this.fee = arbFee;
|
|
||||||
this.hasAttemptedToFetchResource = true;
|
this.hasAttemptedToFetchResource = true;
|
||||||
let resource;
|
let resource;
|
||||||
let nameObject
|
let nameObject
|
||||||
@ -331,7 +319,7 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
nameObject = store.getState().app.accountInfo.names[0];
|
nameObject = store.getState().app.accountInfo.names[0];
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!nameObject) {
|
if (!nameObject) {
|
||||||
this.name = null;
|
this.name = null;
|
||||||
@ -358,7 +346,7 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
try {
|
try {
|
||||||
const response = await this.getRawData(dataItem);
|
const response = await this.getRawData(dataItem);
|
||||||
if (response.version) {
|
if (response.version) {
|
||||||
this.setValues(response, dataItem);
|
await this.setValues(response, dataItem);
|
||||||
} else {
|
} else {
|
||||||
this.error = 'Cannot get saved user settings';
|
this.error = 'Cannot get saved user settings';
|
||||||
}
|
}
|
||||||
@ -514,9 +502,9 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.resourceExists = true;
|
this.resourceExists = true;
|
||||||
this.setValues(newObject, {
|
await this.setValues(newObject, {
|
||||||
updated: Date.now(),
|
updated: Date.now(),
|
||||||
});
|
});
|
||||||
localStorage.setItem('temp-settings-data', JSON.stringify({}));
|
localStorage.setItem('temp-settings-data', JSON.stringify({}));
|
||||||
this.valuesToBeSavedOnQdn = {};
|
this.valuesToBeSavedOnQdn = {};
|
||||||
worker.terminate();
|
worker.terminate();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {registerTranslateConfig, translate, use} from '../../translate/index.js'
|
import {registerTranslateConfig, translate, use} from '../../translate'
|
||||||
|
|
||||||
registerTranslateConfig({
|
registerTranslateConfig({
|
||||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
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 {createWallet} from '../../../../crypto/api/createWallet.js'
|
||||||
import {doLogin, doLogout, doSelectAddress} from '../../redux/app/app-actions.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 dataString = JSON.stringify(data)
|
||||||
const blob = new Blob([dataString], { type: 'text/plain;charset=utf-8' })
|
const blob = new Blob([dataString], { type: 'text/plain;charset=utf-8' })
|
||||||
backupname = "qortal_backup_" + wallet.addresses[0].address + ".json"
|
backupname = "qortal_backup_" + wallet.addresses[0].address + ".json"
|
||||||
this.saveFileToDisk(blob, backupname)
|
await this.saveFileToDisk(blob, backupname)
|
||||||
}
|
}
|
||||||
|
|
||||||
async downloadSeedphrase() {
|
async downloadSeedphrase() {
|
||||||
@ -601,7 +601,7 @@ class CreateAccountSection extends connect(store)(LitElement) {
|
|||||||
const seed = this.shadowRoot.getElementById('randSentence').parsedString
|
const seed = this.shadowRoot.getElementById('randSentence').parsedString
|
||||||
const blob = new Blob([seed], { type: 'text/plain;charset=utf-8' })
|
const blob = new Blob([seed], { type: 'text/plain;charset=utf-8' })
|
||||||
seedname = "qortal_seedphrase.txt"
|
seedname = "qortal_seedphrase.txt"
|
||||||
this.saveFileToDisk(blob, seedname)
|
await this.saveFileToDisk(blob, seedname)
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveFileToDisk(blob, fileName) {
|
async saveFileToDisk(blob, fileName) {
|
||||||
|
@ -2,14 +2,21 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import {checkApiKey} from '../../apiKeyUtils.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-button'
|
||||||
import '@material/mwc-checkbox'
|
import '@material/mwc-checkbox'
|
||||||
import '@material/mwc-textfield'
|
|
||||||
import '@material/mwc-icon'
|
|
||||||
import '@material/mwc-dialog'
|
import '@material/mwc-dialog'
|
||||||
import '@material/mwc-formfield'
|
import '@material/mwc-formfield'
|
||||||
|
import '@material/mwc-icon'
|
||||||
|
import '@material/mwc-icon-button'
|
||||||
|
import '@material/mwc-textfield'
|
||||||
import '@polymer/iron-pages'
|
import '@polymer/iron-pages'
|
||||||
import '@polymer/paper-input/paper-input-container.js'
|
import '@polymer/paper-input/paper-input-container.js'
|
||||||
import '@polymer/paper-input/paper-input.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 '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||||
import '@vaadin/text-field/vaadin-text-field.js'
|
import '@vaadin/text-field/vaadin-text-field.js'
|
||||||
import '@vaadin/password-field/vaadin-password-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) {
|
class LoginSection extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -124,15 +125,15 @@ class LoginSection extends connect(store)(LitElement) {
|
|||||||
return html`
|
return html`
|
||||||
<style>
|
<style>
|
||||||
#loginSection {
|
#loginSection {
|
||||||
padding:0;
|
padding: 0;
|
||||||
text-align:left;
|
text-align: left;
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
--paper-spinner-color: var(--mdc-theme-primary);
|
--paper-spinner-color: var(--mdc-theme-primary);
|
||||||
--paper-spinner-stroke-width: 2px;
|
--paper-spinner-stroke-width: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#loginPages{
|
#loginPages{
|
||||||
overflow:visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
#walletsPage {
|
#walletsPage {
|
||||||
@ -167,7 +168,7 @@ class LoginSection extends connect(store)(LitElement) {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
margin:0;
|
margin: 0;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
@ -213,21 +214,21 @@ class LoginSection extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
*[hidden] {
|
*[hidden] {
|
||||||
display:none !important;
|
display: none !important;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
padding-top:0;
|
padding-top: 0;
|
||||||
margin:0;
|
margin: 0;
|
||||||
font-size:24px;
|
font-size: 24px;
|
||||||
font-weight:100;
|
font-weight: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
.accountIcon {
|
.accountIcon {
|
||||||
font-size:42px;
|
font-size: 42px;
|
||||||
padding-top:8px;
|
padding-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#unlockStoredPage {
|
#unlockStoredPage {
|
||||||
@ -241,9 +242,9 @@ class LoginSection extends connect(store)(LitElement) {
|
|||||||
@media only screen and (max-width: ${getComputedStyle(document.body).getPropertyValue('--layout-breakpoint-tablet')}) {
|
@media only screen and (max-width: ${getComputedStyle(document.body).getPropertyValue('--layout-breakpoint-tablet')}) {
|
||||||
/* Mobile */
|
/* Mobile */
|
||||||
#wallets {
|
#wallets {
|
||||||
height:100%;
|
height: 100%;
|
||||||
overflow-y:auto;
|
overflow-y: auto;
|
||||||
overflow-x:hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#loginSection {
|
#loginSection {
|
||||||
@ -256,15 +257,15 @@ class LoginSection extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.backButton {
|
.backButton {
|
||||||
padding:14px;
|
padding: 14px;
|
||||||
text-align:left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pagesContainer {
|
#pagesContainer {
|
||||||
max-height: calc(var(--window-height) - 184px);
|
max-height: calc(var(--window-height) - 184px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkboxLabel:hover{
|
.checkboxLabel:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import {stateAwait} from '../../stateAwait.js'
|
import {stateAwait} from '../../stateAwait.js'
|
||||||
import {get} from '../../../translate/index.js'
|
import {get} from '../../../translate'
|
||||||
|
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
|
@ -346,8 +346,7 @@ var pJS = function (tag_id, params) {
|
|||||||
var shape_type = pJS.particles.shape.type
|
var shape_type = pJS.particles.shape.type
|
||||||
if (typeof (shape_type) === 'object') {
|
if (typeof (shape_type) === 'object') {
|
||||||
if (shape_type instanceof Array) {
|
if (shape_type instanceof Array) {
|
||||||
var shape_selected = shape_type[Math.floor(Math.random() * shape_type.length)]
|
this.shape = shape_type[Math.floor(Math.random() * shape_type.length)]
|
||||||
this.shape = shape_selected
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.shape = shape_type
|
this.shape = shape_type
|
||||||
@ -1255,11 +1254,11 @@ function hexToRgb(hex) {
|
|||||||
g: parseInt(result[2], 16),
|
g: parseInt(result[2], 16),
|
||||||
b: parseInt(result[3], 16)
|
b: parseInt(result[3], 16)
|
||||||
} : null
|
} : null
|
||||||
};
|
}
|
||||||
|
|
||||||
function clamp(number, min, max) {
|
function clamp(number, min, max) {
|
||||||
return Math.min(Math.max(number, min), max)
|
return Math.min(Math.max(number, min), max)
|
||||||
};
|
}
|
||||||
|
|
||||||
function isInArray(value, array) {
|
function isInArray(value, array) {
|
||||||
return array.indexOf(value) > -1
|
return array.indexOf(value) > -1
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import {doLogout} from '../../redux/app/app-actions.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 '@polymer/paper-dialog/paper-dialog.js'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {registerTranslateConfig, translate, use} from '../../translate/index.js'
|
import {registerTranslateConfig, translate, use} from '../../translate'
|
||||||
|
|
||||||
registerTranslateConfig({
|
registerTranslateConfig({
|
||||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
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 {store} from '../../store.js';
|
||||||
import {setNewNotification} from '../../redux/app/app-actions.js';
|
import {setNewNotification} from '../../redux/app/app-actions.js';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import {get, translate} from '../../../translate/index.js'
|
import {get, translate} from '../../../translate'
|
||||||
import {repeat} from 'lit/directives/repeat.js';
|
import {repeat} from 'lit/directives/repeat.js';
|
||||||
import '../../../../plugins/plugins/core/components/TimeAgo.js';
|
import '../../../../plugins/plugins/core/components/TimeAgo.js';
|
||||||
import './popover.js';
|
import './popover.js';
|
||||||
@ -20,7 +20,6 @@ class NotificationBellGeneral extends connect(store)(LitElement) {
|
|||||||
showNotifications: { type: Boolean },
|
showNotifications: { type: Boolean },
|
||||||
notificationCount: { type: Boolean },
|
notificationCount: { type: Boolean },
|
||||||
theme: { type: String, reflect: true },
|
theme: { type: String, reflect: true },
|
||||||
notifications: { type: Array },
|
|
||||||
currentNotification: { type: Object },
|
currentNotification: { type: Object },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -294,19 +293,14 @@ class NotificationItemTx extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
store.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return store.getState().app.nodeConfig.knownNodes[
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getStatus() {
|
async getStatus() {
|
||||||
@ -314,11 +308,10 @@ class NotificationItemTx extends connect(store)(LitElement) {
|
|||||||
let stop = false;
|
let stop = false;
|
||||||
const getAnswer = async () => {
|
const getAnswer = async () => {
|
||||||
const getTx = async (minterAddr) => {
|
const getTx = async (minterAddr) => {
|
||||||
const url = `${this.nodeUrl}/transactions/signature/${this.signature}`;
|
const url = `${this.nodeUrl}/transactions/signature/${this.signature}`
|
||||||
const res = await fetch(url);
|
const res = await fetch(url)
|
||||||
const data = await res.json();
|
return await res.json()
|
||||||
return data;
|
}
|
||||||
};
|
|
||||||
|
|
||||||
if (!stop) {
|
if (!stop) {
|
||||||
stop = true;
|
stop = true;
|
||||||
|
@ -43,8 +43,7 @@ class NotificationBell extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey
|
return apiNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getNotifications() {
|
async getNotifications() {
|
||||||
@ -69,8 +68,7 @@ class NotificationBell extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const data = await response.json()
|
return await response.json()
|
||||||
return data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stop && !this.showNotifications) {
|
if (!stop && !this.showNotifications) {
|
||||||
@ -97,25 +95,41 @@ class NotificationBell extends connect(store)(LitElement) {
|
|||||||
if (!this.initialFetch && notificationsToShow.length > 0) {
|
if (!this.initialFetch && notificationsToShow.length > 0) {
|
||||||
const mail = notificationsToShow[0]
|
const mail = notificationsToShow[0]
|
||||||
const urlPic = `${nodeUrl}/arbitrary/THUMBNAIL/${mail.name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
const urlPic = `${nodeUrl}/arbitrary/THUMBNAIL/${mail.name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||||
routes.showNotification({
|
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 } }
|
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) {
|
} else if (notificationsToShow.length > 0) {
|
||||||
if (notificationsToShow[0].created > (this.notifications[0]?.created || 0)) {
|
if (notificationsToShow[0].created > (this.notifications[0]?.created || 0)) {
|
||||||
const mail = notificationsToShow[0]
|
const mail = notificationsToShow[0]
|
||||||
const urlPic = `${nodeUrl}/arbitrary/THUMBNAIL/${mail.name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
const urlPic = `${nodeUrl}/arbitrary/THUMBNAIL/${mail.name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||||
routes.showNotification({
|
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 } }
|
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
|
this.notifications = notificationsToShow
|
||||||
|
|
||||||
if (this.notifications.length === 0) {
|
this.notificationCount = this.notifications.length !== 0;
|
||||||
this.notificationCount = false
|
|
||||||
} else {
|
|
||||||
this.notificationCount = true
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.initialFetch) this.initialFetch = true
|
if (!this.initialFetch) this.initialFetch = true
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
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 snackbar from '../functional-components/snackbar.js'
|
||||||
|
|
||||||
import '@polymer/paper-icon-button/paper-icon-button.js'
|
import '@polymer/paper-icon-button/paper-icon-button.js'
|
||||||
@ -118,7 +118,7 @@ class SearchModal extends LitElement {
|
|||||||
dismiss: true
|
dismiss: true
|
||||||
})
|
})
|
||||||
this.shadowRoot.getElementById('searchContent').value = this.searchContentString
|
this.shadowRoot.getElementById('searchContent').value = this.searchContentString
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
let sendInfoAddress = this.shadowRoot.getElementById('searchContent').value
|
let sendInfoAddress = this.shadowRoot.getElementById('searchContent').value
|
||||||
const infoDialog = document.getElementById('main-app').shadowRoot.querySelector('app-view').shadowRoot.querySelector('user-info-view')
|
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 {css, html, LitElement} from 'lit'
|
||||||
import { connect } from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import { store } from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import { get, translate } from '../../../translate/index.js'
|
import {get, translate} from '../../../translate'
|
||||||
|
|
||||||
class AccountView extends connect(store)(LitElement) {
|
class AccountView extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -127,8 +127,7 @@ class AccountView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey
|
return apiNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stateChanged(state) {
|
stateChanged(state) {
|
||||||
@ -136,4 +135,4 @@ class AccountView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.customElements.define('account-view', AccountView)
|
window.customElements.define('account-view', AccountView)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import { Epml } from '../../epml.js'
|
import {Epml} from '../../epml.js'
|
||||||
import { addTradeBotRoutes } from '../../tradebot/addTradeBotRoutes.js'
|
import {addTradeBotRoutes} from '../../tradebot/addTradeBotRoutes.js'
|
||||||
import {get, translate} from '../../../translate/index.js'
|
import {get, translate} from '../../../translate'
|
||||||
import snackbar from '../../functional-components/snackbar.js'
|
import snackbar from '../../functional-components/snackbar.js'
|
||||||
import FileSaver from 'file-saver'
|
import FileSaver from 'file-saver'
|
||||||
|
|
||||||
@ -427,7 +427,7 @@ class ExportKeys extends connect(store)(LitElement) {
|
|||||||
addTradeBotRoutes(parentEpml)
|
addTradeBotRoutes(parentEpml)
|
||||||
parentEpml.imReady()
|
parentEpml.imReady()
|
||||||
await this.fetchArrrWalletAddress()
|
await this.fetchArrrWalletAddress()
|
||||||
this.checkArrrWalletPrivateKey()
|
await this.checkArrrWalletPrivateKey()
|
||||||
}
|
}
|
||||||
|
|
||||||
async fetchArrrWalletAddress() {
|
async fetchArrrWalletAddress() {
|
||||||
@ -518,10 +518,10 @@ class ExportKeys extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
if (resRepair != null && resRepair.error != 128) {
|
if (resRepair != null && resRepair.error != 128) {
|
||||||
this.shadowRoot.querySelector('#pleaseWaitDialog').close()
|
this.shadowRoot.querySelector('#pleaseWaitDialog').close()
|
||||||
this.openOkDialog()
|
await this.openOkDialog()
|
||||||
} else {
|
} else {
|
||||||
this.shadowRoot.querySelector('#pleaseWaitDialog').close()
|
this.shadowRoot.querySelector('#pleaseWaitDialog').close()
|
||||||
this.openErrorDialog()
|
await this.openErrorDialog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,7 +558,7 @@ class ExportKeys extends connect(store)(LitElement) {
|
|||||||
const myCoinAddress = cAddress
|
const myCoinAddress = cAddress
|
||||||
const blob = new Blob([`${myPrivateMasterKey}`], { type: 'text/plain;charset=utf-8' })
|
const blob = new Blob([`${myPrivateMasterKey}`], { type: 'text/plain;charset=utf-8' })
|
||||||
exportname = "Private_Master_Key_" + myCoinName + "_" + myCoinAddress + ".txt"
|
exportname = "Private_Master_Key_" + myCoinName + "_" + myCoinAddress + ".txt"
|
||||||
this.saveFileToDisk(blob, exportname)
|
await this.saveFileToDisk(blob, exportname)
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveFileToDisk(blob, fileName) {
|
async saveFileToDisk(blob, fileName) {
|
||||||
@ -590,8 +590,7 @@ class ExportKeys extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey
|
return apiNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import {connect} from 'pwa-helpers'
|
|||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import {allowShowSyncIndicator, removeShowSyncIndicator} from '../../redux/app/app-actions.js'
|
import {allowShowSyncIndicator, removeShowSyncIndicator} from '../../redux/app/app-actions.js'
|
||||||
import {doSetQChatNotificationConfig} from '../../redux/user/user-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 isElectron from 'is-electron'
|
||||||
|
|
||||||
import '@material/mwc-checkbox'
|
import '@material/mwc-checkbox'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
import '@material/mwc-textfield'
|
import '@material/mwc-textfield'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
|
@ -10,7 +10,7 @@ import {
|
|||||||
removeQAPPAutoLists,
|
removeQAPPAutoLists,
|
||||||
setIsOpenDevDialog
|
setIsOpenDevDialog
|
||||||
} from '../../redux/app/app-actions.js'
|
} 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 snackbar from '../../functional-components/snackbar.js'
|
||||||
import FileSaver from 'file-saver'
|
import FileSaver from 'file-saver'
|
||||||
|
|
||||||
@ -232,7 +232,7 @@ class SecurityView extends connect(store)(LitElement) {
|
|||||||
const dataString = JSON.stringify(data)
|
const dataString = JSON.stringify(data)
|
||||||
const blob = new Blob([dataString], { type: 'text/plain;charset=utf-8' })
|
const blob = new Blob([dataString], { type: 'text/plain;charset=utf-8' })
|
||||||
backupname = "qortal_backup_" + state.app.selectedAddress.address + ".json"
|
backupname = "qortal_backup_" + state.app.selectedAddress.address + ".json"
|
||||||
this.saveFileToDisk(blob, backupname)
|
await this.saveFileToDisk(blob, backupname)
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveFileToDisk(blob, fileName) {
|
async saveFileToDisk(blob, fileName) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
import '@polymer/paper-dialog/paper-dialog.js'
|
import '@polymer/paper-dialog/paper-dialog.js'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
|
@ -8,7 +8,7 @@ import {repeat} from 'lit/directives/repeat.js';
|
|||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
import {setIsOpenDevDialog, setNewTab} from '../redux/app/app-actions.js'
|
import {setIsOpenDevDialog, setNewTab} from '../redux/app/app-actions.js'
|
||||||
import FileSaver from 'file-saver'
|
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-button'
|
||||||
import '@material/mwc-dialog'
|
import '@material/mwc-dialog'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
@ -19,7 +19,7 @@ import '@polymer/paper-dialog/paper-dialog.js'
|
|||||||
import '@vaadin/grid'
|
import '@vaadin/grid'
|
||||||
import '@vaadin/text-field'
|
import '@vaadin/text-field'
|
||||||
import '../custom-elements/frag-file-input.js'
|
import '../custom-elements/frag-file-input.js'
|
||||||
import { defaultQappsTabs } from '../data/defaultQapps.js'
|
import {defaultQappsTabs} from '../data/defaultQapps.js'
|
||||||
|
|
||||||
registerTranslateConfig({
|
registerTranslateConfig({
|
||||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
||||||
@ -842,7 +842,7 @@ class ShowPlugin extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
store.dispatch(setNewTab(null))
|
store.dispatch(setNewTab(null))
|
||||||
} else if (!this.tabs.find((tab) => tab.id === newTab.id)) {
|
} else if (!this.tabs.find((tab) => tab.id === newTab.id)) {
|
||||||
this.addTab(newTab)
|
await this.addTab(newTab)
|
||||||
this.currentTab = this.tabs.length - 1
|
this.currentTab = this.tabs.length - 1
|
||||||
store.dispatch(setNewTab(null))
|
store.dispatch(setNewTab(null))
|
||||||
//clear newTab
|
//clear newTab
|
||||||
@ -1473,8 +1473,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
res()
|
res()
|
||||||
}, 1000);
|
}, 1000);
|
||||||
})
|
})
|
||||||
const detail = event.detail
|
this.myMenuPlugins = event.detail
|
||||||
this.myMenuPlugins = detail
|
|
||||||
const addressInfo = this.addressInfo
|
const addressInfo = this.addressInfo
|
||||||
const isMinter = addressInfo?.error !== 124 && +addressInfo?.level > 0
|
const isMinter = addressInfo?.error !== 124 && +addressInfo?.level > 0
|
||||||
const isSponsor = +addressInfo?.level >= 5
|
const isSponsor = +addressInfo?.level >= 5
|
||||||
@ -1588,11 +1587,9 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getMyFollowedNames() {
|
async getMyFollowedNames() {
|
||||||
let myFollowedNames = await parentEpml.request('apiCall', {
|
this.myFollowedNames = await parentEpml.request('apiCall', {
|
||||||
url: `/lists/followedNames?apiKey=${this.getApiKey()}`
|
url: `/lists/followedNames?apiKey=${this.getApiKey()}`
|
||||||
})
|
})
|
||||||
|
|
||||||
this.myFollowedNames = myFollowedNames
|
|
||||||
}
|
}
|
||||||
|
|
||||||
searchNameKeyListener(e) {
|
searchNameKeyListener(e) {
|
||||||
@ -1692,7 +1689,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
let err3string = get("appspage.schange22")
|
let err3string = get("appspage.schange22")
|
||||||
parentEpml.request('showSnackBar', `${err3string}`)
|
parentEpml.request('showSnackBar', `${err3string}`)
|
||||||
}
|
}
|
||||||
this.getMyFollowedNamesList()
|
await this.getMyFollowedNamesList()
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1718,7 +1715,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
let err4string = get("appspage.schange23")
|
let err4string = get("appspage.schange23")
|
||||||
parentEpml.request('showSnackBar', `${err4string}`)
|
parentEpml.request('showSnackBar', `${err4string}`)
|
||||||
}
|
}
|
||||||
this.getMyFollowedNamesList()
|
await this.getMyFollowedNamesList()
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1995,11 +1992,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
this.myPluginNameRes = res
|
this.myPluginNameRes = res
|
||||||
})
|
})
|
||||||
|
|
||||||
if (this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0) {
|
myPluginName = !(this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0);
|
||||||
myPluginName = false
|
|
||||||
} else {
|
|
||||||
myPluginName = true
|
|
||||||
}
|
|
||||||
return myPluginName
|
return myPluginName
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2060,11 +2053,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
this.myPluginNameRes = res
|
this.myPluginNameRes = res
|
||||||
})
|
})
|
||||||
|
|
||||||
if (this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0 ) {
|
myPluginName = !(this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0);
|
||||||
myPluginName = false
|
|
||||||
} else {
|
|
||||||
myPluginName = true
|
|
||||||
}
|
|
||||||
return myPluginName
|
return myPluginName
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2406,7 +2395,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
async handlePasteLink(e) {
|
async handlePasteLink(e) {
|
||||||
try {
|
try {
|
||||||
const value = this.shadowRoot.getElementById('linkInput').value
|
const value = this.shadowRoot.getElementById('linkInput').value
|
||||||
this.getQuery(value)
|
await this.getQuery(value)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2415,7 +2404,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
if (e.key === 'Enter') {
|
if (e.key === 'Enter') {
|
||||||
try {
|
try {
|
||||||
const value = this.shadowRoot.getElementById('linkInput').value
|
const value = this.shadowRoot.getElementById('linkInput').value
|
||||||
this.getQuery(value)
|
await this.getQuery(value)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2423,8 +2412,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey
|
return apiNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isEmptyArray(arr) {
|
isEmptyArray(arr) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import {connect} from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import {store} from '../store.js';
|
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 {asyncReplace} from 'lit/directives/async-replace.js';
|
||||||
|
|
||||||
import '../functional-components/my-button.js';
|
import '../functional-components/my-button.js';
|
||||||
@ -235,9 +235,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
const url = `${nodeUrl}/admin/mintingaccounts`;
|
const url = `${nodeUrl}/admin/mintingaccounts`;
|
||||||
try {
|
try {
|
||||||
const res = await fetch(url);
|
const res = await fetch(url);
|
||||||
const mintingAccountData = await res.json();
|
this.mintingAccountData = await res.json();
|
||||||
|
|
||||||
this.mintingAccountData = mintingAccountData;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.errorMsg = this.renderErrorMsg1();
|
this.errorMsg = this.renderErrorMsg1();
|
||||||
}
|
}
|
||||||
@ -286,14 +284,14 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await addMintingAccount(this.privateRewardShareKey);
|
await addMintingAccount(this.privateRewardShareKey);
|
||||||
routes.showSnackBar({
|
await routes.showSnackBar({
|
||||||
data: translate('becomeMinterPage.bchange19'),
|
data: translate('becomeMinterPage.bchange19'),
|
||||||
});
|
});
|
||||||
this.status = 5;
|
this.status = 5;
|
||||||
this.getMintingAcccounts();
|
await this.getMintingAcccounts();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.errorMsg = this.renderErrorMsg3();
|
this.errorMsg = this.renderErrorMsg3();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,8 +309,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
const rewardShares = async (minterAddr) => {
|
const rewardShares = async (minterAddr) => {
|
||||||
const url = `${nodeUrl}/addresses/rewardshares?minters=${minterAddr}&recipients=${minterAddr}`;
|
const url = `${nodeUrl}/addresses/rewardshares?minters=${minterAddr}&recipients=${minterAddr}`;
|
||||||
const res = await fetch(url);
|
const res = await fetch(url);
|
||||||
const data = await res.json();
|
return await res.json();
|
||||||
return data;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!stop) {
|
if (!stop) {
|
||||||
@ -352,7 +349,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
let rewarddialog3 = get('transactions.rewarddialog3');
|
let rewarddialog3 = get('transactions.rewarddialog3');
|
||||||
let rewarddialog4 = get('transactions.rewarddialog4');
|
let rewarddialog4 = get('transactions.rewarddialog4');
|
||||||
|
|
||||||
let myTxnrequest = await routes.transaction({
|
return await routes.transaction({
|
||||||
data: {
|
data: {
|
||||||
type: 38,
|
type: 38,
|
||||||
nonce: nonce,
|
nonce: nonce,
|
||||||
@ -368,7 +365,6 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
},
|
},
|
||||||
disableModal: true,
|
disableModal: true,
|
||||||
});
|
});
|
||||||
return myTxnrequest;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const getTxnRequestResponse = (txnResponse) => {
|
const getTxnRequestResponse = (txnResponse) => {
|
||||||
@ -404,8 +400,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
const getLastRef = async () => {
|
const getLastRef = async () => {
|
||||||
const url = `${nodeUrl}/addresses/lastreference/${address}`;
|
const url = `${nodeUrl}/addresses/lastreference/${address}`;
|
||||||
const res = await fetch(url);
|
const res = await fetch(url);
|
||||||
const data = await res.text();
|
return await res.text();
|
||||||
return data;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const startMinting = async () => {
|
const startMinting = async () => {
|
||||||
@ -422,11 +417,11 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
this.privateRewardShareKey = await createSponsorshipKey();
|
this.privateRewardShareKey = await createSponsorshipKey();
|
||||||
this.confirmRelationship(publicAddress)
|
await this.confirmRelationship(publicAddress)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log({ error })
|
console.log({ error })
|
||||||
this.errorMsg = (error && error.data && error.data.message) ? error.data.message : this.renderErrorMsg4();
|
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 () => {
|
.onClick=${async () => {
|
||||||
await startMinting();
|
await startMinting();
|
||||||
if (this.errorMsg) {
|
if (this.errorMsg) {
|
||||||
routes.showSnackBar({
|
await routes.showSnackBar({
|
||||||
data: this.errorMsg,
|
data: this.errorMsg,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
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/paper-icon-button/paper-icon-button.js'
|
||||||
import '@polymer/iron-icons/image-icons.js'
|
import '@polymer/iron-icons/image-icons.js'
|
||||||
import '@polymer/iron-icons/iron-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 {render} from 'lit/html.js'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
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 '@polymer/paper-dialog/paper-dialog.js'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
@ -1374,13 +1374,11 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
const fromNameUrl = `${nodeUrl}/names/${fromName}`
|
const fromNameUrl = `${nodeUrl}/names/${fromName}`
|
||||||
|
|
||||||
const qortalNameInfo = await fetch(fromNameUrl).then(response => {
|
this.nameAddressResult = await fetch(fromNameUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.nameAddressResult = qortalNameInfo
|
|
||||||
const nameAddress = this.nameAddressResult.owner
|
const nameAddress = this.nameAddressResult.owner
|
||||||
this.getAllWithAddress(nameAddress)
|
await this.getAllWithAddress(nameAddress)
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAllWithAddress(myAddress) {
|
async getAllWithAddress(myAddress) {
|
||||||
@ -1401,11 +1399,9 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
const infoAddressUrl = `${nodeUrl}/addresses/${infoAddress}`
|
const infoAddressUrl = `${nodeUrl}/addresses/${infoAddress}`
|
||||||
|
|
||||||
const qortalAddressInfo = await fetch(infoAddressUrl).then(response => {
|
this.addressResult = await fetch(infoAddressUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.addressResult = qortalAddressInfo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAddressUserAvatar(avatarAddress) {
|
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 = `${nodeUrl}/arbitrary/THUMBNAIL/${this.imageName}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||||
this.imageUrl = myImageUrl
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAddressUserBalance(balanceAddress) {
|
async getAddressUserBalance(balanceAddress) {
|
||||||
@ -1451,19 +1446,15 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
|
|
||||||
if (checkBlocks === 0) {
|
if (checkBlocks === 0) {
|
||||||
let noMinterString = get("explorerpage.exp16")
|
this.startMintTime = get("explorerpage.exp16")
|
||||||
this.startMintTime = noMinterString
|
|
||||||
} else {
|
} else {
|
||||||
const rewardshareUrl = `${nodeUrl}/transactions/search?txType=REWARD_SHARE&address=${mintAddress}&confirmationStatus=CONFIRMED&limit=1&reverse=false`
|
const rewardshareUrl = `${nodeUrl}/transactions/search?txType=REWARD_SHARE&address=${mintAddress}&confirmationStatus=CONFIRMED&limit=1&reverse=false`
|
||||||
|
|
||||||
const startMinting = await fetch(rewardshareUrl).then(response => {
|
this.startMinting = await fetch(rewardshareUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.startMinting = startMinting
|
this.startMintTime = new Date(this.startMinting[0].timestamp).toLocaleDateString()
|
||||||
|
|
||||||
const mintString = new Date(this.startMinting[0].timestamp).toLocaleDateString()
|
|
||||||
this.startMintTime = mintString
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1928,9 +1919,8 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node];
|
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey;
|
return apiNode.apiKey
|
||||||
return apiKey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isEmptyArray(arr) {
|
isEmptyArray(arr) {
|
||||||
@ -1941,8 +1931,7 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
round(number) {
|
round(number) {
|
||||||
let result = (Math.round(parseFloat(number) * 1e8) / 1e8).toFixed(8)
|
return (Math.round(parseFloat(number) * 1e8) / 1e8).toFixed(8)
|
||||||
return result
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,8 +111,7 @@ class WalletProfile extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey
|
return apiNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stateChanged(state) {
|
stateChanged(state) {
|
||||||
|
@ -3,7 +3,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
|
|
||||||
import {translate} from '../../translate/index.js'
|
import {translate} from '../../translate'
|
||||||
|
|
||||||
class FragFileInput extends LitElement {
|
class FragFileInput extends LitElement {
|
||||||
static get properties () {
|
static get properties () {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../store.js'
|
import {store} from '../store.js'
|
||||||
import {get, translate} from '../../translate/index.js'
|
import {get, translate} from '../../translate'
|
||||||
|
|
||||||
import {listenForRequest} from '../transactionRequest.js'
|
import {listenForRequest} from '../transactionRequest.js'
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../store.js'
|
import {store} from '../store.js'
|
||||||
import {testApiKey} from '../apiKeyUtils.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-dialog'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../store.js'
|
import {store} from '../store.js'
|
||||||
import {doAddNode, doEditNode, doLoadNodeConfig, doRemoveNode, doSetNode} from '../redux/app/app-actions.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 snackbar from './snackbar.js'
|
||||||
import '../components/language-selector.js'
|
import '../components/language-selector.js'
|
||||||
import '../custom-elements/frag-file-input.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
|
// Set the selected value for mwc-select
|
||||||
const protocolList = dialog.querySelector('#protocolList')
|
const protocolList = dialog.querySelector('#protocolList')
|
||||||
const desiredProtocol = currentValues.protocol
|
protocolList.value = currentValues.protocol
|
||||||
protocolList.value = desiredProtocol
|
|
||||||
this.isBeingEdited = true
|
this.isBeingEdited = true
|
||||||
this.isBeingEditedIndex = index
|
this.isBeingEditedIndex = index
|
||||||
this.shadowRoot.querySelector('#addNodeDialog').show()
|
this.shadowRoot.querySelector('#addNodeDialog').show()
|
||||||
|
@ -171,9 +171,7 @@ export const newMessageNotificationQappLocal = (data) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
notify.onclick = async(e) => {
|
notify.onclick = async(e) => {
|
||||||
const url = data?.url
|
let newQuery = data?.url;
|
||||||
const value = url
|
|
||||||
let newQuery = value;
|
|
||||||
if (newQuery.endsWith('/')) {
|
if (newQuery.endsWith('/')) {
|
||||||
newQuery = newQuery.slice(0, -1);
|
newQuery = newQuery.slice(0, -1);
|
||||||
}
|
}
|
||||||
@ -217,9 +215,7 @@ export const newMessageNotificationQappLocal = (data) => {
|
|||||||
const notify = new Notification(data.title, data.options)
|
const notify = new Notification(data.title, data.options)
|
||||||
|
|
||||||
notify.onclick = async(e) => {
|
notify.onclick = async(e) => {
|
||||||
const url = data?.url
|
let newQuery = data?.url;
|
||||||
const value = url
|
|
||||||
let newQuery = value;
|
|
||||||
if (newQuery.endsWith('/')) {
|
if (newQuery.endsWith('/')) {
|
||||||
newQuery = newQuery.slice(0, -1);
|
newQuery = newQuery.slice(0, -1);
|
||||||
}
|
}
|
||||||
|
@ -198,11 +198,8 @@ export const routes = {
|
|||||||
|
|
||||||
username: async (req) => {
|
username: async (req) => {
|
||||||
const state = store.getState()
|
const state = store.getState()
|
||||||
const username =
|
return state.user.storedWallets[state.app.wallet.addresses[0].address]
|
||||||
state.user.storedWallets[state.app.wallet.addresses[0].address]
|
.name
|
||||||
.name
|
|
||||||
|
|
||||||
return username
|
|
||||||
},
|
},
|
||||||
|
|
||||||
chat: async (req) => {
|
chat: async (req) => {
|
||||||
@ -343,9 +340,7 @@ export const routes = {
|
|||||||
tradeBotRespondRequest: async (req) => {
|
tradeBotRespondRequest: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await tradeBotRespondRequest(req.data)
|
response = await tradeBotRespondRequest(req.data)
|
||||||
|
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -385,10 +380,9 @@ export const routes = {
|
|||||||
cancelAllOffers: async (req) => {
|
cancelAllOffers: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await cancelAllOffers(
|
response = await cancelAllOffers(
|
||||||
store.getState().app.selectedAddress
|
store.getState().app.selectedAddress
|
||||||
)
|
)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -400,8 +394,7 @@ export const routes = {
|
|||||||
sendBtc: async (req) => {
|
sendBtc: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await sendBtc(req.data)
|
response = await sendBtc(req.data)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -413,8 +406,7 @@ export const routes = {
|
|||||||
sendLtc: async (req) => {
|
sendLtc: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await sendLtc(req.data)
|
response = await sendLtc(req.data)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -426,8 +418,7 @@ export const routes = {
|
|||||||
sendDoge: async (req) => {
|
sendDoge: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await sendDoge(req.data)
|
response = await sendDoge(req.data)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -439,8 +430,7 @@ export const routes = {
|
|||||||
sendDgb: async (req) => {
|
sendDgb: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await sendDgb(req.data)
|
response = await sendDgb(req.data)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -452,8 +442,7 @@ export const routes = {
|
|||||||
sendRvn: async (req) => {
|
sendRvn: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await sendRvn(req.data)
|
response = await sendRvn(req.data)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -465,8 +454,7 @@ export const routes = {
|
|||||||
sendArrr: async (req) => {
|
sendArrr: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await sendArrr(req.data)
|
response = await sendArrr(req.data)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
|
@ -114,8 +114,7 @@ export const routes = {
|
|||||||
store.getState().app.selectedAddress.keyPair
|
store.getState().app.selectedAddress.keyPair
|
||||||
)
|
)
|
||||||
|
|
||||||
const res = await processTransaction(signedTxnBytes)
|
response = await processTransaction(signedTxnBytes)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -127,8 +126,7 @@ export const routes = {
|
|||||||
tradeBotRespondRequest: async (req) => {
|
tradeBotRespondRequest: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await tradeBotRespondRequest(req.data)
|
response = await tradeBotRespondRequest(req.data)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -147,9 +145,7 @@ export const routes = {
|
|||||||
store.getState().app.selectedAddress.keyPair
|
store.getState().app.selectedAddress.keyPair
|
||||||
)
|
)
|
||||||
|
|
||||||
const res = await processTransaction(signedTxnBytes)
|
response = await processTransaction(signedTxnBytes)
|
||||||
|
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -161,10 +157,9 @@ export const routes = {
|
|||||||
cancelAllOffers: async (req) => {
|
cancelAllOffers: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await cancelAllOffers(
|
response = await cancelAllOffers(
|
||||||
store.getState().app.selectedAddress
|
store.getState().app.selectedAddress
|
||||||
)
|
)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -176,8 +171,7 @@ export const routes = {
|
|||||||
sendBtc: async (req) => {
|
sendBtc: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await sendBtc(req.data)
|
response = await sendBtc(req.data)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -189,8 +183,7 @@ export const routes = {
|
|||||||
sendLtc: async (req) => {
|
sendLtc: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await sendLtc(req.data)
|
response = await sendLtc(req.data)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -202,8 +195,7 @@ export const routes = {
|
|||||||
sendDoge: async (req) => {
|
sendDoge: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await sendDoge(req.data)
|
response = await sendDoge(req.data)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -215,8 +207,7 @@ export const routes = {
|
|||||||
sendDgb: async (req) => {
|
sendDgb: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await sendDgb(req.data)
|
response = await sendDgb(req.data)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -228,8 +219,7 @@ export const routes = {
|
|||||||
sendRvn: async (req) => {
|
sendRvn: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await sendRvn(req.data)
|
response = await sendRvn(req.data)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -241,8 +231,7 @@ export const routes = {
|
|||||||
sendArrr: async (req) => {
|
sendArrr: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await sendArrr(req.data)
|
response = await sendArrr(req.data)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
|
@ -17,20 +17,15 @@ const uiCoreController = (type) => {
|
|||||||
const { createServer } = require('./server/server.js')
|
const { createServer } = require('./server/server.js')
|
||||||
return createServer
|
return createServer
|
||||||
case BUILD:
|
case BUILD:
|
||||||
const build = require('./tooling/build.js')
|
return require('./tooling/build.js')
|
||||||
return build
|
|
||||||
case WATCH:
|
case WATCH:
|
||||||
const watch = require('./tooling/watch.js')
|
return require('./tooling/watch.js')
|
||||||
return watch
|
|
||||||
case WATCH_INLINE:
|
case WATCH_INLINE:
|
||||||
const watchInlines = require('./tooling/watch-inlines.js')
|
return require('./tooling/watch-inlines.js')
|
||||||
return watchInlines
|
|
||||||
case DEFAULT_CONFIG:
|
case DEFAULT_CONFIG:
|
||||||
const defaultConfig = require('./config/config.js')
|
return require('./config/config.js')
|
||||||
return defaultConfig
|
|
||||||
case GENERATE_BUILD_CONFIG:
|
case GENERATE_BUILD_CONFIG:
|
||||||
const generateBuildConfig = require('./tooling/generateBuildConfig.js')
|
return require('./tooling/generateBuildConfig.js')
|
||||||
return generateBuildConfig
|
|
||||||
default:
|
default:
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -309,8 +309,7 @@ export default class AltcoinHDWallet {
|
|||||||
|
|
||||||
// PublicKey Hash
|
// PublicKey Hash
|
||||||
const publicKeySHA256 = new Sha256().process(new Uint8Array(this.publicKey)).finish().result
|
const publicKeySHA256 = new Sha256().process(new Uint8Array(this.publicKey)).finish().result
|
||||||
const _publicKeyHash = new RIPEMD160().update(Buffer.from(publicKeySHA256)).digest('hex')
|
this.publicKeyHash = new RIPEMD160().update(Buffer.from(publicKeySHA256)).digest('hex')
|
||||||
this.publicKeyHash = _publicKeyHash
|
|
||||||
}
|
}
|
||||||
|
|
||||||
generateMainnetMasterPrivateKey() {
|
generateMainnetMasterPrivateKey() {
|
||||||
@ -505,8 +504,7 @@ export default class AltcoinHDWallet {
|
|||||||
|
|
||||||
// PublicKey Hash
|
// PublicKey Hash
|
||||||
const childPublicKeySHA256 = new Sha256().process(new Uint8Array(this.childPublicKey)).finish().result
|
const childPublicKeySHA256 = new Sha256().process(new Uint8Array(this.childPublicKey)).finish().result
|
||||||
const _childPublicKeyHash = new RIPEMD160().update(Buffer.from(childPublicKeySHA256)).digest('hex')
|
this.childPublicKeyHash = new RIPEMD160().update(Buffer.from(childPublicKeySHA256)).digest('hex')
|
||||||
this.childPublicKeyHash = _childPublicKeyHash
|
|
||||||
|
|
||||||
|
|
||||||
// Call deriveExtendedPublicChildKey // WIll be hardcoding the values...
|
// Call deriveExtendedPublicChildKey // WIll be hardcoding the values...
|
||||||
@ -658,8 +656,7 @@ export default class AltcoinHDWallet {
|
|||||||
|
|
||||||
// PublicKey Hash
|
// PublicKey Hash
|
||||||
const grandChildPublicKeySHA256 = new Sha256().process(new Uint8Array(this.grandChildPublicKey)).finish().result
|
const grandChildPublicKeySHA256 = new Sha256().process(new Uint8Array(this.grandChildPublicKey)).finish().result
|
||||||
const _grandChildPublicKeyHash = new RIPEMD160().update(Buffer.from(grandChildPublicKeySHA256)).digest('hex')
|
this.grandChildPublicKeyHash = new RIPEMD160().update(Buffer.from(grandChildPublicKeySHA256)).digest('hex')
|
||||||
this.grandChildPublicKeyHash = _grandChildPublicKeyHash
|
|
||||||
|
|
||||||
|
|
||||||
// Call deriveExtendedPublicChildKey // WIll be hardcoding the values...
|
// Call deriveExtendedPublicChildKey // WIll be hardcoding the values...
|
||||||
|
@ -24,6 +24,5 @@ export const createWallet = async (sourceType, source, statusUpdateFn) => {
|
|||||||
throw 'sourceType ' + sourceType + ' not recognized'
|
throw 'sourceType ' + sourceType + ' not recognized'
|
||||||
}
|
}
|
||||||
|
|
||||||
const wallet = new PhraseWallet(seed, version)
|
return new PhraseWallet(seed, version)
|
||||||
return wallet
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Base58 from './deps/Base58.js'
|
import Base58 from './deps/Base58.js'
|
||||||
import {kdf} from './kdf.js'
|
import {kdf} from './kdf.js'
|
||||||
import {AES_CBC, HmacSha512} from 'asmcrypto.js'
|
import {AES_CBC, HmacSha512} from 'asmcrypto.js'
|
||||||
import {get, registerTranslateConfig} from '../../core/translate/index.js'
|
import {get, registerTranslateConfig} from '../../core/translate'
|
||||||
|
|
||||||
registerTranslateConfig({
|
registerTranslateConfig({
|
||||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
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")
|
const sfn5 = get("login.lp16")
|
||||||
statusFn(sfn5)
|
statusFn(sfn5)
|
||||||
const decryptedBytes = AES_CBC.decrypt(encryptedSeedBytes, encryptionKey, false, iv)
|
return AES_CBC.decrypt(encryptedSeedBytes, encryptionKey, false, iv)
|
||||||
return decryptedBytes
|
|
||||||
}
|
}
|
||||||
|
@ -14,11 +14,10 @@ Base64.decode = function (string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const decoder = new TextDecoder();
|
const decoder = new TextDecoder();
|
||||||
const decodedString = decoder.decode(bytes);
|
return decoder.decode(bytes);
|
||||||
return decodedString;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default Base64;
|
export default Base64;
|
||||||
|
@ -593,7 +593,7 @@
|
|||||||
}
|
}
|
||||||
dst(c1);
|
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.
|
// Zero length arguments are considered not equal.
|
||||||
if (x.length === 0 || y.length === 0) return false;
|
if (x.length === 0 || y.length === 0) return false;
|
||||||
if (x.length !== y.length) 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) {
|
nacl.setPRNG = function(fn) {
|
||||||
@ -2419,4 +2419,4 @@ nacl.setPRNG = function(fn) {
|
|||||||
|
|
||||||
// == CHANGE TO ES6 EXPORT == //
|
// == CHANGE TO ES6 EXPORT == //
|
||||||
//})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {}));
|
//})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {}));
|
||||||
export default nacl
|
export default nacl
|
||||||
|
@ -21,8 +21,7 @@ export async function request(url, options) {
|
|||||||
body,
|
body,
|
||||||
}).then(async (response) => {
|
}).then(async (response) => {
|
||||||
try {
|
try {
|
||||||
const json = await response.clone().json()
|
return await response.clone().json()
|
||||||
return json
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return await response.text()
|
return await response.text()
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ import {store} from '../api_deps.js'
|
|||||||
import {stateAwait} from './utils/stateAwait.js'
|
import {stateAwait} from './utils/stateAwait.js'
|
||||||
import {Sha512} from 'asmcrypto.js'
|
import {Sha512} from 'asmcrypto.js'
|
||||||
import utils from '../api/deps/utils.js'
|
import utils from '../api/deps/utils.js'
|
||||||
import {get, registerTranslateConfig} from '../../core/translate/index.js'
|
import {get, registerTranslateConfig} from '../../core/translate'
|
||||||
|
|
||||||
registerTranslateConfig({
|
registerTranslateConfig({
|
||||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
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 signature = nacl.sign.detached(arbitraryBytesForSigningBuffer, keyPair.privateKey)
|
||||||
|
|
||||||
const signedBytes = utils.appendBuffer(arbitraryBytesBuffer, signature)
|
return utils.appendBuffer(arbitraryBytesBuffer, signature)
|
||||||
|
|
||||||
return signedBytes
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default signArbitrary
|
export default signArbitrary
|
||||||
|
@ -21,13 +21,11 @@ const signArbitraryWithFee = (arbitraryBytesBase58, arbitraryBytesForSigningBase
|
|||||||
const _arbitraryBytesForSigningBuffer = Object.keys(arbitraryBytesForSigning).map(function (key) { return arbitraryBytesForSigning[key]; })
|
const _arbitraryBytesForSigningBuffer = Object.keys(arbitraryBytesForSigning).map(function (key) { return arbitraryBytesForSigning[key]; })
|
||||||
const arbitraryBytesForSigningBuffer = new Uint8Array(_arbitraryBytesForSigningBuffer)
|
const arbitraryBytesForSigningBuffer = new Uint8Array(_arbitraryBytesForSigningBuffer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const signature = nacl.sign.detached(arbitraryBytesForSigningBuffer, keyPair.privateKey)
|
const signature = nacl.sign.detached(arbitraryBytesForSigningBuffer, keyPair.privateKey)
|
||||||
|
|
||||||
const signedBytes = utils.appendBuffer(arbitraryBytesBuffer, signature)
|
return utils.appendBuffer(arbitraryBytesBuffer, signature)
|
||||||
|
|
||||||
return signedBytes
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default signArbitraryWithFee
|
export default signArbitraryWithFee
|
||||||
|
@ -25,18 +25,14 @@ const signChat = (chatBytes, nonce, keyPair) => {
|
|||||||
|
|
||||||
const signature = nacl.sign.detached(chatBytesBuffer, keyPair.privateKey)
|
const signature = nacl.sign.detached(chatBytesBuffer, keyPair.privateKey)
|
||||||
|
|
||||||
const signedBytes = utils.appendBuffer(chatBytesBuffer, signature)
|
return utils.appendBuffer(chatBytesBuffer, signature)
|
||||||
|
|
||||||
return signedBytes
|
|
||||||
} else {
|
} else {
|
||||||
const chatBytesBuffer = new Uint8Array(chatBytes)
|
const chatBytesBuffer = new Uint8Array(chatBytes)
|
||||||
chatBytesBuffer.set(_nonce, 112)
|
chatBytesBuffer.set(_nonce, 112)
|
||||||
|
|
||||||
const signature = nacl.sign.detached(chatBytesBuffer, keyPair.privateKey)
|
const signature = nacl.sign.detached(chatBytesBuffer, keyPair.privateKey)
|
||||||
|
|
||||||
const signedBytes = utils.appendBuffer(chatBytesBuffer, signature)
|
return utils.appendBuffer(chatBytesBuffer, signature)
|
||||||
|
|
||||||
return signedBytes
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,14 +17,10 @@ const signTradeBotTransaction = (unsignedTxn, keyPair) => {
|
|||||||
const _privateKey = Object.keys(keyPair.privateKey).map(function (key) { return keyPair.privateKey[key]; })
|
const _privateKey = Object.keys(keyPair.privateKey).map(function (key) { return keyPair.privateKey[key]; })
|
||||||
const privateKey = new Uint8Array(_privateKey)
|
const privateKey = new Uint8Array(_privateKey)
|
||||||
const signature = nacl.sign.detached(txnBuffer, privateKey)
|
const signature = nacl.sign.detached(txnBuffer, privateKey)
|
||||||
const signedBytes = utils.appendBuffer(txnBuffer, signature)
|
return utils.appendBuffer(txnBuffer, signature)
|
||||||
|
|
||||||
return signedBytes
|
|
||||||
} else {
|
} else {
|
||||||
const signature = nacl.sign.detached(txnBuffer, keyPair.privateKey)
|
const signature = nacl.sign.detached(txnBuffer, keyPair.privateKey)
|
||||||
const signedBytes = utils.appendBuffer(txnBuffer, signature)
|
return utils.appendBuffer(txnBuffer, signature)
|
||||||
|
|
||||||
return signedBytes
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,8 +9,7 @@ export const cancelAllOffers = async (requestObject) => {
|
|||||||
|
|
||||||
const getMyOpenOffers = async () => {
|
const getMyOpenOffers = async () => {
|
||||||
const res = await request('/crosschain/tradeoffers')
|
const res = await request('/crosschain/tradeoffers')
|
||||||
const myOpenTradeOrders = await res.filter(order => order.mode === "OFFERING" && order.qortalCreator === address)
|
return await res.filter(order => order.mode === "OFFERING" && order.qortalCreator === address)
|
||||||
return myOpenTradeOrders
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const myOpenOffers = await getMyOpenOffers()
|
const myOpenOffers = await getMyOpenOffers()
|
||||||
|
@ -3,6 +3,5 @@ import Base58 from '../deps/Base58.js'
|
|||||||
|
|
||||||
export const base58PublicKeyToAddress = (base58pubkey, qora = false) => {
|
export const base58PublicKeyToAddress = (base58pubkey, qora = false) => {
|
||||||
const decodePubKey = Base58.decode(base58pubkey)
|
const decodePubKey = Base58.decode(base58pubkey)
|
||||||
const address = publicKeyToAddress(decodePubKey, qora)
|
return publicKeyToAddress(decodePubKey, qora)
|
||||||
return address
|
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,6 @@ import Base58 from '../deps/Base58.js'
|
|||||||
export const validateAddress = (address) => {
|
export const validateAddress = (address) => {
|
||||||
const decodePubKey = Base58.decode(address)
|
const decodePubKey = Base58.decode(address)
|
||||||
|
|
||||||
if (!(decodePubKey instanceof Uint8Array && decodePubKey.length == 25)) {
|
return decodePubKey instanceof Uint8Array && decodePubKey.length == 25;
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
40
electron.js
40
electron.js
@ -168,11 +168,7 @@ function doesFileExist(urlToJavaFile) {
|
|||||||
xhr.open('HEAD', urlToJavaFile, true)
|
xhr.open('HEAD', urlToJavaFile, true)
|
||||||
xhr.send()
|
xhr.send()
|
||||||
|
|
||||||
if (xhr.status == "404") {
|
return xhr.status != "404";
|
||||||
return false
|
|
||||||
} else {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function checkWin() {
|
async function checkWin() {
|
||||||
@ -197,7 +193,7 @@ async function checkWin() {
|
|||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
} else {
|
} else {
|
||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -215,7 +211,7 @@ async function checkWin() {
|
|||||||
if (returnValue.response === 0) {
|
if (returnValue.response === 0) {
|
||||||
downloadWindows()
|
downloadWindows()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -227,7 +223,7 @@ async function checkOsPlatform() {
|
|||||||
} else if (process.platform === 'linux' || process.platform === 'darwin') {
|
} else if (process.platform === 'linux' || process.platform === 'darwin') {
|
||||||
startElectronUnix()
|
startElectronUnix()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,7 +248,7 @@ async function startElectronWin() {
|
|||||||
if (returnValue.response === 0) {
|
if (returnValue.response === 0) {
|
||||||
downloadWindows()
|
downloadWindows()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -279,7 +275,7 @@ function startElectronUnix() {
|
|||||||
if (returnValue.response === 0) {
|
if (returnValue.response === 0) {
|
||||||
downloadQortal()
|
downloadQortal()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -340,7 +336,7 @@ async function checkPort() {
|
|||||||
|
|
||||||
async function checkResponseStatus(res) {
|
async function checkResponseStatus(res) {
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
return
|
|
||||||
} else if (process.platform === 'win32') {
|
} else if (process.platform === 'win32') {
|
||||||
await checkWin()
|
await checkWin()
|
||||||
} else {
|
} else {
|
||||||
@ -382,7 +378,7 @@ async function javaversion() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
checkJava.stderr.on('end', () => {
|
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;
|
const javaVersion = new RegExp('(java|openjdk) version').test(datres) ? datres.split(' ')[2].replace(/"/g, '') : false;
|
||||||
log.info("Java Version", javaVersion)
|
log.info("Java Version", javaVersion)
|
||||||
if (javaVersion != false) {
|
if (javaVersion != false) {
|
||||||
@ -399,7 +395,7 @@ async function javaversion() {
|
|||||||
if (returnValue.response === 0) {
|
if (returnValue.response === 0) {
|
||||||
installJava()
|
installJava()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -706,7 +702,7 @@ function checkQortal() {
|
|||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
} else {
|
} else {
|
||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -724,7 +720,7 @@ function checkQortal() {
|
|||||||
if (returnValue.response === 0) {
|
if (returnValue.response === 0) {
|
||||||
downloadQortal()
|
downloadQortal()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -807,7 +803,7 @@ async function checkAndStart() {
|
|||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
} else {
|
} else {
|
||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -986,7 +982,7 @@ const editMenu = Menu.buildFromTemplate([
|
|||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
} else {
|
} else {
|
||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -1143,7 +1139,7 @@ const createTray = () => {
|
|||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
} else {
|
} else {
|
||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -1243,7 +1239,7 @@ if (!isLock) {
|
|||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
} else {
|
} else {
|
||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -1329,7 +1325,7 @@ if (!isLock) {
|
|||||||
})
|
})
|
||||||
dl.show()
|
dl.show()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -1351,7 +1347,7 @@ if (!isLock) {
|
|||||||
if (returnValue.response === 0) {
|
if (returnValue.response === 0) {
|
||||||
autoUpdater.quitAndInstall()
|
autoUpdater.quitAndInstall()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -1372,4 +1368,4 @@ if (!isLock) {
|
|||||||
process.on('uncaughtException', function (err) {
|
process.on('uncaughtException', function (err) {
|
||||||
log.info("*** WHOOPS TIME ***" + err)
|
log.info("*** WHOOPS TIME ***" + err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
536
package-lock.json
generated
536
package-lock.json
generated
@ -9,7 +9,7 @@
|
|||||||
"version": "4.5.1",
|
"version": "4.5.1",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hapi/hapi": "21.3.6",
|
"@hapi/hapi": "21.3.7",
|
||||||
"@hapi/inert": "7.1.0",
|
"@hapi/inert": "7.1.0",
|
||||||
"@lit-labs/motion": "1.0.6",
|
"@lit-labs/motion": "1.0.6",
|
||||||
"@popperjs/core": "2.11.8",
|
"@popperjs/core": "2.11.8",
|
||||||
@ -40,20 +40,20 @@
|
|||||||
"prosemirror-commands": "1.5.2",
|
"prosemirror-commands": "1.5.2",
|
||||||
"prosemirror-dropcursor": "1.8.1",
|
"prosemirror-dropcursor": "1.8.1",
|
||||||
"prosemirror-gapcursor": "1.3.2",
|
"prosemirror-gapcursor": "1.3.2",
|
||||||
"prosemirror-history": "1.3.2",
|
"prosemirror-history": "1.4.0",
|
||||||
"prosemirror-keymap": "1.2.2",
|
"prosemirror-keymap": "1.2.2",
|
||||||
"prosemirror-model": "1.19.4",
|
"prosemirror-model": "1.19.4",
|
||||||
"prosemirror-schema-list": "1.3.0",
|
"prosemirror-schema-list": "1.3.0",
|
||||||
"prosemirror-state": "1.4.3",
|
"prosemirror-state": "1.4.3",
|
||||||
"prosemirror-transform": "1.8.0",
|
"prosemirror-transform": "1.8.0",
|
||||||
"prosemirror-view": "1.33.1",
|
"prosemirror-view": "1.33.3",
|
||||||
"sass": "1.72.0",
|
"sass": "1.72.0",
|
||||||
"short-unique-id": "5.0.3",
|
"short-unique-id": "5.0.3",
|
||||||
"xhr2": "0.2.1"
|
"xhr2": "0.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.24.0",
|
"@babel/core": "7.24.3",
|
||||||
"@electron/packager": "18.1.3",
|
"@electron/packager": "18.3.2",
|
||||||
"@material/mwc-button": "0.27.0",
|
"@material/mwc-button": "0.27.0",
|
||||||
"@material/mwc-checkbox": "0.27.0",
|
"@material/mwc-checkbox": "0.27.0",
|
||||||
"@material/mwc-dialog": "0.27.0",
|
"@material/mwc-dialog": "0.27.0",
|
||||||
@ -102,9 +102,9 @@
|
|||||||
"@vaadin/icons": "24.2.9",
|
"@vaadin/icons": "24.2.9",
|
||||||
"@vaadin/password-field": "24.2.9",
|
"@vaadin/password-field": "24.2.9",
|
||||||
"@vaadin/tooltip": "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",
|
"axios": "1.6.8",
|
||||||
"electron": "27.3.6",
|
"electron": "27.3.8",
|
||||||
"electron-builder": "24.13.3",
|
"electron-builder": "24.13.3",
|
||||||
"epml": "0.3.3",
|
"epml": "0.3.3",
|
||||||
"eslint": "8.57.0",
|
"eslint": "8.57.0",
|
||||||
@ -119,7 +119,7 @@
|
|||||||
"pwa-helpers": "0.9.1",
|
"pwa-helpers": "0.9.1",
|
||||||
"redux": "5.0.1",
|
"redux": "5.0.1",
|
||||||
"redux-thunk": "3.1.0",
|
"redux-thunk": "3.1.0",
|
||||||
"rollup": "4.13.0",
|
"rollup": "4.13.2",
|
||||||
"rollup-plugin-node-globals": "1.4.0",
|
"rollup-plugin-node-globals": "1.4.0",
|
||||||
"rollup-plugin-progress": "1.1.2",
|
"rollup-plugin-progress": "1.1.2",
|
||||||
"rollup-plugin-scss": "3.0.0",
|
"rollup-plugin-scss": "3.0.0",
|
||||||
@ -152,42 +152,42 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/code-frame": {
|
"node_modules/@babel/code-frame": {
|
||||||
"version": "7.23.5",
|
"version": "7.24.2",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz",
|
||||||
"integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==",
|
"integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/highlight": "^7.23.4",
|
"@babel/highlight": "^7.24.2",
|
||||||
"chalk": "^2.4.2"
|
"picocolors": "^1.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/compat-data": {
|
"node_modules/@babel/compat-data": {
|
||||||
"version": "7.23.5",
|
"version": "7.24.1",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.1.tgz",
|
||||||
"integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==",
|
"integrity": "sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/core": {
|
"node_modules/@babel/core": {
|
||||||
"version": "7.24.0",
|
"version": "7.24.3",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.3.tgz",
|
||||||
"integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==",
|
"integrity": "sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ampproject/remapping": "^2.2.0",
|
"@ampproject/remapping": "^2.2.0",
|
||||||
"@babel/code-frame": "^7.23.5",
|
"@babel/code-frame": "^7.24.2",
|
||||||
"@babel/generator": "^7.23.6",
|
"@babel/generator": "^7.24.1",
|
||||||
"@babel/helper-compilation-targets": "^7.23.6",
|
"@babel/helper-compilation-targets": "^7.23.6",
|
||||||
"@babel/helper-module-transforms": "^7.23.3",
|
"@babel/helper-module-transforms": "^7.23.3",
|
||||||
"@babel/helpers": "^7.24.0",
|
"@babel/helpers": "^7.24.1",
|
||||||
"@babel/parser": "^7.24.0",
|
"@babel/parser": "^7.24.1",
|
||||||
"@babel/template": "^7.24.0",
|
"@babel/template": "^7.24.0",
|
||||||
"@babel/traverse": "^7.24.0",
|
"@babel/traverse": "^7.24.1",
|
||||||
"@babel/types": "^7.24.0",
|
"@babel/types": "^7.24.0",
|
||||||
"convert-source-map": "^2.0.0",
|
"convert-source-map": "^2.0.0",
|
||||||
"debug": "^4.1.0",
|
"debug": "^4.1.0",
|
||||||
@ -204,14 +204,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/generator": {
|
"node_modules/@babel/generator": {
|
||||||
"version": "7.23.6",
|
"version": "7.24.1",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.1.tgz",
|
||||||
"integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==",
|
"integrity": "sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/types": "^7.23.6",
|
"@babel/types": "^7.24.0",
|
||||||
"@jridgewell/gen-mapping": "^0.3.2",
|
"@jridgewell/gen-mapping": "^0.3.5",
|
||||||
"@jridgewell/trace-mapping": "^0.3.17",
|
"@jridgewell/trace-mapping": "^0.3.25",
|
||||||
"jsesc": "^2.5.1"
|
"jsesc": "^2.5.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -269,12 +269,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-module-imports": {
|
"node_modules/@babel/helper-module-imports": {
|
||||||
"version": "7.22.15",
|
"version": "7.24.3",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz",
|
||||||
"integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==",
|
"integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/types": "^7.22.15"
|
"@babel/types": "^7.24.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
@ -324,9 +324,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-string-parser": {
|
"node_modules/@babel/helper-string-parser": {
|
||||||
"version": "7.23.4",
|
"version": "7.24.1",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz",
|
||||||
"integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==",
|
"integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
@ -351,13 +351,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helpers": {
|
"node_modules/@babel/helpers": {
|
||||||
"version": "7.24.0",
|
"version": "7.24.1",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.0.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.1.tgz",
|
||||||
"integrity": "sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA==",
|
"integrity": "sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/template": "^7.24.0",
|
"@babel/template": "^7.24.0",
|
||||||
"@babel/traverse": "^7.24.0",
|
"@babel/traverse": "^7.24.1",
|
||||||
"@babel/types": "^7.24.0"
|
"@babel/types": "^7.24.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -365,23 +365,24 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/highlight": {
|
"node_modules/@babel/highlight": {
|
||||||
"version": "7.23.4",
|
"version": "7.24.2",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz",
|
||||||
"integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==",
|
"integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-validator-identifier": "^7.22.20",
|
"@babel/helper-validator-identifier": "^7.22.20",
|
||||||
"chalk": "^2.4.2",
|
"chalk": "^2.4.2",
|
||||||
"js-tokens": "^4.0.0"
|
"js-tokens": "^4.0.0",
|
||||||
|
"picocolors": "^1.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/parser": {
|
"node_modules/@babel/parser": {
|
||||||
"version": "7.24.0",
|
"version": "7.24.1",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.1.tgz",
|
||||||
"integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==",
|
"integrity": "sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"parser": "bin/babel-parser.js"
|
"parser": "bin/babel-parser.js"
|
||||||
@ -405,18 +406,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/traverse": {
|
"node_modules/@babel/traverse": {
|
||||||
"version": "7.24.0",
|
"version": "7.24.1",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz",
|
||||||
"integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==",
|
"integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": "^7.23.5",
|
"@babel/code-frame": "^7.24.1",
|
||||||
"@babel/generator": "^7.23.6",
|
"@babel/generator": "^7.24.1",
|
||||||
"@babel/helper-environment-visitor": "^7.22.20",
|
"@babel/helper-environment-visitor": "^7.22.20",
|
||||||
"@babel/helper-function-name": "^7.23.0",
|
"@babel/helper-function-name": "^7.23.0",
|
||||||
"@babel/helper-hoist-variables": "^7.22.5",
|
"@babel/helper-hoist-variables": "^7.22.5",
|
||||||
"@babel/helper-split-export-declaration": "^7.22.6",
|
"@babel/helper-split-export-declaration": "^7.22.6",
|
||||||
"@babel/parser": "^7.24.0",
|
"@babel/parser": "^7.24.1",
|
||||||
"@babel/types": "^7.24.0",
|
"@babel/types": "^7.24.0",
|
||||||
"debug": "^4.3.1",
|
"debug": "^4.3.1",
|
||||||
"globals": "^11.1.0"
|
"globals": "^11.1.0"
|
||||||
@ -556,9 +557,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@electron/osx-sign": {
|
"node_modules/@electron/osx-sign": {
|
||||||
"version": "1.0.5",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.1.0.tgz",
|
||||||
"integrity": "sha512-k9ZzUQtamSoweGQDV2jILiRIHUu7lYlJ3c6IEmjv1hC17rclE+eb9U+f6UFlOOETo0JzY1HNlXy4YOlCvl+Lww==",
|
"integrity": "sha512-9xxNAyTu2YEAfn2TOQXC5fcTZ9hxVT/zAgWOONpOvxivv5rU97RldGbJrxz+OBKXGAiQRJUYOY07mJI++S/iYw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"compare-version": "^0.1.2",
|
"compare-version": "^0.1.2",
|
||||||
@ -591,9 +592,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@electron/packager": {
|
"node_modules/@electron/packager": {
|
||||||
"version": "18.1.3",
|
"version": "18.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@electron/packager/-/packager-18.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@electron/packager/-/packager-18.3.2.tgz",
|
||||||
"integrity": "sha512-21T5MxUf7DwV07IIes3jO/571mXCjOGVPdmYJFPCVDTimFiHQSW0Oy+OIGQaKBiNIXfnP29KylsCQbmds6O6Iw==",
|
"integrity": "sha512-orjylavppgIh24qkNpWm2B/LQUpCS/YLOoKoU+eMK/hJgIhShLDsusPIQzgUGVwNCichu8/zPAGfdQZXHG0gtw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@electron/asar": "^3.2.1",
|
"@electron/asar": "^3.2.1",
|
||||||
@ -602,7 +603,6 @@
|
|||||||
"@electron/osx-sign": "^1.0.5",
|
"@electron/osx-sign": "^1.0.5",
|
||||||
"@electron/universal": "^2.0.1",
|
"@electron/universal": "^2.0.1",
|
||||||
"@electron/windows-sign": "^1.0.0",
|
"@electron/windows-sign": "^1.0.0",
|
||||||
"cross-spawn-windows-exe": "^1.2.0",
|
|
||||||
"debug": "^4.0.1",
|
"debug": "^4.0.1",
|
||||||
"extract-zip": "^2.0.0",
|
"extract-zip": "^2.0.0",
|
||||||
"filenamify": "^4.1.0",
|
"filenamify": "^4.1.0",
|
||||||
@ -612,7 +612,7 @@
|
|||||||
"junk": "^3.1.0",
|
"junk": "^3.1.0",
|
||||||
"parse-author": "^2.0.0",
|
"parse-author": "^2.0.0",
|
||||||
"plist": "^3.0.0",
|
"plist": "^3.0.0",
|
||||||
"rcedit": "^4.0.0",
|
"resedit": "^2.0.0",
|
||||||
"resolve": "^1.1.6",
|
"resolve": "^1.1.6",
|
||||||
"semver": "^7.1.3",
|
"semver": "^7.1.3",
|
||||||
"yargs-parser": "^21.1.1"
|
"yargs-parser": "^21.1.1"
|
||||||
@ -688,9 +688,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@electron/universal/node_modules/minimatch": {
|
"node_modules/@electron/universal/node_modules/minimatch": {
|
||||||
"version": "9.0.3",
|
"version": "9.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
|
||||||
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
|
"integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"brace-expansion": "^2.0.1"
|
"brace-expansion": "^2.0.1"
|
||||||
@ -950,9 +950,9 @@
|
|||||||
"integrity": "sha512-w+lKW+yRrLhJu620jT3y+5g2mHqnKfepreykvdOcl9/6up8GrQQn+l3FRTsjHTKbkbfQFkuksHpdv2EcpKcJ4Q=="
|
"integrity": "sha512-w+lKW+yRrLhJu620jT3y+5g2mHqnKfepreykvdOcl9/6up8GrQQn+l3FRTsjHTKbkbfQFkuksHpdv2EcpKcJ4Q=="
|
||||||
},
|
},
|
||||||
"node_modules/@hapi/hapi": {
|
"node_modules/@hapi/hapi": {
|
||||||
"version": "21.3.6",
|
"version": "21.3.7",
|
||||||
"resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-21.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-21.3.7.tgz",
|
||||||
"integrity": "sha512-fbJ7QYQZl7Ixe6fmKjJbVO3zUrDa5aY+4xn7xBvJFXw6be76B4d28qknrD2la1aXo6GIhTUsJnqzU2awqmG0Sg==",
|
"integrity": "sha512-33J0nreMfqkhY7wwRAZRy+9J+7J4QOH1JtICMjIUmxfaOYSJL/d8JJCtg57SX60944bhlCeu7isb7qyr2jT2oA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hapi/accept": "^6.0.1",
|
"@hapi/accept": "^6.0.1",
|
||||||
"@hapi/ammo": "^6.0.1",
|
"@hapi/ammo": "^6.0.1",
|
||||||
@ -1185,9 +1185,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@humanwhocodes/object-schema": {
|
"node_modules/@humanwhocodes/object-schema": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",
|
||||||
"integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",
|
"integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@isaacs/cliui": {
|
"node_modules/@isaacs/cliui": {
|
||||||
@ -3039,9 +3039,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-android-arm-eabi": {
|
"node_modules/@rollup/rollup-android-arm-eabi": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.2.tgz",
|
||||||
"integrity": "sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==",
|
"integrity": "sha512-3XFIDKWMFZrMnao1mJhnOT1h2g0169Os848NhhmGweEcfJ4rCi+3yMCOLG4zA61rbJdkcrM/DjVZm9Hg5p5w7g==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@ -3052,9 +3052,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-android-arm64": {
|
"node_modules/@rollup/rollup-android-arm64": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.2.tgz",
|
||||||
"integrity": "sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q==",
|
"integrity": "sha512-GdxxXbAuM7Y/YQM9/TwwP+L0omeE/lJAR1J+olu36c3LqqZEBdsIWeQ91KBe6nxwOnb06Xh7JS2U5ooWU5/LgQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -3065,9 +3065,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-darwin-arm64": {
|
"node_modules/@rollup/rollup-darwin-arm64": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.2.tgz",
|
||||||
"integrity": "sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g==",
|
"integrity": "sha512-mCMlpzlBgOTdaFs83I4XRr8wNPveJiJX1RLfv4hggyIVhfB5mJfN4P8Z6yKh+oE4Luz+qq1P3kVdWrCKcMYrrA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -3078,9 +3078,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-darwin-x64": {
|
"node_modules/@rollup/rollup-darwin-x64": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.2.tgz",
|
||||||
"integrity": "sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg==",
|
"integrity": "sha512-yUoEvnH0FBef/NbB1u6d3HNGyruAKnN74LrPAfDQL3O32e3k3OSfLrPgSJmgb3PJrBZWfPyt6m4ZhAFa2nZp2A==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -3091,9 +3091,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.2.tgz",
|
||||||
"integrity": "sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ==",
|
"integrity": "sha512-GYbLs5ErswU/Xs7aGXqzc3RrdEjKdmoCrgzhJWyFL0r5fL3qd1NPcDKDowDnmcoSiGJeU68/Vy+OMUluRxPiLQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@ -3104,9 +3104,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.2.tgz",
|
||||||
"integrity": "sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w==",
|
"integrity": "sha512-L1+D8/wqGnKQIlh4Zre9i4R4b4noxzH5DDciyahX4oOz62CphY7WDWqJoQ66zNR4oScLNOqQJfNSIAe/6TPUmQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -3117,9 +3117,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.2.tgz",
|
||||||
"integrity": "sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw==",
|
"integrity": "sha512-tK5eoKFkXdz6vjfkSTCupUzCo40xueTOiOO6PeEIadlNBkadH1wNOH8ILCPIl8by/Gmb5AGAeQOFeLev7iZDOA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -3129,10 +3129,23 @@
|
|||||||
"linux"
|
"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": {
|
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.2.tgz",
|
||||||
"integrity": "sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA==",
|
"integrity": "sha512-C3GSKvMtdudHCN5HdmAMSRYR2kkhgdOfye4w0xzyii7lebVr4riCgmM6lRiSCnJn2w1Xz7ZZzHKuLrjx5620kw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
@ -3142,10 +3155,23 @@
|
|||||||
"linux"
|
"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": {
|
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.2.tgz",
|
||||||
"integrity": "sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==",
|
"integrity": "sha512-xXMLUAMzrtsvh3cZ448vbXqlUa7ZL8z0MwHp63K2IIID2+DeP5iWIT6g1SN7hg1VxPzqx0xZdiDM9l4n9LRU1A==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -3156,9 +3182,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-x64-musl": {
|
"node_modules/@rollup/rollup-linux-x64-musl": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.2.tgz",
|
||||||
"integrity": "sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw==",
|
"integrity": "sha512-M/JYAWickafUijWPai4ehrjzVPKRCyDb1SLuO+ZyPfoXgeCEAlgPkNXewFZx0zcnoIe3ay4UjXIMdXQXOZXWqA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -3169,9 +3195,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.2.tgz",
|
||||||
"integrity": "sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA==",
|
"integrity": "sha512-2YWwoVg9KRkIKaXSh0mz3NmfurpmYoBBTAXA9qt7VXk0Xy12PoOP40EFuau+ajgALbbhi4uTj3tSG3tVseCjuA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -3182,9 +3208,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.2.tgz",
|
||||||
"integrity": "sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw==",
|
"integrity": "sha512-2FSsE9aQ6OWD20E498NYKEQLneShWes0NGMPQwxWOdws35qQXH+FplabOSP5zEe1pVjurSDOGEVCE2agFwSEsw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@ -3195,9 +3221,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.2.tgz",
|
||||||
"integrity": "sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw==",
|
"integrity": "sha512-7h7J2nokcdPePdKykd8wtc8QqqkqxIrUz7MHj6aNr8waBRU//NLDVnNjQnqQO6fqtjrtCdftpbTuOKAyrAQETQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -3658,9 +3684,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "18.19.24",
|
"version": "18.19.28",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.24.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.28.tgz",
|
||||||
"integrity": "sha512-eghAz3gnbQbvnHqB+mgB2ZR3aH6RhdEmHGS48BnV75KceQPHqabkxKI0BbUSsqhqy2Ddhc2xD/VAR9ySZd57Lw==",
|
"integrity": "sha512-J5cOGD9n4x3YGgVuaND6khm5x07MMdAKkRyXnjVR6KFhLMNh2yONGiP7Z+4+tBOt5mK+GvDTiacTOVGGpqiecw==",
|
||||||
"devOptional": true,
|
"devOptional": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~5.26.4"
|
"undici-types": "~5.26.4"
|
||||||
@ -4033,9 +4059,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@zip.js/zip.js": {
|
"node_modules/@zip.js/zip.js": {
|
||||||
"version": "2.7.40",
|
"version": "2.7.41",
|
||||||
"resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.40.tgz",
|
"resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.41.tgz",
|
||||||
"integrity": "sha512-kSYwO0Wth6G66QM4CejZqG0nRhBsVVTaR18M/Ta8EcqcvaV0dYrnDDyKAstfy0V5+ejK4b9w5xc1W0ECATJTvA==",
|
"integrity": "sha512-EMxPWXlEqqvsK9jxPmNvEShrIXP2LYTdQnEfsBH6OQCnlZRVo/dJIgtzbKvtK9A8PBTDQdxwxulj+QKplmW2Xg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"bun": ">=0.7.0",
|
"bun": ">=0.7.0",
|
||||||
@ -4253,6 +4279,39 @@
|
|||||||
"node": ">=10"
|
"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": {
|
"node_modules/app-builder-lib/node_modules/@electron/universal": {
|
||||||
"version": "1.5.1",
|
"version": "1.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/@electron/universal/-/universal-1.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/@electron/universal/-/universal-1.5.1.tgz",
|
||||||
@ -4973,9 +5032,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001598",
|
"version": "1.0.30001605",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001598.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001605.tgz",
|
||||||
"integrity": "sha512-j8mQRDziG94uoBfeFuqsJUNECW37DXpnvhcMJMdlH2u3MRkq1sAI0LJcXP1i/Py0KbSIC4UDj8YHPrTn5YsL+Q==",
|
"integrity": "sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -5288,16 +5347,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/config-file-ts/node_modules/glob": {
|
"node_modules/config-file-ts/node_modules/glob": {
|
||||||
"version": "10.3.10",
|
"version": "10.3.12",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz",
|
||||||
"integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
|
"integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"foreground-child": "^3.1.0",
|
"foreground-child": "^3.1.0",
|
||||||
"jackspeak": "^2.3.5",
|
"jackspeak": "^2.3.6",
|
||||||
"minimatch": "^9.0.1",
|
"minimatch": "^9.0.1",
|
||||||
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
|
"minipass": "^7.0.4",
|
||||||
"path-scurry": "^1.10.1"
|
"path-scurry": "^1.10.2"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"glob": "dist/esm/bin.mjs"
|
"glob": "dist/esm/bin.mjs"
|
||||||
@ -5310,9 +5369,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/config-file-ts/node_modules/minimatch": {
|
"node_modules/config-file-ts/node_modules/minimatch": {
|
||||||
"version": "9.0.3",
|
"version": "9.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
|
||||||
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
|
"integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"brace-expansion": "^2.0.1"
|
"brace-expansion": "^2.0.1"
|
||||||
@ -5324,6 +5383,15 @@
|
|||||||
"url": "https://github.com/sponsors/isaacs"
|
"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": {
|
"node_modules/convert-source-map": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
|
||||||
@ -5422,52 +5490,6 @@
|
|||||||
"node": ">= 8"
|
"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": {
|
"node_modules/crypto-js": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
|
||||||
@ -5752,9 +5774,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/electron": {
|
"node_modules/electron": {
|
||||||
"version": "27.3.6",
|
"version": "27.3.8",
|
||||||
"resolved": "https://registry.npmjs.org/electron/-/electron-27.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/electron/-/electron-27.3.8.tgz",
|
||||||
"integrity": "sha512-oLk99Euqa9EQKWJsPxi4rYV32OYmlbasHUZdvLGNzTn5S3U+jLlfhvca/9Tg1xUyIv2U/gyRnwjR37Ne9n4orA==",
|
"integrity": "sha512-CLQ4rhFiXBzfYsEuxDHqQlnw4fI5tJVMA+xqW322LkfcP6iiFjAMh/gYe3a1JqGPNMO2bff2Ev7toAxP1opRnQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -6043,9 +6065,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.4.708",
|
"version": "1.4.723",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.708.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.723.tgz",
|
||||||
"integrity": "sha512-iWgEEvREL4GTXXHKohhh33+6Y8XkPI5eHihDmm8zUk5Zo7HICEW+wI/j5kJ2tbuNUCXJ/sNXa03ajW635DiJXA==",
|
"integrity": "sha512-rxFVtrMGMFROr4qqU6n95rUi9IlfIm+lIAt+hOToy/9r6CDv0XiEcQdC3VP71y1pE5CFTzKV0RvxOGYCPWWHPw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/electron-updater": {
|
"node_modules/electron-updater": {
|
||||||
@ -7614,21 +7636,6 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"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": {
|
"node_modules/is-electron": {
|
||||||
"version": "2.2.2",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz",
|
"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"
|
"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": {
|
"node_modules/isarray": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||||
@ -8254,16 +8249,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/markdown-it": {
|
"node_modules/markdown-it": {
|
||||||
"version": "14.0.0",
|
"version": "14.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz",
|
||||||
"integrity": "sha512-seFjF0FIcPt4P9U39Bq1JYblX0KZCjDLFFQPHpL5AzHpqPEKtosxmdq/LTVZnjfH7tjt9BxStm+wXcDBNuYmzw==",
|
"integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"argparse": "^2.0.1",
|
"argparse": "^2.0.1",
|
||||||
"entities": "^4.4.0",
|
"entities": "^4.4.0",
|
||||||
"linkify-it": "^5.0.0",
|
"linkify-it": "^5.0.0",
|
||||||
"mdurl": "^2.0.0",
|
"mdurl": "^2.0.0",
|
||||||
"punycode.js": "^2.3.1",
|
"punycode.js": "^2.3.1",
|
||||||
"uc.micro": "^2.0.0"
|
"uc.micro": "^2.1.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"markdown-it": "bin/markdown-it.mjs"
|
"markdown-it": "bin/markdown-it.mjs"
|
||||||
@ -8768,12 +8763,12 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/path-scurry": {
|
"node_modules/path-scurry": {
|
||||||
"version": "1.10.1",
|
"version": "1.10.2",
|
||||||
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",
|
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz",
|
||||||
"integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",
|
"integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lru-cache": "^9.1.1 || ^10.0.0",
|
"lru-cache": "^10.2.0",
|
||||||
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
|
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -8804,6 +8799,16 @@
|
|||||||
"node": ">=4"
|
"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": {
|
"node_modules/pend": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
||||||
@ -9032,9 +9037,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prosemirror-history": {
|
"node_modules/prosemirror-history": {
|
||||||
"version": "1.3.2",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.4.0.tgz",
|
||||||
"integrity": "sha512-/zm0XoU/N/+u7i5zepjmZAEnpvjDtzoPWW6VmKptcAnPadN/SStsBjMImdCEbb3seiNTpveziPTIrXQbHLtU1g==",
|
"integrity": "sha512-UUiGzDVcqo1lovOPdi9YxxUps3oBFWAIYkXLu3Ot+JPv1qzVogRbcizxK3LhHmtaUxclohgiOVesRw5QSlMnbQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"prosemirror-state": "^1.2.2",
|
"prosemirror-state": "^1.2.2",
|
||||||
"prosemirror-transform": "^1.0.0",
|
"prosemirror-transform": "^1.0.0",
|
||||||
@ -9162,9 +9167,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prosemirror-view": {
|
"node_modules/prosemirror-view": {
|
||||||
"version": "1.33.1",
|
"version": "1.33.3",
|
||||||
"resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.33.1.tgz",
|
"resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.33.3.tgz",
|
||||||
"integrity": "sha512-62qkYgSJIkwIMMCpuGuPzc52DiK1Iod6TWoIMxP4ja6BTD4yO8kCUL64PZ/WhH/dJ9fW0CDO39FhH1EMyhUFEg==",
|
"integrity": "sha512-P4Ao/bc4OrU/2yLIf8dL4lJaEtjLR3QjIvQHgJYp2jUS7kYM4bSR6okbBjkqzOs/FwUon6UGjTLdKMnPL1MZqw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"prosemirror-model": "^1.16.0",
|
"prosemirror-model": "^1.16.0",
|
||||||
"prosemirror-state": "^1.0.0",
|
"prosemirror-state": "^1.0.0",
|
||||||
@ -9260,18 +9265,6 @@
|
|||||||
"safe-buffer": "^5.1.0"
|
"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": {
|
"node_modules/read-config-file": {
|
||||||
"version": "6.3.2",
|
"version": "6.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/read-config-file/-/read-config-file-6.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/read-config-file/-/read-config-file-6.3.2.tgz",
|
||||||
@ -9495,6 +9488,19 @@
|
|||||||
"node": ">=0.10.5"
|
"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": {
|
"node_modules/resolve": {
|
||||||
"version": "1.22.8",
|
"version": "1.22.8",
|
||||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
|
||||||
@ -9592,9 +9598,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/rollup": {
|
"node_modules/rollup": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.2.tgz",
|
||||||
"integrity": "sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==",
|
"integrity": "sha512-MIlLgsdMprDBXC+4hsPgzWUasLO9CE4zOkj/u6j+Z6j5A4zRY+CtiXAdJyPtgCsc42g658Aeh1DlrdVEJhsL2g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/estree": "1.0.5"
|
"@types/estree": "1.0.5"
|
||||||
@ -9607,19 +9613,21 @@
|
|||||||
"npm": ">=8.0.0"
|
"npm": ">=8.0.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@rollup/rollup-android-arm-eabi": "4.13.0",
|
"@rollup/rollup-android-arm-eabi": "4.13.2",
|
||||||
"@rollup/rollup-android-arm64": "4.13.0",
|
"@rollup/rollup-android-arm64": "4.13.2",
|
||||||
"@rollup/rollup-darwin-arm64": "4.13.0",
|
"@rollup/rollup-darwin-arm64": "4.13.2",
|
||||||
"@rollup/rollup-darwin-x64": "4.13.0",
|
"@rollup/rollup-darwin-x64": "4.13.2",
|
||||||
"@rollup/rollup-linux-arm-gnueabihf": "4.13.0",
|
"@rollup/rollup-linux-arm-gnueabihf": "4.13.2",
|
||||||
"@rollup/rollup-linux-arm64-gnu": "4.13.0",
|
"@rollup/rollup-linux-arm64-gnu": "4.13.2",
|
||||||
"@rollup/rollup-linux-arm64-musl": "4.13.0",
|
"@rollup/rollup-linux-arm64-musl": "4.13.2",
|
||||||
"@rollup/rollup-linux-riscv64-gnu": "4.13.0",
|
"@rollup/rollup-linux-powerpc64le-gnu": "4.13.2",
|
||||||
"@rollup/rollup-linux-x64-gnu": "4.13.0",
|
"@rollup/rollup-linux-riscv64-gnu": "4.13.2",
|
||||||
"@rollup/rollup-linux-x64-musl": "4.13.0",
|
"@rollup/rollup-linux-s390x-gnu": "4.13.2",
|
||||||
"@rollup/rollup-win32-arm64-msvc": "4.13.0",
|
"@rollup/rollup-linux-x64-gnu": "4.13.2",
|
||||||
"@rollup/rollup-win32-ia32-msvc": "4.13.0",
|
"@rollup/rollup-linux-x64-musl": "4.13.2",
|
||||||
"@rollup/rollup-win32-x64-msvc": "4.13.0",
|
"@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"
|
"fsevents": "~2.3.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -10005,9 +10013,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/smob": {
|
"node_modules/smob": {
|
||||||
"version": "1.4.1",
|
"version": "1.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/smob/-/smob-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz",
|
||||||
"integrity": "sha512-9LK+E7Hv5R9u4g4C3p+jjLstaLe11MDsL21UpYaCNmapvMkYhqCV4A/f/3gyH8QjMyh6l68q9xC85vihY9ahMQ==",
|
"integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/sort-keys": {
|
"node_modules/sort-keys": {
|
||||||
@ -10042,9 +10050,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/source-map-js": {
|
"node_modules/source-map-js": {
|
||||||
"version": "1.0.2",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
|
||||||
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
|
"integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
@ -10254,9 +10262,9 @@
|
|||||||
"integrity": "sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA=="
|
"integrity": "sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA=="
|
||||||
},
|
},
|
||||||
"node_modules/tar": {
|
"node_modules/tar": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",
|
||||||
"integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==",
|
"integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chownr": "^2.0.0",
|
"chownr": "^2.0.0",
|
||||||
@ -10318,9 +10326,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/terser": {
|
"node_modules/terser": {
|
||||||
"version": "5.29.2",
|
"version": "5.30.2",
|
||||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.29.2.tgz",
|
"resolved": "https://registry.npmjs.org/terser/-/terser-5.30.2.tgz",
|
||||||
"integrity": "sha512-ZiGkhUBIM+7LwkNjXYJq8svgkd+QK3UUr0wJqY4MieaezBSAIPgbSPZyIx0idM6XWK5CMzSWa8MJIzmRcB8Caw==",
|
"integrity": "sha512-vTDjRKYKip4dOFL5VizdoxHTYDfEXPdz5t+FbxCC5Rp2s+KbEO8w5wqMDPgj7CtFKZuzq7PXv28fZoXfqqBVuw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/source-map": "^0.3.3",
|
"@jridgewell/source-map": "^0.3.3",
|
||||||
@ -10501,9 +10509,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.4.2",
|
"version": "5.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz",
|
||||||
"integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
|
"integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
|
16
package.json
16
package.json
@ -31,7 +31,7 @@
|
|||||||
"lint": "eslint './**/*.{js,mjs}'"
|
"lint": "eslint './**/*.{js,mjs}'"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hapi/hapi": "21.3.6",
|
"@hapi/hapi": "21.3.7",
|
||||||
"@hapi/inert": "7.1.0",
|
"@hapi/inert": "7.1.0",
|
||||||
"@lit-labs/motion": "1.0.6",
|
"@lit-labs/motion": "1.0.6",
|
||||||
"@popperjs/core": "2.11.8",
|
"@popperjs/core": "2.11.8",
|
||||||
@ -62,20 +62,20 @@
|
|||||||
"prosemirror-commands": "1.5.2",
|
"prosemirror-commands": "1.5.2",
|
||||||
"prosemirror-dropcursor": "1.8.1",
|
"prosemirror-dropcursor": "1.8.1",
|
||||||
"prosemirror-gapcursor": "1.3.2",
|
"prosemirror-gapcursor": "1.3.2",
|
||||||
"prosemirror-history": "1.3.2",
|
"prosemirror-history": "1.4.0",
|
||||||
"prosemirror-keymap": "1.2.2",
|
"prosemirror-keymap": "1.2.2",
|
||||||
"prosemirror-model": "1.19.4",
|
"prosemirror-model": "1.19.4",
|
||||||
"prosemirror-schema-list": "1.3.0",
|
"prosemirror-schema-list": "1.3.0",
|
||||||
"prosemirror-state": "1.4.3",
|
"prosemirror-state": "1.4.3",
|
||||||
"prosemirror-transform": "1.8.0",
|
"prosemirror-transform": "1.8.0",
|
||||||
"prosemirror-view": "1.33.1",
|
"prosemirror-view": "1.33.3",
|
||||||
"sass": "1.72.0",
|
"sass": "1.72.0",
|
||||||
"short-unique-id": "5.0.3",
|
"short-unique-id": "5.0.3",
|
||||||
"xhr2": "0.2.1"
|
"xhr2": "0.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.24.0",
|
"@babel/core": "7.24.3",
|
||||||
"@electron/packager": "18.1.3",
|
"@electron/packager": "18.3.2",
|
||||||
"@material/mwc-button": "0.27.0",
|
"@material/mwc-button": "0.27.0",
|
||||||
"@material/mwc-checkbox": "0.27.0",
|
"@material/mwc-checkbox": "0.27.0",
|
||||||
"@material/mwc-dialog": "0.27.0",
|
"@material/mwc-dialog": "0.27.0",
|
||||||
@ -124,9 +124,9 @@
|
|||||||
"@vaadin/icons": "24.2.9",
|
"@vaadin/icons": "24.2.9",
|
||||||
"@vaadin/password-field": "24.2.9",
|
"@vaadin/password-field": "24.2.9",
|
||||||
"@vaadin/tooltip": "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",
|
"axios": "1.6.8",
|
||||||
"electron": "27.3.6",
|
"electron": "27.3.8",
|
||||||
"electron-builder": "24.13.3",
|
"electron-builder": "24.13.3",
|
||||||
"epml": "0.3.3",
|
"epml": "0.3.3",
|
||||||
"eslint": "8.57.0",
|
"eslint": "8.57.0",
|
||||||
@ -141,7 +141,7 @@
|
|||||||
"pwa-helpers": "0.9.1",
|
"pwa-helpers": "0.9.1",
|
||||||
"redux": "5.0.1",
|
"redux": "5.0.1",
|
||||||
"redux-thunk": "3.1.0",
|
"redux-thunk": "3.1.0",
|
||||||
"rollup": "4.13.0",
|
"rollup": "4.13.2",
|
||||||
"rollup-plugin-node-globals": "1.4.0",
|
"rollup-plugin-node-globals": "1.4.0",
|
||||||
"rollup-plugin-progress": "1.1.2",
|
"rollup-plugin-progress": "1.1.2",
|
||||||
"rollup-plugin-scss": "3.0.0",
|
"rollup-plugin-scss": "3.0.0",
|
||||||
|
@ -63,7 +63,7 @@ const generateRollupConfig = (inputFile, outputFile) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const generateForPlugins = () => {
|
const generateForPlugins = () => {
|
||||||
const configs = [
|
return [
|
||||||
{
|
{
|
||||||
in: 'plugins/core/main.src.js',
|
in: 'plugins/core/main.src.js',
|
||||||
out: 'plugins/core/main.js',
|
out: 'plugins/core/main.js',
|
||||||
@ -162,7 +162,6 @@ const generateForPlugins = () => {
|
|||||||
path.join(__dirname, file.out)
|
path.join(__dirname, file.out)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
return configs;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = generateForPlugins;
|
module.exports = generateForPlugins;
|
||||||
|
@ -12,19 +12,16 @@ const pluginsController = (type) => {
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case PLUGINS:
|
case PLUGINS:
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const plugins = [
|
return [
|
||||||
{
|
{
|
||||||
folder: path.join(__dirname, 'plugins/core'),
|
folder: path.join(__dirname, 'plugins/core'),
|
||||||
name: 'core'
|
name: 'core'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
return plugins
|
|
||||||
case BUILD:
|
case BUILD:
|
||||||
const build = require('./build.js')
|
return require('./build.js')
|
||||||
return build
|
|
||||||
case WATCH:
|
case WATCH:
|
||||||
const watch = require('./watch.js')
|
return require('./watch.js')
|
||||||
return watch
|
|
||||||
default:
|
default:
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {html, LitElement} from 'lit'
|
import {html, LitElement} from 'lit'
|
||||||
import {Epml} from '../../../epml.js'
|
import {Epml} from '../../../epml.js'
|
||||||
import '../components/ButtonIconCopy.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 {blocksNeed} from '../../utils/blocks-needed.js'
|
||||||
import isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||||
@ -80,18 +80,15 @@ class BecomeMinter extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getNodeInfo() {
|
async getNodeInfo() {
|
||||||
const nodeInfo = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
url: `/admin/status`,
|
url: `/admin/status`,
|
||||||
})
|
})
|
||||||
|
|
||||||
return nodeInfo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getMintingAcccounts() {
|
async getMintingAcccounts() {
|
||||||
const mintingAccountData = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
url: `/admin/mintingaccounts`,
|
url: `/admin/mintingaccounts`,
|
||||||
})
|
})
|
||||||
return mintingAccountData
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async atMount() {
|
async atMount() {
|
||||||
@ -148,21 +145,18 @@ class BecomeMinter extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getRewardShareRelationship(recipientAddress) {
|
async getRewardShareRelationship(recipientAddress) {
|
||||||
const myRewardShareArray = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
type: 'api',
|
type: 'api',
|
||||||
url: `/addresses/rewardshares?recipients=${recipientAddress}`,
|
url: `/addresses/rewardshares?recipients=${recipientAddress}`,
|
||||||
})
|
})
|
||||||
|
|
||||||
return myRewardShareArray
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_levelUpBlocks() {
|
_levelUpBlocks() {
|
||||||
let countBlocksString = (
|
return (
|
||||||
blocksNeed(0) -
|
blocksNeed(0) -
|
||||||
(this.addressInfo?.blocksMinted +
|
(this.addressInfo?.blocksMinted +
|
||||||
this.addressInfo?.blocksMintedAdjustment)
|
this.addressInfo?.blocksMintedAdjustment)
|
||||||
).toString()
|
).toString()
|
||||||
return countBlocksString
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {html, LitElement} from 'lit'
|
import {html, LitElement} from 'lit'
|
||||||
import {Epml} from '../../../../epml.js'
|
import {Epml} from '../../../../epml.js'
|
||||||
import '../../components/ButtonIconCopy.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 '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
@ -41,9 +41,8 @@ class NotSponsored extends LitElement {
|
|||||||
const myNode =
|
const myNode =
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
let apiKey = myNode.apiKey
|
return myNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addMintingAccount(e) {
|
addMintingAccount(e) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {html, LitElement} from 'lit'
|
import {html, LitElement} from 'lit'
|
||||||
import '../../components/ButtonIconCopy.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 '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
@ -28,12 +28,11 @@ class YesSponsored extends LitElement {
|
|||||||
static styles = [pageStyles]
|
static styles = [pageStyles]
|
||||||
|
|
||||||
_levelUpBlocks() {
|
_levelUpBlocks() {
|
||||||
let countBlocksString = (
|
return (
|
||||||
blocksNeed(0) -
|
blocksNeed(0) -
|
||||||
(this.addressInfo?.blocksMinted +
|
(this.addressInfo?.blocksMinted +
|
||||||
this.addressInfo?.blocksMintedAdjustment)
|
this.addressInfo?.blocksMintedAdjustment)
|
||||||
).toString();
|
).toString()
|
||||||
return countBlocksString
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -9,7 +9,7 @@ import {bytesToMegabytes} from '../../../utils/bytesToMegabytes.js';
|
|||||||
import './ChatGifsExplore.js';
|
import './ChatGifsExplore.js';
|
||||||
import '../ImageComponent.js';
|
import '../ImageComponent.js';
|
||||||
import '@vaadin/tooltip';
|
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});
|
const parentEpml = new Epml({type: 'WINDOW', source: window.parent});
|
||||||
|
|
||||||
@ -150,11 +150,7 @@ setOpenGifModal: { attribute: false }
|
|||||||
if (changedProperties && changedProperties.has('currentCollection')) {
|
if (changedProperties && changedProperties.has('currentCollection')) {
|
||||||
if (this.mode === 'explore') {
|
if (this.mode === 'explore') {
|
||||||
const subbedCollection = this.mySubscribedCollections.find((collection) => ((collection.name === this.currentCollection.name) && (collection.identifier === this.currentCollection.identifier)));
|
const subbedCollection = this.mySubscribedCollections.find((collection) => ((collection.name === this.currentCollection.name) && (collection.identifier === this.currentCollection.identifier)));
|
||||||
if (subbedCollection) {
|
this.isSubscribed = !!subbedCollection;
|
||||||
this.isSubscribed = true;
|
|
||||||
} else {
|
|
||||||
this.isSubscribed = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -211,8 +207,7 @@ setOpenGifModal: { attribute: false }
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node];
|
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node];
|
||||||
let apiKey = myNode.apiKey;
|
return myNode.apiKey;
|
||||||
return apiKey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getMoreExploreGifs() {
|
async getMoreExploreGifs() {
|
||||||
@ -285,17 +280,14 @@ setOpenGifModal: { attribute: false }
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getMyGifCollections() {
|
async getMyGifCollections() {
|
||||||
const userName = await this.getName(this.selectedAddress.address);
|
this.myAccountName = await this.getName(this.selectedAddress.address);
|
||||||
this.myAccountName = userName;
|
|
||||||
if (this.myAccountName) {
|
if (this.myAccountName) {
|
||||||
const getMyGifCollections = await parentEpml.request('apiCall', {
|
const getMyGifCollections = await parentEpml.request('apiCall', {
|
||||||
url: `/arbitrary/resources/search?service=GIF_REPOSITORY&query=${this.myAccountName}&apiKey=${this.getApiKey()}`,
|
url: `/arbitrary/resources/search?service=GIF_REPOSITORY&query=${this.myAccountName}&apiKey=${this.getApiKey()}`,
|
||||||
});
|
});
|
||||||
const gifCollectionWithMetaData = await this.structureCollections(
|
return await this.structureCollections(
|
||||||
getMyGifCollections
|
getMyGifCollections
|
||||||
);
|
);
|
||||||
|
|
||||||
return gifCollectionWithMetaData;
|
|
||||||
} else {
|
} else {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
@ -343,10 +335,9 @@ setOpenGifModal: { attribute: false }
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
await Promise.all(getSavedGifRepos);
|
await Promise.all(getSavedGifRepos);
|
||||||
const savedCollectionsWithMetaData = await this.structureCollections(
|
return await this.structureCollections(
|
||||||
savedCollections
|
savedCollections
|
||||||
);
|
);
|
||||||
return savedCollectionsWithMetaData;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getName(recipient) {
|
async getName(recipient) {
|
||||||
@ -440,11 +431,7 @@ setOpenGifModal: { attribute: false }
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (invalidGifs.length > 0) {
|
return invalidGifs.length <= 0;
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let validatedSize = validateGifSizes(this.gifsToBeAdded);
|
let validatedSize = validateGifSizes(this.gifsToBeAdded);
|
||||||
@ -587,8 +574,7 @@ setOpenGifModal: { attribute: false }
|
|||||||
);
|
);
|
||||||
parentEpml.request('showSnackBar', get('gifs.gchange20'));
|
parentEpml.request('showSnackBar', get('gifs.gchange20'));
|
||||||
this.isSubscribed = true;
|
this.isSubscribed = true;
|
||||||
const savedCollections = await this.getSavedCollections();
|
this.mySubscribedCollections = await this.getSavedCollections();
|
||||||
this.mySubscribedCollections = savedCollections;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async unsubscribeToCollection() {
|
async unsubscribeToCollection() {
|
||||||
@ -597,8 +583,7 @@ setOpenGifModal: { attribute: false }
|
|||||||
);
|
);
|
||||||
parentEpml.request('showSnackBar', get('gifs.gchange21'));
|
parentEpml.request('showSnackBar', get('gifs.gchange21'));
|
||||||
this.isSubscribed = false;
|
this.isSubscribed = false;
|
||||||
const savedCollections = await this.getSavedCollections();
|
this.mySubscribedCollections = await this.getSavedCollections();
|
||||||
this.mySubscribedCollections = savedCollections;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {html, LitElement} from 'lit'
|
import {html, LitElement} from 'lit'
|
||||||
import {Epml} from '../../../../epml.js'
|
import {Epml} from '../../../../epml.js'
|
||||||
import {chatGifsExploreStyles} from './ChatGifsExplore-css.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'
|
import '@material/mwc-icon'
|
||||||
|
|
||||||
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
|
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
|
||||||
@ -52,7 +52,7 @@ class ChatGifsExplore extends LitElement {
|
|||||||
|
|
||||||
observerHandler(entries) {
|
observerHandler(entries) {
|
||||||
if (!entries[0].isIntersecting) {
|
if (!entries[0].isIntersecting) {
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
if (this.exploreCollections.length < 20) {
|
if (this.exploreCollections.length < 20) {
|
||||||
return;
|
return;
|
||||||
@ -70,8 +70,7 @@ class ChatGifsExplore extends LitElement {
|
|||||||
}
|
}
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
let apiKey = myNode.apiKey
|
return myNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async searchCollections() {
|
async searchCollections() {
|
||||||
@ -120,8 +119,7 @@ class ChatGifsExplore extends LitElement {
|
|||||||
class='clear-search-icon'
|
class='clear-search-icon'
|
||||||
@click=${async () => {
|
@click=${async () => {
|
||||||
if (this.isLoading) return;
|
if (this.isLoading) return;
|
||||||
const latestCollections = await this.getAllCollections();
|
this.exploreCollections = await this.getAllCollections();
|
||||||
this.exploreCollections = latestCollections;
|
|
||||||
this.searchCollectionName = '';
|
this.searchCollectionName = '';
|
||||||
this.isSearched = false;
|
this.isSearched = false;
|
||||||
}}
|
}}
|
||||||
|
@ -5,7 +5,7 @@ import "@material/mwc-dialog"
|
|||||||
import "@polymer/paper-spinner/paper-spinner-lite.js"
|
import "@polymer/paper-spinner/paper-spinner-lite.js"
|
||||||
import "@material/mwc-icon"
|
import "@material/mwc-icon"
|
||||||
import "./WrapperModal"
|
import "./WrapperModal"
|
||||||
import {translate} from '../../../../core/translate/index.js'
|
import {translate} from '../../../../core/translate'
|
||||||
|
|
||||||
const parentEpml = new Epml({ type: "WINDOW", source: window.parent })
|
const parentEpml = new Epml({ type: "WINDOW", source: window.parent })
|
||||||
|
|
||||||
@ -105,11 +105,10 @@ class ChatGroupInvites extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getLastRef() {
|
async getLastRef() {
|
||||||
let myRef = await parentEpml.request("apiCall", {
|
return await parentEpml.request("apiCall", {
|
||||||
type: "api",
|
type: "api",
|
||||||
url: `/addresses/lastreference/${this.selectedAddress.address}`,
|
url: `/addresses/lastreference/${this.selectedAddress.address}`,
|
||||||
})
|
})
|
||||||
return myRef
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getTxnRequestResponse(txnResponse, reference) {
|
getTxnRequestResponse(txnResponse, reference) {
|
||||||
@ -125,13 +124,12 @@ class ChatGroupInvites extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async convertBytesForSigning(transactionBytesBase58) {
|
async convertBytesForSigning(transactionBytesBase58) {
|
||||||
let convertedBytes = await parentEpml.request("apiCall", {
|
return await parentEpml.request("apiCall", {
|
||||||
type: "api",
|
type: "api",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `/transactions/convert`,
|
url: `/transactions/convert`,
|
||||||
body: `${transactionBytesBase58}`,
|
body: `${transactionBytesBase58}`,
|
||||||
})
|
})
|
||||||
return convertedBytes
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async signTx(body){
|
async signTx(body){
|
||||||
@ -204,11 +202,10 @@ class ChatGroupInvites extends LitElement {
|
|||||||
}
|
}
|
||||||
const bodyToString2 = JSON.stringify(body2)
|
const bodyToString2 = JSON.stringify(body2)
|
||||||
let signTransaction = await this.signTx(bodyToString2)
|
let signTransaction = await this.signTx(bodyToString2)
|
||||||
let processTransaction = await this.process(signTransaction)
|
return await this.process(signTransaction)
|
||||||
return processTransaction
|
|
||||||
}
|
}
|
||||||
|
|
||||||
validateReceiver()
|
await validateReceiver()
|
||||||
}
|
}
|
||||||
|
|
||||||
async _removeAdmin(groupId) {
|
async _removeAdmin(groupId) {
|
||||||
@ -261,11 +258,10 @@ class ChatGroupInvites extends LitElement {
|
|||||||
}
|
}
|
||||||
const bodyToString2 = JSON.stringify(body2)
|
const bodyToString2 = JSON.stringify(body2)
|
||||||
let signTransaction = await this.signTx(bodyToString2)
|
let signTransaction = await this.signTx(bodyToString2)
|
||||||
let processTransaction = await this.process(signTransaction)
|
return await this.process(signTransaction)
|
||||||
return processTransaction
|
|
||||||
}
|
}
|
||||||
|
|
||||||
validateReceiver()
|
await validateReceiver()
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -11,7 +11,7 @@ import './TipUser';
|
|||||||
import './UserInfo/UserInfo';
|
import './UserInfo/UserInfo';
|
||||||
import './ChatImage';
|
import './ChatImage';
|
||||||
import './ReusableImage';
|
import './ReusableImage';
|
||||||
import {get} from '../../../../core/translate/index.js'
|
import {get} from '../../../../core/translate'
|
||||||
|
|
||||||
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
|
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
|
||||||
|
|
||||||
@ -242,14 +242,10 @@ class ChatGroupsManager extends LitElement {
|
|||||||
let endpoint = `/groups`
|
let endpoint = `/groups`
|
||||||
|
|
||||||
|
|
||||||
const groups = await parentEpml.request('apiCall', {
|
this.groups = await parentEpml.request('apiCall', {
|
||||||
type: 'api',
|
type: 'api',
|
||||||
url: endpoint,
|
url: endpoint,
|
||||||
});
|
})
|
||||||
|
|
||||||
let list = groups
|
|
||||||
|
|
||||||
this.groups = list
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
@ -284,7 +280,7 @@ class ChatGroupsManager extends LitElement {
|
|||||||
|
|
||||||
observerHandler(entries) {
|
observerHandler(entries) {
|
||||||
if (!entries[0].isIntersecting) {
|
if (!entries[0].isIntersecting) {
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
if (this.images.length < 20) {
|
if (this.images.length < 20) {
|
||||||
return;
|
return;
|
||||||
@ -294,19 +290,11 @@ class ChatGroupsManager extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
selectAuto(e) {
|
selectAuto(e) {
|
||||||
if (e.target.checked) {
|
this.autoView = !e.target.checked;
|
||||||
this.autoView = false
|
|
||||||
} else {
|
|
||||||
this.autoView = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
selectMyImages(e) {
|
selectMyImages(e) {
|
||||||
if (e.target.checked) {
|
this.onlyMyImages = !e.target.checked;
|
||||||
this.onlyMyImages = false
|
|
||||||
} else {
|
|
||||||
this.onlyMyImages = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -5,7 +5,7 @@ import '@material/mwc-dialog'
|
|||||||
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
import './WrapperModal'
|
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 })
|
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
|
||||||
|
|
||||||
@ -115,11 +115,10 @@ class ChatGroupSettings extends LitElement {
|
|||||||
|
|
||||||
// Get Last Ref
|
// Get Last Ref
|
||||||
const getLastRef = async () => {
|
const getLastRef = async () => {
|
||||||
let myRef = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
type: 'api',
|
type: 'api',
|
||||||
url: `/addresses/lastreference/${this.selectedAddress.address}`
|
url: `/addresses/lastreference/${this.selectedAddress.address}`
|
||||||
})
|
})
|
||||||
return myRef
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const validateReceiver = async () => {
|
const validateReceiver = async () => {
|
||||||
@ -129,13 +128,12 @@ class ChatGroupSettings extends LitElement {
|
|||||||
|
|
||||||
}
|
}
|
||||||
const convertBytesForSigning = async (transactionBytesBase58) => {
|
const convertBytesForSigning = async (transactionBytesBase58) => {
|
||||||
let convertedBytes = await parentEpml.request("apiCall", {
|
return await parentEpml.request("apiCall", {
|
||||||
type: "api",
|
type: "api",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `/transactions/convert`,
|
url: `/transactions/convert`,
|
||||||
body: `${transactionBytesBase58}`,
|
body: `${transactionBytesBase58}`,
|
||||||
})
|
})
|
||||||
return convertedBytes
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -193,22 +191,21 @@ class ChatGroupSettings extends LitElement {
|
|||||||
// })
|
// })
|
||||||
// return processTransaction
|
// return processTransaction
|
||||||
console.log('this.selectedAddress.nonce', this.selectedAddress.nonce)
|
console.log('this.selectedAddress.nonce', this.selectedAddress.nonce)
|
||||||
let myTxnrequest = await parentEpml.request('transaction', {
|
return await parentEpml.request('transaction', {
|
||||||
type: 23,
|
type: 23,
|
||||||
nonce: this.selectedAddress.nonce,
|
nonce: this.selectedAddress.nonce,
|
||||||
params: {
|
params: {
|
||||||
_groupId: groupId,
|
_groupId: groupId,
|
||||||
lastReference: lastRef,
|
lastReference: lastRef,
|
||||||
fee: leaveFeeInput,
|
fee: leaveFeeInput,
|
||||||
"newOwner": "QdR4bQ1fJFnSZgswtW27eE8ToXwHqUQyaU",
|
"newOwner": "QdR4bQ1fJFnSZgswtW27eE8ToXwHqUQyaU",
|
||||||
"newIsOpen": false,
|
"newIsOpen": false,
|
||||||
"newDescription": "my group for accounts I like",
|
"newDescription": "my group for accounts I like",
|
||||||
"newApprovalThreshold": "NONE",
|
"newApprovalThreshold": "NONE",
|
||||||
"newMinimumBlockDelay": 5,
|
"newMinimumBlockDelay": 5,
|
||||||
"newMaximumBlockDelay": 60
|
"newMaximumBlockDelay": 60
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return myTxnrequest
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const getTxnRequestResponse = (txnResponse) => {
|
const getTxnRequestResponse = (txnResponse) => {
|
||||||
@ -223,7 +220,7 @@ class ChatGroupSettings extends LitElement {
|
|||||||
throw new Error(txnResponse)
|
throw new Error(txnResponse)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
validateReceiver()
|
await validateReceiver()
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -10,7 +10,7 @@ import '@vaadin/tabs/theme/material/vaadin-tabs.js'
|
|||||||
import '@vaadin/avatar'
|
import '@vaadin/avatar'
|
||||||
import '@vaadin/grid'
|
import '@vaadin/grid'
|
||||||
import '@vaadin/grid/vaadin-grid-filter-column.js'
|
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 })
|
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
|
||||||
|
|
||||||
@ -68,17 +68,15 @@ class ChatGroupsManagement extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getJoinedGroups(){
|
async getJoinedGroups(){
|
||||||
let joinedG = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
url: `/groups/member/${this.selectedAddress.address}`
|
url: `/groups/member/${this.selectedAddress.address}`
|
||||||
})
|
})
|
||||||
return joinedG
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async firstUpdated() {
|
async firstUpdated() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let _joinedGroups = await this.getJoinedGroups()
|
this.joinedGroups = await this.getJoinedGroups()
|
||||||
this.joinedGroups = _joinedGroups
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -161,11 +159,10 @@ class ChatGroupsManagement extends LitElement {
|
|||||||
|
|
||||||
// Get Last Ref
|
// Get Last Ref
|
||||||
const getLastRef = async () => {
|
const getLastRef = async () => {
|
||||||
let myRef = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
type: 'api',
|
type: 'api',
|
||||||
url: `/addresses/lastreference/${this.selectedAddress.address}`
|
url: `/addresses/lastreference/${this.selectedAddress.address}`
|
||||||
})
|
})
|
||||||
return myRef
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const validateReceiver = async () => {
|
const validateReceiver = async () => {
|
||||||
@ -179,20 +176,19 @@ class ChatGroupsManagement extends LitElement {
|
|||||||
const makeTransactionRequest = async (lastRef) => {
|
const makeTransactionRequest = async (lastRef) => {
|
||||||
let groupdialog3 = get("transactions.groupdialog3")
|
let groupdialog3 = get("transactions.groupdialog3")
|
||||||
let groupdialog4 = get("transactions.groupdialog4")
|
let groupdialog4 = get("transactions.groupdialog4")
|
||||||
let myTxnrequest = await parentEpml.request('transaction', {
|
return await parentEpml.request('transaction', {
|
||||||
type: 32,
|
type: 32,
|
||||||
nonce: this.selectedAddress.nonce,
|
nonce: this.selectedAddress.nonce,
|
||||||
params: {
|
params: {
|
||||||
fee: leaveFeeInput,
|
fee: leaveFeeInput,
|
||||||
registrantAddress: this.selectedAddress.address,
|
registrantAddress: this.selectedAddress.address,
|
||||||
rGroupName: groupName,
|
rGroupName: groupName,
|
||||||
rGroupId: groupId,
|
rGroupId: groupId,
|
||||||
lastReference: lastRef,
|
lastReference: lastRef,
|
||||||
groupdialog3: groupdialog3,
|
groupdialog3: groupdialog3,
|
||||||
groupdialog4: groupdialog4,
|
groupdialog4: groupdialog4,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return myTxnrequest
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const getTxnRequestResponse = (txnResponse) => {
|
const getTxnRequestResponse = (txnResponse) => {
|
||||||
@ -211,7 +207,7 @@ class ChatGroupsManagement extends LitElement {
|
|||||||
throw new Error(txnResponse)
|
throw new Error(txnResponse)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
validateReceiver()
|
await validateReceiver()
|
||||||
}
|
}
|
||||||
|
|
||||||
nameRenderer(person){
|
nameRenderer(person){
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit';
|
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-menu';
|
||||||
import '@material/mwc-list/mwc-list-item.js';
|
import '@material/mwc-list/mwc-list-item.js';
|
||||||
import '@material/mwc-dialog'
|
import '@material/mwc-dialog'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit';
|
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 axios from 'axios'
|
||||||
import {RequestQueueWithPromise} from '../../utils/queue';
|
import {RequestQueueWithPromise} from '../../utils/queue';
|
||||||
import '@material/mwc-menu';
|
import '@material/mwc-menu';
|
||||||
@ -116,13 +116,10 @@ export class ChatImage extends LitElement {
|
|||||||
getNodeUrl(){
|
getNodeUrl(){
|
||||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
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 myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
return nodeUrl
|
|
||||||
}
|
}
|
||||||
getMyNode(){
|
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() {
|
getApiKey() {
|
||||||
@ -130,8 +127,7 @@ getMyNode(){
|
|||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
];
|
||||||
let apiKey = myNode.apiKey;
|
return myNode.apiKey;
|
||||||
return apiKey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fetchResource() {
|
async fetchResource() {
|
||||||
@ -148,7 +144,7 @@ getMyNode(){
|
|||||||
|
|
||||||
async fetchVideoUrl() {
|
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}`
|
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
|
this.status = res
|
||||||
if(this.status.status === 'DOWNLOADED'){
|
if(this.status.status === 'DOWNLOADED'){
|
||||||
this.fetchResource()
|
await this.fetchResource()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,12 +212,12 @@ getMyNode(){
|
|||||||
|
|
||||||
async _fetchImage() {
|
async _fetchImage() {
|
||||||
try {
|
try {
|
||||||
this.fetchVideoUrl({
|
await this.fetchVideoUrl({
|
||||||
name: this.resource.name,
|
name: this.resource.name,
|
||||||
service: this.resource.service,
|
service: this.resource.service,
|
||||||
identifier: this.resource.identifier
|
identifier: this.resource.identifier
|
||||||
})
|
})
|
||||||
this.fetchStatus()
|
await this.fetchStatus()
|
||||||
} catch (error) { /* empty */ }
|
} catch (error) { /* empty */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,11 +227,9 @@ getMyNode(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
shouldUpdate(changedProperties) {
|
shouldUpdate(changedProperties) {
|
||||||
if (changedProperties.has('setOpenDialogImage') && changedProperties.size === 1) {
|
return !(changedProperties.has('setOpenDialogImage') && changedProperties.size === 1);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import '@material/mwc-dialog'
|
|||||||
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
import './WrapperModal'
|
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 })
|
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
|
||||||
|
|
||||||
@ -134,11 +134,10 @@ class ChatLeaveGroup extends LitElement {
|
|||||||
|
|
||||||
// Get Last Ref
|
// Get Last Ref
|
||||||
const getLastRef = async () => {
|
const getLastRef = async () => {
|
||||||
let myRef = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
type: 'api',
|
type: 'api',
|
||||||
url: `/addresses/lastreference/${this.selectedAddress.address}`
|
url: `/addresses/lastreference/${this.selectedAddress.address}`
|
||||||
})
|
})
|
||||||
return myRef
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const validateReceiver = async () => {
|
const validateReceiver = async () => {
|
||||||
@ -152,20 +151,19 @@ class ChatLeaveGroup extends LitElement {
|
|||||||
const makeTransactionRequest = async (lastRef) => {
|
const makeTransactionRequest = async (lastRef) => {
|
||||||
let groupdialog3 = get("transactions.groupdialog3")
|
let groupdialog3 = get("transactions.groupdialog3")
|
||||||
let groupdialog4 = get("transactions.groupdialog4")
|
let groupdialog4 = get("transactions.groupdialog4")
|
||||||
let myTxnrequest = await parentEpml.request('transaction', {
|
return await parentEpml.request('transaction', {
|
||||||
type: 32,
|
type: 32,
|
||||||
nonce: this.selectedAddress.nonce,
|
nonce: this.selectedAddress.nonce,
|
||||||
params: {
|
params: {
|
||||||
fee: leaveFeeInput,
|
fee: leaveFeeInput,
|
||||||
registrantAddress: this.selectedAddress.address,
|
registrantAddress: this.selectedAddress.address,
|
||||||
rGroupName: groupName,
|
rGroupName: groupName,
|
||||||
rGroupId: groupId,
|
rGroupId: groupId,
|
||||||
lastReference: lastRef,
|
lastReference: lastRef,
|
||||||
groupdialog3: groupdialog3,
|
groupdialog3: groupdialog3,
|
||||||
groupdialog4: groupdialog4,
|
groupdialog4: groupdialog4,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return myTxnrequest
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const getTxnRequestResponse = (txnResponse) => {
|
const getTxnRequestResponse = (txnResponse) => {
|
||||||
@ -184,7 +182,7 @@ class ChatLeaveGroup extends LitElement {
|
|||||||
throw new Error(txnResponse)
|
throw new Error(txnResponse)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
validateReceiver()
|
await validateReceiver()
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {Epml} from '../../../epml'
|
import {Epml} from '../../../epml'
|
||||||
import snackbar from './snackbar.js'
|
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-button'
|
||||||
import '@material/mwc-dialog'
|
import '@material/mwc-dialog'
|
||||||
|
|
||||||
@ -159,11 +159,11 @@ class ChatModals extends LitElement {
|
|||||||
} else if (addressPublicKey !== false) {
|
} else if (addressPublicKey !== false) {
|
||||||
isEncrypted = 1
|
isEncrypted = 1
|
||||||
_publicKey = addressPublicKey
|
_publicKey = addressPublicKey
|
||||||
sendMessageRequest(isEncrypted, _publicKey)
|
await sendMessageRequest(isEncrypted, _publicKey)
|
||||||
} else {
|
} else {
|
||||||
isEncrypted = 0
|
isEncrypted = 0
|
||||||
_publicKey = this.selectedAddress.address
|
_publicKey = this.selectedAddress.address
|
||||||
sendMessageRequest(isEncrypted, _publicKey)
|
await sendMessageRequest(isEncrypted, _publicKey)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ class ChatModals extends LitElement {
|
|||||||
isText: 1
|
isText: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
_computePow(chatResponse)
|
await _computePow(chatResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
const _computePow = async (chatBytes) => {
|
const _computePow = async (chatBytes) => {
|
||||||
@ -237,7 +237,7 @@ class ChatModals extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
getAddressPublicKey()
|
await getAddressPublicKey()
|
||||||
}
|
}
|
||||||
|
|
||||||
_textArea(e) {
|
_textArea(e) {
|
||||||
@ -246,8 +246,7 @@ class ChatModals extends LitElement {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
let apiKey = myNode.apiKey
|
return myNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getChatBlockedList() {
|
getChatBlockedList() {
|
||||||
@ -291,10 +290,9 @@ class ChatModals extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getChatBlockedAdresses() {
|
async getChatBlockedAdresses() {
|
||||||
const chatBlockedAdresses = await parentEpml.request('apiCall', {
|
this.chatBlockedAdresses = await parentEpml.request('apiCall', {
|
||||||
url: `/lists/blockedAddresses?apiKey=${this.getApiKey()}`
|
url: `/lists/blockedAddresses?apiKey=${this.getApiKey()}`
|
||||||
})
|
})
|
||||||
this.chatBlockedAdresses = chatBlockedAdresses
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {html, LitElement} from 'lit'
|
import {html, LitElement} from 'lit'
|
||||||
import {animate} from '@lit-labs/motion'
|
import {animate} from '@lit-labs/motion'
|
||||||
import {Epml} from '../../../epml.js'
|
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 {Editor, Extension, generateHTML} from '@tiptap/core'
|
||||||
import {unsafeHTML} from 'lit/directives/unsafe-html.js'
|
import {unsafeHTML} from 'lit/directives/unsafe-html.js'
|
||||||
import {escape} from 'html-escaper'
|
import {escape} from 'html-escaper'
|
||||||
@ -245,17 +245,12 @@ class ChatPage extends LitElement {
|
|||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
];
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setOpenGifModal(value) {
|
setOpenGifModal(value) {
|
||||||
@ -263,11 +258,11 @@ class ChatPage extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_toggle(value) {
|
_toggle(value) {
|
||||||
this.shifted = value === (false || true) ? value : !this.shifted
|
this.shifted = value === true ? value : !this.shifted
|
||||||
this.requestUpdate()
|
this.requestUpdate()
|
||||||
}
|
}
|
||||||
_toggleResources(value) {
|
_toggleResources(value) {
|
||||||
this.shiftedResources = value === (false || true) ? value : !this.shiftedResources
|
this.shiftedResources = value === true ? value : !this.shiftedResources
|
||||||
this.requestUpdate()
|
this.requestUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,7 +357,7 @@ class ChatPage extends LitElement {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
this.processMessages(getInitialMessages, true, false)
|
await this.processMessages(getInitialMessages, true, false)
|
||||||
} catch (error) { /* empty */ }
|
} catch (error) { /* empty */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1105,8 +1100,7 @@ class ChatPage extends LitElement {
|
|||||||
const handleTransferIntoURL = (dataTransfer) => {
|
const handleTransferIntoURL = (dataTransfer) => {
|
||||||
try {
|
try {
|
||||||
const [firstItem] = dataTransfer.items
|
const [firstItem] = dataTransfer.items
|
||||||
const blob = firstItem.getAsFile()
|
return firstItem.getAsFile()
|
||||||
return blob
|
|
||||||
} catch (error) { /* empty */ }
|
} catch (error) { /* empty */ }
|
||||||
}
|
}
|
||||||
if (event.clipboardData) {
|
if (event.clipboardData) {
|
||||||
@ -1114,7 +1108,7 @@ class ChatPage extends LitElement {
|
|||||||
if (blobFound) {
|
if (blobFound) {
|
||||||
this.insertFile(blobFound)
|
this.insertFile(blobFound)
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const item_list = await navigator.clipboard.read()
|
const item_list = await navigator.clipboard.read()
|
||||||
let image_type
|
let image_type
|
||||||
@ -1140,7 +1134,7 @@ class ChatPage extends LitElement {
|
|||||||
parentEpml.request('showSnackBar', `${errorMsg}`)
|
parentEpml.request('showSnackBar', `${errorMsg}`)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1267,7 +1261,7 @@ class ChatPage extends LitElement {
|
|||||||
}
|
}
|
||||||
delete message.reactions
|
delete message.reactions
|
||||||
const stringifyMessageObject = JSON.stringify(message)
|
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 */ }
|
} catch (error) { /* empty */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1279,16 +1273,16 @@ class ChatPage extends LitElement {
|
|||||||
if(file.identifier){
|
if(file.identifier){
|
||||||
this.imageFile = file
|
this.imageFile = file
|
||||||
this.currentEditor = 'newChat'
|
this.currentEditor = 'newChat'
|
||||||
return
|
|
||||||
}else
|
}else
|
||||||
if (file.type.includes('image')) {
|
if (file.type.includes('image')) {
|
||||||
this.imageFile = file
|
this.imageFile = file
|
||||||
this.currentEditor = 'newChat'
|
this.currentEditor = 'newChat'
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
this.attachment = file
|
this.attachment = file
|
||||||
this.currentEditor = "newAttachmentChat"
|
this.currentEditor = "newAttachmentChat"
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1343,13 +1337,12 @@ class ChatPage extends LitElement {
|
|||||||
|
|
||||||
|
|
||||||
setTimeout(() => {
|
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.includes('direct') === true ? this.isReceipient = true : this.isReceipient = false
|
||||||
this._chatId = this.chatId.split('/')[1]
|
this._chatId = this.chatId.split('/')[1]
|
||||||
|
|
||||||
const mstring = get("chatpage.cchange8")
|
const mstring = get("chatpage.cchange8")
|
||||||
const placeholder = isRecipient === true ? `Message ${this._chatId}` : `${mstring}`
|
this.chatEditorPlaceholder = isRecipient === true ? `Message ${this._chatId}` : `${mstring}`
|
||||||
this.chatEditorPlaceholder = placeholder
|
|
||||||
|
|
||||||
isRecipient ? getAddressPublicKey() : this.fetchChatMessages(this._chatId)
|
isRecipient ? getAddressPublicKey() : this.fetchChatMessages(this._chatId)
|
||||||
|
|
||||||
@ -1358,7 +1351,7 @@ class ChatPage extends LitElement {
|
|||||||
}, 100)
|
}, 100)
|
||||||
|
|
||||||
|
|
||||||
const isRecipient = this.chatId.includes('direct') === true ? true : false
|
const isRecipient = this.chatId.includes('direct') === true
|
||||||
const groupId = this.chatId.split('/')[1]
|
const groupId = this.chatId.split('/')[1]
|
||||||
if (!isRecipient && groupId.toString() !== '0') {
|
if (!isRecipient && groupId.toString() !== '0') {
|
||||||
|
|
||||||
@ -1438,7 +1431,7 @@ class ChatPage extends LitElement {
|
|||||||
const isEnabledChatEnter = localStorage.getItem('isEnabledChatEnter')
|
const isEnabledChatEnter = localStorage.getItem('isEnabledChatEnter')
|
||||||
|
|
||||||
if (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');
|
const previousChatId = changedProperties.get('chatId');
|
||||||
|
|
||||||
this.isLoadingMessages = true
|
this.isLoadingMessages = true
|
||||||
this.initUpdate()
|
await this.initUpdate()
|
||||||
|
|
||||||
|
|
||||||
if (previousChatId) {
|
if (previousChatId) {
|
||||||
@ -1494,11 +1487,9 @@ class ChatPage extends LitElement {
|
|||||||
if (changedProperties.has('setActiveChatHeadUrl')) {
|
if (changedProperties.has('setActiveChatHeadUrl')) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (changedProperties.has('setOpenPrivateMessage')) {
|
return !changedProperties.has('setOpenPrivateMessage');
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1543,8 +1534,7 @@ class ChatPage extends LitElement {
|
|||||||
userName = await getName(this._chatId)
|
userName = await getName(this._chatId)
|
||||||
}
|
}
|
||||||
const mstring = get("chatpage.cchange8")
|
const mstring = get("chatpage.cchange8")
|
||||||
const placeholder = this.isReceipient === true ? `Message ${userName ? userName : this._chatId}` : `${mstring}`
|
return this.isReceipient === true ? `Message ${userName ? userName : this._chatId}` : `${mstring}`
|
||||||
return placeholder
|
|
||||||
}
|
}
|
||||||
|
|
||||||
renderChatScroller() {
|
renderChatScroller() {
|
||||||
@ -1651,14 +1641,14 @@ class ChatPage extends LitElement {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
queue.push(() => replaceMessagesEdited({
|
await queue.push(() => replaceMessagesEdited({
|
||||||
decodedMessages: decodeMsgs,
|
decodedMessages: decodeMsgs,
|
||||||
parentEpml,
|
parentEpml,
|
||||||
isReceipient: this.isReceipient,
|
isReceipient: this.isReceipient,
|
||||||
decodeMessageFunc: this.decodeMessage,
|
decodeMessageFunc: this.decodeMessage,
|
||||||
_publicKey: this._publicKey,
|
_publicKey: this._publicKey,
|
||||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
let list = [...decodeMsgs]
|
let list = [...decodeMsgs]
|
||||||
@ -1717,14 +1707,14 @@ class ChatPage extends LitElement {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
queue.push(() => replaceMessagesEdited({
|
await queue.push(() => replaceMessagesEdited({
|
||||||
decodedMessages: decodeMsgs,
|
decodedMessages: decodeMsgs,
|
||||||
parentEpml,
|
parentEpml,
|
||||||
isReceipient: this.isReceipient,
|
isReceipient: this.isReceipient,
|
||||||
decodeMessageFunc: this.decodeMessage,
|
decodeMessageFunc: this.decodeMessage,
|
||||||
_publicKey: this._publicKey,
|
_publicKey: this._publicKey,
|
||||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
let list = [...decodeMsgs]
|
let list = [...decodeMsgs]
|
||||||
@ -1791,14 +1781,14 @@ class ChatPage extends LitElement {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
queue.push(() => replaceMessagesEdited({
|
await queue.push(() => replaceMessagesEdited({
|
||||||
decodedMessages: decodeMsgs,
|
decodedMessages: decodeMsgs,
|
||||||
parentEpml,
|
parentEpml,
|
||||||
isReceipient: this.isReceipient,
|
isReceipient: this.isReceipient,
|
||||||
decodeMessageFunc: this.decodeMessage,
|
decodeMessageFunc: this.decodeMessage,
|
||||||
_publicKey: this._publicKey,
|
_publicKey: this._publicKey,
|
||||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||||
}));
|
}));
|
||||||
|
|
||||||
let list = [...decodeMsgs]
|
let list = [...decodeMsgs]
|
||||||
|
|
||||||
@ -1843,14 +1833,14 @@ class ChatPage extends LitElement {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
queue.push(() => replaceMessagesEdited({
|
await queue.push(() => replaceMessagesEdited({
|
||||||
decodedMessages: decodeMsgs,
|
decodedMessages: decodeMsgs,
|
||||||
parentEpml,
|
parentEpml,
|
||||||
isReceipient: this.isReceipient,
|
isReceipient: this.isReceipient,
|
||||||
decodeMessageFunc: this.decodeMessage,
|
decodeMessageFunc: this.decodeMessage,
|
||||||
_publicKey: this._publicKey,
|
_publicKey: this._publicKey,
|
||||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||||
}));
|
}));
|
||||||
let list = [...decodeMsgs]
|
let list = [...decodeMsgs]
|
||||||
|
|
||||||
|
|
||||||
@ -1902,14 +1892,14 @@ class ChatPage extends LitElement {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
queue.push(() => replaceMessagesEdited({
|
await queue.push(() => replaceMessagesEdited({
|
||||||
decodedMessages: decodeMsgs,
|
decodedMessages: decodeMsgs,
|
||||||
parentEpml,
|
parentEpml,
|
||||||
isReceipient: this.isReceipient,
|
isReceipient: this.isReceipient,
|
||||||
decodeMessageFunc: this.decodeMessage,
|
decodeMessageFunc: this.decodeMessage,
|
||||||
_publicKey: this._publicKey,
|
_publicKey: this._publicKey,
|
||||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||||
}));
|
}));
|
||||||
|
|
||||||
let list = [ ...decodeMsgs]
|
let list = [ ...decodeMsgs]
|
||||||
|
|
||||||
@ -1961,14 +1951,14 @@ class ChatPage extends LitElement {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
queue.push(() => replaceMessagesEdited({
|
await queue.push(() => replaceMessagesEdited({
|
||||||
decodedMessages: decodeMsgs,
|
decodedMessages: decodeMsgs,
|
||||||
parentEpml,
|
parentEpml,
|
||||||
isReceipient: this.isReceipient,
|
isReceipient: this.isReceipient,
|
||||||
decodeMessageFunc: this.decodeMessage,
|
decodeMessageFunc: this.decodeMessage,
|
||||||
_publicKey: this._publicKey,
|
_publicKey: this._publicKey,
|
||||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -2074,14 +2064,14 @@ class ChatPage extends LitElement {
|
|||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
queue.push(() => replaceMessagesEdited({
|
await queue.push(() => replaceMessagesEdited({
|
||||||
decodedMessages: decodedMessages,
|
decodedMessages: decodedMessages,
|
||||||
parentEpml,
|
parentEpml,
|
||||||
isReceipient: isReceipient,
|
isReceipient: isReceipient,
|
||||||
decodeMessageFunc: this.decodeMessage,
|
decodeMessageFunc: this.decodeMessage,
|
||||||
_publicKey: this._publicKey,
|
_publicKey: this._publicKey,
|
||||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||||
}));
|
}));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log({error})
|
console.log({error})
|
||||||
}
|
}
|
||||||
@ -2135,15 +2125,15 @@ class ChatPage extends LitElement {
|
|||||||
setTimeout(() => this.downElementObserver(), 500)
|
setTimeout(() => this.downElementObserver(), 500)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
queue.push(() => replaceMessagesEdited({
|
await queue.push(() => replaceMessagesEdited({
|
||||||
decodedMessages: decodedMessages,
|
decodedMessages: decodedMessages,
|
||||||
parentEpml,
|
parentEpml,
|
||||||
isReceipient: isReceipient,
|
isReceipient: isReceipient,
|
||||||
decodeMessageFunc: this.decodeMessage,
|
decodeMessageFunc: this.decodeMessage,
|
||||||
_publicKey: this._publicKey,
|
_publicKey: this._publicKey,
|
||||||
isNotInitial: true,
|
isNotInitial: true,
|
||||||
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const renderEachMessage = decodedMessages.map(async (msg) => {
|
const renderEachMessage = decodedMessages.map(async (msg) => {
|
||||||
await this.renderNewMessage(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
|
initial = initial + 1
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
if (e.data) {
|
if (e.data) {
|
||||||
this.processMessages(JSON.parse(e.data), false)
|
await this.processMessages(JSON.parse(e.data), false)
|
||||||
}
|
}
|
||||||
} catch (error) { /* empty */ }
|
} 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
|
initial = initial + 1
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
if (e.data) {
|
if (e.data) {
|
||||||
this.processMessages(JSON.parse(e.data), false)
|
await this.processMessages(JSON.parse(e.data), false)
|
||||||
}
|
}
|
||||||
} catch (error) { /* empty */ }
|
} catch (error) { /* empty */ }
|
||||||
}
|
}
|
||||||
@ -2530,7 +2520,7 @@ class ChatPage extends LitElement {
|
|||||||
|
|
||||||
if (chatId !== undefined) {
|
if (chatId !== undefined) {
|
||||||
if (this.isReceipient) {
|
if (this.isReceipient) {
|
||||||
initDirect(chatId)
|
await initDirect(chatId)
|
||||||
} else {
|
} else {
|
||||||
let groupChatId = Number(chatId)
|
let groupChatId = Number(chatId)
|
||||||
initGroup(groupChatId)
|
initGroup(groupChatId)
|
||||||
@ -2648,8 +2638,7 @@ class ChatPage extends LitElement {
|
|||||||
byteArrays.push(byteArray)
|
byteArrays.push(byteArray)
|
||||||
}
|
}
|
||||||
|
|
||||||
const blob = new Blob(byteArrays, { type: contentType })
|
return new Blob(byteArrays, {type: contentType})
|
||||||
return blob
|
|
||||||
}
|
}
|
||||||
const blob = b64toBlob(str, 'image/png')
|
const blob = b64toBlob(str, 'image/png')
|
||||||
await new Promise(resolve => {
|
await new Promise(resolve => {
|
||||||
@ -2657,11 +2646,9 @@ class ChatPage extends LitElement {
|
|||||||
quality: 0.6,
|
quality: 0.6,
|
||||||
maxWidth: 500,
|
maxWidth: 500,
|
||||||
success(result) {
|
success(result) {
|
||||||
const file = new File([result], "name", {
|
compressedFile = new File([result], "name", {
|
||||||
type: 'image/png'
|
type: 'image/png'
|
||||||
})
|
})
|
||||||
|
|
||||||
compressedFile = file
|
|
||||||
resolve()
|
resolve()
|
||||||
},
|
},
|
||||||
error() {
|
error() {
|
||||||
@ -2703,8 +2690,7 @@ class ChatPage extends LitElement {
|
|||||||
|
|
||||||
let message = ""
|
let message = ""
|
||||||
try {
|
try {
|
||||||
const parsedMessageObj = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
|
message = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
|
||||||
message = parsedMessageObj
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message = outSideMsg.editedMessageObj.decodedMessage
|
message = outSideMsg.editedMessageObj.decodedMessage
|
||||||
}
|
}
|
||||||
@ -2744,8 +2730,7 @@ class ChatPage extends LitElement {
|
|||||||
byteArrays.push(byteArray)
|
byteArrays.push(byteArray)
|
||||||
}
|
}
|
||||||
|
|
||||||
const blob = new Blob(byteArrays, { type: contentType })
|
return new Blob(byteArrays, {type: contentType})
|
||||||
return blob
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const blob = b64toBlob(str, 'image/png')
|
const blob = b64toBlob(str, 'image/png')
|
||||||
@ -2754,11 +2739,9 @@ class ChatPage extends LitElement {
|
|||||||
quality: 0.6,
|
quality: 0.6,
|
||||||
maxWidth: 500,
|
maxWidth: 500,
|
||||||
success(result) {
|
success(result) {
|
||||||
const file = new File([result], "name", {
|
compressedFile = new File([result], "name", {
|
||||||
type: 'image/png'
|
type: 'image/png'
|
||||||
})
|
})
|
||||||
|
|
||||||
compressedFile = file
|
|
||||||
resolve()
|
resolve()
|
||||||
},
|
},
|
||||||
error() {
|
error() {
|
||||||
@ -2800,8 +2783,7 @@ class ChatPage extends LitElement {
|
|||||||
|
|
||||||
let message = ""
|
let message = ""
|
||||||
try {
|
try {
|
||||||
const parsedMessageObj = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
|
message = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
|
||||||
message = parsedMessageObj
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message = outSideMsg.editedMessageObj.decodedMessage
|
message = outSideMsg.editedMessageObj.decodedMessage
|
||||||
@ -2864,10 +2846,9 @@ class ChatPage extends LitElement {
|
|||||||
maxWidth: 1200,
|
maxWidth: 1200,
|
||||||
mimeType: 'image/webp',
|
mimeType: 'image/webp',
|
||||||
success(result) {
|
success(result) {
|
||||||
const file = new File([result], "name", {
|
compressedFile = new File([result], "name", {
|
||||||
type: 'image/webp'
|
type: 'image/webp'
|
||||||
})
|
})
|
||||||
compressedFile = file
|
|
||||||
resolve()
|
resolve()
|
||||||
},
|
},
|
||||||
error() {
|
error() {
|
||||||
@ -3023,8 +3004,7 @@ class ChatPage extends LitElement {
|
|||||||
let message = ""
|
let message = ""
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const parsedMessageObj = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
|
message = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
|
||||||
message = parsedMessageObj
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message = outSideMsg.editedMessageObj.decodedMessage
|
message = outSideMsg.editedMessageObj.decodedMessage
|
||||||
}
|
}
|
||||||
@ -3092,8 +3072,7 @@ class ChatPage extends LitElement {
|
|||||||
|
|
||||||
let message = ""
|
let message = ""
|
||||||
try {
|
try {
|
||||||
const parsedMessageObj = JSON.parse(this.editedMessageObj.decodedMessage)
|
message = JSON.parse(this.editedMessageObj.decodedMessage)
|
||||||
message = parsedMessageObj
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message = this.editedMessageObj.decodedMessage
|
message = this.editedMessageObj.decodedMessage
|
||||||
@ -3125,7 +3104,7 @@ class ChatPage extends LitElement {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
this.isUploadingImage = false
|
this.isUploadingImage = false
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -3288,7 +3267,7 @@ class ChatPage extends LitElement {
|
|||||||
} catch (error) { /* empty */ }
|
} 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]
|
const recipientAddress = this.forwardActiveChatHeadUrl.url.split('/')[1]
|
||||||
this.openForwardOpen = false
|
this.openForwardOpen = false
|
||||||
@ -3315,7 +3294,7 @@ class ChatPage extends LitElement {
|
|||||||
isText: 1
|
isText: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
_computePow(chatResponse, true)
|
await _computePow(chatResponse, true)
|
||||||
} else {
|
} else {
|
||||||
let groupResponse = await parentEpml.request('chat', {
|
let groupResponse = await parentEpml.request('chat', {
|
||||||
type: 181,
|
type: 181,
|
||||||
@ -3333,7 +3312,7 @@ class ChatPage extends LitElement {
|
|||||||
isText: 1
|
isText: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
_computePow(groupResponse, true)
|
await _computePow(groupResponse, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3413,7 +3392,7 @@ class ChatPage extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isForward) {
|
if (isForward) {
|
||||||
sendForwardRequest()
|
await sendForwardRequest()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return sendMessageRequest()
|
return sendMessageRequest()
|
||||||
|
@ -194,8 +194,7 @@ class ChatRightPanel extends LitElement {
|
|||||||
async updated(changedProperties) {
|
async updated(changedProperties) {
|
||||||
if (changedProperties && changedProperties.has('selectedHead')) {
|
if (changedProperties && changedProperties.has('selectedHead')) {
|
||||||
if (this.selectedHead !== {}) {
|
if (this.selectedHead !== {}) {
|
||||||
const userName = await getUserNameFromAddress(this.selectedHead.address);
|
this.userName = await getUserNameFromAddress(this.selectedHead.address);
|
||||||
this.userName = userName;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -217,7 +216,7 @@ class ChatRightPanel extends LitElement {
|
|||||||
|
|
||||||
observerHandler(entries) {
|
observerHandler(entries) {
|
||||||
if (!entries[0].isIntersecting) {
|
if (!entries[0].isIntersecting) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
if(this.groupMembers.length < 20){
|
if(this.groupMembers.length < 20){
|
||||||
return
|
return
|
||||||
|
@ -11,7 +11,7 @@ import './TipUser';
|
|||||||
import './UserInfo/UserInfo';
|
import './UserInfo/UserInfo';
|
||||||
import './ChatImage';
|
import './ChatImage';
|
||||||
import './ReusableImage';
|
import './ReusableImage';
|
||||||
import {get, translate,} from '../../../../core/translate/index.js'
|
import {get, translate,} from '../../../../core/translate'
|
||||||
import {generateIdFromAddresses} from '../../utils/id-generation';
|
import {generateIdFromAddresses} from '../../utils/id-generation';
|
||||||
|
|
||||||
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
|
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
|
||||||
@ -279,11 +279,11 @@ class ChatRightPanelResources extends LitElement {
|
|||||||
async updated(changedProperties) {
|
async updated(changedProperties) {
|
||||||
if (changedProperties && changedProperties.has('_chatId')) {
|
if (changedProperties && changedProperties.has('_chatId')) {
|
||||||
this.images = [];
|
this.images = [];
|
||||||
this.getMoreImages(true);
|
await this.getMoreImages(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changedProperties && changedProperties.has('onlyMyImages')) {
|
if (changedProperties && changedProperties.has('onlyMyImages')) {
|
||||||
this.getMoreImages(true)
|
await this.getMoreImages(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ class ChatRightPanelResources extends LitElement {
|
|||||||
|
|
||||||
observerHandler(entries) {
|
observerHandler(entries) {
|
||||||
if (!entries[0].isIntersecting) {
|
if (!entries[0].isIntersecting) {
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
if (this.images.length < 20) {
|
if (this.images.length < 20) {
|
||||||
return;
|
return;
|
||||||
@ -317,19 +317,11 @@ class ChatRightPanelResources extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
selectAuto(e) {
|
selectAuto(e) {
|
||||||
if (e.target.checked) {
|
this.autoView = !e.target.checked;
|
||||||
this.autoView = false
|
|
||||||
} else {
|
|
||||||
this.autoView = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
selectMyImages(e) {
|
selectMyImages(e) {
|
||||||
if (e.target.checked) {
|
this.onlyMyImages = !e.target.checked;
|
||||||
this.onlyMyImages = false
|
|
||||||
} else {
|
|
||||||
this.onlyMyImages = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {html, LitElement,} from 'lit';
|
import {html, LitElement,} from 'lit';
|
||||||
import {repeat} from 'lit/directives/repeat.js';
|
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 {unsafeHTML} from 'lit/directives/unsafe-html.js';
|
||||||
import {chatStyles} from './ChatScroller-css.js';
|
import {chatStyles} from './ChatScroller-css.js';
|
||||||
import {Epml} from '../../../epml';
|
import {Epml} from '../../../epml';
|
||||||
@ -40,8 +40,7 @@ const getApiKey = () => {
|
|||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
];
|
||||||
let apiKey = myNode.apiKey;
|
return myNode.apiKey;
|
||||||
return apiKey;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const extractComponents = async (url) => {
|
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
|
// 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
|
// For each message, return the updated message if it exists, otherwise return the original message
|
||||||
const updatedGroupMessages = group.messages.map((message) => {
|
const updatedGroupMessages = group.messages.map((message) => {
|
||||||
return updatedMessages[message.signature]
|
return updatedMessages[message.signature]
|
||||||
? { ...message, ...updatedMessages[message.signature] }
|
? {...message, ...updatedMessages[message.signature]}
|
||||||
: message;
|
: message;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -573,8 +572,6 @@ class ChatScroller extends LitElement {
|
|||||||
messages: updatedGroupMessages,
|
messages: updatedGroupMessages,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
this.messagesToRender = newMessagesToRender;
|
|
||||||
this.requestUpdate();
|
this.requestUpdate();
|
||||||
await this.updateComplete;
|
await this.updateComplete;
|
||||||
|
|
||||||
@ -627,34 +624,34 @@ class ChatScroller extends LitElement {
|
|||||||
async updated(changedProperties) {
|
async updated(changedProperties) {
|
||||||
if (changedProperties && changedProperties.has('messages')) {
|
if (changedProperties && changedProperties.has('messages')) {
|
||||||
if (this.messages.type === 'initial') {
|
if (this.messages.type === 'initial') {
|
||||||
this.addNewMessages(this.messages.messages, 'initial');
|
await this.addNewMessages(this.messages.messages, 'initial');
|
||||||
} else if (this.messages.type === 'initialLastSeen') {
|
} else if (this.messages.type === 'initialLastSeen') {
|
||||||
this.newListMessagesUnreadMessages(
|
await this.newListMessagesUnreadMessages(
|
||||||
this.messages.messages,
|
this.messages.messages,
|
||||||
'initialLastSeen',
|
'initialLastSeen',
|
||||||
this.messages.lastReadMessageTimestamp,
|
this.messages.lastReadMessageTimestamp,
|
||||||
this.messages.count
|
this.messages.count
|
||||||
);
|
);
|
||||||
} else if (this.messages.type === 'new')
|
} else if (this.messages.type === 'new')
|
||||||
this.addNewMessages(this.messages.messages);
|
await this.addNewMessages(this.messages.messages);
|
||||||
else if (this.messages.type === 'newComingInAuto')
|
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')
|
else if (this.messages.type === 'old')
|
||||||
this.prependOldMessages(this.messages.messages);
|
await this.prependOldMessages(this.messages.messages);
|
||||||
else if (this.messages.type === 'inBetween')
|
else if (this.messages.type === 'inBetween')
|
||||||
this.newListMessages(
|
await this.newListMessages(
|
||||||
this.messages.messages,
|
this.messages.messages,
|
||||||
this.messages.count
|
this.messages.count
|
||||||
);
|
);
|
||||||
else if (this.messages.type === 'update')
|
else if (this.messages.type === 'update')
|
||||||
this.replaceMessagesWithUpdateByArray(this.messages.messages);
|
await this.replaceMessagesWithUpdateByArray(this.messages.messages);
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
changedProperties &&
|
changedProperties &&
|
||||||
changedProperties.has('updateMessageHash') &&
|
changedProperties.has('updateMessageHash') &&
|
||||||
Object.keys(this.updateMessageHash).length > 0
|
Object.keys(this.updateMessageHash).length > 0
|
||||||
) {
|
) {
|
||||||
this.replaceMessagesWithUpdate(this.updateMessageHash);
|
await this.replaceMessagesWithUpdate(this.updateMessageHash);
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
changedProperties &&
|
changedProperties &&
|
||||||
@ -676,13 +673,9 @@ class ChatScroller extends LitElement {
|
|||||||
|
|
||||||
isLastMessageBeforeUnread(message, formattedMessages) {
|
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 the message is the last one in the older messages list and its timestamp is before the user's last seen timestamp
|
||||||
if (
|
return message.timestamp < this.lastReadMessageTimestamp &&
|
||||||
message.timestamp < this.lastReadMessageTimestamp &&
|
formattedMessages.indexOf(message) === formattedMessages.length - 21;
|
||||||
formattedMessages.indexOf(message) === formattedMessages.length - 21
|
|
||||||
) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@ -1097,11 +1090,7 @@ class MessageTemplate extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
showBlockIconFunc(bool) {
|
showBlockIconFunc(bool) {
|
||||||
if (bool) {
|
this.showBlockAddressIcon = !!bool;
|
||||||
this.showBlockAddressIcon = true;
|
|
||||||
} else {
|
|
||||||
this.showBlockAddressIcon = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async downloadAttachment(attachment) {
|
async downloadAttachment(attachment) {
|
||||||
@ -1206,10 +1195,8 @@ class MessageTemplate extends LitElement {
|
|||||||
if (changedProperties.has('openDialogGif')) {
|
if (changedProperties.has('openDialogGif')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (changedProperties.has('isGifLoaded')) {
|
return !!changedProperties.has('isGifLoaded');
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clearConsole() {
|
clearConsole() {
|
||||||
@ -1411,8 +1398,7 @@ class MessageTemplate extends LitElement {
|
|||||||
|
|
||||||
if (repliedToData) {
|
if (repliedToData) {
|
||||||
try {
|
try {
|
||||||
const parsedMsg = JSON.parse(repliedToData.decodedMessage);
|
repliedToData.decodedMessage = JSON.parse(repliedToData.decodedMessage);
|
||||||
repliedToData.decodedMessage = parsedMsg;
|
|
||||||
} catch (error) { /* empty */ }
|
} catch (error) { /* empty */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2535,4 +2521,4 @@ class ChatMenu extends LitElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.customElements.define('chat-menu', ChatMenu);
|
window.customElements.define('chat-menu', ChatMenu);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {html, LitElement} from 'lit';
|
import {html, LitElement} from 'lit';
|
||||||
import {chatSearchResultsStyles} from './ChatSearchResults-css.js'
|
import {chatSearchResultsStyles} from './ChatSearchResults-css.js'
|
||||||
import {translate} from '../../../../core/translate/index.js'
|
import {translate} from '../../../../core/translate'
|
||||||
|
|
||||||
export class ChatSearchResults extends LitElement {
|
export class ChatSearchResults extends LitElement {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {html, LitElement} from 'lit'
|
import {html, LitElement} from 'lit'
|
||||||
import {chatSearchResultsStyles} from './ChatSearchResults-css.js'
|
import {chatSearchResultsStyles} from './ChatSearchResults-css.js'
|
||||||
import {translate} from '../../../../core/translate/index.js'
|
import {translate} from '../../../../core/translate'
|
||||||
import '@vaadin/icon'
|
import '@vaadin/icon'
|
||||||
import '@vaadin/icons'
|
import '@vaadin/icons'
|
||||||
|
|
||||||
|
@ -210,11 +210,9 @@ class ChatSelect extends LitElement {
|
|||||||
if(changedProperties.has('activeChatHeadUrl')){
|
if(changedProperties.has('activeChatHeadUrl')){
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if(changedProperties.has('chatInfo')){
|
return !!changedProperties.has('chatInfo');
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getUrl(chatUrl) {
|
getUrl(chatUrl) {
|
||||||
|
@ -185,11 +185,9 @@ class ChatSideNavHeads extends LitElement {
|
|||||||
if(changedProperties.has('chatInfo')){
|
if(changedProperties.has('chatInfo')){
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if(changedProperties.has('isImageLoaded')){
|
return !!changedProperties.has('isImageLoaded');
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getUrl(chatUrl) {
|
getUrl(chatUrl) {
|
||||||
|
@ -3,7 +3,7 @@ import {escape, unescape} from 'html-escaper'
|
|||||||
import {EmojiPicker} from 'emoji-picker-js'
|
import {EmojiPicker} from 'emoji-picker-js'
|
||||||
import {inputKeyCodes} from '../../utils/keyCodes.js'
|
import {inputKeyCodes} from '../../utils/keyCodes.js'
|
||||||
import {Epml} from '../../../epml.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 })
|
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
|
||||||
|
|
||||||
@ -268,7 +268,7 @@ class ChatTextEditor extends LitElement {
|
|||||||
if (!this.userName) {
|
if (!this.userName) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
parentEpml.request('showSnackBar', get("chatpage.cchange27"));
|
parentEpml.request('showSnackBar', get("chatpage.cchange27"));
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
initialChat(e) {
|
initialChat(e) {
|
||||||
@ -360,15 +360,15 @@ class ChatTextEditor extends LitElement {
|
|||||||
|
|
||||||
shouldUpdate(changedProperties) {
|
shouldUpdate(changedProperties) {
|
||||||
// Only update element if prop1 changed.
|
// Only update element if prop1 changed.
|
||||||
if(changedProperties.has('setChatEditor') && changedProperties.size === 1) return false
|
return !(changedProperties.has('setChatEditor') && changedProperties.size === 1);
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sendMessageFunc(props) {
|
sendMessageFunc(props) {
|
||||||
if (this.chatMessageSize > 1000 ) {
|
if (this.chatMessageSize > 1000 ) {
|
||||||
parentEpml.request('showSnackBar', get("chatpage.cchange29"))
|
parentEpml.request('showSnackBar', get("chatpage.cchange29"))
|
||||||
return
|
return
|
||||||
};
|
}
|
||||||
this.chatMessageSize = 0
|
this.chatMessageSize = 0
|
||||||
this.chatEditor.updateMirror()
|
this.chatEditor.updateMirror()
|
||||||
this._sendMessage(props)
|
this._sendMessage(props)
|
||||||
@ -376,9 +376,8 @@ class ChatTextEditor extends LitElement {
|
|||||||
|
|
||||||
getMessageSize(message){
|
getMessageSize(message){
|
||||||
try {
|
try {
|
||||||
const messageText = message;
|
// Format and Sanitize Message
|
||||||
// Format and Sanitize Message
|
const sanitizedMessage = message.replace(/ /gi, ' ').replace(/<br\s*[\/]?>/gi, '\n');
|
||||||
const sanitizedMessage = messageText.replace(/ /gi, ' ').replace(/<br\s*[\/]?>/gi, '\n');
|
|
||||||
const trimmedMessage = sanitizedMessage.trim();
|
const trimmedMessage = sanitizedMessage.trim();
|
||||||
let messageObject = {};
|
let messageObject = {};
|
||||||
|
|
||||||
@ -396,8 +395,7 @@ class ChatTextEditor extends LitElement {
|
|||||||
} else if (this.editedMessageObj) {
|
} else if (this.editedMessageObj) {
|
||||||
let message = "";
|
let message = "";
|
||||||
try {
|
try {
|
||||||
const parsedMessageObj = JSON.parse(this.editedMessageObj.decodedMessage);
|
message = JSON.parse(this.editedMessageObj.decodedMessage);
|
||||||
message = parsedMessageObj;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message = this.messageObj.decodedMessage
|
message = this.messageObj.decodedMessage
|
||||||
}
|
}
|
||||||
@ -426,8 +424,7 @@ class ChatTextEditor extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const stringified = JSON.stringify(messageObject);
|
const stringified = JSON.stringify(messageObject);
|
||||||
const size = new Blob([stringified]).size;
|
this.chatMessageSize = new Blob([stringified]).size;
|
||||||
this.chatMessageSize = size;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
@ -626,8 +623,7 @@ class ChatTextEditor extends LitElement {
|
|||||||
const chatInputValue = editor.getValue();
|
const chatInputValue = editor.getValue();
|
||||||
const filteredValue = chatInputValue.replace(/<img.*?alt=".*?/g, '').replace(/".?src=.*?>/g, '');
|
const filteredValue = chatInputValue.replace(/<img.*?alt=".*?/g, '').replace(/".?src=.*?>/g, '');
|
||||||
|
|
||||||
let unescapedValue = editorConfig.unescape(filteredValue);
|
editor.mirror.value = editorConfig.unescape(filteredValue);
|
||||||
editor.mirror.value = unescapedValue;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ChatEditor.prototype.listenChanges = function () {
|
ChatEditor.prototype.listenChanges = function () {
|
||||||
|
@ -3,7 +3,7 @@ import {EmojiPicker} from 'emoji-picker-js'
|
|||||||
import {Epml} from '../../../epml.js'
|
import {Epml} from '../../../epml.js'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
import '@material/mwc-checkbox'
|
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 })
|
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
|
||||||
|
|
||||||
@ -358,10 +358,9 @@ class ChatTextEditor extends LitElement {
|
|||||||
.hide-styling {
|
.hide-styling {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::before {
|
mwc-checkbox::shadow, mdc-checkbox::after, mwc-checkbox::shadow, mdc-checkbox::before {
|
||||||
background-color:var(--mdc-theme-primary)
|
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) {
|
shouldUpdate(changedProperties) {
|
||||||
// Only update element if prop1 changed.
|
// Only update element if prop1 changed.
|
||||||
if(changedProperties.has('setChatEditor') && changedProperties.size === 1) return false
|
return !(changedProperties.has('setChatEditor') && changedProperties.size === 1);
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sendMessageFunc(props) {
|
sendMessageFunc(props) {
|
||||||
@ -700,8 +699,7 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
|
|||||||
} else if (this.editedMessageObj) {
|
} else if (this.editedMessageObj) {
|
||||||
let message = "";
|
let message = "";
|
||||||
try {
|
try {
|
||||||
const parsedMessageObj = JSON.parse(this.editedMessageObj.decodedMessage);
|
message = JSON.parse(this.editedMessageObj.decodedMessage);
|
||||||
message = parsedMessageObj;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message = this.messageObj.decodedMessage
|
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 stringified = JSON.stringify(messageObject);
|
||||||
const size = new Blob([stringified]).size;
|
this.chatMessageSize = new Blob([stringified]).size;
|
||||||
this.chatMessageSize = size;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {Epml} from '../../../epml.js'
|
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 isElectron from 'is-electron'
|
||||||
|
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
@ -145,7 +145,7 @@ class ChatWelcomePage extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
h2, h3, h4, h5 {
|
h2, h3, h4, h5 {
|
||||||
color:# var(--black);
|
color: var(--black);
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -369,7 +369,7 @@ class ChatWelcomePage extends LitElement {
|
|||||||
myRes = false;
|
myRes = false;
|
||||||
} else {
|
} else {
|
||||||
myRes = myNameRes;
|
myRes = myNameRes;
|
||||||
};
|
}
|
||||||
return myRes;
|
return myRes;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -379,7 +379,7 @@ class ChatWelcomePage extends LitElement {
|
|||||||
recipient = _recipient;
|
recipient = _recipient;
|
||||||
} else {
|
} else {
|
||||||
recipient = myNameRes.owner;
|
recipient = myNameRes.owner;
|
||||||
};
|
}
|
||||||
|
|
||||||
let _reference = new Uint8Array(64);
|
let _reference = new Uint8Array(64);
|
||||||
window.crypto.getRandomValues(_reference);
|
window.crypto.getRandomValues(_reference);
|
||||||
@ -406,12 +406,12 @@ class ChatWelcomePage extends LitElement {
|
|||||||
} else if (addressPublicKey !== false) {
|
} else if (addressPublicKey !== false) {
|
||||||
isEncrypted = 1;
|
isEncrypted = 1;
|
||||||
_publicKey = addressPublicKey;
|
_publicKey = addressPublicKey;
|
||||||
sendMessageRequest(isEncrypted, _publicKey);
|
await sendMessageRequest(isEncrypted, _publicKey);
|
||||||
} else {
|
} else {
|
||||||
isEncrypted = 0;
|
isEncrypted = 0;
|
||||||
_publicKey = this.selectedAddress.address;
|
_publicKey = this.selectedAddress.address;
|
||||||
sendMessageRequest(isEncrypted, _publicKey);
|
await sendMessageRequest(isEncrypted, _publicKey);
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const sendMessageRequest = async (isEncrypted, _publicKey) => {
|
const sendMessageRequest = async (isEncrypted, _publicKey) => {
|
||||||
@ -437,7 +437,7 @@ class ChatWelcomePage extends LitElement {
|
|||||||
isText: 1
|
isText: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
_computePow(chatResponse)
|
await _computePow(chatResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
const _computePow = async (chatBytes) => {
|
const _computePow = async (chatBytes) => {
|
||||||
@ -482,7 +482,7 @@ class ChatWelcomePage extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
getAddressPublicKey()
|
await getAddressPublicKey()
|
||||||
}
|
}
|
||||||
|
|
||||||
_textArea(e) {
|
_textArea(e) {
|
||||||
@ -495,9 +495,8 @@ class ChatWelcomePage extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node];
|
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
let apiKey = myNode.apiKey;
|
return myNode.apiKey
|
||||||
return apiKey;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import {translate,} from '../../../../core/translate/index.js'
|
import {translate,} from '../../../../core/translate'
|
||||||
|
|
||||||
export class ImageComponent extends LitElement {
|
export class ImageComponent extends LitElement {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -55,9 +55,8 @@ export class ImageComponent extends LitElement {
|
|||||||
const myNode =
|
const myNode =
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
let apiKey = myNode.apiKey;
|
return myNode.apiKey
|
||||||
return apiKey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async _fetchImage() {
|
async _fetchImage() {
|
||||||
@ -78,15 +77,11 @@ export class ImageComponent extends LitElement {
|
|||||||
url: data.src,
|
url: data.src,
|
||||||
};
|
};
|
||||||
this.requestUpdate();
|
this.requestUpdate();
|
||||||
} else if (!data.ok || data.error) {
|
} else this.error = !data.ok || data.error;
|
||||||
this.error = true;
|
|
||||||
} else {
|
|
||||||
this.error = false;
|
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.error = true;
|
this.error = true;
|
||||||
console.error(error);
|
console.error(error);
|
||||||
this._fetchImage();
|
await this._fetchImage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {Epml} from '../../../epml.js'
|
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 '@polymer/paper-tooltip/paper-tooltip.js'
|
||||||
import {RequestQueue} from '../../utils/queue.js'
|
import {RequestQueue} from '../../utils/queue.js'
|
||||||
|
|
||||||
@ -107,10 +107,9 @@ class LevelFounder extends LitElement {
|
|||||||
async checkAddressInfo() {
|
async checkAddressInfo() {
|
||||||
try {
|
try {
|
||||||
let toCheck = this.checkleveladdress
|
let toCheck = this.checkleveladdress
|
||||||
const memberInfo = await parentEpml.request('apiCall', {
|
this.memberInfo = await parentEpml.request('apiCall', {
|
||||||
url: `/addresses/${toCheck}`
|
url: `/addresses/${toCheck}`
|
||||||
})
|
})
|
||||||
this.memberInfo = memberInfo
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
@ -146,8 +145,7 @@ class LevelFounder extends LitElement {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
let apiKey = myNode.apiKey
|
return myNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {Epml} from '../../../epml.js'
|
import {Epml} from '../../../epml.js'
|
||||||
import snackbar from './snackbar.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-snackbar'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-dialog'
|
import '@material/mwc-dialog'
|
||||||
@ -90,7 +90,7 @@ class NameMenu extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
h2, h3, h4, h5 {
|
h2, h3, h4, h5 {
|
||||||
color:# var(--black);
|
color: var(--black);
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -333,10 +333,9 @@ class NameMenu extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getChatBlockedAdresses() {
|
async getChatBlockedAdresses() {
|
||||||
const chatBlockedAdresses = await parentEpml.request('apiCall', {
|
this.chatBlockedAdresses = await parentEpml.request('apiCall', {
|
||||||
url: `/lists/blockedAddresses?apiKey=${this.getApiKey()}`
|
url: `/lists/blockedAddresses?apiKey=${this.getApiKey()}`
|
||||||
})
|
})
|
||||||
this.chatBlockedAdresses = chatBlockedAdresses
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async chatBlockAddress() {
|
async chatBlockAddress() {
|
||||||
@ -490,11 +489,11 @@ class NameMenu extends LitElement {
|
|||||||
} else if (addressPublicKey !== false) {
|
} else if (addressPublicKey !== false) {
|
||||||
isEncrypted = 1
|
isEncrypted = 1
|
||||||
_publicKey = addressPublicKey
|
_publicKey = addressPublicKey
|
||||||
sendMessageRequest(isEncrypted, _publicKey)
|
await sendMessageRequest(isEncrypted, _publicKey)
|
||||||
} else {
|
} else {
|
||||||
isEncrypted = 0
|
isEncrypted = 0
|
||||||
_publicKey = this.selectedAddress.address
|
_publicKey = this.selectedAddress.address
|
||||||
sendMessageRequest(isEncrypted, _publicKey)
|
await sendMessageRequest(isEncrypted, _publicKey)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -521,7 +520,7 @@ class NameMenu extends LitElement {
|
|||||||
isText: 1
|
isText: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
_computePow(chatResponse)
|
await _computePow(chatResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
const _computePow = async (chatBytes) => {
|
const _computePow = async (chatBytes) => {
|
||||||
@ -568,7 +567,7 @@ class NameMenu extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
getAddressPublicKey()
|
await getAddressPublicKey()
|
||||||
}
|
}
|
||||||
|
|
||||||
_textMenu(event) {
|
_textMenu(event) {
|
||||||
@ -603,9 +602,8 @@ class NameMenu extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node];
|
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
let apiKey = myNode.apiKey;
|
return myNode.apiKey
|
||||||
return apiKey;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ var encode = function(ver, mode, data, maxbuflen) {
|
|||||||
pack(data[i], 8);
|
pack(data[i], 8);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
};
|
}
|
||||||
|
|
||||||
pack(MODE_TERMINATOR, 4);
|
pack(MODE_TERMINATOR, 4);
|
||||||
if (remaining < 8) buf.push(bits);
|
if (remaining < 8) buf.push(bits);
|
||||||
@ -596,4 +596,4 @@ var QRCode = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export { QRCode };
|
export { QRCode };
|
||||||
export default QRCode;
|
export default QRCode;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {translate,} from '../../../../core/translate/index.js'
|
import {translate,} from '../../../../core/translate'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import {RequestQueueWithPromise} from '../../utils/queue'
|
import {RequestQueueWithPromise} from '../../utils/queue'
|
||||||
import '@material/mwc-menu'
|
import '@material/mwc-menu'
|
||||||
@ -121,26 +121,20 @@ export class ResuableImage extends LitElement {
|
|||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
]
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
|
||||||
return nodeUrl
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
|
||||||
]
|
]
|
||||||
|
|
||||||
return myNode
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const myNode =
|
const myNode =
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
let apiKey = myNode.apiKey
|
return myNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fetchResource() {
|
async fetchResource() {
|
||||||
@ -160,7 +154,7 @@ export class ResuableImage extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fetchVideoUrl() {
|
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}`
|
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
|
this.status = res
|
||||||
if (this.status.status === 'DOWNLOADED') {
|
if (this.status.status === 'DOWNLOADED') {
|
||||||
this.fetchResource()
|
await this.fetchResource()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,12 +233,12 @@ export class ResuableImage extends LitElement {
|
|||||||
|
|
||||||
async _fetchImage() {
|
async _fetchImage() {
|
||||||
try {
|
try {
|
||||||
this.fetchVideoUrl({
|
await this.fetchVideoUrl({
|
||||||
name: this.resource.name,
|
name: this.resource.name,
|
||||||
service: this.resource.service,
|
service: this.resource.service,
|
||||||
identifier: this.resource.identifier,
|
identifier: this.resource.identifier,
|
||||||
});
|
});
|
||||||
this.fetchStatus()
|
await this.fetchStatus()
|
||||||
} catch (error) { /* empty */ }
|
} 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