Cleanup code
This commit is contained in:
parent
1c587325e8
commit
42201341c1
@ -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;
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ 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'
|
||||||
@ -965,7 +965,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)
|
||||||
@ -1009,7 +1009,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))
|
||||||
@ -1162,7 +1162,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)
|
||||||
@ -1206,7 +1206,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))
|
||||||
@ -1348,7 +1348,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)
|
||||||
@ -1392,7 +1392,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))
|
||||||
@ -1534,7 +1534,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)
|
||||||
@ -1578,7 +1578,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))
|
||||||
@ -1720,7 +1720,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)
|
||||||
@ -1764,7 +1764,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))
|
||||||
@ -1906,7 +1906,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)
|
||||||
@ -1950,7 +1950,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 +2243,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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ 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';
|
||||||
|
@ -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'
|
||||||
|
@ -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';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { LitElement, html, css } from 'lit';
|
import { LitElement, html, css } from 'lit';
|
||||||
import { get, translate } from '../../../translate/index.js'
|
import { get, 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';
|
||||||
|
@ -8,7 +8,7 @@ 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, 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 '../notification-view/popover.js';
|
import '../notification-view/popover.js';
|
||||||
@ -94,11 +94,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 '';
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
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() {
|
||||||
|
@ -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'
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
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';
|
||||||
|
@ -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'
|
||||||
|
|
||||||
@ -216,7 +216,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;
|
||||||
|
@ -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';
|
||||||
@ -165,7 +165,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;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { LitElement, html, css } from 'lit';
|
import { LitElement, html, css } from 'lit';
|
||||||
import { render } from 'lit/html.js';
|
import { render } from 'lit/html.js';
|
||||||
import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from '../../../translate/index.js'
|
import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from '../../../translate'
|
||||||
import '@material/mwc-button';
|
import '@material/mwc-button';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import '@vaadin/tooltip';
|
import '@vaadin/tooltip';
|
||||||
|
@ -6,7 +6,7 @@ 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';
|
||||||
|
|
||||||
@ -814,11 +814,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() {
|
||||||
|
@ -6,7 +6,7 @@ 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 { get, translate } from '../../../translate'
|
||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -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'
|
||||||
|
@ -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 {checkApiKey} from '../../apiKeyUtils.js'
|
import {checkApiKey} from '../../apiKeyUtils.js'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-checkbox'
|
import '@material/mwc-checkbox'
|
||||||
|
@ -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'
|
||||||
|
@ -1255,11 +1255,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 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -111,11 +111,7 @@ class NotificationBell extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
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 { LitElement, html, css } 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() {
|
||||||
|
@ -3,7 +3,7 @@ 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'
|
||||||
|
|
||||||
|
@ -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'
|
||||||
|
|
||||||
|
@ -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'
|
||||||
@ -1995,11 +1995,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 +2056,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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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';
|
||||||
@ -293,7 +293,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
this.getMintingAcccounts();
|
this.getMintingAcccounts();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.errorMsg = this.renderErrorMsg3();
|
this.errorMsg = this.renderErrorMsg3();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -426,7 +426,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
} 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;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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'
|
||||||
|
@ -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'
|
||||||
|
@ -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())
|
||||||
|
@ -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())
|
||||||
|
@ -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
|
|
||||||
}
|
}
|
||||||
|
38
electron.js
38
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
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -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'
|
||||||
|
@ -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'
|
||||||
|
@ -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'
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -440,11 +436,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);
|
||||||
|
@ -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;
|
||||||
|
@ -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 })
|
||||||
|
|
||||||
|
@ -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 });
|
||||||
|
|
||||||
@ -284,7 +284,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 +294,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 })
|
||||||
|
|
||||||
|
@ -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 })
|
||||||
|
|
||||||
|
@ -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';
|
||||||
@ -231,11 +231,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 })
|
||||||
|
|
||||||
|
@ -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'
|
||||||
|
|
||||||
|
@ -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'
|
||||||
@ -263,11 +263,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()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1114,7 +1114,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 +1140,7 @@ class ChatPage extends LitElement {
|
|||||||
parentEpml.request('showSnackBar', `${errorMsg}`)
|
parentEpml.request('showSnackBar', `${errorMsg}`)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1279,16 +1279,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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1494,11 +1494,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
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3125,7 +3123,7 @@ class ChatPage extends LitElement {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
this.isUploadingImage = false
|
this.isUploadingImage = false
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,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 });
|
||||||
@ -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';
|
||||||
@ -676,13 +676,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 +1093,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 +1198,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() {
|
||||||
|
@ -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)
|
||||||
|
@ -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) {
|
||||||
|
@ -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);
|
||||||
@ -411,7 +411,7 @@ class ChatWelcomePage extends LitElement {
|
|||||||
isEncrypted = 0;
|
isEncrypted = 0;
|
||||||
_publicKey = this.selectedAddress.address;
|
_publicKey = this.selectedAddress.address;
|
||||||
sendMessageRequest(isEncrypted, _publicKey);
|
sendMessageRequest(isEncrypted, _publicKey);
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const sendMessageRequest = async (isEncrypted, _publicKey) => {
|
const sendMessageRequest = async (isEncrypted, _publicKey) => {
|
||||||
|
@ -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() {
|
||||||
@ -78,11 +78,7 @@ 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);
|
||||||
|
@ -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'
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
@ -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'
|
||||||
|
@ -3,7 +3,7 @@ import {tipUserStyles} from './TipUser-css.js'
|
|||||||
import {Epml} from '../../../epml'
|
import {Epml} from '../../../epml'
|
||||||
import '@vaadin/button'
|
import '@vaadin/button'
|
||||||
import '@polymer/paper-progress/paper-progress.js'
|
import '@polymer/paper-progress/paper-progress.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 });
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ export class TipUser extends LitElement {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const validateAddress = async (receiverAddress) => {
|
const validateAddress = async (receiverAddress) => {
|
||||||
return await window.parent.validateAddress(receiverAddress);
|
return window.parent.validateAddress(receiverAddress);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getName = async (recipient) => {
|
const getName = async (recipient) => {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {render} from 'lit/html.js'
|
import {render} from 'lit/html.js'
|
||||||
import {Epml} from '../../../epml.js'
|
import {Epml} from '../../../epml.js'
|
||||||
import {get, translate} from '../../../../core/translate/index.js'
|
import {get, translate} from '../../../../core/translate'
|
||||||
import {tradeInfoViewStyle} from './TradeInfoView-css.js'
|
import {tradeInfoViewStyle} from './TradeInfoView-css.js'
|
||||||
import './TraderInfoView.js'
|
import './TraderInfoView.js'
|
||||||
import '@polymer/paper-dialog/paper-dialog.js'
|
import '@polymer/paper-dialog/paper-dialog.js'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {render} from 'lit/html.js'
|
import {render} from 'lit/html.js'
|
||||||
import {Epml} from '../../../epml.js'
|
import {Epml} from '../../../epml.js'
|
||||||
import {get, translate} from '../../../../core/translate/index.js'
|
import {get, translate} from '../../../../core/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 {html, LitElement} from 'lit'
|
import {html, LitElement} from 'lit'
|
||||||
import {translate} from '../../../../../core/translate/index.js'
|
import {translate} from '../../../../../core/translate'
|
||||||
import {userInfoStyles} from './UserInfo-css.js'
|
import {userInfoStyles} from './UserInfo-css.js'
|
||||||
import {cropAddress} from '../../../utils/cropAddress.js'
|
import {cropAddress} from '../../../utils/cropAddress.js'
|
||||||
|
|
||||||
|
@ -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 '../../../../core/translate/index.js'
|
import {translate} from '../../../../core/translate'
|
||||||
|
|
||||||
class FragFileInput extends LitElement {
|
class FragFileInput extends LitElement {
|
||||||
static get properties () {
|
static get properties () {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {render} from 'lit/html.js'
|
import {render} from 'lit/html.js'
|
||||||
import {get, translate} from '../../../../core/translate/index.js'
|
import {get, translate} from '../../../../core/translate'
|
||||||
import '@polymer/paper-dialog/paper-dialog.js'
|
import '@polymer/paper-dialog/paper-dialog.js'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
|
@ -75,7 +75,7 @@ export default class ExtendedTimeElement extends HTMLElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
getFormattedDate() {
|
getFormattedDate() {
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const titleFormatter = makeFormatter({
|
const titleFormatter = makeFormatter({
|
||||||
|
@ -240,7 +240,7 @@ class ExtendedTimeElement extends HTMLElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
getFormattedDate() {
|
getFormattedDate() {
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const titleFormatter = makeFormatter({
|
const titleFormatter = makeFormatter({
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {render} from 'lit/html.js'
|
import {render} from 'lit/html.js'
|
||||||
import {Epml} from '../../../epml.js'
|
import {Epml} from '../../../epml.js'
|
||||||
import isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
|
import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
|
||||||
import '../components/time-elements/index.js'
|
import '../components/time-elements/index.js'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-dialog'
|
import '@material/mwc-dialog'
|
||||||
@ -2491,7 +2491,7 @@ class GroupManagement extends LitElement {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (this.bannedMembers.length === 0) {
|
if (this.bannedMembers.length === 0) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
this.bannedMembers.map(a => {
|
this.bannedMembers.map(a => {
|
||||||
let callTheBannedMember = a.offender
|
let callTheBannedMember = a.offender
|
||||||
@ -2542,7 +2542,7 @@ class GroupManagement extends LitElement {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (this.groupInviteMembers.length === 0) {
|
if (this.groupInviteMembers.length === 0) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
this.groupInviteMembers.map(a => {
|
this.groupInviteMembers.map(a => {
|
||||||
let callTheInviteMember = a.invitee
|
let callTheInviteMember = a.invitee
|
||||||
@ -2589,7 +2589,7 @@ class GroupManagement extends LitElement {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (this.groupJoinMembers.length === 0) {
|
if (this.groupJoinMembers.length === 0) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
this.groupJoinMembers.map(a => {
|
this.groupJoinMembers.map(a => {
|
||||||
let callTheJoinMember = a.joiner
|
let callTheJoinMember = a.joiner
|
||||||
|
@ -938,7 +938,7 @@ class Chat extends LitElement {
|
|||||||
|
|
||||||
getChatHeadFromState(chatObj) {
|
getChatHeadFromState(chatObj) {
|
||||||
if (chatObj === undefined) {
|
if (chatObj === undefined) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
this.chatHeadsObj = chatObj
|
this.chatHeadsObj = chatObj
|
||||||
this.setChatHeads(chatObj)
|
this.setChatHeads(chatObj)
|
||||||
|
@ -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 isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
import {registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
|
import {registerTranslateConfig, translate, use} from '../../../../core/translate'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-dialog'
|
import '@material/mwc-dialog'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {render} from 'lit/html.js'
|
import {render} from 'lit/html.js'
|
||||||
import {Epml} from '../../../epml.js'
|
import {Epml} from '../../../epml.js'
|
||||||
import {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-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-dialog'
|
import '@material/mwc-dialog'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {render} from 'lit/html.js'
|
import {render} from 'lit/html.js'
|
||||||
import {Epml} from '../../../epml.js'
|
import {Epml} from '../../../epml.js'
|
||||||
import {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 '../components/qortal-info-view.js'
|
import '../components/qortal-info-view.js'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {render} from 'lit/html.js'
|
import {render} from 'lit/html.js'
|
||||||
import {Epml} from '../../../epml.js'
|
import {Epml} from '../../../epml.js'
|
||||||
import isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
|
import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
|
||||||
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 '@material/mwc-textfield'
|
import '@material/mwc-textfield'
|
||||||
|
@ -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 {overviewStyle} from './overview-page-css.js'
|
import {overviewStyle} from './overview-page-css.js'
|
||||||
import {asyncReplace} from 'lit/directives/async-replace.js'
|
import {asyncReplace} from 'lit/directives/async-replace.js'
|
||||||
import isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
@ -247,17 +247,9 @@ class OverviewPage extends LitElement {
|
|||||||
const findMyMintingRecipient = this.listAccounts.find((myKey) => myKey.recipientAccount === address)
|
const findMyMintingRecipient = this.listAccounts.find((myKey) => myKey.recipientAccount === address)
|
||||||
const findRemovedSponsorsKey = this.listAccounts.filter((my) => my.address)
|
const findRemovedSponsorsKey = this.listAccounts.filter((my) => my.address)
|
||||||
|
|
||||||
if (findMyMintingAccount === undefined) {
|
this.check1 = findMyMintingAccount !== undefined;
|
||||||
this.check1 = false
|
|
||||||
} else {
|
|
||||||
this.check1 = true
|
|
||||||
}
|
|
||||||
|
|
||||||
if (findMyMintingRecipient === undefined) {
|
this.check2 = findMyMintingRecipient !== undefined;
|
||||||
this.check2 = false
|
|
||||||
} else {
|
|
||||||
this.check2 = true
|
|
||||||
}
|
|
||||||
|
|
||||||
if (findRemovedSponsorsKey.length > 0) {
|
if (findRemovedSponsorsKey.length > 0) {
|
||||||
this.removeBlankKey(findRemovedSponsorsKey.publicKey)
|
this.removeBlankKey(findRemovedSponsorsKey.publicKey)
|
||||||
@ -611,7 +603,7 @@ class StartMintingNow extends LitElement {
|
|||||||
this.getMintingAcccounts()
|
this.getMintingAcccounts()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.errorMsg = this.renderErrorMsg3()
|
this.errorMsg = this.renderErrorMsg3()
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -732,7 +724,7 @@ class StartMintingNow extends LitElement {
|
|||||||
this.confirmRelationship(publicAddress)
|
this.confirmRelationship(publicAddress)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.errorMsg = error.data.message || this.renderErrorMsg4()
|
this.errorMsg = error.data.message || this.renderErrorMsg4()
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {render} from 'lit/html.js'
|
import {render} from 'lit/html.js'
|
||||||
import {Epml} from '../../../epml.js'
|
import {Epml} from '../../../epml.js'
|
||||||
import isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
import {registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
|
import {registerTranslateConfig, translate, use} from '../../../../core/translate'
|
||||||
import nacl from '../../../../crypto/api/deps/nacl-fast.js'
|
import nacl from '../../../../crypto/api/deps/nacl-fast.js'
|
||||||
import Base58 from '../../../../crypto/api/deps/Base58.js'
|
import Base58 from '../../../../crypto/api/deps/Base58.js'
|
||||||
import publicKeyToAddress from '../../../../crypto/api/wallet/publicKeyToAddress.js'
|
import publicKeyToAddress from '../../../../crypto/api/wallet/publicKeyToAddress.js'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {render} from 'lit/html.js'
|
import {render} from 'lit/html.js'
|
||||||
import {Epml} from '../../../epml.js'
|
import {Epml} from '../../../epml.js'
|
||||||
import {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 '@polymer/paper-spinner/paper-spinner-lite.js'
|
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||||
import '@polymer/paper-dialog/paper-dialog.js'
|
import '@polymer/paper-dialog/paper-dialog.js'
|
||||||
|
@ -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 isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
import { get, registerTranslateConfig, translate, use } from '../../../../../core/translate/index.js'
|
import { get, registerTranslateConfig, translate, use } from '../../../../../core/translate'
|
||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
import FileSaver from 'file-saver'
|
import FileSaver from 'file-saver'
|
||||||
import * as actions from '../../components/qdn-action-types'
|
import * as actions from '../../components/qdn-action-types'
|
||||||
@ -1547,7 +1547,6 @@ class WebBrowser extends LitElement {
|
|||||||
reason: errorMsg,
|
reason: errorMsg,
|
||||||
identifier: resource.identifier
|
identifier: resource.identifier
|
||||||
})
|
})
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -1555,7 +1554,6 @@ class WebBrowser extends LitElement {
|
|||||||
reason: "Unknown error",
|
reason: "Unknown error",
|
||||||
identifier: resource.identifier
|
identifier: resource.identifier
|
||||||
})
|
})
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -4164,7 +4162,7 @@ async function showModalAndWait(type, data) {
|
|||||||
const modalContent = modal.querySelector('.modal-content')
|
const modalContent = modal.querySelector('.modal-content')
|
||||||
modalContent.addEventListener('click', (e) => {
|
modalContent.addEventListener('click', (e) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
return
|
|
||||||
})
|
})
|
||||||
const backdropClick = document.getElementById('backdrop')
|
const backdropClick = document.getElementById('backdrop')
|
||||||
backdropClick.addEventListener('click', () => {
|
backdropClick.addEventListener('click', () => {
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {render} from 'lit/html.js'
|
import {render} from 'lit/html.js'
|
||||||
import {Epml} from '../../../../epml'
|
import {Epml} from '../../../../epml'
|
||||||
import isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate/index.js'
|
import {get, registerTranslateConfig, translate, use} from '../../../../../core/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'
|
||||||
|
@ -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 isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate/index.js'
|
import {get, registerTranslateConfig, translate, use} from '../../../../../core/translate'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-textfield'
|
import '@material/mwc-textfield'
|
||||||
import '@material/mwc-select'
|
import '@material/mwc-select'
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {render} from 'lit/html.js'
|
import {render} from 'lit/html.js'
|
||||||
import {Epml} from '../../../epml.js'
|
import {Epml} from '../../../epml.js'
|
||||||
import isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
|
import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
|
||||||
import '@material/mwc-dialog'
|
import '@material/mwc-dialog'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {render} from 'lit/html.js'
|
import {render} from 'lit/html.js'
|
||||||
import {Epml} from '../../../epml.js'
|
import {Epml} from '../../../epml.js'
|
||||||
import {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-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-dialog'
|
import '@material/mwc-dialog'
|
||||||
@ -480,20 +480,20 @@ class QortalLottery extends LitElement {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
await this.openLotteries.map(item => {
|
this.openLotteries.map(item => {
|
||||||
const aTT = item.ATAddress
|
const aTT = item.ATAddress
|
||||||
const endHeight = item.sleepUntilHeight
|
const endHeight = item.sleepUntilHeight
|
||||||
const newObj = {
|
const newObj = {
|
||||||
ATAddress: aTT,
|
ATAddress: aTT,
|
||||||
sleepUntilHeight: endHeight
|
sleepUntilHeight: endHeight
|
||||||
}
|
}
|
||||||
this.openLotteriesAtArray.push(newObj)
|
this.openLotteriesAtArray.push(newObj)
|
||||||
})
|
})
|
||||||
|
|
||||||
await this.closedLotteries.map(item => {
|
this.closedLotteries.map(item => {
|
||||||
const myAT = item.ATAddress
|
const myAT = item.ATAddress
|
||||||
this.closedLotteriesAtArray.push(myAT)
|
this.closedLotteriesAtArray.push(myAT)
|
||||||
})
|
})
|
||||||
|
|
||||||
const appDelay = ms => new Promise(res => setTimeout(res, ms))
|
const appDelay = ms => new Promise(res => setTimeout(res, ms))
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
@ -502,37 +502,37 @@ class QortalLottery extends LitElement {
|
|||||||
async getOpenLotteries() {
|
async getOpenLotteries() {
|
||||||
let prepareOpenLotteriesArray = []
|
let prepareOpenLotteriesArray = []
|
||||||
|
|
||||||
await this.openLotteriesAtArray.map(item => {
|
this.openLotteriesAtArray.map(item => {
|
||||||
parentEpml.request('apiCall', {
|
parentEpml.request('apiCall', {
|
||||||
url: `/transactions/address/${item.ATAddress}?limit=0&reverse=true`
|
url: `/transactions/address/${item.ATAddress}?limit=0&reverse=true`
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.openLotteriesFilterTx1 = []
|
this.openLotteriesFilterTx1 = []
|
||||||
this.openLotteriesFilterTx2 = []
|
this.openLotteriesFilterTx2 = []
|
||||||
this.openLotteriesFilterTx = res.filter(function (da) {
|
this.openLotteriesFilterTx = res.filter(function (da) {
|
||||||
return da.type === "DEPLOY_AT"
|
return da.type === "DEPLOY_AT"
|
||||||
})
|
})
|
||||||
this.openLotteriesFilterTx2 = res.filter(function (pm) {
|
this.openLotteriesFilterTx2 = res.filter(function (pm) {
|
||||||
return pm.type === "PAYMENT"
|
return pm.type === "PAYMENT"
|
||||||
})
|
})
|
||||||
this.openLotteriesFilterTx.map(item2 => {
|
this.openLotteriesFilterTx.map(item2 => {
|
||||||
const sleep = item.sleepUntilHeight
|
const sleep = item.sleepUntilHeight
|
||||||
const desc = item2.description
|
const desc = item2.description
|
||||||
const start = item2.blockHeight
|
const start = item2.blockHeight
|
||||||
const ata = item2.aTAddress
|
const ata = item2.aTAddress
|
||||||
const amount = item2.tags
|
const amount = item2.tags
|
||||||
const players = this.openLotteriesFilterTx2.length
|
const players = this.openLotteriesFilterTx2.length
|
||||||
const obj = {
|
const obj = {
|
||||||
description: desc,
|
description: desc,
|
||||||
startBlock: start,
|
startBlock: start,
|
||||||
endBlock: sleep,
|
endBlock: sleep,
|
||||||
aTAddress: ata,
|
aTAddress: ata,
|
||||||
joined: players,
|
joined: players,
|
||||||
enter: amount
|
enter: amount
|
||||||
}
|
}
|
||||||
prepareOpenLotteriesArray.push(obj)
|
prepareOpenLotteriesArray.push(obj)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
const appDelay = ms => new Promise(res => setTimeout(res, ms))
|
const appDelay = ms => new Promise(res => setTimeout(res, ms))
|
||||||
await appDelay(2000)
|
await appDelay(2000)
|
||||||
this.openLotteriesArray = prepareOpenLotteriesArray
|
this.openLotteriesArray = prepareOpenLotteriesArray
|
||||||
@ -543,55 +543,55 @@ class QortalLottery extends LitElement {
|
|||||||
async getFinishedLotteries() {
|
async getFinishedLotteries() {
|
||||||
let prepareClosedLotteriesArray = []
|
let prepareClosedLotteriesArray = []
|
||||||
|
|
||||||
await this.closedLotteriesAtArray.map(item => {
|
this.closedLotteriesAtArray.map(item => {
|
||||||
parentEpml.request('apiCall', {
|
parentEpml.request('apiCall', {
|
||||||
url: `/transactions/address/${item}?limit=0&reverse=true`
|
url: `/transactions/address/${item}?limit=0&reverse=true`
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.closedLotteriesFilterTx1 = []
|
this.closedLotteriesFilterTx1 = []
|
||||||
this.closedLotteriesFilterTx2 = []
|
this.closedLotteriesFilterTx2 = []
|
||||||
this.closedLotteriesFilterTx1 = res.filter(function (el) {
|
this.closedLotteriesFilterTx1 = res.filter(function (el) {
|
||||||
return el.type === "DEPLOY_AT"
|
return el.type === "DEPLOY_AT"
|
||||||
})
|
})
|
||||||
this.closedLotteriesFilterTx2 = res.filter(function (el) {
|
this.closedLotteriesFilterTx2 = res.filter(function (el) {
|
||||||
return el.type === "AT"
|
return el.type === "AT"
|
||||||
})
|
})
|
||||||
|
|
||||||
this.closedLotteriesFilterTx2.map(item1 => {
|
this.closedLotteriesFilterTx2.map(item1 => {
|
||||||
const twinner = item1.recipient
|
const twinner = item1.recipient
|
||||||
const tjackpot = item1.amount
|
const tjackpot = item1.amount
|
||||||
const tendblock = item1.blockHeight
|
const tendblock = item1.blockHeight
|
||||||
this.closedLotteriesFilterTx1.map(item2 => {
|
this.closedLotteriesFilterTx1.map(item2 => {
|
||||||
const tstartblock = item2.blockHeight
|
const tstartblock = item2.blockHeight
|
||||||
const tdescription = item2.description
|
const tdescription = item2.description
|
||||||
parentEpml.request('apiCall', {
|
parentEpml.request('apiCall', {
|
||||||
url: `/names/address/${twinner}?limit=0&reverse=true`
|
url: `/names/address/${twinner}?limit=0&reverse=true`
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.length) {
|
if (res.length) {
|
||||||
const winName = res[0].name
|
const winName = res[0].name
|
||||||
const obj = {
|
const obj = {
|
||||||
description: tdescription,
|
description: tdescription,
|
||||||
startblock: tstartblock,
|
startblock: tstartblock,
|
||||||
endblock: tendblock,
|
endblock: tendblock,
|
||||||
winner: winName,
|
winner: winName,
|
||||||
jackpot: tjackpot
|
jackpot: tjackpot
|
||||||
}
|
}
|
||||||
prepareClosedLotteriesArray.push(obj)
|
prepareClosedLotteriesArray.push(obj)
|
||||||
} else {
|
} else {
|
||||||
const winName = twinner
|
const winName = twinner
|
||||||
const obj = {
|
const obj = {
|
||||||
description: tdescription,
|
description: tdescription,
|
||||||
startblock: tstartblock,
|
startblock: tstartblock,
|
||||||
endblock: tendblock,
|
endblock: tendblock,
|
||||||
winner: winName,
|
winner: winName,
|
||||||
jackpot: tjackpot
|
jackpot: tjackpot
|
||||||
}
|
}
|
||||||
prepareClosedLotteriesArray.push(obj)
|
prepareClosedLotteriesArray.push(obj)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
const appDelay = ms => new Promise(res => setTimeout(res, ms))
|
const appDelay = ms => new Promise(res => setTimeout(res, ms))
|
||||||
await appDelay(5000)
|
await appDelay(5000)
|
||||||
this.closedLotteriesArray = prepareClosedLotteriesArray
|
this.closedLotteriesArray = prepareClosedLotteriesArray
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {render} from 'lit/html.js'
|
import {render} from 'lit/html.js'
|
||||||
import {Epml} from '../../../epml.js'
|
import {Epml} from '../../../epml.js'
|
||||||
import isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
import {get, registerTranslateConfig, translate, use} from '../../../../core/translate/index.js'
|
import {get, registerTranslateConfig, translate, use} from '../../../../core/translate'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-textfield'
|
import '@material/mwc-textfield'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {html, LitElement} from 'lit'
|
import {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 {blocksNeed} from '../../utils/blocks-needed.js'
|
import {blocksNeed} from '../../utils/blocks-needed.js'
|
||||||
import {asyncReplace} from 'lit/directives/async-replace.js'
|
import {asyncReplace} from 'lit/directives/async-replace.js'
|
||||||
import {pageStyles} from './sponsorship-list-css.src.js'
|
import {pageStyles} from './sponsorship-list-css.src.js'
|
||||||
|
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