diff --git a/core/assets/js/svg.js b/core/assets/js/svg.js
index bf4e4288..85257c81 100644
--- a/core/assets/js/svg.js
+++ b/core/assets/js/svg.js
@@ -1,4 +1,4 @@
-import { html } from 'lit'
+import {html} from 'lit'
export const svgSun = html` `;
export const svgMoon = html ` `;
diff --git a/core/src/components/app-info.js b/core/src/components/app-info.js
index fc2719c4..3c212b7b 100644
--- a/core/src/components/app-info.js
+++ b/core/src/components/app-info.js
@@ -1,10 +1,10 @@
-import { LitElement, html, css } from 'lit'
-import { connect } from 'pwa-helpers'
-import { store } from '../store.js'
-import { doPageUrl } from '../redux/app/app-actions.js'
-import { translate, translateUnsafeHTML } from 'lit-translate'
+import {css, html, LitElement} from 'lit'
+import {connect} from 'pwa-helpers'
+import {store} from '../store.js'
+import {doPageUrl} from '../redux/app/app-actions.js'
+import {translate} from 'lit-translate'
import WebWorker from 'web-worker:./computePowWorker.js';
-import { routes } from '../plugins/routes.js';
+import {routes} from '../plugins/routes.js';
import '@material/mwc-icon'
import '@material/mwc-button'
@@ -124,7 +124,7 @@ class AppInfo extends connect(store)(LitElement) {
// } catch (error) {
// console.error(error)
// }
-
+
setInterval(() => {
this.getNodeInfo()
this.getCoreInfo()
@@ -198,13 +198,13 @@ class AppInfo extends connect(store)(LitElement) {
lastReference: reference,
proofOfWorkNonce: 0,
fee: 0,
- timestamp: Date.now(),
+ timestamp: Date.now(),
},
disableModal: true
},
disableModal: true,
});
-
+
try {
const powRes = await _computePow2(chatRes)
if(powRes === true) {
@@ -216,7 +216,7 @@ class AppInfo extends connect(store)(LitElement) {
console.error(error)
}
}
-
+
if (!data.error && data !== 'false' && data) {
clearInterval(this.interval)
localStorage.removeItem(this.publicizeAddress)
diff --git a/core/src/components/app-view.js b/core/src/components/app-view.js
index 253472d2..dd356819 100644
--- a/core/src/components/app-view.js
+++ b/core/src/components/app-view.js
@@ -1,18 +1,13 @@
-import { LitElement, html, css } from 'lit'
-import { connect } from 'pwa-helpers'
-import { store } from '../store.js'
-import { Epml } from '../epml.js'
-import { addTradeBotRoutes } from '../tradebot/addTradeBotRoutes.js'
-import { get, translate, translateUnsafeHTML } from 'lit-translate'
+import {css, html, LitElement} from 'lit'
+import {connect} from 'pwa-helpers'
+import {store} from '../store.js'
+import {Epml} from '../epml.js'
+import {addTradeBotRoutes} from '../tradebot/addTradeBotRoutes.js'
+import {get, translate} from 'lit-translate'
import localForage from 'localforage'
-import { encryptData, decryptData } from '../lockScreen.js'
-import { setChatLastSeen } from '../redux/app/app-actions.js'
+import {decryptData, encryptData} from '../lockScreen.js'
+import {setChatLastSeen} from '../redux/app/app-actions.js'
import isElectron from 'is-electron'
-
-const chatLastSeen = localForage.createInstance({
- name: "chat-last-seen",
-})
-
import '@material/mwc-button'
import '@material/mwc-icon'
import '@polymer/paper-icon-button/paper-icon-button.js'
@@ -47,6 +42,11 @@ import './friends-view/friends-side-panel-parent.js'
import './friends-view/save-settings-qdn.js'
import './friends-view/core-sync-status.js'
import './controllers/coin-balances-controller.js'
+
+const chatLastSeen = localForage.createInstance({
+ name: "chat-last-seen",
+})
+
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
class AppView extends connect(store)(LitElement) {
@@ -230,13 +230,13 @@ class AppView extends connect(store)(LitElement) {
background-color: whitesmoke;
border-radius: 7px;
}
-
+
.sideBarMenu::-webkit-scrollbar {
width: 6px;
border-radius: 7px;
background-color: whitesmoke;
}
-
+
.sideBarMenu::-webkit-scrollbar-thumb {
background-color: rgb(180, 176, 176);
border-radius: 7px;
@@ -363,7 +363,7 @@ class AppView extends connect(store)(LitElement) {
0%,100% { opacity: 0; }
50% { opacity: 10; }
}
-
+
.sideBarMenu::-webkit-scrollbar-thumb:hover {
background-color: rgb(148, 146, 146);
cursor: pointer;
@@ -1837,7 +1837,7 @@ class AppView extends connect(store)(LitElement) {
-
+
diff --git a/core/src/components/base.js b/core/src/components/base.js
index d8d24093..e5382038 100644
--- a/core/src/components/base.js
+++ b/core/src/components/base.js
@@ -1,6 +1,6 @@
-import { LitElement, html, css } from 'lit'
-import { connect } from 'pwa-helpers'
-import { store } from '../store.js'
+import {css, html, LitElement} from 'lit'
+import {connect} from 'pwa-helpers'
+import {store} from '../store.js'
class MyElement extends connect(store)(LitElement) {
static get properties () {
diff --git a/core/src/components/check-for-update.js b/core/src/components/check-for-update.js
index a14c0fd0..92844d79 100644
--- a/core/src/components/check-for-update.js
+++ b/core/src/components/check-for-update.js
@@ -1,5 +1,5 @@
-import { LitElement, html, css } from 'lit'
-import { get, translate, translateUnsafeHTML } from 'lit-translate'
+import {css, html, LitElement} from 'lit'
+import {translate} from 'lit-translate'
import isElectron from 'is-electron'
import '@polymer/paper-icon-button/paper-icon-button.js'
diff --git a/core/src/components/computePowWorker.js b/core/src/components/computePowWorker.js
index 2ed60a20..b89b9d84 100644
--- a/core/src/components/computePowWorker.js
+++ b/core/src/components/computePowWorker.js
@@ -1,4 +1,4 @@
-import { Sha256 } from 'asmcrypto.js'
+import {Sha256} from 'asmcrypto.js'
function sbrk(size, heap){
@@ -39,7 +39,7 @@ const computePow = async (chatBytes, path, difficulty) => {
const hashAry = new Uint8Array(memory.buffer, hashPtr, 32);
hashAry.set(chatBytesHash);
-
+
const workBufferLength = 8 * 1024 * 1024;
const workBufferPtr = sbrk(workBufferLength, heap);
@@ -72,11 +72,11 @@ loadWebAssembly(path)
}
resolve()
-
+
});
- })
+ })
return response
-}
\ No newline at end of file
+}
diff --git a/core/src/components/controllers/coin-balances-controller.js b/core/src/components/controllers/coin-balances-controller.js
index 0aef763c..3cddd6d8 100644
--- a/core/src/components/controllers/coin-balances-controller.js
+++ b/core/src/components/controllers/coin-balances-controller.js
@@ -1,11 +1,10 @@
-import { LitElement, html, css } from 'lit';
+import {html, LitElement} from 'lit';
import '@material/mwc-icon';
-import { store } from '../../store';
-import { connect } from 'pwa-helpers';
+import {store} from '../../store';
+import {connect} from 'pwa-helpers';
import '@vaadin/tooltip';
-import { get } from 'lit-translate';
-import { parentEpml } from '../show-plugin';
-import { setCoinBalances } from '../../redux/app/app-actions';
+import {parentEpml} from '../show-plugin';
+import {setCoinBalances} from '../../redux/app/app-actions';
class CoinBalancesController extends connect(store)(LitElement) {
static get properties() {
@@ -43,7 +42,7 @@ class CoinBalancesController extends connect(store)(LitElement) {
return myNode;
}
-
+
async updateArrrWalletBalance() {
let _url = `/crosschain/arrr/walletbalance?apiKey=${this.myNode.apiKey}`
let _body = store.getState().app.selectedAddress.arrrWallet.seed58
@@ -205,7 +204,7 @@ class CoinBalancesController extends connect(store)(LitElement) {
fullValue: Number(res)
})
);
-
+
}
}).catch(()=> {
console.log('error')
@@ -233,7 +232,7 @@ class CoinBalancesController extends connect(store)(LitElement) {
this.updateArrrWalletBalance()
}
} catch (error) {
-
+
}
}
copyCoinList[coin] = Date.now() + 120000;
@@ -264,9 +263,9 @@ class CoinBalancesController extends connect(store)(LitElement) {
})
await Promise.all(getCoinBalances);
-
+
}
-
+
async fetchBalance(){
try {
let arrayOfCoins = []
@@ -303,7 +302,7 @@ class CoinBalancesController extends connect(store)(LitElement) {
}
disconnectedCallback() {
-
+
super.disconnectedCallback();
window.removeEventListener(
'ping-coin-controller-with-coin',
@@ -316,7 +315,7 @@ class CoinBalancesController extends connect(store)(LitElement) {
}
-
+
render() {
return html``;
diff --git a/core/src/components/friends-view/ChatSideNavHeads.js b/core/src/components/friends-view/ChatSideNavHeads.js
index 2bae1d7a..bdbaa599 100644
--- a/core/src/components/friends-view/ChatSideNavHeads.js
+++ b/core/src/components/friends-view/ChatSideNavHeads.js
@@ -1,6 +1,5 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {css, html, LitElement} from 'lit'
+import {get} from 'lit-translate'
import '@material/mwc-icon'
import '@vaadin/tooltip';
@@ -100,7 +99,7 @@ class ChatSideNavHeads extends LitElement {
imageHTMLRes.onload = () => {
this.isImageLoaded = true;
}
- imageHTMLRes.onerror = () => {
+ imageHTMLRes.onerror = () => {
if (this.imageFetches < 4) {
setTimeout(() => {
this.imageFetches = this.imageFetches + 1;
@@ -170,13 +169,13 @@ class ChatSideNavHeads extends LitElement {
-
+
${count ? html`
@@ -455,7 +452,7 @@ class ShowPlugin extends connect(store)(LitElement) {
${count}
{
event.stopPropagation(); this.removeTab(index, tab.id)
-
+
}}>close
` : html`
${title}
@@ -465,7 +462,7 @@ class ShowPlugin extends connect(store)(LitElement) {
`
})}
-
'use strict'
-import { LitElement, html, css } from 'lit'
+import {html, LitElement} from 'lit'
import * as WORDLISTS from './wordlists.js'
class RandomSentenceGenerator extends LitElement {
diff --git a/core/src/functional-components/settings-page.js b/core/src/functional-components/settings-page.js
index c96e36e0..2aaad8c7 100644
--- a/core/src/functional-components/settings-page.js
+++ b/core/src/functional-components/settings-page.js
@@ -1,8 +1,8 @@
-import { LitElement, html, css } from 'lit'
-import { connect } from 'pwa-helpers'
-import { store } from '../store.js'
-import { doAddNode, doSetNode, doLoadNodeConfig, doRemoveNode, doEditNode } from '../redux/app/app-actions.js'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {css, html, LitElement} from 'lit'
+import {connect} from 'pwa-helpers'
+import {store} from '../store.js'
+import {doAddNode, doEditNode, doLoadNodeConfig, doRemoveNode, doSetNode} from '../redux/app/app-actions.js'
+import {get, registerTranslateConfig, translate, use} from 'lit-translate'
import snackbar from './snackbar.js'
import '../components/language-selector.js'
import '../custom-elements/frag-file-input.js'
diff --git a/core/src/functional-components/side-menu-item-style.js b/core/src/functional-components/side-menu-item-style.js
index e30386ce..a9711b12 100644
--- a/core/src/functional-components/side-menu-item-style.js
+++ b/core/src/functional-components/side-menu-item-style.js
@@ -1,4 +1,4 @@
-import { css } from 'lit'
+import {css} from 'lit'
export const sideMenuItemStyle = css`
:host {
@@ -21,7 +21,7 @@ export const sideMenuItemStyle = css`
--overlay-box-shadow: 0 2px 4px -1px hsla(214, 53%, 23%, 0.16), 0 3px 12px -1px hsla(214, 50%, 22%, 0.26);
--overlay-background-color: #ffffff;
-
+
--spacing: 4px;
font-family: var(--font-family);
@@ -86,7 +86,7 @@ export const sideMenuItemStyle = css`
:host([expanded]){
background-color: var(--item-selected-color);
}
-
+
:host([hasSelectedChild]){
background-color: var(--item-selected-color);
}
@@ -109,7 +109,7 @@ export const sideMenuItemStyle = css`
}
#collapse-button {
- float: right;
+ float: right;
}
:host([compact]) #itemLink[level]:not([level="0"]) {
@@ -143,7 +143,7 @@ export const sideMenuItemStyle = css`
z-index: 1;
animation: pop 200ms forwards;
}
-
+
@keyframes pop{
0% {
transform: translateX(-5px);
diff --git a/core/src/functional-components/side-menu-item.js b/core/src/functional-components/side-menu-item.js
index ad0ac02e..a24fffb6 100644
--- a/core/src/functional-components/side-menu-item.js
+++ b/core/src/functional-components/side-menu-item.js
@@ -1,6 +1,6 @@
-import { LitElement, html, css } from 'lit'
-import { ifDefined } from 'lit/directives/if-defined.js'
-import { sideMenuItemStyle } from './side-menu-item-style.js'
+import {css, html, LitElement} from 'lit'
+import {ifDefined} from 'lit/directives/if-defined.js'
+import {sideMenuItemStyle} from './side-menu-item-style.js'
import '@vaadin/icon'
import '@vaadin/icons'
import '@polymer/paper-tooltip'
@@ -50,8 +50,8 @@ export class SideMenuItem extends LitElement {
_itemLinkTemplate() {
return html`
- this._onClick(e)}"
target=${ifDefined(this.target)}
diff --git a/core/src/functional-components/side-menu.js b/core/src/functional-components/side-menu.js
index c3b08c24..9508c1b7 100644
--- a/core/src/functional-components/side-menu.js
+++ b/core/src/functional-components/side-menu.js
@@ -1,4 +1,4 @@
-import {LitElement, html, css} from 'lit'
+import {css, html, LitElement} from 'lit'
class SideMenu extends LitElement {
static get properties() {
diff --git a/core/src/functional-components/snackbar.js b/core/src/functional-components/snackbar.js
index 372074df..763337db 100644
--- a/core/src/functional-components/snackbar.js
+++ b/core/src/functional-components/snackbar.js
@@ -1,4 +1,4 @@
-import { LitElement, html, css } from 'lit'
+import {css, html, LitElement} from 'lit'
import '@material/mwc-snackbar'
let queueElement
diff --git a/core/src/functional-components/wordlists.js b/core/src/functional-components/wordlists.js
index 903889a7..9a058a21 100644
--- a/core/src/functional-components/wordlists.js
+++ b/core/src/functional-components/wordlists.js
@@ -1,4 +1,4 @@
-import { getPastTense } from './verb-past-tense.js'
+import {getPastTense} from './verb-past-tense.js'
export const verbs = [
'abase', 'abate', 'abduct', 'abet', 'abhor', 'abide', 'abjure', 'ablate', 'abort', 'abound', 'abseil', 'absorb', 'abuse', 'abut', 'accede', 'accent', 'accept', 'access', 'accord', 'accost', 'accrue', 'accuse', 'ache', 'acquit', 'act', 'adapt', 'add', 'addict', 'addle', 'adduce', 'adhere', 'adjoin', 'adjust', 'admire', 'admit', 'adopt', 'adore', 'adorn', 'advert', 'advise', 'aerate', 'affect', 'affirm', 'affix', 'afford', 'age', 'agree', 'aid', 'aim', 'alarm', 'alert', 'alight', 'align', 'allay', 'allege', 'allot', 'allow', 'alloy', 'allure', 'ally', 'alter', 'amass', 'amaze', 'amble', 'ambush', 'amend', 'amount', 'amuse', 'anger', 'angle', 'anneal', 'annex', 'annoy', 'annul', 'anoint', 'answer', 'ape', 'appeal', 'appear', 'append', 'apply', 'arc', 'arch', 'argue', 'arise', 'arm', 'array', 'arrest', 'arrive', 'arrow', 'ascend', 'ask', 'aspire', 'assail', 'assay', 'assent', 'assert', 'assess', 'assign', 'assist', 'assort', 'assume', 'assure', 'atone', 'attach', 'attack', 'attain', 'attend', 'attest', 'attire', 'attune', 'audit', 'augur', 'author', 'avail', 'avenge', 'aver', 'avert', 'avoid', 'await', 'awake', 'awaken', 'award', 'awe', 'babble', 'back', 'badge', 'badger', 'baffle', 'bag', 'bail', 'bait', 'bake', 'bald', 'bale', 'ball', 'ballot', 'ban', 'band', 'bandy', 'bang', 'banish', 'bank', 'banter', 'bar', 'barb', 'barber', 'bard', 'bare', 'barge', 'bark', 'barn', 'barrel', 'barter', 'base', 'bash', 'bask', 'baste', 'bat', 'batch', 'bathe', 'batten', 'batter', 'battle', 'bawl', 'bay', 'be', 'beach', 'beacon', 'bead', 'beam', 'bean', 'bear', 'beard', 'beat', 'become', 'bed', 'beef', 'beep', 'beetle', 'befall', 'befit', 'beg', 'beget', 'beggar', 'begin', 'behave', 'behead', 'behold', 'belay', 'belch', 'belie', 'bell', 'bellow', 'belly', 'belong', 'belt', 'bemoan', 'bench', 'bend', 'berate', 'berry', 'beset', 'best', 'bestir', 'bestow', 'bet', 'betide', 'betray', 'better', 'bevel', 'bewail', 'beware', 'bias', 'bib', 'bicker', 'bid', 'bide', 'bilge', 'bill', 'billet', 'billow', 'bin', 'bind', 'birdie', 'birth', 'bisect', 'bit', 'bite', 'bitter', 'black', 'blame', 'blanch', 'blank', 'blare', 'blast', 'blaze', 'bleach', 'bleat', 'bleed', 'bleep', 'blench', 'blend', 'bless', 'blight', 'blind', 'blink', 'blip', 'bliss', 'blitz', 'bloat', 'blob', 'blood', 'bloody', 'bloom', 'blot', 'blotch', 'blow', 'blue', 'bluff', 'blunt', 'blur', 'blurb', 'blurt', 'blush', 'board', 'boast', 'bob', 'bode', 'body', 'bog', 'bogey', 'boggle', 'boil', 'bolt', 'bomb', 'bond', 'bone', 'bonnet', 'boo', 'book', 'boom', 'boost', 'boot', 'booze', 'bop', 'bore', 'borrow', 'boss', 'botch', 'bother', 'bottle', 'bottom', 'bounce', 'bound', 'bout', 'bow', 'bowel', 'bowl', 'box', 'brace', 'brag', 'braid', 'braise', 'brake', 'branch', 'brand', 'brave', 'brawl', 'bray', 'breach', 'bread', 'break', 'breed', 'breeze', 'brew', 'bribe', 'brick', 'bridge', 'bridle', 'brief', 'brim', 'brine', 'bring', 'broach', 'broil', 'bronze', 'brook', 'brown', 'browse', 'bruise', 'brush', 'bubble', 'buck', 'bucket', 'buckle', 'bud', 'budge', 'budget', 'buffet', 'bug', 'bugle', 'build', 'bulge', 'bulk', 'bull', 'bully', 'bumble', 'bump', 'bunch', 'bundle', 'bung', 'bungle', 'bunk', 'bunker', 'buoy', 'burble', 'burden', 'burgle', 'burn', 'burp', 'burr', 'burrow', 'burst', 'bury', 'bus', 'bush', 'busk', 'bust', 'bustle', 'busy', 'butt', 'button', 'buy', 'buzz', 'bypass', 'cab', 'cabal', 'cabin', 'cable', 'cache', 'cackle', 'cadge', 'cage', 'cajole', 'cake', 'call', 'calm', 'calve', 'camber', 'camp', 'can', 'canal', 'cancel', 'candle', 'candy', 'cane', 'cannon', 'canoe', 'canopy', 'cant', 'canter', 'cap', 'caper', 'card', 'care', 'career', 'caress', 'carol', 'carp', 'carpet', 'carry', 'cart', 'carve', 'case', 'cash', 'cast', 'castle', 'cat', 'catch', 'cater', 'caucus', 'cause', 'cave', 'cavern', 'cease', 'cede', 'cellar', 'cement', 'censor', 'chafe', 'chain', 'chair', 'chalk', 'champ', 'chance', 'change', 'chant', 'chap', 'char', 'charge', 'charm', 'chart', 'chase', 'chat', 'cheat', 'check', 'cheep', 'cheer', 'chew', 'chide', 'chill', 'chime', 'chin', 'chink', 'chip', 'chirp', 'chisel', 'chock', 'choir', 'choke', 'choose', 'chop', 'chord', 'chorus', 'chrome', 'chuck', 'chuff', 'chug', 'chum', 'chunk', 'churn', 'chute', 'cinder', 'cipher', 'circle', 'cite', 'clad', 'claim', 'clam', 'clamp', 'clang', 'clank', 'clap', 'clash', 'clasp', 'class', 'claw', 'clean', 'clear', 'cleat', 'cleave', 'clench', 'clerk', 'click', 'climax', 'climb', 'clinch', 'cling', 'clink', 'clip', 'clique', 'cloak', 'clock', 'clog', 'clone', 'close', 'closet', 'clot', 'cloud', 'clout', 'clown', 'club', 'cluck', 'clue', 'clump', 'clutch', 'coach', 'coal', 'coast', 'coat', 'coax', 'cobble', 'cobweb', 'cockle', 'cocoon', 'coddle', 'code', 'codify', 'coerce', 'coffer', 'coffin', 'cog', 'cohere', 'coil', 'coin', 'coke', 'collar', 'comb', 'combat', 'come', 'commit', 'compel', 'comply', 'con', 'concur', 'cone', 'confer', 'convey', 'convoy', 'cook', 'cool', 'cope', 'copper', 'copy', 'cord', 'cordon', 'core', 'cork', 'corn', 'corner', 'corral', 'cosset', 'cost', 'cotton', 'couch', 'cough', 'count', 'couple', 'course', 'court', 'cover', 'covet', 'cowl', 'cox', 'crab', 'crack', 'cradle', 'craft', 'cram', 'cramp', 'crane', 'crank', 'crash', 'crate', 'crater', 'crave', 'crawl', 'crayon', 'craze', 'creak', 'cream', 'crease', 'create', 'credit', 'creed', 'creep', 'crest', 'crew', 'crib', 'crick', 'crimp', 'cringe', 'crisp', 'croak', 'crook', 'croon', 'crop', 'cross', 'crouch', 'crowd', 'crown', 'cruise', 'crunch', 'crush', 'crust', 'crutch', 'cry', 'cube', 'cuckoo', 'cuddle', 'cudgel', 'cue', 'cuff', 'cull', 'cup', 'curb', 'curd', 'curdle', 'cure', 'curl', 'curry', 'curse', 'curve', 'cuss', 'cut', 'cycle', 'dab', 'dabble', 'dagger', 'dally', 'dam', 'damage', 'damn', 'damp', 'dampen', 'dance', 'dangle', 'dapple', 'dare', 'darken', 'darn', 'dart', 'dash', 'date', 'daub', 'daunt', 'dawdle', 'daze', 'dazzle', 'deaden', 'deafen', 'deal', 'debar', 'debase', 'debate', 'debit', 'debug', 'debut', 'decamp', 'decant', 'decay', 'decide', 'deck', 'decode', 'decoy', 'decree', 'decry', 'deduce', 'deduct', 'deem', 'deepen', 'deface', 'defame', 'defeat', 'defect', 'defend', 'defer', 'defile', 'define', 'deform', 'defray', 'defuse', 'defy', 'deify', 'deign', 'delay', 'delete', 'delude', 'deluge', 'delve', 'demand', 'demean', 'demise', 'demote', 'demur', 'den', 'denote', 'dent', 'denude', 'deny', 'depart', 'depend', 'depict', 'deploy', 'deport', 'depose', 'depute', 'derail', 'deride', 'derive', 'desert', 'design', 'desire', 'desist', 'detach', 'detail', 'detain', 'detect', 'deter', 'detest', 'detour', 'devil', 'devise', 'devote', 'devour', 'dial', 'diaper', 'dice', 'die', 'diet', 'differ', 'dig', 'digest', 'dilate', 'dilute', 'dim', 'dimple', 'din', 'dine', 'dint', 'dip', 'direct', 'disarm', 'disc', 'disco', 'dish', 'dismay', 'disown', 'dispel', 'disuse', 'ditch', 'dither', 'dive', 'divert', 'divest', 'divide', 'divine', 'dizzy', 'do', 'dock', 'docket', 'doctor', 'dodge', 'dog', 'dole', 'doll', 'dolly', 'dome', 'donate', 'doodle', 'doom', 'dope', 'dose', 'dot', 'dote', 'double', 'doubt', 'douse', 'dowel', 'down', 'dowse', 'doze', 'drab', 'draft', 'drag', 'drain', 'drape', 'draw', 'drawl', 'dray', 'dread', 'dream', 'dredge', 'drench', 'dress', 'drift', 'drill', 'drink', 'drip', 'drive', 'drivel', 'drone', 'drool', 'droop', 'drop', 'drown', 'drowse', 'drudge', 'drug', 'drum', 'dry', 'dub', 'duck', 'duel', 'duet', 'dull', 'dumb', 'dummy', 'dump', 'dun', 'dupe', 'dust', 'dwarf', 'dwell', 'dye', 'ear', 'earn', 'ease', 'eat', 'ebb', 'echo', 'eddy', 'edge', 'edify', 'edit', 'efface', 'egg', 'egress', 'eject', 'elapse', 'elate', 'elbow', 'elect', 'elicit', 'elide', 'elope', 'elude', 'embalm', 'embark', 'embed', 'embody', 'emboss', 'emerge', 'emit', 'employ', 'empty', 'enable', 'enact', 'enamel', 'encamp', 'encase', 'encode', 'encore', 'end', 'endear', 'endow', 'endure', 'enfold', 'engage', 'engulf', 'enjoin', 'enjoy', 'enlist', 'enrage', 'enrich', 'ensue', 'ensure', 'entail', 'enter', 'entice', 'entomb', 'entrap', 'envy', 'equal', 'equate', 'equip', 'erase', 'erect', 'erode', 'err', 'erupt', 'escape', 'eschew', 'escort', 'escrow', 'essay', 'esteem', 'etch', 'evade', 'evict', 'evince', 'evoke', 'evolve', 'exact', 'exalt', 'exceed', 'excel', 'except', 'excess', 'excise', 'excite', 'excuse', 'exempt', 'exert', 'exeunt', 'exhale', 'exhort', 'exhume', 'exile', 'exist', 'expand', 'expect', 'expel', 'expend', 'expire', 'export', 'expose', 'extend', 'extol', 'extort', 'exude', 'exult', 'eye', 'fable', 'face', 'facet', 'factor', 'fade', 'fail', 'faint', 'fair', 'fake', 'fall', 'falter', 'fame', 'fan', 'fancy', 'farce', 'fare', 'farm', 'fast', 'fasten', 'fat', 'fate', 'father', 'fathom', 'fatten', 'fault', 'fawn', 'fear', 'feast', 'fee', 'feed', 'feel', 'feign', 'fell', 'fence', 'fend', 'ferret', 'ferry', 'fester', 'fetch', 'fettle', 'feud', 'fever', 'fib', 'fiddle', 'fidget', 'field', 'fife', 'fight', 'figure', 'file', 'fill', 'fillet', 'fillip', 'film', 'filter', 'fin', 'find', 'fine', 'finger', 'finish', 'fire', 'firm', 'fish', 'fit', 'fitter', 'fix', 'fizz', 'fizzle', 'flack', 'flag', 'flail', 'flake', 'flame', 'flank', 'flap', 'flare', 'flash', 'flat', 'flaunt', 'flaw', 'flay', 'flee', 'fleece', 'fleet', 'flesh', 'flex', 'flick', 'flight', 'flinch', 'fling', 'flint', 'flip', 'flit', 'float', 'flock', 'flog', 'flood', 'floor', 'flop', 'floss', 'flour', 'flout', 'flow', 'flower', 'fluff', 'flurry', 'flush', 'flute', 'flux', 'fly', 'foal', 'foam', 'fob', 'focus', 'fodder', 'fog', 'foil', 'foist', 'fold', 'folio', 'follow', 'foment', 'fondle', 'fool', 'foot', 'forage', 'foray', 'forbid', 'force', 'ford', 'forego', 'forest', 'forge', 'forget', 'fork', 'form', 'format', 'foster', 'foul', 'found', 'fowl', 'fox', 'frame', 'frank', 'fray', 'freak', 'free', 'freeze', 'frenzy', 'fresh', 'fret', 'friend', 'fright', 'frill', 'fringe', 'frisk', 'frock', 'frog', 'frolic', 'front', 'frost', 'froth', 'frown', 'fruit', 'fry', 'fudge', 'fuel', 'full', 'fumble', 'fume', 'fun', 'fund', 'funk', 'funnel', 'fur', 'furrow', 'fuse', 'fuss', 'fuzz', 'gabble', 'gad', 'gaff', 'gag', 'gaggle', 'gain', 'gait', 'gall', 'gallop', 'gamble', 'gambol', 'game', 'gang', 'gap', 'gape', 'garage', 'garble', 'garden', 'gargle', 'garner', 'garter', 'gas', 'gash', 'gasp', 'gate', 'gather', 'gauge', 'gavel', 'gaze', 'gear', 'gel', 'gem', 'gender', 'gentle', 'get', 'ghost', 'gibber', 'gibbet', 'giddy', 'gift', 'gig', 'giggle', 'gimlet', 'gin', 'ginger', 'gird', 'girdle', 'girth', 'give', 'glad', 'glance', 'glare', 'glass', 'glaze', 'gleam', 'glean', 'glide', 'glint', 'gloat', 'globe', 'gloom', 'glory', 'gloss', 'glove', 'glow', 'glower', 'glue', 'glut', 'gnarl', 'gnash', 'gnaw', 'go', 'goad', 'gobble', 'golf', 'gong', 'goose', 'gore', 'gorge', 'gossip', 'gouge', 'govern', 'gown', 'grab', 'grace', 'grade', 'graft', 'grain', 'grant', 'graph', 'grasp', 'grass', 'grate', 'grave', 'gravel', 'graze', 'grease', 'green', 'greet', 'grey', 'grieve', 'grill', 'grin', 'grind', 'grip', 'gripe', 'grit', 'groan', 'groin', 'groom', 'groove', 'grope', 'gross', 'grouch', 'ground', 'group', 'grouse', 'grout', 'grovel', 'grow', 'growl', 'grub', 'grudge', 'grunt', 'guard', 'guess', 'guest', 'guffaw', 'guide', 'guilt', 'guise', 'gulf', 'gull', 'gully', 'gulp', 'gum', 'gun', 'gurgle', 'gush', 'gust', 'gut', 'gutter', 'guy', 'guzzle', 'gyrate', 'habit', 'hack', 'haft', 'haggle', 'hail', 'hale', 'hallo', 'halo', 'halt', 'halter', 'halve', 'ham', 'hammer', 'hamper', 'hand', 'handle', 'hang', 'hanker', 'happen', 'harass', 'harden', 'hark', 'harm', 'harp', 'harrow', 'harry', 'hash', 'hasp', 'hassle', 'haste', 'hasten', 'hat', 'hatch', 'hate', 'haul', 'haunt', 'have', 'haven', 'havoc', 'hawk', 'hay', 'hazard', 'haze', 'head', 'heal', 'heap', 'hear', 'heart', 'heat', 'heave', 'heckle', 'hector', 'hedge', 'heed', 'heel', 'heft', 'hell', 'hello', 'helm', 'help', 'hem', 'herald', 'herd', 'hew', 'hex', 'hiccup', 'hide', 'hijack', 'hike', 'hill', 'hilt', 'hinder', 'hinge', 'hint', 'hip', 'hiss', 'hit', 'hitch', 'hive', 'hoard', 'hoax', 'hob', 'hobble', 'hock', 'hoe', 'hog', 'hoist', 'hold', 'hole', 'hollow', 'home', 'hone', 'honey', 'honk', 'hood', 'hoof', 'hook', 'hoop', 'hoot', 'hop', 'hope', 'horde', 'horn', 'hose', 'host', 'hostel', 'hound', 'house', 'hovel', 'hover', 'howl', 'huddle', 'huff', 'hug', 'hulk', 'hull', 'hum', 'humble', 'humbug', 'hump', 'hunch', 'hunger', 'hunt', 'hurdle', 'hurl', 'hurrah', 'hurry', 'hurt', 'hurtle', 'hush', 'husk', 'hustle', 'hymn', 'hyphen', 'ice', 'id', 'idle', 'ignite', 'ignore', 'image', 'imbibe', 'imbue', 'imp', 'impact', 'impair', 'impale', 'impart', 'impede', 'impel', 'imply', 'import', 'impose', 'impugn', 'impute', 'inch', 'incite', 'incur', 'indent', 'index', 'indict', 'induce', 'induct', 'infect', 'infer', 'infest', 'infix', 'inform', 'infuse', 'ingest', 'inhale', 'inject', 'injure', 'ink', 'inlay', 'inlet', 'input', 'insert', 'inset', 'insist', 'insult', 'insure', 'intend', 'inter', 'intern', 'intone', 'inure', 'invade', 'invent', 'invert', 'invest', 'invite', 'invoke', 'ionize', 'iris', 'iron', 'island', 'isle', 'issue', 'itch', 'item', 'jab', 'jabber', 'jack', 'jade', 'jag', 'jail', 'jam', 'jangle', 'jape', 'jar', 'jargon', 'jaunt', 'jaw', 'jazz', 'jeer', 'jelly', 'jerk', 'jest', 'jet', 'jetty', 'jewel', 'jib', 'jibe', 'jig', 'jigsaw', 'jilt', 'jingle', 'jinx', 'jitter', 'jive', 'job', 'jockey', 'jog', 'join', 'joint', 'joke', 'jolly', 'jolt', 'jostle', 'jot', 'joust', 'joy', 'judge', 'jug', 'juggle', 'juice', 'jumble', 'jump', 'junk', 'junket', 'just', 'jut', 'kayak', 'keel', 'keen', 'keep', 'ken', 'kennel', 'kernel', 'key', 'kick', 'kid', 'kidnap', 'kill', 'kiln', 'kilt', 'kindle', 'king', 'kink', 'kipper', 'kiss', 'kit', 'kite', 'kitten', 'knead', 'knee', 'kneel', 'knell', 'knife', 'knight', 'knit', 'knock', 'knoll', 'knot', 'know', 'kosher', 'kowtow', 'laager', 'label', 'lace', 'lack', 'lackey', 'ladle', 'lag', 'lame', 'lament', 'lance', 'land', 'lap', 'lapse', 'lard', 'lark', 'lash', 'lasso', 'last', 'latch', 'lathe', 'lather', 'laud', 'laugh', 'launch', 'laurel', 'lavish', 'law', 'lay', 'layer', 'laze', 'lazy', 'leach', 'lead', 'leaf', 'league', 'leak', 'lean', 'leap', 'learn', 'lease', 'leash', 'leave', 'leaven', 'lecher', 'leech', 'leer', 'leg', 'lend', 'lesion', 'lessen', 'lesson', 'let', 'letter', 'level', 'lever', 'levy', 'libel', 'lichen', 'lick', 'lid', 'lie', 'lift', 'light', 'like', 'liken', 'lilt', 'limb', 'limber', 'lime', 'limit', 'limp', 'line', 'linger', 'link', 'lip', 'liquor', 'lisp', 'list', 'listen', 'litter', 'live', 'liven', 'load', 'loaf', 'loam', 'loan', 'loathe', 'lob', 'lobby', 'local', 'locate', 'lock', 'lodge', 'loft', 'log', 'loiter', 'loll', 'long', 'look', 'loom', 'loop', 'loose', 'loosen', 'loot', 'lop', 'lope', 'lord', 'lose', 'lot', 'loth', 'lounge', 'louse', 'lout', 'love', 'lower', 'luck', 'lug', 'lull', 'lumber', 'lump', 'lunch', 'lunge', 'lurch', 'lure', 'lurk', 'lust', 'lute', 'lynch', 'mace', 'mad', 'madden', 'mail', 'maim', 'major', 'make', 'malign', 'malt', 'man', 'manage', 'mangle', 'mantle', 'manure', 'map', 'mar', 'marble', 'march', 'margin', 'mark', 'market', 'marl', 'maroon', 'marry', 'martyr', 'marvel', 'mash', 'mask', 'mason', 'mass', 'mast', 'master', 'mat', 'match', 'mate', 'matte', 'matter', 'mature', 'maul', 'maze', 'mean', 'medal', 'meddle', 'meet', 'meld', 'mellow', 'melt', 'menace', 'mend', 'mentor', 'merge', 'merit', 'mesh', 'mess', 'metal', 'meter', 'mew', 'mildew', 'milk', 'mill', 'mimic', 'mince', 'mind', 'mine', 'mingle', 'minor', 'mint', 'minute', 'mire', 'mirror', 'miscue', 'misfit', 'mislay', 'miss', 'mist', 'misuse', 'mitre', 'mix', 'moan', 'mob', 'mock', 'model', 'modem', 'modify', 'molest', 'molten', 'monger', 'monkey', 'moon', 'moor', 'moot', 'mop', 'mope', 'morph', 'morsel', 'mortar', 'mosaic', 'moss', 'mother', 'motion', 'motive', 'motor', 'mould', 'mound', 'mount', 'mourn', 'mouse', 'mousse', 'mouth', 'move', 'mow', 'muck', 'mud', 'muddle', 'muddy', 'muff', 'muffle', 'mug', 'mulch', 'mull', 'mumble', 'mummy', 'munch', 'murder', 'murmur', 'muscle', 'muse', 'mush', 'must', 'muster', 'mutate', 'mute', 'mutiny', 'mutter', 'muzzle', 'nag', 'nail', 'name', 'nap', 'narrow', 'near', 'neaten', 'neck', 'need', 'needle', 'negate', 'neigh', 'nerve', 'nest', 'nestle', 'net', 'nettle', 'neuter', 'nibble', 'niche', 'nick', 'nickel', 'niggle', 'nigh', 'nip', 'nod', 'noise', 'noodle', 'noose', 'nose', 'notch', 'note', 'notice', 'notify', 'nudge', 'null', 'numb', 'number', 'nurse', 'nut', 'nuzzle', 'oar', 'obey', 'object', 'oblige', 'obtain', 'occult', 'occupy', 'occur', 'off', 'offend', 'offer', 'ogle', 'oh', 'oil', 'omen', 'omit', 'ooze', 'open', 'opiate', 'oppose', 'opt', 'option', 'orb', 'orbit', 'ordain', 'order', 'orient', 'orphan', 'oust', 'out', 'outbid', 'outdo', 'outfit', 'outlaw', 'outlay', 'output', 'outrun', 'outwit', 'over', 'overdo', 'owe', 'own', 'oyster', 'pace', 'pacify', 'pack', 'packet', 'pad', 'paddle', 'page', 'pain', 'paint', 'pair', 'pal', 'pale', 'pall', 'pallet', 'palm', 'palsy', 'pamper', 'pan', 'pander', 'panel', 'panic', 'pant', 'paper', 'par', 'parade', 'parcel', 'parch', 'pardon', 'pare', 'parent', 'park', 'parley', 'parody', 'parole', 'parrot', 'parry', 'parse', 'part', 'party', 'pass', 'paste', 'pastor', 'pat', 'patch', 'patent', 'patrol', 'patter', 'pause', 'pave', 'paw', 'pawn', 'pay', 'peace', 'peach', 'peak', 'peal', 'pearl', 'pebble', 'peck', 'pedal', 'peddle', 'peek', 'peel', 'peep', 'peer', 'peg', 'pellet', 'pelt', 'pen', 'pencil', 'people', 'pepper', 'perch', 'peril', 'perish', 'perk', 'perm', 'permit', 'peruse', 'pester', 'pestle', 'pet', 'phase', 'phone', 'phrase', 'pi', 'pick', 'picket', 'pickle', 'picnic', 'pie', 'piece', 'pierce', 'piffle', 'pig', 'pike', 'pile', 'pilfer', 'pill', 'pillar', 'pillow', 'pilot', 'pimp', 'pin', 'pinch', 'pine', 'ping', 'pinion', 'pink', 'pip', 'pipe', 'pique', 'pirate', 'pistol', 'pit', 'pitch', 'pith', 'pity', 'pivot', 'place', 'plague', 'plait', 'plan', 'plane', 'plank', 'plant', 'plat', 'plate', 'play', 'plead', 'please', 'pleat', 'pledge', 'plight', 'plod', 'plop', 'plot', 'plough', 'pluck', 'plug', 'plumb', 'plume', 'plump', 'plunge', 'ply', 'poach', 'pocket', 'pod', 'point', 'poise', 'poison', 'poke', 'pole', 'police', 'polish', 'polka', 'poll', 'pollen', 'pomade', 'pond', 'ponder', 'pony', 'pool', 'pop', 'pore', 'port', 'pose', 'posit', 'post', 'pot', 'potter', 'pouch', 'pounce', 'pound', 'pour', 'pout', 'powder', 'power', 'praise', 'prance', 'prank', 'prawn', 'pray', 'preach', 'preen', 'prefab', 'prefix', 'preset', 'press', 'pretty', 'prey', 'price', 'prick', 'pride', 'priest', 'prim', 'prime', 'print', 'prize', 'probe', 'prod', 'profit', 'prompt', 'prong', 'proof', 'prop', 'propel', 'prose', 'prove', 'prowl', 'prune', 'pry', 'pucker', 'puddle', 'puff', 'pug', 'puke', 'pull', 'pulp', 'pulse', 'pumice', 'pummel', 'pump', 'pun', 'punch', 'punish', 'punt', 'pup', 'purge', 'purify', 'purl', 'purple', 'purr', 'purse', 'pursue', 'push', 'put', 'putt', 'putter', 'putty', 'puzzle', 'quack', 'quaff', 'quake', 'quarry', 'quash', 'quaver', 'queen', 'queer', 'quell', 'quench', 'query', 'quest', 'queue', 'quiet', 'quill', 'quilt', 'quip', 'quit', 'quiver', 'quiz', 'quote', 'rabble', 'race', 'rack', 'racket', 'radio', 'raffle', 'raft', 'rag', 'rage', 'raid', 'rail', 'rain', 'raise', 'rake', 'rally', 'ram', 'ramble', 'ramify', 'ramp', 'ramrod', 'ranch', 'range', 'rank', 'rankle', 'ransom', 'rant', 'rap', 'rasp', 'rat', 'rate', 'ratify', 'ration', 'rattle', 'ravage', 'rave', 'ravel', 'raven', 'ravish', 'ray', 'raze', 'reach', 'react', 'read', 'ready', 'really', 'ream', 'reap', 'rear', 'reason', 'rebate', 'rebel', 'rebind', 'rebook', 'rebuff', 'rebuke', 'rebut', 'recall', 'recant', 'recap', 'recast', 'recede', 'recess', 'recite', 'reckon', 'recode', 'recoil', 'record', 'recur', 'redden', 'redeem', 'redial', 'redo', 'redraw', 'reduce', 'reed', 'reef', 'reek', 'reel', 'reeve', 'refer', 'refile', 'refill', 'refine', 'refit', 'reflex', 'reform', 'refuel', 'refuge', 'refund', 'refuse', 'refute', 'regain', 'regale', 'regard', 'regret', 'rehash', 'reheat', 'reify', 'reign', 'reject', 'rejoin', 'relate', 'relax', 'relay', 'relent', 'relink', 'relish', 'relive', 'rely', 'remain', 'remake', 'remand', 'remap', 'remark', 'remedy', 'remind', 'remit', 'remove', 'rename', 'rend', 'render', 'renege', 'renew', 'rent', 'reopen', 'repack', 'repair', 'repast', 'repay', 'repeal', 'repeat', 'repel', 'repent', 'repine', 'replay', 'reply', 'report', 'repose', 'repute', 'reread', 'rerun', 'rescue', 'resell', 'resend', 'resent', 'reset', 'reshow', 'reside', 'resign', 'resin', 'resist', 'resit', 'resort', 'rest', 'result', 'resume', 'retail', 'retain', 'retake', 'retard', 'retch', 'retell', 'retest', 'retire', 'retort', 'retry', 'retune', 'return', 'retype', 'reuse', 'revamp', 'reveal', 'revel', 'revere', 'revert', 'review', 'revile', 'revive', 'revoke', 'revolt', 'reward', 'rewind', 'reword', 'rework', 'rhyme', 'rib', 'ribbon', 'rice', 'rid', 'riddle', 'ride', 'ridge', 'riff', 'rifle', 'rift', 'rig', 'right', 'rim', 'rime', 'ring', 'rinse', 'riot', 'rip', 'ripen', 'ripple', 'rise', 'risk', 'rival', 'rivet', 'roach', 'roam', 'roar', 'roast', 'rob', 'robe', 'rock', 'rocket', 'rogue', 'roll', 'romp', 'roof', 'rook', 'room', 'roost', 'root', 'rope', 'rosin', 'rot', 'rotate', 'rouge', 'rough', 'round', 'rouse', 'rout', 'route', 'rove', 'row', 'rub', 'ruck', 'rue', 'ruff', 'ruffle', 'ruin', 'rule', 'rumble', 'rumple', 'run', 'rush', 'rust', 'rustle', 'rut', 'sack', 'sadden', 'saddle', 'safari', 'sag', 'sail', 'saint', 'sallow', 'salt', 'salute', 'sample', 'sand', 'sandal', 'sap', 'sash', 'sauce', 'sauna', 'savage', 'save', 'saw', 'say', 'scab', 'scald', 'scale', 'scalp', 'scan', 'scant', 'scape', 'scar', 'scare', 'scarf', 'scathe', 'scent', 'scheme', 'school', 'scoff', 'scold', 'scoop', 'scoot', 'scope', 'scorch', 'score', 'scorn', 'scotch', 'scour', 'scout', 'scowl', 'scrap', 'scrape', 'scrawl', 'scream', 'screen', 'screw', 'scribe', 'script', 'scroll', 'scrub', 'scrum', 'scuba', 'scud', 'scuff', 'scull', 'sculpt', 'scum', 'scurry', 'scythe', 'seal', 'seam', 'sear', 'search', 'season', 'seat', 'secede', 'second', 'sector', 'secure', 'sedate', 'seduce', 'see', 'seed', 'seek', 'seem', 'seep', 'seethe', 'seize', 'select', 'sell', 'send', 'sense', 'serge', 'serve', 'set', 'settle', 'sever', 'sew', 'shack', 'shade', 'shadow', 'shaft', 'shag', 'shake', 'sham', 'shame', 'shank', 'shape', 'share', 'shark', 'sharp', 'shave', 'shear', 'shed', 'sheer', 'shell', 'shelve', 'shield', 'shift', 'shin', 'shine', 'ship', 'shirk', 'shiver', 'shoal', 'shock', 'shoe', 'shoo', 'shoot', 'shop', 'short', 'shot', 'shout', 'shove', 'shovel', 'show', 'shower', 'shred', 'shriek', 'shrill', 'shrimp', 'shrine', 'shrink', 'shroud', 'shrug', 'shun', 'shunt', 'shut', 'shy', 'sicken', 'sickly', 'side', 'sidle', 'siege', 'sieve', 'sift', 'sigh', 'sight', 'sign', 'signal', 'signet', 'silk', 'silo', 'silt', 'silver', 'simmer', 'simper', 'simple', 'sin', 'sinew', 'sing', 'single', 'sink', 'sip', 'siphon', 'sire', 'sit', 'site', 'size', 'sizzle', 'skate', 'sketch', 'skew', 'skewer', 'ski', 'skid', 'skim', 'skimp', 'skin', 'skip', 'skirl', 'skirt', 'skulk', 'skunk', 'sky', 'slab', 'slack', 'slag', 'slake', 'slam', 'slang', 'slant', 'slap', 'slash', 'slat', 'slate', 'slave', 'slaver', 'slay', 'sleaze', 'sled', 'sledge', 'sleek', 'sleep', 'sleet', 'sleeve', 'sleigh', 'sleuth', 'slice', 'slick', 'slide', 'slight', 'slim', 'slime', 'sling', 'slink', 'slip', 'slit', 'sliver', 'slog', 'slop', 'slope', 'slosh', 'slot', 'slouch', 'slough', 'slow', 'slug', 'sluice', 'slum', 'slump', 'slur', 'slurp', 'slurry', 'slush', 'smack', 'smart', 'smash', 'smear', 'smell', 'smelt', 'smile', 'smirk', 'smite', 'smock', 'smoke', 'smooth', 'smudge', 'smut', 'snack', 'snag', 'snake', 'snap', 'snare', 'snarl', 'snatch', 'sneak', 'sneer', 'sneeze', 'snick', 'sniff', 'snip', 'snipe', 'snivel', 'snoop', 'snooze', 'snore', 'snort', 'snow', 'snub', 'snuff', 'snug', 'soak', 'soap', 'soar', 'sob', 'sober', 'sock', 'socket', 'sodden', 'soften', 'soil', 'solace', 'solder', 'sole', 'solo', 'solve', 'soot', 'soothe', 'sop', 'sorrow', 'sort', 'sortie', 'sound', 'soup', 'sour', 'source', 'south', 'sow', 'space', 'spade', 'span', 'spank', 'spar', 'spare', 'spark', 'spat', 'spawn', 'speak', 'spear', 'speck', 'speed', 'spell', 'spend', 'spew', 'sphere', 'spice', 'spike', 'spill', 'spin', 'spiral', 'spire', 'spirit', 'spit', 'spite', 'splash', 'splice', 'splint', 'split', 'spoil', 'spoke', 'sponge', 'spoof', 'spool', 'spoon', 'spoor', 'spore', 'sport', 'spot', 'spout', 'sprain', 'sprawl', 'spray', 'spread', 'sprig', 'spring', 'sprint', 'sprout', 'spruce', 'spud', 'spume', 'spur', 'spurn', 'spurt', 'spy', 'squad', 'squall', 'square', 'squash', 'squat', 'squawk', 'squeak', 'squeal', 'squib', 'squint', 'squire', 'squirm', 'squirt', 'stab', 'stable', 'stack', 'staff', 'stag', 'stage', 'stain', 'stake', 'stale', 'stalk', 'stall', 'stamp', 'stand', 'staple', 'star', 'starch', 'stare', 'start', 'starve', 'state', 'stave', 'stay', 'stead', 'steal', 'steam', 'steel', 'steep', 'steer', 'stem', 'step', 'stet', 'stew', 'stick', 'stiff', 'stifle', 'still', 'stilt', 'sting', 'stink', 'stint', 'stir', 'stitch', 'stock', 'stomp', 'stone', 'stooge', 'stool', 'stoop', 'stop', 'store', 'storm', 'story', 'stow', 'strafe', 'strain', 'strand', 'strap', 'stray', 'streak', 'stream', 'stress', 'strew', 'stride', 'strike', 'string', 'strip', 'stripe', 'strive', 'stroke', 'stroll', 'strop', 'strum', 'strut', 'stub', 'stucco', 'stud', 'study', 'stuff', 'stump', 'stun', 'stunt', 'sturdy', 'sty', 'style', 'stymie', 'subdue', 'submit', 'suck', 'sucker', 'suckle', 'suds', 'sue', 'suede', 'suffer', 'suffix', 'sugar', 'suit', 'sulk', 'sully', 'sum', 'summer', 'summit', 'summon', 'sun', 'suntan', 'sup', 'supple', 'supply', 'surf', 'surge', 'survey', 'suture', 'swab', 'swamp', 'swap', 'swarm', 'swat', 'swathe', 'sway', 'swear', 'sweat', 'sweep', 'swell', 'swerve', 'swill', 'swim', 'swing', 'swipe', 'swirl', 'swish', 'switch', 'swivel', 'swoon', 'swoop', 'swop', 'symbol', 'syrup', 'tab', 'tabby', 'table', 'taboo', 'tack', 'tackle', 'tag', 'tail', 'tailor', 'taint', 'take', 'talk', 'tallow', 'tally', 'tame', 'tamp', 'tamper', 'tan', 'tangle', 'tango', 'tank', 'tap', 'tape', 'taper', 'tar', 'target', 'tariff', 'tarry', 'tart', 'task', 'tassel', 'taste', 'tattle', 'tattoo', 'taunt', 'tax', 'taxi', 'teach', 'team', 'tear', 'tease', 'tee', 'teem', 'teeter', 'teethe', 'telex', 'tell', 'temper', 'tempt', 'tenant', 'tend', 'tender', 'tenon', 'tense', 'tent', 'tenure', 'term', 'test', 'tether', 'thank', 'thatch', 'thaw', 'thieve', 'thin', 'think', 'thirst', 'thorn', 'thou', 'thrall', 'thrash', 'thread', 'threat', 'thresh', 'thrill', 'thrive', 'throat', 'throb', 'throne', 'throng', 'throw', 'thrum', 'thrust', 'thud', 'thumb', 'thump', 'thwack', 'thwart', 'tick', 'ticket', 'tickle', 'tide', 'tidy', 'tie', 'tier', 'tile', 'till', 'tiller', 'tilt', 'timber', 'time', 'tin', 'tinge', 'tingle', 'tinker', 'tinkle', 'tinsel', 'tint', 'tip', 'tipple', 'tiptoe', 'tire', 'tissue', 'tithe', 'title', 'titter', 'toady', 'toast', 'toddle', 'toe', 'toggle', 'toil', 'token', 'toll', 'tomb', 'tomcat', 'tone', 'tongue', 'tool', 'toot', 'tooth', 'tootle', 'top', 'topple', 'torch', 'torque', 'toss', 'tot', 'total', 'totter', 'touch', 'tough', 'tour', 'tout', 'tow', 'towel', 'tower', 'toy', 'trace', 'track', 'trade', 'trail', 'train', 'tram', 'tramp', 'trance', 'trap', 'trash', 'travel', 'trawl', 'tread', 'treat', 'treble', 'tree', 'trek', 'trench', 'trend', 'triage', 'trice', 'trick', 'trill', 'trim', 'trip', 'triple', 'troll', 'troop', 'trot', 'troupe', 'trowel', 'truant', 'truck', 'trudge', 'true', 'truss', 'trust', 'try', 'tub', 'tube', 'tuck', 'tucker', 'tuft', 'tug', 'tumble', 'tun', 'tune', 'tunnel', 'turf', 'turn', 'turtle', 'tusk', 'tussle', 'tutor', 'twang', 'tweak', 'tweet', 'twig', 'twill', 'twin', 'twine', 'twinge', 'twirl', 'twist', 'twitch', 'type', 'typify', 'umpire', 'unable', 'unbend', 'unbolt', 'unclog', 'uncoil', 'undo', 'unfit', 'unfold', 'unfurl', 'unhand', 'unify', 'unite', 'unjam', 'unlace', 'unlink', 'unload', 'unlock', 'unmask', 'unpack', 'unpick', 'unplug', 'unroll', 'unseal', 'unseat', 'untie', 'unveil', 'unwind', 'unwrap', 'unzip', 'up', 'update', 'uphold', 'uplift', 'upload', 'uproot', 'upset', 'upturn', 'urge', 'use', 'usher', 'usurp', 'utter', 'vacate', 'vacuum', 'valet', 'value', 'valve', 'vamp', 'vanish', 'vary', 'vat', 'vault', 'vector', 'veer', 'veil', 'vein', 'vend', 'veneer', 'vent', 'verge', 'verify', 'verse', 'vest', 'vet', 'veto', 'vex', 'vial', 'vice', 'video', 'vie', 'view', 'vilify', 'visa', 'vision', 'visit', 'visor', 'voice', 'void', 'volley', 'vomit', 'voodoo', 'vote', 'vouch', 'vow', 'voyage', 'wad', 'waddle', 'wade', 'wafer', 'waffle', 'waft', 'wag', 'wager', 'waggle', 'wagon', 'wail', 'wait', 'waive', 'wake', 'waken', 'walk', 'wall', 'wallow', 'waltz', 'wan', 'wander', 'wane', 'want', 'wanton', 'war', 'warble', 'ward', 'warm', 'warn', 'warp', 'wash', 'waste', 'watch', 'water', 'wattle', 'wave', 'waver', 'wax', 'waylay', 'weaken', 'wean', 'weapon', 'wear', 'weary', 'weasel', 'weave', 'web', 'wed', 'wedge', 'weed', 'weep', 'weigh', 'weight', 'weld', 'well', 'welt', 'welter', 'wench', 'wend', 'wet', 'whack', 'whale', 'wharf', 'wheel', 'wheeze', 'whelp', 'whet', 'whiff', 'while', 'whine', 'whinny', 'whip', 'whir', 'whirl', 'whirr', 'whisk', 'white', 'whiten', 'whizz', 'whoop', 'whoosh', 'wick', 'widen', 'widow', 'wield', 'wig', 'wiggle', 'wild', 'wile', 'will', 'wilt', 'wimple', 'win', 'wince', 'winch', 'wind', 'window', 'wine', 'wing', 'wink', 'winnow', 'winter', 'wipe', 'wire', 'wish', 'wisp', 'wit', 'witch', 'wither', 'wobble', 'wolf', 'wonder', 'wont', 'woo', 'wood', 'word', 'work', 'worm', 'worry', 'worsen', 'worst', 'wound', 'wow', 'wrack', 'wrap', 'wreak', 'wreath', 'wreck', 'wrench', 'wrest', 'wring', 'write', 'writhe', 'wrong', 'x-ray', 'xerox', 'yacht', 'yak', 'yap', 'yard', 'yaw', 'yawn', 'yearn', 'yeast', 'yell', 'yellow', 'yelp', 'yen', 'yes', 'yield', 'yo-yo', 'yodel', 'yoke', 'zero', 'zigzag', 'zinc', 'zip', 'zipper', 'zone', 'zoom'
diff --git a/core/src/initStore.js b/core/src/initStore.js
index 256100c7..038c39e9 100644
--- a/core/src/initStore.js
+++ b/core/src/initStore.js
@@ -1,11 +1,11 @@
-import { store } from './store.js'
-import { doLoadConfigFromAPI } from './redux/config/config-actions.js'
-import { doLoadNodeConfig, doInitWorkers } from './redux/app/app-actions.js'
-import { doLoadNotificationConfig } from './redux/user/user-actions.js'
+import {store} from './store.js'
+import {doLoadConfigFromAPI} from './redux/config/config-actions.js'
+import {doInitWorkers, doLoadNodeConfig} from './redux/app/app-actions.js'
+import {doLoadNotificationConfig} from './redux/user/user-actions.js'
import './persistState.js'
-import { initApi } from 'qortal-ui-crypto'
+import {initApi} from 'qortal-ui-crypto'
initApi(store)
diff --git a/core/src/lockScreen.js b/core/src/lockScreen.js
index e552c879..7dfde20a 100644
--- a/core/src/lockScreen.js
+++ b/core/src/lockScreen.js
@@ -1,6 +1,6 @@
import CryptoJS from 'crypto-js'
-
-export const encryptData = (data, salt) => CryptoJS.AES.encrypt(JSON.stringify(data), salt).toString()
+
+export const encryptData = (data, salt) => CryptoJS.AES.encrypt(JSON.stringify(data), salt).toString()
export const decryptData = (ciphertext, salt) => {
const bytes = CryptoJS.AES.decrypt(ciphertext, salt)
try {
@@ -8,4 +8,4 @@ export const decryptData = (ciphertext, salt) => {
} catch(err) {
return null
}
-}
\ No newline at end of file
+}
diff --git a/core/src/notifications/controller.js b/core/src/notifications/controller.js
index 20d4994d..1934fb42 100644
--- a/core/src/notifications/controller.js
+++ b/core/src/notifications/controller.js
@@ -1,7 +1,7 @@
import config from './config'
-import { dispatcher } from './dispatcher'
+import {dispatcher} from './dispatcher'
import snackbar from '../functional-components/snackbar.js'
-import { NEW_MESSAGE, NEW_MESSAGE_NOTIFICATION_QAPP, NEW_MESSAGE_NOTIFICATION_QAPP_LOCAL } from './types'
+import {NEW_MESSAGE, NEW_MESSAGE_NOTIFICATION_QAPP, NEW_MESSAGE_NOTIFICATION_QAPP_LOCAL} from './types'
let initial = 0
let _state
@@ -44,7 +44,7 @@ const notificationCheck = function () {
export const doNewMessage = function (req) {
const newMessage = () => {
-
+
let data
if (req.type && req.type === 'qapp') {
data = req
@@ -73,7 +73,7 @@ export const doNewMessage = function (req) {
} else {
_state = notificationState
}
- }
+ }
const page = window.top.location.href
if(req.type && req.type === 'qapp-local-notification'){
try {
diff --git a/core/src/notifications/dispatcher.js b/core/src/notifications/dispatcher.js
index b0c7713e..e31e6d84 100644
--- a/core/src/notifications/dispatcher.js
+++ b/core/src/notifications/dispatcher.js
@@ -1,5 +1,5 @@
-import { NEW_MESSAGE, NEW_MESSAGE_NOTIFICATION_QAPP, NEW_MESSAGE_NOTIFICATION_QAPP_LOCAL } from './types'
-import { newMessage, newMessageNotificationQapp, newMessageNotificationQappLocal } from './notification-actions'
+import {NEW_MESSAGE, NEW_MESSAGE_NOTIFICATION_QAPP, NEW_MESSAGE_NOTIFICATION_QAPP_LOCAL} from './types'
+import {newMessage, newMessageNotificationQapp, newMessageNotificationQappLocal} from './notification-actions'
export const dispatcher = function (notificationState) {
diff --git a/core/src/notifications/notification-actions/new-message.js b/core/src/notifications/notification-actions/new-message.js
index b3a50b37..b25902f6 100644
--- a/core/src/notifications/notification-actions/new-message.js
+++ b/core/src/notifications/notification-actions/new-message.js
@@ -1,5 +1,5 @@
-import { store } from '../../store.js'
-import { doPageUrl, setNewTab } from '../../redux/app/app-actions.js'
+import {store} from '../../store.js'
+import {doPageUrl, setNewTab} from '../../redux/app/app-actions.js'
import isElectron from 'is-electron'
import ShortUniqueId from 'short-unique-id';
diff --git a/core/src/persistState.js b/core/src/persistState.js
index d0195d12..277634a0 100644
--- a/core/src/persistState.js
+++ b/core/src/persistState.js
@@ -1,5 +1,5 @@
-import { store } from './store.js'
-import { saveStateToLocalStorage } from './localStorageHelpers.js'
+import {store} from './store.js'
+import {saveStateToLocalStorage} from './localStorageHelpers.js'
const keys = [
'config',
diff --git a/core/src/plugins/addPluginRoutes.js b/core/src/plugins/addPluginRoutes.js
index 59796749..e840dd74 100644
--- a/core/src/plugins/addPluginRoutes.js
+++ b/core/src/plugins/addPluginRoutes.js
@@ -1,4 +1,4 @@
-import { routes } from './routes.js'
+import {routes} from './routes.js'
export const addPluginRoutes = epmlInstance => {
Object.entries(routes).forEach(([route, handler]) => {
diff --git a/core/src/plugins/load-plugins.js b/core/src/plugins/load-plugins.js
index 693e255e..63b72729 100644
--- a/core/src/plugins/load-plugins.js
+++ b/core/src/plugins/load-plugins.js
@@ -1,7 +1,7 @@
-import { store } from '../store.js'
-import { Epml } from '../epml.js'
-import { addPluginRoutes } from './addPluginRoutes'
-import { doAddPlugin } from '../redux/app/app-actions.js'
+import {store} from '../store.js'
+import {Epml} from '../epml.js'
+import {addPluginRoutes} from './addPluginRoutes'
+import {doAddPlugin} from '../redux/app/app-actions.js'
let retryLoadPluginsInterval = 0
export const loadPlugins = () => fetch('/getPlugins')
diff --git a/core/src/plugins/plugin-mainjs-loader.js b/core/src/plugins/plugin-mainjs-loader.js
index c185a97b..86ec8917 100644
--- a/core/src/plugins/plugin-mainjs-loader.js
+++ b/core/src/plugins/plugin-mainjs-loader.js
@@ -1,5 +1,5 @@
'use strict'
-import { Epml, EpmlStream } from '../epml.js'
+import {Epml, EpmlStream} from '../epml.js'
window.Epml = Epml
window.EpmlStream = EpmlStream
diff --git a/core/src/plugins/routes.js b/core/src/plugins/routes.js
index 62358413..01f33410 100644
--- a/core/src/plugins/routes.js
+++ b/core/src/plugins/routes.js
@@ -1,22 +1,19 @@
-import { store } from '../store.js'
+import {store} from '../store.js'
import {
doAddPluginUrl,
- doUpdateBlockInfo,
- doUpdateNodeStatus,
- doUpdateNodeInfo,
- doSetNode,
doPageUrl,
doSetChatHeads,
+ doSetNode,
doUpdateAccountInfo,
+ doUpdateBlockInfo,
+ doUpdateNodeInfo,
+ doUpdateNodeStatus,
} from '../redux/app/app-actions.js'
import * as api from 'qortal-ui-crypto'
-import { requestTransactionDialog } from '../functional-components/confirm-transaction-dialog.js'
-import { doNewMessage } from '../notifications/controller.js'
+import {requestTransactionDialog} from '../functional-components/confirm-transaction-dialog.js'
+import {doNewMessage} from '../notifications/controller.js'
import snackbar from '../functional-components/snackbar.js'
-import {
- loadStateFromLocalStorage,
- saveStateToLocalStorage,
-} from '../localStorageHelpers.js'
+import {loadStateFromLocalStorage, saveStateToLocalStorage,} from '../localStorageHelpers.js'
const createTransaction = api.createTransaction
const processTransaction = api.processTransaction
@@ -128,13 +125,13 @@ export const routes = {
if(!req.data.apiVersion){
res = await processTransaction(tx.signedBytes)
}
-
+
let extraData = {}
if(req.data.type === 38 && tx && tx._rewardShareKeyPair && tx._rewardShareKeyPair.secretKey){
extraData.rewardSharePrivateKey = Base58.encode(tx._rewardShareKeyPair.secretKey)
}
-
-
+
+
response = {
success: true,
data: res,
@@ -182,8 +179,8 @@ export const routes = {
if(!req.data.apiVersion){
res = await processTransaction(tx.signedBytes)
}
-
-
+
+
response = {
success: true,
data: res,
@@ -234,7 +231,7 @@ export const routes = {
req.data.chatNonce,
store.getState().app.wallet._addresses[req.data.nonce].keyPair
)
-
+
let res
if(req.data.apiVersion && req.data.apiVersion === 2){
@@ -243,7 +240,7 @@ export const routes = {
if(!req.data.apiVersion){
res = await processTransaction(signedChatBytes)
}
-
+
response = res
} catch (e) {
console.error(e)
@@ -270,7 +267,7 @@ export const routes = {
if(!req.data.apiVersion){
res = await processTransaction(signedArbitraryBytes)
}
-
+
response = res
} catch (e) {
console.error(e)
@@ -296,7 +293,7 @@ export const routes = {
if(!req.data.apiVersion){
res = await processTransaction(signedArbitraryBytes)
}
-
+
response = res
} catch (e) {
console.error(e)
@@ -366,7 +363,7 @@ export const routes = {
unsignedTxn,
store.getState().app.selectedAddress.keyPair
)
-
+
let res
if(req.data.apiVersion && req.data.apiVersion === 2){
diff --git a/core/src/plugins/streams.js b/core/src/plugins/streams.js
index aae100e1..aafac880 100644
--- a/core/src/plugins/streams.js
+++ b/core/src/plugins/streams.js
@@ -1,5 +1,5 @@
-import { store } from '../store.js'
-import { EpmlStream } from 'epml'
+import {store} from '../store.js'
+import {EpmlStream} from 'epml'
const LOGIN_STREAM_NAME = 'logged_in'
const CONFIG_STREAM_NAME = 'config'
diff --git a/core/src/redux/app/actions/app-core.js b/core/src/redux/app/actions/app-core.js
index 53e9d547..77f99a87 100644
--- a/core/src/redux/app/actions/app-core.js
+++ b/core/src/redux/app/actions/app-core.js
@@ -1,5 +1,26 @@
// Core App Actions here...
-import { UPDATE_BLOCK_INFO, UPDATE_NODE_STATUS, UPDATE_NODE_INFO, CHAT_HEADS, ACCOUNT_INFO, ADD_AUTO_LOAD_IMAGES_CHAT, REMOVE_AUTO_LOAD_IMAGES_CHAT, ALLOW_QAPP_AUTO_AUTH, REMOVE_QAPP_AUTO_AUTH, SET_CHAT_LAST_SEEN, ADD_CHAT_LAST_SEEN, ALLOW_QAPP_AUTO_LISTS, REMOVE_QAPP_AUTO_LISTS, SET_NEW_TAB, ADD_TAB_INFO, SET_TAB_NOTIFICATIONS, IS_OPEN_DEV_DIALOG, SET_NEW_NOTIFICATION, SET_SIDE_EFFECT, SET_COIN_BALANCES } from '../app-action-types.js'
+import {
+ ACCOUNT_INFO,
+ ADD_AUTO_LOAD_IMAGES_CHAT,
+ ADD_CHAT_LAST_SEEN,
+ ADD_TAB_INFO,
+ ALLOW_QAPP_AUTO_AUTH,
+ ALLOW_QAPP_AUTO_LISTS,
+ CHAT_HEADS,
+ IS_OPEN_DEV_DIALOG,
+ REMOVE_AUTO_LOAD_IMAGES_CHAT,
+ REMOVE_QAPP_AUTO_AUTH,
+ REMOVE_QAPP_AUTO_LISTS,
+ SET_CHAT_LAST_SEEN,
+ SET_COIN_BALANCES,
+ SET_NEW_NOTIFICATION,
+ SET_NEW_TAB,
+ SET_SIDE_EFFECT,
+ SET_TAB_NOTIFICATIONS,
+ UPDATE_BLOCK_INFO,
+ UPDATE_NODE_INFO,
+ UPDATE_NODE_STATUS
+} from '../app-action-types.js'
export const doUpdateBlockInfo = (blockObj) => {
return (dispatch, getState) => {
@@ -164,4 +185,4 @@ export const setCoinBalances = (payload)=> {
type: SET_COIN_BALANCES,
payload
}
-}
\ No newline at end of file
+}
diff --git a/core/src/redux/app/actions/init-worker.js b/core/src/redux/app/actions/init-worker.js
index ce77b25e..3bdff3ee 100644
--- a/core/src/redux/app/actions/init-worker.js
+++ b/core/src/redux/app/actions/init-worker.js
@@ -1,7 +1,8 @@
-import { Epml } from '../../../epml.js'
-import { EpmlWorkerPlugin } from 'epml'
+import {Epml} from '../../../epml.js'
+import {EpmlWorkerPlugin} from 'epml'
+
+import {INIT_WORKERS} from '../app-action-types.js'
-import { INIT_WORKERS } from '../app-action-types.js'
Epml.registerPlugin(EpmlWorkerPlugin)
export const doInitWorkers = (numberOfWorkers, workerURL) => {
diff --git a/core/src/redux/app/actions/login.js b/core/src/redux/app/actions/login.js
index 02ce7e52..0bb8b092 100644
--- a/core/src/redux/app/actions/login.js
+++ b/core/src/redux/app/actions/login.js
@@ -1,4 +1,4 @@
-import { LOG_IN, LOG_OUT, SELECT_ADDRESS } from '../app-action-types.js'
+import {LOG_IN, LOG_OUT, SELECT_ADDRESS} from '../app-action-types.js'
export const doSelectAddress = address => {
return (dispatch, getState) => {
diff --git a/core/src/redux/app/actions/node-config.js b/core/src/redux/app/actions/node-config.js
index 700e0c5f..1761239f 100644
--- a/core/src/redux/app/actions/node-config.js
+++ b/core/src/redux/app/actions/node-config.js
@@ -1,6 +1,6 @@
// Node Config Actions here...
-import { LOAD_NODE_CONFIG, SET_NODE, ADD_NODE, REMOVE_NODE, EDIT_NODE } from '../app-action-types.js'
-import { UI_VERSION } from '../version.js'
+import {ADD_NODE, EDIT_NODE, LOAD_NODE_CONFIG, REMOVE_NODE, SET_NODE} from '../app-action-types.js'
+import {UI_VERSION} from '../version.js'
const nodeConfigUrl = '/getConfig'
diff --git a/core/src/redux/app/actions/plugins.js b/core/src/redux/app/actions/plugins.js
index 84e4d820..e376befe 100644
--- a/core/src/redux/app/actions/plugins.js
+++ b/core/src/redux/app/actions/plugins.js
@@ -1,4 +1,4 @@
-import { ADD_PLUGIN, ADD_PLUGIN_URL, PAGE_URL } from '../app-action-types.js'
+import {ADD_PLUGIN, ADD_PLUGIN_URL, PAGE_URL} from '../app-action-types.js'
export const doAddPluginUrl = (pluginUrlsConf) => {
return (dispatch, getState) => {
diff --git a/core/src/redux/app/app-actions.js b/core/src/redux/app/app-actions.js
index 51574a58..3dea965a 100644
--- a/core/src/redux/app/app-actions.js
+++ b/core/src/redux/app/app-actions.js
@@ -1,4 +1,4 @@
-import { NAVIGATE, NETWORK_CONNECTION_STATUS } from './app-action-types.js'
+import {NAVIGATE, NETWORK_CONNECTION_STATUS} from './app-action-types.js'
export * from './actions/login.js'
export * from './actions/init-worker.js'
diff --git a/core/src/redux/app/app-reducer.js b/core/src/redux/app/app-reducer.js
index e67826dd..8de46a5f 100644
--- a/core/src/redux/app/app-reducer.js
+++ b/core/src/redux/app/app-reducer.js
@@ -1,10 +1,47 @@
// Loading state, login state, isNavDrawOpen state etc. None of this needs to be saved to localstorage.
-import { loadStateFromLocalStorage, saveStateToLocalStorage } from '../../localStorageHelpers.js'
-import { LOG_IN, LOG_OUT, NETWORK_CONNECTION_STATUS, INIT_WORKERS, ADD_PLUGIN_URL, ADD_PLUGIN, ADD_NEW_PLUGIN_URL, NAVIGATE, SELECT_ADDRESS, ACCOUNT_INFO, CHAT_HEADS, UPDATE_BLOCK_INFO, UPDATE_NODE_STATUS, UPDATE_NODE_INFO, LOAD_NODE_CONFIG, SET_NODE, ADD_NODE, PAGE_URL, ADD_AUTO_LOAD_IMAGES_CHAT, REMOVE_AUTO_LOAD_IMAGES_CHAT, ALLOW_QAPP_AUTO_AUTH, REMOVE_QAPP_AUTO_AUTH, SET_CHAT_LAST_SEEN, ADD_CHAT_LAST_SEEN, ALLOW_QAPP_AUTO_LISTS, REMOVE_QAPP_AUTO_LISTS, SET_NEW_TAB, ADD_TAB_INFO, SET_TAB_NOTIFICATIONS, IS_OPEN_DEV_DIALOG, REMOVE_NODE, EDIT_NODE, SET_NEW_NOTIFICATION, SET_SIDE_EFFECT, SET_COIN_BALANCES } from './app-action-types.js'
-import { initWorkersReducer } from './reducers/init-workers.js'
-import { loginReducer } from './reducers/login-reducer.js'
-import { setNode, addNode, removeNode, editNode } from './reducers/manage-node.js'
+import {loadStateFromLocalStorage, saveStateToLocalStorage} from '../../localStorageHelpers.js'
+import {
+ ACCOUNT_INFO,
+ ADD_AUTO_LOAD_IMAGES_CHAT,
+ ADD_CHAT_LAST_SEEN,
+ ADD_NEW_PLUGIN_URL,
+ ADD_NODE,
+ ADD_PLUGIN,
+ ADD_PLUGIN_URL,
+ ADD_TAB_INFO,
+ ALLOW_QAPP_AUTO_AUTH,
+ ALLOW_QAPP_AUTO_LISTS,
+ CHAT_HEADS,
+ EDIT_NODE,
+ INIT_WORKERS,
+ IS_OPEN_DEV_DIALOG,
+ LOAD_NODE_CONFIG,
+ LOG_IN,
+ LOG_OUT,
+ NAVIGATE,
+ NETWORK_CONNECTION_STATUS,
+ PAGE_URL,
+ REMOVE_AUTO_LOAD_IMAGES_CHAT,
+ REMOVE_NODE,
+ REMOVE_QAPP_AUTO_AUTH,
+ REMOVE_QAPP_AUTO_LISTS,
+ SELECT_ADDRESS,
+ SET_CHAT_LAST_SEEN,
+ SET_COIN_BALANCES,
+ SET_NEW_NOTIFICATION,
+ SET_NEW_TAB,
+ SET_NODE,
+ SET_SIDE_EFFECT,
+ SET_TAB_NOTIFICATIONS,
+ UPDATE_BLOCK_INFO,
+ UPDATE_NODE_INFO,
+ UPDATE_NODE_STATUS
+} from './app-action-types.js'
+import {initWorkersReducer} from './reducers/init-workers.js'
+import {loginReducer} from './reducers/login-reducer.js'
+import {addNode, editNode, removeNode, setNode} from './reducers/manage-node.js'
import localForage from "localforage";
+
const chatLastSeen = localForage.createInstance({
name: "chat-last-seen",
});
@@ -71,7 +108,7 @@ export default (state = INITIAL_STATE, action) => {
wallet: INITIAL_STATE.wallet,
selectedAddress: INITIAL_STATE.selectedAddress,
accountInfo: INITIAL_STATE.accountInfo
-
+
}
case ADD_PLUGIN:
return {
diff --git a/core/src/redux/config/config-reducer.js b/core/src/redux/config/config-reducer.js
index 5a53f4d1..81900681 100644
--- a/core/src/redux/config/config-reducer.js
+++ b/core/src/redux/config/config-reducer.js
@@ -1,8 +1,8 @@
// Must be saved to localstorage. Will storage things such as saved addresses and themes (day/night mode) etc.
// Initial state needs to be loaded from either the getConfig url or localstorage...NOT set via this
-import { loadStateFromLocalStorage } from '../../localStorageHelpers'
-import { LOAD_CONFIG_FROM_API } from './config-actions.js'
-import { loadConfigFromAPI } from './reducers/load-config-from-api.js'
+import {loadStateFromLocalStorage} from '../../localStorageHelpers'
+import {LOAD_CONFIG_FROM_API} from './config-actions.js'
+import {loadConfigFromAPI} from './reducers/load-config-from-api.js'
const DEFAULT_INITIAL_STATE = {
styles: {
diff --git a/core/src/redux/reducers.js b/core/src/redux/reducers.js
index 8fb963a0..8b9235c8 100644
--- a/core/src/redux/reducers.js
+++ b/core/src/redux/reducers.js
@@ -1,4 +1,4 @@
-import { combineReducers } from 'redux'
+import {combineReducers} from 'redux'
import app from './app/app-reducer.js'
import config from './config/config-reducer.js'
diff --git a/core/src/redux/user/actions/claim-airdrop.js b/core/src/redux/user/actions/claim-airdrop.js
index 24f25dda..d94b5fe1 100644
--- a/core/src/redux/user/actions/claim-airdrop.js
+++ b/core/src/redux/user/actions/claim-airdrop.js
@@ -1,4 +1,4 @@
-import { CLAIM_AIRDROP } from '../user-action-types.js'
+import {CLAIM_AIRDROP} from '../user-action-types.js'
export const doClaimAirdrop = (address) => {
return (dispatch, getState) => {
diff --git a/core/src/redux/user/actions/notification-config.js b/core/src/redux/user/actions/notification-config.js
index 646865f6..949a32b8 100644
--- a/core/src/redux/user/actions/notification-config.js
+++ b/core/src/redux/user/actions/notification-config.js
@@ -1,5 +1,4 @@
-
-import { LOAD_NOTIFICATION_CONFIG, SET_QCHAT_NOTIFICATION_CONFIG } from '../user-action-types.js'
+import {LOAD_NOTIFICATION_CONFIG, SET_QCHAT_NOTIFICATION_CONFIG} from '../user-action-types.js'
const configUrl = '/getConfig'
diff --git a/core/src/redux/user/actions/store-wallet.js b/core/src/redux/user/actions/store-wallet.js
index 2621ad25..07b5f872 100644
--- a/core/src/redux/user/actions/store-wallet.js
+++ b/core/src/redux/user/actions/store-wallet.js
@@ -1,4 +1,4 @@
-import { STORE_WALLET, REMOVE_WALLET, UPDATE_STORED_WALLET_NAME } from '../user-action-types.js'
+import {REMOVE_WALLET, STORE_WALLET, UPDATE_STORED_WALLET_NAME} from '../user-action-types.js'
export const doStoreWallet = (wallet, password, name, statusUpdateFn = () => { }) => {
return (dispatch, getState) => {
diff --git a/core/src/redux/user/actions/update-account-info.js b/core/src/redux/user/actions/update-account-info.js
index def4695f..7b80ab82 100644
--- a/core/src/redux/user/actions/update-account-info.js
+++ b/core/src/redux/user/actions/update-account-info.js
@@ -1,4 +1,4 @@
-import { UPDATE_ACCOUNT_INFO } from '../user-action-types'
+import {UPDATE_ACCOUNT_INFO} from '../user-action-types'
export const doUpdateAccountInfo = (accInfo) => {
return (dispatch, getState) => {
diff --git a/core/src/redux/user/actions/update-name.js b/core/src/redux/user/actions/update-name.js
index c3eb1772..ae46cee0 100644
--- a/core/src/redux/user/actions/update-name.js
+++ b/core/src/redux/user/actions/update-name.js
@@ -1,5 +1,5 @@
-import { updateAccountInfo } from './update-account-info.js'
-import { doUpdateStoredWalletName } from './store-wallet.js'
+import {updateAccountInfo} from './update-account-info.js'
+import {doUpdateStoredWalletName} from './store-wallet.js'
const GET_NAME_URL = 'names/address/'
const CHECK_NAME_INTERVAL = 1000 * 10 // Every 10 seconds
diff --git a/core/src/redux/user/user-reducer.js b/core/src/redux/user/user-reducer.js
index b6535737..67f24757 100644
--- a/core/src/redux/user/user-reducer.js
+++ b/core/src/redux/user/user-reducer.js
@@ -1,5 +1,12 @@
-import { loadStateFromLocalStorage } from '../../localStorageHelpers'
-import { STORE_WALLET, REMOVE_WALLET, CLAIM_AIRDROP, UPDATE_ACCOUNT_INFO, LOAD_NOTIFICATION_CONFIG, SET_QCHAT_NOTIFICATION_CONFIG } from './user-action-types.js'
+import {loadStateFromLocalStorage} from '../../localStorageHelpers'
+import {
+ CLAIM_AIRDROP,
+ LOAD_NOTIFICATION_CONFIG,
+ REMOVE_WALLET,
+ SET_QCHAT_NOTIFICATION_CONFIG,
+ STORE_WALLET,
+ UPDATE_ACCOUNT_INFO
+} from './user-action-types.js'
const DEFAULT_INITIAL_STATE = {
storedWallets: {},
diff --git a/core/src/stateAwait.js b/core/src/stateAwait.js
index 1668cb54..7736b769 100644
--- a/core/src/stateAwait.js
+++ b/core/src/stateAwait.js
@@ -1,7 +1,7 @@
/**
* Simple helper function so that I can do `await stateAwait(state => state.something === true)` or `await stateAwait(state => state.name === 'myName')`
*/
-import { store } from './store.js'
+import {store} from './store.js'
let subscriptions = []
store.subscribe(() => {
diff --git a/core/src/store.js b/core/src/store.js
index 16622e7d..141f4d6e 100644
--- a/core/src/store.js
+++ b/core/src/store.js
@@ -1,7 +1,8 @@
-import { createStore, compose, applyMiddleware } from 'redux'
+import {applyMiddleware, compose, createStore} from 'redux'
import thunk from 'redux-thunk'
import reducers from './redux/reducers.js'
+
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
export const store = createStore(
diff --git a/core/src/styles/app-styles.js b/core/src/styles/app-styles.js
index 09a9a1ca..2fac5ce4 100644
--- a/core/src/styles/app-styles.js
+++ b/core/src/styles/app-styles.js
@@ -1,4 +1,4 @@
-import { LitElement, html } from 'lit'
+import {html, LitElement} from 'lit'
import './styles.scss'
import './app-theme.js'
@@ -21,7 +21,7 @@ class AppStyles extends LitElement {
--shadow-4: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
--shadow-5: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
--paper-input-container-focus-color: var(--mdc-theme-secondary);
-
+
font-family: "Roboto", sans-serif;
color: var(--mdc-theme-on-surface);
--window-height: ${this.windowHeight};
diff --git a/core/src/styles/app-theme.js b/core/src/styles/app-theme.js
index 7a94f99f..f2e9f93b 100644
--- a/core/src/styles/app-theme.js
+++ b/core/src/styles/app-theme.js
@@ -1,6 +1,6 @@
-import { LitElement, html } from 'lit'
-import { connect } from 'pwa-helpers'
-import { store } from '../store.js'
+import {html, LitElement} from 'lit'
+import {connect} from 'pwa-helpers'
+import {store} from '../store.js'
class AppTheme extends connect(store)(LitElement) {
@@ -27,7 +27,7 @@ class AppTheme extends connect(store)(LitElement) {
--mdc-theme-secondary: ${this.theme.colors.secondary}; /* Sets the text color to the theme secondary color. */
--mdc-theme-secondary-bg: ${this.theme.colors.secondaryBg};/* Sets the background color to the theme secondary color. */
--mdc-theme-on-secondary: ${this.theme.colors.onSecondary}; /* Sets the text color to the color configured for text on the secondary color. */
-
+
--mdc-theme-surface: ${this.theme.colors.surface}; /* Sets the background color to the surface background color. */
--mdc-theme-on-surface: ${this.theme.colors.onSurface};/* Sets the text color to the color configured for text on the surface color. */
--mdc-theme-background: ${this.theme.colors.background};/* Sets the background color to the theme background color. */
@@ -43,7 +43,7 @@ class AppTheme extends connect(store)(LitElement) {
paper-spinner-lite, paper-spinner {
--paper-spinner-color: var(--mdc-theme-secondary)
}
-
+
`
}
diff --git a/core/src/tradebot/addTradeBotRoutes.js b/core/src/tradebot/addTradeBotRoutes.js
index 1cef040c..50da648e 100644
--- a/core/src/tradebot/addTradeBotRoutes.js
+++ b/core/src/tradebot/addTradeBotRoutes.js
@@ -1,4 +1,4 @@
-import { routes } from './trade-bot-routes.js'
+import {routes} from './trade-bot-routes.js'
export const addTradeBotRoutes = epmlInstance => {
Object.entries(routes).forEach(([route, handler]) => {
diff --git a/core/src/tradebot/trade-bot-routes.js b/core/src/tradebot/trade-bot-routes.js
index aecb989f..4fb72c4c 100644
--- a/core/src/tradebot/trade-bot-routes.js
+++ b/core/src/tradebot/trade-bot-routes.js
@@ -1,4 +1,4 @@
-import { store } from '../store.js'
+import {store} from '../store.js'
import * as api from 'qortal-ui-crypto'
import snackbar from '../functional-components/snackbar.js'
@@ -35,14 +35,14 @@ export const routes = {
if (!req.disableModal && !req.data.disableModal) {
await requestTransactionDialog.requestTransaction(tx)
}
-
+
const res = await processTransaction(tx.signedBytes)
let extraData = {}
if(req.data.type === 38 && tx && tx._rewardShareKeyPair && tx._rewardShareKeyPair.secretKey){
extraData.rewardSharePrivateKey = Base58.encode(tx._rewardShareKeyPair.secretKey)
}
-
-
+
+
response = {
success: true,
data: res,
diff --git a/core/src/worker.js b/core/src/worker.js
index 24a11d8b..a1188062 100644
--- a/core/src/worker.js
+++ b/core/src/worker.js
@@ -1,7 +1,7 @@
-import { Epml, EpmlReadyPlugin, RequestPlugin, EpmlWorkerPlugin } from 'epml'
+import {Epml, EpmlReadyPlugin, EpmlWorkerPlugin, RequestPlugin} from 'epml'
import utils from './cryptoUtils.js'
-import { Sha512, bytes_to_base64 as bytesToBase64 } from 'asmcrypto.js'
+import {bytes_to_base64 as bytesToBase64, Sha512} from 'asmcrypto.js'
import bcrypt from 'bcryptjs'
Epml.registerPlugin(RequestPlugin)
diff --git a/crypto/api.js b/crypto/api.js
index 543d875d..e7ea9034 100644
--- a/crypto/api.js
+++ b/crypto/api.js
@@ -1,9 +1,9 @@
-import { Sha256 } from 'asmcrypto.js'
+import {Sha256} from 'asmcrypto.js'
import Base58 from './api/deps/Base58'
import Base64 from './api/deps/Base64'
-import { base58PublicKeyToAddress } from './api/wallet/base58PublicKeyToAddress'
-import { validateAddress } from './api/wallet/validateAddress'
-import { decryptChatMessage, decryptChatMessageBase64 } from './api/transactions/chat/decryptChatMessage'
+import {base58PublicKeyToAddress} from './api/wallet/base58PublicKeyToAddress'
+import {validateAddress} from './api/wallet/validateAddress'
+import {decryptChatMessage, decryptChatMessageBase64} from './api/transactions/chat/decryptChatMessage'
import _ from 'lodash'
window.Sha256 = Sha256
diff --git a/crypto/api/PhraseWallet.js b/crypto/api/PhraseWallet.js
index 41818a28..bfe81999 100644
--- a/crypto/api/PhraseWallet.js
+++ b/crypto/api/PhraseWallet.js
@@ -3,11 +3,11 @@ Copyright 2017-2018 @ irontiga and vbcs (original developer)
*/
'use strict'
import Base58 from './deps/Base58.js'
-import { Sha256, Sha512 } from 'asmcrypto.js'
+import {Sha256, Sha512} from 'asmcrypto.js'
import nacl from './deps/nacl-fast.js'
import utils from './deps/utils.js'
-import { generateSaveWalletData } from './storeWallet.js'
+import {generateSaveWalletData} from './storeWallet.js'
import publicKeyToAddress from './wallet/publicKeyToAddress.js'
import AltcoinHDWallet from "./bitcoin/AltcoinHDWallet"
@@ -93,7 +93,7 @@ export default class PhraseWallet {
const address = publicKeyToAddress(addrKeyPair.publicKey);
const qoraAddress = publicKeyToAddress(addrKeyPair.publicKey, true);
- // Create Bitcoin HD Wallet
+ // Create Bitcoin HD Wallet
const btcSeed = [...addrSeed];
const btcWallet = new AltcoinHDWallet({
mainnet: {
@@ -108,7 +108,7 @@ export default class PhraseWallet {
}
}).createWallet(new Uint8Array(btcSeed), false);
- // Create Litecoin HD Wallet
+ // Create Litecoin HD Wallet
const ltcSeed = [...addrSeed];
const ltcWallet = new AltcoinHDWallet({
mainnet: {
@@ -123,7 +123,7 @@ export default class PhraseWallet {
}
}).createWallet(new Uint8Array(ltcSeed), false, 'LTC');
- // Create Dogecoin HD Wallet
+ // Create Dogecoin HD Wallet
const dogeSeed = [...addrSeed];
const dogeWallet = new AltcoinHDWallet({
mainnet: {
@@ -138,7 +138,7 @@ export default class PhraseWallet {
}
}).createWallet(new Uint8Array(dogeSeed), false, 'DOGE');
- // Create Digibyte HD Wallet
+ // Create Digibyte HD Wallet
const dgbSeed = [...addrSeed];
const dgbWallet = new AltcoinHDWallet({
mainnet: {
@@ -153,7 +153,7 @@ export default class PhraseWallet {
}
}).createWallet(new Uint8Array(dgbSeed), false, 'DGB');
- // Create Ravencoin HD Wallet
+ // Create Ravencoin HD Wallet
const rvnSeed = [...addrSeed];
const rvnWallet = new AltcoinHDWallet({
mainnet: {
@@ -168,7 +168,7 @@ export default class PhraseWallet {
}
}).createWallet(new Uint8Array(rvnSeed), false, 'RVN');
- // Create Pirate Chain HD Wallet
+ // Create Pirate Chain HD Wallet
const arrrSeed = [...addrSeed];
const arrrWallet = new AltcoinHDWallet({
mainnet: {
diff --git a/crypto/api/bitcoin/AltcoinHDWallet.js b/crypto/api/bitcoin/AltcoinHDWallet.js
index 421d19fb..c0131e19 100644
--- a/crypto/api/bitcoin/AltcoinHDWallet.js
+++ b/crypto/api/bitcoin/AltcoinHDWallet.js
@@ -1,10 +1,10 @@
'use strict';
import Base58 from '../deps/Base58.js'
-import { Sha256, Sha512 } from 'asmcrypto.js'
+import {Sha256, Sha512} from 'asmcrypto.js'
import jsSHA from 'jssha'
import RIPEMD160 from '../deps/ripemd160.js'
import utils from '../deps/utils.js'
-import { EllipticCurve, BigInteger } from './ecbn.js'
+import {BigInteger, EllipticCurve} from './ecbn.js'
export default class AltcoinHDWallet {
@@ -335,7 +335,7 @@ export default class AltcoinHDWallet {
// Append 1 byte '0x00' (to make the key data 33 bytes, DO THIS ONLY FOR PRIVATE KEYS )
s.push(0)
- //if the private key length is less than 32 let's add leading zeros
+ //if the private key length is less than 32 let's add leading zeros
if(this.privateKey.length<32){
for(let i=this.privateKey.length;i<32;i++){
s.push(0)
diff --git a/crypto/api/createTransaction.js b/crypto/api/createTransaction.js
index b4bf7802..faf24803 100644
--- a/crypto/api/createTransaction.js
+++ b/crypto/api/createTransaction.js
@@ -1,6 +1,6 @@
-import { transactionTypes as transactions } from './transactions/transactions.js'
+import {transactionTypes as transactions} from './transactions/transactions.js'
import Base58 from './deps/Base58.js'
-import { request } from './fetch-request'
+import {request} from './fetch-request'
import signChat from './transactions/chat/signChat.js'
import signArbitrary from './transactions/arbitrary/signArbitrary.js'
import signArbitraryWithFee from './transactions/arbitrary/signArbitraryWithFee.js'
diff --git a/crypto/api/createWallet.js b/crypto/api/createWallet.js
index ed978183..341a2aeb 100644
--- a/crypto/api/createWallet.js
+++ b/crypto/api/createWallet.js
@@ -1,7 +1,7 @@
-import { kdf } from './kdf.js'
+import {kdf} from './kdf.js'
import PhraseWallet from './PhraseWallet.js'
import Base58 from './deps/Base58.js'
-import { decryptStoredWallet } from './decryptStoredWallet.js'
+import {decryptStoredWallet} from './decryptStoredWallet.js'
export const createWallet = async (sourceType, source, statusUpdateFn) => {
let version, seed
diff --git a/crypto/api/decryptStoredWallet.js b/crypto/api/decryptStoredWallet.js
index 9a045376..0d026e3a 100644
--- a/crypto/api/decryptStoredWallet.js
+++ b/crypto/api/decryptStoredWallet.js
@@ -1,7 +1,7 @@
import Base58 from './deps/Base58.js'
-import { kdf } from './kdf.js'
-import { HmacSha512, AES_CBC } from 'asmcrypto.js'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {kdf} from './kdf.js'
+import {AES_CBC, HmacSha512} from 'asmcrypto.js'
+import {get, registerTranslateConfig} from 'lit-translate'
registerTranslateConfig({
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
diff --git a/crypto/api/fetch-request.js b/crypto/api/fetch-request.js
index f7e5c9b2..a1ccee31 100644
--- a/crypto/api/fetch-request.js
+++ b/crypto/api/fetch-request.js
@@ -1,4 +1,4 @@
-import { watchConfig, waitForConfig } from '../config.js'
+import {waitForConfig, watchConfig} from '../config.js'
let config = {}
watchConfig((c) => {
diff --git a/crypto/api/kdf.js b/crypto/api/kdf.js
index bf3daec5..fcff88eb 100644
--- a/crypto/api/kdf.js
+++ b/crypto/api/kdf.js
@@ -1,8 +1,8 @@
-import { store } from '../api_deps.js'
-import { stateAwait } from './utils/stateAwait.js'
-import { Sha512 } from 'asmcrypto.js'
+import {store} from '../api_deps.js'
+import {stateAwait} from './utils/stateAwait.js'
+import {Sha512} from 'asmcrypto.js'
import utils from '../api/deps/utils.js'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {get, registerTranslateConfig} from 'lit-translate'
registerTranslateConfig({
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
diff --git a/crypto/api/registerUsername.js b/crypto/api/registerUsername.js
index 9715a078..1092e756 100644
--- a/crypto/api/registerUsername.js
+++ b/crypto/api/registerUsername.js
@@ -1,7 +1,7 @@
/**
* Not to be confused with register name...this is a special use case
*/
-import { request, createTransaction, processTransaction } from './api.js'
+import {createTransaction, processTransaction, request} from './api.js'
const TX_TYPE = 3 // NAME_REGISTRATION
const CHECK_LAST_REF_INTERVAL = 30 * 1000 // err 30 seconds
diff --git a/crypto/api/storeWallet.js b/crypto/api/storeWallet.js
index 9d16c8af..f63a2ce2 100644
--- a/crypto/api/storeWallet.js
+++ b/crypto/api/storeWallet.js
@@ -1,5 +1,5 @@
-import { HmacSha512, AES_CBC } from 'asmcrypto.js'
-import { kdf } from './kdf.js'
+import {AES_CBC, HmacSha512} from 'asmcrypto.js'
+import {kdf} from './kdf.js'
import Base58 from './deps/Base58.js'
const getRandomValues = window.crypto ? window.crypto.getRandomValues.bind(window.crypto) : window.msCrypto.getRandomValues.bind(window.msCrypto)
diff --git a/crypto/api/tradeRequest.js b/crypto/api/tradeRequest.js
index 797cbe5b..892c1318 100644
--- a/crypto/api/tradeRequest.js
+++ b/crypto/api/tradeRequest.js
@@ -3,7 +3,7 @@ import TradeBotCreateRequest from './transactions/trade-portal/tradebot/TradeBot
import TradeBotRespondRequest from './transactions/trade-portal/tradebot/TradeBotRespondRequest.js'
import signTradeBotTransaction from './transactions/trade-portal/tradebot/signTradeBotTransaction.js'
import DeleteTradeOffer from './transactions/trade-portal/tradeoffer/DeleteTradeOffer.js'
-import { request } from './fetch-request'
+import {request} from './fetch-request'
// TradeBotCreateRequest
export const tradeBotCreateRequest = (requestObject) => {
@@ -55,7 +55,7 @@ export const deleteTradeOffer = (requestObject) => {
})
}
-// Send BTC
+// Send BTC
export const sendBtc = (requestObject) => {
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
@@ -69,7 +69,7 @@ export const sendBtc = (requestObject) => {
})
}
-// Send LTC
+// Send LTC
export const sendLtc = (requestObject) => {
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
@@ -83,7 +83,7 @@ export const sendLtc = (requestObject) => {
})
}
-// Send DOGE
+// Send DOGE
export const sendDoge = (requestObject) => {
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
@@ -97,7 +97,7 @@ export const sendDoge = (requestObject) => {
})
}
-// Send DGB
+// Send DGB
export const sendDgb = (requestObject) => {
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
@@ -111,7 +111,7 @@ export const sendDgb = (requestObject) => {
})
}
-// Send RVN
+// Send RVN
export const sendRvn = (requestObject) => {
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
@@ -125,7 +125,7 @@ export const sendRvn = (requestObject) => {
})
}
-// Send ARRR
+// Send ARRR
export const sendArrr = (requestObject) => {
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
diff --git a/crypto/api/transactions/AirdropTransaction.js b/crypto/api/transactions/AirdropTransaction.js
index e23029a8..0d366ab5 100644
--- a/crypto/api/transactions/AirdropTransaction.js
+++ b/crypto/api/transactions/AirdropTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from './TransactionBase.js'
-import { QORT_DECIMALS } from '../constants.js'
+import {QORT_DECIMALS} from '../constants.js'
export default class PaymentTransaction extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/DeployAtTransaction.js b/crypto/api/transactions/DeployAtTransaction.js
index 23e50255..3e4edbc3 100644
--- a/crypto/api/transactions/DeployAtTransaction.js
+++ b/crypto/api/transactions/DeployAtTransaction.js
@@ -1,7 +1,7 @@
'use strict'
import TransactionBase from './TransactionBase.js'
-import { store } from '../../api.js'
-import { QORT_DECIMALS } from '../constants.js'
+import {store} from '../../api.js'
+import {QORT_DECIMALS} from '../constants.js'
export default class DeployAtTransaction extends TransactionBase {
constructor() {
@@ -81,7 +81,7 @@ export default class DeployAtTransaction extends TransactionBase {
set rAssetId(rAssetId) {
this._rAssetId = this.constructor.utils.int64ToBytes(rAssetId)
}
-
+
get params() {
const params = super.params
diff --git a/crypto/api/transactions/MessageTransaction.js b/crypto/api/transactions/MessageTransaction.js
index ea0e4079..5e34c0fa 100644
--- a/crypto/api/transactions/MessageTransaction.js
+++ b/crypto/api/transactions/MessageTransaction.js
@@ -1,6 +1,5 @@
'use strict'
import PaymentTransaction from './PaymentTransaction.js'
-import { QORT_DECIMALS } from '../constants.js'
export default class MessageTransaction extends PaymentTransaction {
constructor() {
diff --git a/crypto/api/transactions/PaymentTransaction.js b/crypto/api/transactions/PaymentTransaction.js
index bde396eb..7e86b211 100644
--- a/crypto/api/transactions/PaymentTransaction.js
+++ b/crypto/api/transactions/PaymentTransaction.js
@@ -1,7 +1,7 @@
'use strict'
import TransactionBase from './TransactionBase.js'
import Base58 from '../deps/Base58.js'
-import { store } from '../../api.js'
+import {store} from '../../api.js'
export default class PaymentTransaction extends TransactionBase {
constructor() {
@@ -17,12 +17,12 @@ export default class PaymentTransaction extends TransactionBase {
${this._dialogto}:
- ${this.dialogAddress} ${' '}-
- ${Base58.encode(this._recipient)}
+ ${this.dialogAddress} ${' '}-
+ ${Base58.encode(this._recipient)}
${this.recipientName ? html`
- ${this.dialogName} ${' '}-
+ ${this.dialogName} ${' '}-
${this.recipientName}
` : ''}
diff --git a/crypto/api/transactions/PublicizeTransaction.js b/crypto/api/transactions/PublicizeTransaction.js
index 569f5e38..2e1afda4 100644
--- a/crypto/api/transactions/PublicizeTransaction.js
+++ b/crypto/api/transactions/PublicizeTransaction.js
@@ -1,6 +1,6 @@
"use strict";
import ChatBase from "./chat/ChatBase.js"
-import { QORT_DECIMALS } from "../constants.js"
+import {QORT_DECIMALS} from "../constants.js"
export default class PublicizeTransaction extends ChatBase {
constructor() {
diff --git a/crypto/api/transactions/TransactionBase.js b/crypto/api/transactions/TransactionBase.js
index f41b7749..e29f00b4 100644
--- a/crypto/api/transactions/TransactionBase.js
+++ b/crypto/api/transactions/TransactionBase.js
@@ -1,5 +1,5 @@
'use strict'
-import { TX_TYPES, QORT_DECIMALS } from '../constants.js'
+import {QORT_DECIMALS, TX_TYPES} from '../constants.js'
import nacl from '../deps/nacl-fast.js'
import Base58 from '../deps/Base58.js'
import utils from '../deps/utils.js'
diff --git a/crypto/api/transactions/TransferPrivsTransaction.js b/crypto/api/transactions/TransferPrivsTransaction.js
index 858ac26a..61029703 100644
--- a/crypto/api/transactions/TransferPrivsTransaction.js
+++ b/crypto/api/transactions/TransferPrivsTransaction.js
@@ -1,8 +1,7 @@
'use strict'
import TransactionBase from './TransactionBase.js'
-import Base58 from '../deps/Base58.js'
-import { store } from '../../api.js'
-import { QORT_DECIMALS } from '../constants.js'
+import {store} from '../../api.js'
+import {QORT_DECIMALS} from '../constants.js'
export default class TransferPrivsTransaction extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/chat/ChatBase.js b/crypto/api/transactions/chat/ChatBase.js
index 240c9068..ce9fe8dc 100644
--- a/crypto/api/transactions/chat/ChatBase.js
+++ b/crypto/api/transactions/chat/ChatBase.js
@@ -1,5 +1,5 @@
'use strict'
-import { TX_TYPES, QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS, TX_TYPES} from '../../constants.js'
import nacl from '../../deps/nacl-fast.js'
import Base58 from '../../deps/Base58.js'
import utils from '../../deps/utils.js'
diff --git a/crypto/api/transactions/chat/ChatTransaction.js b/crypto/api/transactions/chat/ChatTransaction.js
index d6313924..b79aa415 100644
--- a/crypto/api/transactions/chat/ChatTransaction.js
+++ b/crypto/api/transactions/chat/ChatTransaction.js
@@ -2,8 +2,8 @@
import ChatBase from "./ChatBase.js"
import nacl from '../../deps/nacl-fast.js'
import ed2curve from '../../deps/ed2curve.js'
-import { Sha256 } from 'asmcrypto.js'
-import { CHAT_REFERENCE_FEATURE_TRIGGER_TIMESTAMP } from '../../constants.js'
+import {Sha256} from 'asmcrypto.js'
+import {CHAT_REFERENCE_FEATURE_TRIGGER_TIMESTAMP} from '../../constants.js'
export default class ChatTransaction extends ChatBase {
diff --git a/crypto/api/transactions/chat/GroupChatTransaction.js b/crypto/api/transactions/chat/GroupChatTransaction.js
index dc3a856b..a7dd51c3 100644
--- a/crypto/api/transactions/chat/GroupChatTransaction.js
+++ b/crypto/api/transactions/chat/GroupChatTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import ChatBase from "./ChatBase.js"
-import { CHAT_REFERENCE_FEATURE_TRIGGER_TIMESTAMP } from '../../constants.js'
+import {CHAT_REFERENCE_FEATURE_TRIGGER_TIMESTAMP} from '../../constants.js'
export default class GroupChatTransaction extends ChatBase {
constructor() {
diff --git a/crypto/api/transactions/chat/decryptChatMessage.js b/crypto/api/transactions/chat/decryptChatMessage.js
index e6f8bcd1..38ecea4e 100644
--- a/crypto/api/transactions/chat/decryptChatMessage.js
+++ b/crypto/api/transactions/chat/decryptChatMessage.js
@@ -1,7 +1,7 @@
import nacl from '../../deps/nacl-fast.js'
import Base58 from '../../deps/Base58.js'
import ed2curve from '../../deps/ed2curve.js'
-import { Sha256 } from 'asmcrypto.js'
+import {Sha256} from 'asmcrypto.js'
export const decryptChatMessage = (encryptedMessage, privateKey, recipientPublicKey, lastReference) => {
let _encryptedMessage = Base58.decode(encryptedMessage)
@@ -54,4 +54,4 @@ export const decryptChatMessageBase64 = (encryptedMessage, privateKey, recipient
return new TextDecoder('utf-8').decode(_decryptedMessage)
-}
\ No newline at end of file
+}
diff --git a/crypto/api/transactions/groups/AddGroupAdminTransaction.js b/crypto/api/transactions/groups/AddGroupAdminTransaction.js
index 4f5bf090..4719320c 100644
--- a/crypto/api/transactions/groups/AddGroupAdminTransaction.js
+++ b/crypto/api/transactions/groups/AddGroupAdminTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class AddGroupAdminTransaction extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/groups/CancelGroupBanTransaction.js b/crypto/api/transactions/groups/CancelGroupBanTransaction.js
index 61de1e34..78d58c85 100644
--- a/crypto/api/transactions/groups/CancelGroupBanTransaction.js
+++ b/crypto/api/transactions/groups/CancelGroupBanTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class CancelGroupBanTransaction extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/groups/CancelGroupInviteTransaction.js b/crypto/api/transactions/groups/CancelGroupInviteTransaction.js
index 10bb800b..6bf09844 100644
--- a/crypto/api/transactions/groups/CancelGroupInviteTransaction.js
+++ b/crypto/api/transactions/groups/CancelGroupInviteTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class CancelGroupInviteTransaction extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/groups/CreateGroupTransaction.js b/crypto/api/transactions/groups/CreateGroupTransaction.js
index 0b76ead0..1a6b38c9 100644
--- a/crypto/api/transactions/groups/CreateGroupTransaction.js
+++ b/crypto/api/transactions/groups/CreateGroupTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class CreateGroupTransaction extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/groups/GroupBanTransaction.js b/crypto/api/transactions/groups/GroupBanTransaction.js
index 101cb364..23aeb769 100644
--- a/crypto/api/transactions/groups/GroupBanTransaction.js
+++ b/crypto/api/transactions/groups/GroupBanTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class GroupBanTransaction extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/groups/GroupInviteTransaction.js b/crypto/api/transactions/groups/GroupInviteTransaction.js
index 62a89633..0e7397e3 100644
--- a/crypto/api/transactions/groups/GroupInviteTransaction.js
+++ b/crypto/api/transactions/groups/GroupInviteTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class GroupInviteTransaction extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/groups/GroupKickTransaction.js b/crypto/api/transactions/groups/GroupKickTransaction.js
index 4a2af2c2..22712da4 100644
--- a/crypto/api/transactions/groups/GroupKickTransaction.js
+++ b/crypto/api/transactions/groups/GroupKickTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class GroupKickTransaction extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/groups/JoinGroupTransaction.js b/crypto/api/transactions/groups/JoinGroupTransaction.js
index 57a42bb5..b42e17d2 100644
--- a/crypto/api/transactions/groups/JoinGroupTransaction.js
+++ b/crypto/api/transactions/groups/JoinGroupTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class JoinGroupTransaction extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/groups/LeaveGroupTransaction.js b/crypto/api/transactions/groups/LeaveGroupTransaction.js
index 988d768c..fd57381f 100644
--- a/crypto/api/transactions/groups/LeaveGroupTransaction.js
+++ b/crypto/api/transactions/groups/LeaveGroupTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class LeaveGroupTransaction extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/groups/RemoveGroupAdminTransaction.js b/crypto/api/transactions/groups/RemoveGroupAdminTransaction.js
index 05af0da9..abd8c084 100644
--- a/crypto/api/transactions/groups/RemoveGroupAdminTransaction.js
+++ b/crypto/api/transactions/groups/RemoveGroupAdminTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class RemoveGroupAdminTransaction extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/groups/UpdateGroupTransaction.js b/crypto/api/transactions/groups/UpdateGroupTransaction.js
index 8709f778..f5071f4e 100644
--- a/crypto/api/transactions/groups/UpdateGroupTransaction.js
+++ b/crypto/api/transactions/groups/UpdateGroupTransaction.js
@@ -1,8 +1,7 @@
'use strict';
import TransactionBase from '../TransactionBase.js'
-import Base58 from '../../deps/Base58.js'
-import { store } from '../../../api.js'
-import { QORT_DECIMALS } from "../../constants.js"
+import {store} from '../../../api.js'
+import {QORT_DECIMALS} from "../../constants.js"
export default class UpdateGroupTransaction extends TransactionBase {
constructor() {
@@ -15,7 +14,7 @@ export default class UpdateGroupTransaction extends TransactionBase {
return html`
Are you sure to update this group ?
-
+
On pressing confirm, the group details will be updated!
`
@@ -69,4 +68,4 @@ export default class UpdateGroupTransaction extends TransactionBase {
console.log('verify params', params)
return params
}
-}
\ No newline at end of file
+}
diff --git a/crypto/api/transactions/names/BuyNameTransacion.js b/crypto/api/transactions/names/BuyNameTransacion.js
index 48671a2a..c03f7b85 100644
--- a/crypto/api/transactions/names/BuyNameTransacion.js
+++ b/crypto/api/transactions/names/BuyNameTransacion.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class BuyNameTransacion extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/names/CancelSellNameTransacion.js b/crypto/api/transactions/names/CancelSellNameTransacion.js
index da8f98bb..cfd59b8d 100644
--- a/crypto/api/transactions/names/CancelSellNameTransacion.js
+++ b/crypto/api/transactions/names/CancelSellNameTransacion.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class CancelSellNameTransacion extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/names/RegisterNameTransaction.js b/crypto/api/transactions/names/RegisterNameTransaction.js
index 6076e7c3..06dde2ea 100644
--- a/crypto/api/transactions/names/RegisterNameTransaction.js
+++ b/crypto/api/transactions/names/RegisterNameTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class RegisterNameTransaction extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/names/SellNameTransacion.js b/crypto/api/transactions/names/SellNameTransacion.js
index 8659edf7..1ce67835 100644
--- a/crypto/api/transactions/names/SellNameTransacion.js
+++ b/crypto/api/transactions/names/SellNameTransacion.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class SellNameTransacion extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/names/UpdateNameTransaction.js b/crypto/api/transactions/names/UpdateNameTransaction.js
index bfc31563..f7ccf613 100644
--- a/crypto/api/transactions/names/UpdateNameTransaction.js
+++ b/crypto/api/transactions/names/UpdateNameTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class UpdateNameTransaction extends TransactionBase {
constructor() {
@@ -70,4 +70,4 @@ export default class UpdateNameTransaction extends TransactionBase {
)
return params
}
-}
\ No newline at end of file
+}
diff --git a/crypto/api/transactions/polls/CreatePollTransaction.js b/crypto/api/transactions/polls/CreatePollTransaction.js
index b7d8bb6c..a99179b1 100644
--- a/crypto/api/transactions/polls/CreatePollTransaction.js
+++ b/crypto/api/transactions/polls/CreatePollTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class CreatePollTransaction extends TransactionBase {
constructor() {
@@ -79,14 +79,14 @@ export default class CreatePollTransaction extends TransactionBase {
set rOptions(rOptions) {
const optionsArray = rOptions[0].split(', ').map(opt => opt.trim());
- this._pollOptions = optionsArray
+ this._pollOptions = optionsArray
for (let i = 0; i < optionsArray.length; i++) {
this.addOption(optionsArray[i]);
}
-
+
this._rNumberOfOptionsBytes = this.constructor.utils.int32ToBytes(optionsArray.length);
}
-
+
get params() {
const params = super.params
@@ -108,4 +108,4 @@ export default class CreatePollTransaction extends TransactionBase {
return params
}
-}
\ No newline at end of file
+}
diff --git a/crypto/api/transactions/polls/VoteOnPollTransaction.js b/crypto/api/transactions/polls/VoteOnPollTransaction.js
index 9fbba6ff..16c51140 100644
--- a/crypto/api/transactions/polls/VoteOnPollTransaction.js
+++ b/crypto/api/transactions/polls/VoteOnPollTransaction.js
@@ -1,6 +1,6 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
-import { QORT_DECIMALS } from '../../constants.js'
+import {QORT_DECIMALS} from '../../constants.js'
export default class VoteOnPollTransaction extends TransactionBase {
constructor() {
@@ -62,4 +62,4 @@ export default class VoteOnPollTransaction extends TransactionBase {
)
return params
}
-}
\ No newline at end of file
+}
diff --git a/crypto/api/transactions/reward-share/RemoveRewardShareTransaction.js b/crypto/api/transactions/reward-share/RemoveRewardShareTransaction.js
index 38719b56..2c2f9b3c 100644
--- a/crypto/api/transactions/reward-share/RemoveRewardShareTransaction.js
+++ b/crypto/api/transactions/reward-share/RemoveRewardShareTransaction.js
@@ -1,8 +1,8 @@
'use strict'
import TransactionBase from '../TransactionBase.js'
import publicKeyToAddress from '../../wallet/publicKeyToAddress.js'
-import { Base58 } from '../../deps/deps.js'
-import { DYNAMIC_FEE_TIMESTAMP } from '../../constants.js'
+import {Base58} from '../../deps/deps.js'
+import {DYNAMIC_FEE_TIMESTAMP} from '../../constants.js'
export default class RemoveRewardShareTransaction extends TransactionBase {
constructor() {
diff --git a/crypto/api/transactions/reward-share/RewardShareTransaction.js b/crypto/api/transactions/reward-share/RewardShareTransaction.js
index af0d6bba..eac8329c 100644
--- a/crypto/api/transactions/reward-share/RewardShareTransaction.js
+++ b/crypto/api/transactions/reward-share/RewardShareTransaction.js
@@ -3,8 +3,8 @@ import publicKeyToAddress from '../../wallet/publicKeyToAddress.js'
import TransactionBase from "../TransactionBase.js"
import nacl from '../../deps/nacl-fast.js'
import ed2curve from '../../deps/ed2curve.js'
-import { Sha256 } from 'asmcrypto.js'
-import { DYNAMIC_FEE_TIMESTAMP } from '../../constants.js'
+import {Sha256} from 'asmcrypto.js'
+import {DYNAMIC_FEE_TIMESTAMP} from '../../constants.js'
export default class RewardShareTransaction extends TransactionBase {
constructor() {
@@ -14,7 +14,7 @@ export default class RewardShareTransaction extends TransactionBase {
render(html) {
return html`
- ${this._rewarddialog1} ${this._percentageShare / 1e8}% ${this._rewarddialog2} ${this.constructor.Base58.encode(this._recipient)} ?
+ ${this._rewarddialog1} ${this._percentageShare / 1e8}% ${this._rewarddialog2} ${this.constructor.Base58.encode(this._recipient)} ?
${this._rewarddialog3}
${this._base58RewardShareSeed}
diff --git a/crypto/api/transactions/trade-portal/tradeoffer/cancelAllOffers.js b/crypto/api/transactions/trade-portal/tradeoffer/cancelAllOffers.js
index e3011a59..c3a91933 100644
--- a/crypto/api/transactions/trade-portal/tradeoffer/cancelAllOffers.js
+++ b/crypto/api/transactions/trade-portal/tradeoffer/cancelAllOffers.js
@@ -1,6 +1,6 @@
-import { request } from '../../../fetch-request.js'
-import { deleteTradeOffer, signTradeBotTxn } from '../../../tradeRequest.js'
-import { processTransaction } from '../../../createTransaction.js'
+import {request} from '../../../fetch-request.js'
+import {deleteTradeOffer, signTradeBotTxn} from '../../../tradeRequest.js'
+import {processTransaction} from '../../../createTransaction.js'
export const cancelAllOffers = async (requestObject) => {
const keyPair = requestObject.keyPair
diff --git a/crypto/api/transactions/transactions.js b/crypto/api/transactions/transactions.js
index 4f0e92fd..75aeb35b 100644
--- a/crypto/api/transactions/transactions.js
+++ b/crypto/api/transactions/transactions.js
@@ -17,7 +17,6 @@ import GroupKickTransaction from './groups/GroupKickTransaction.js'
import GroupInviteTransaction from './groups/GroupInviteTransaction.js'
import CancelGroupInviteTransaction from './groups/CancelGroupInviteTransaction.js'
import JoinGroupTransaction from './groups/JoinGroupTransaction.js'
-import UpdateGroupTransaction from './groups/UpdateGroupTransaction.js'
import LeaveGroupTransaction from './groups/LeaveGroupTransaction.js'
import RewardShareTransaction from './reward-share/RewardShareTransaction.js'
import RemoveRewardShareTransaction from './reward-share/RemoveRewardShareTransaction.js'
diff --git a/crypto/api/utils/stateAwait.js b/crypto/api/utils/stateAwait.js
index 8e8278f3..666eb0db 100644
--- a/crypto/api/utils/stateAwait.js
+++ b/crypto/api/utils/stateAwait.js
@@ -1,4 +1,4 @@
-import { store } from '../../api.js'
+import {store} from '../../api.js'
let subscriptions = []
diff --git a/crypto/api/wallet/publicKeyToAddress.js b/crypto/api/wallet/publicKeyToAddress.js
index 1839a05b..67954a0a 100644
--- a/crypto/api/wallet/publicKeyToAddress.js
+++ b/crypto/api/wallet/publicKeyToAddress.js
@@ -2,9 +2,9 @@ import Base58 from '../deps/Base58.js'
import BROKEN_RIPEMD160 from '../deps/broken-ripemd160.js'
import RIPEMD160 from '../deps/ripemd160.js'
import utils from '../deps/utils.js'
-import { ADDRESS_VERSION } from '../constants.js'
-import { Buffer } from 'buffer'
-import { Sha256 } from 'asmcrypto.js'
+import {ADDRESS_VERSION} from '../constants.js'
+import {Buffer} from 'buffer'
+import {Sha256} from 'asmcrypto.js'
const repeatSHA256 = (passphrase, hashes) => {
let hash = passphrase
diff --git a/crypto/config.js b/crypto/config.js
index e17ca4f2..375b5bd8 100644
--- a/crypto/config.js
+++ b/crypto/config.js
@@ -1,4 +1,4 @@
-import { store } from './api.js'
+import {store} from './api.js'
let config = false
let loaded = false
diff --git a/plugins/epml.js b/plugins/epml.js
index 0a0489a5..41892ab8 100644
--- a/plugins/epml.js
+++ b/plugins/epml.js
@@ -1,4 +1,12 @@
-import { Epml, EpmlReadyPlugin, RequestPlugin, ContentWindow as EpmlContentWindowPlugin, EpmlStreamPlugin, EpmlProxyPlugin, EpmlStream } from 'epml'
+import {
+ ContentWindow as EpmlContentWindowPlugin,
+ Epml,
+ EpmlProxyPlugin,
+ EpmlReadyPlugin,
+ EpmlStream,
+ EpmlStreamPlugin,
+ RequestPlugin
+} from 'epml'
Epml.registerPlugin(RequestPlugin)
Epml.registerPlugin(EpmlReadyPlugin)
diff --git a/plugins/plugins/core/become-minter/become-minter-css.src.js b/plugins/plugins/core/become-minter/become-minter-css.src.js
index 1efb0c4d..5ed388c9 100644
--- a/plugins/plugins/core/become-minter/become-minter-css.src.js
+++ b/plugins/plugins/core/become-minter/become-minter-css.src.js
@@ -1,4 +1,4 @@
-import { css } from 'lit';
+import {css} from 'lit';
export const pageStyles = css`
* {
diff --git a/plugins/plugins/core/become-minter/become-minter.src.js b/plugins/plugins/core/become-minter/become-minter.src.js
index 0a9033d4..33f4b6d2 100644
--- a/plugins/plugins/core/become-minter/become-minter.src.js
+++ b/plugins/plugins/core/become-minter/become-minter.src.js
@@ -1,22 +1,21 @@
-import { LitElement, html } from 'lit'
-import { Epml } from '../../../epml.js'
+import {html, LitElement} from 'lit'
+import {Epml} from '../../../epml.js'
import '../components/ButtonIconCopy.js'
-import { use, translate, registerTranslateConfig } from 'lit-translate'
-import { blocksNeed } from '../../utils/blocks-needed.js'
+import {registerTranslateConfig, translate, use} from 'lit-translate'
+import {blocksNeed} from '../../utils/blocks-needed.js'
import isElectron from 'is-electron'
-
-registerTranslateConfig({
- loader: (lang) => fetch(`/language/${lang}.json`).then((res) => res.json()),
-})
-
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@material/mwc-button'
import '@material/mwc-textfield'
import '@vaadin/button'
-import { pageStyles } from './become-minter-css.src.js'
+import {pageStyles} from './become-minter-css.src.js'
import './components/not-sponsored.js'
import './components/yes-sponsored.js'
+registerTranslateConfig({
+ loader: (lang) => fetch(`/language/${lang}.json`).then((res) => res.json()),
+})
+
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
class BecomeMinter extends LitElement {
diff --git a/plugins/plugins/core/become-minter/components/not-sponsored.js b/plugins/plugins/core/become-minter/components/not-sponsored.js
index 380a992a..516c9c88 100644
--- a/plugins/plugins/core/become-minter/components/not-sponsored.js
+++ b/plugins/plugins/core/become-minter/components/not-sponsored.js
@@ -1,13 +1,13 @@
-import { LitElement, html } from 'lit'
-import { Epml } from '../../../../epml.js'
+import {html, LitElement} from 'lit'
+import {Epml} from '../../../../epml.js'
import '../../components/ButtonIconCopy.js'
-import { use, get, translate, registerTranslateConfig } from 'lit-translate'
+import {translate} from 'lit-translate'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@material/mwc-button'
import '@material/mwc-textfield'
import '@vaadin/button'
-import { pageStyles } from '../become-minter-css.src.js'
+import {pageStyles} from '../become-minter-css.src.js'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
diff --git a/plugins/plugins/core/become-minter/components/yes-sponsored.js b/plugins/plugins/core/become-minter/components/yes-sponsored.js
index f4eea8cf..e1b8783b 100644
--- a/plugins/plugins/core/become-minter/components/yes-sponsored.js
+++ b/plugins/plugins/core/become-minter/components/yes-sponsored.js
@@ -1,14 +1,13 @@
-import { LitElement, html } from 'lit'
-import { Epml } from '../../../../epml.js'
+import {html, LitElement} from 'lit'
import '../../components/ButtonIconCopy.js'
-import { use, get, translate, registerTranslateConfig } from 'lit-translate'
+import {translate} from 'lit-translate'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@material/mwc-button'
import '@material/mwc-textfield'
import '@vaadin/button'
-import { blocksNeed } from '../../../utils/blocks-needed.js'
-import { pageStyles } from '../become-minter-css.src.js'
+import {blocksNeed} from '../../../utils/blocks-needed.js'
+import {pageStyles} from '../become-minter-css.src.js'
class YesSponsored extends LitElement {
static get properties() {
diff --git a/plugins/plugins/core/components/ButtonIconCopy.js b/plugins/plugins/core/components/ButtonIconCopy.js
index a92e8b15..2604fed8 100644
--- a/plugins/plugins/core/components/ButtonIconCopy.js
+++ b/plugins/plugins/core/components/ButtonIconCopy.js
@@ -1,5 +1,5 @@
-import { LitElement, html, css } from 'lit'
-import { Epml } from '../../../epml.js'
+import {html, LitElement} from 'lit'
+import {Epml} from '../../../epml.js'
import '@material/mwc-icon-button'
@@ -44,10 +44,10 @@ class ButtonIconCopy extends LitElement {
render() {
return html`
-
this.saveToClipboard(this.textToCopy)}
>
diff --git a/plugins/plugins/core/components/ChatGifs/ChatGifs-css.js b/plugins/plugins/core/components/ChatGifs/ChatGifs-css.js
index dedbdb90..41aab02b 100644
--- a/plugins/plugins/core/components/ChatGifs/ChatGifs-css.js
+++ b/plugins/plugins/core/components/ChatGifs/ChatGifs-css.js
@@ -1,4 +1,4 @@
-import { css } from 'lit';
+import {css} from 'lit';
export const gifExplorerStyles = css`
.gifs-container {
diff --git a/plugins/plugins/core/components/ChatGifs/ChatGifs.js b/plugins/plugins/core/components/ChatGifs/ChatGifs.js
index 35d511e3..c5ce7bc4 100644
--- a/plugins/plugins/core/components/ChatGifs/ChatGifs.js
+++ b/plugins/plugins/core/components/ChatGifs/ChatGifs.js
@@ -1,16 +1,15 @@
-import {LitElement, html, css} from 'lit';
-import {render} from 'lit/html.js';
+import {html, LitElement} from 'lit';
import {Epml} from '../../../../epml.js';
import * as zip from '@zip.js/zip.js';
import '@material/mwc-icon';
import ShortUniqueId from 'short-unique-id';
import {publishData} from '../../../utils/publish-image.js';
import {gifExplorerStyles} from './ChatGifs-css.js';
-import { bytesToMegabytes } from '../../../utils/bytesToMegabytes.js';
+import {bytesToMegabytes} from '../../../utils/bytesToMegabytes.js';
import './ChatGifsExplore.js';
import '../ImageComponent.js';
import '@vaadin/tooltip';
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {get, translate} from 'lit-translate'
const parentEpml = new Epml({type: 'WINDOW', source: window.parent});
@@ -429,25 +428,25 @@ setOpenGifModal: { attribute: false }
function validateGifSizes(gifs) {
const maxSizeInMB = 0.7;
const invalidGifs = [];
-
+
for (let i = 0; i < gifs.length; i++) {
const gif = gifs[i];
const gifSize = gif.size;
-
+
const gifSizeMB = bytesToMegabytes(gifSize);
-
+
if (gifSizeMB > maxSizeInMB) {
invalidGifs.push(gif);
}
}
-
+
if (invalidGifs.length > 0) {
return false;
} else {
return true;
}
}
-
+
let validatedSize = validateGifSizes(this.gifsToBeAdded);
if (!validatedSize) {
@@ -504,7 +503,7 @@ setOpenGifModal: { attribute: false }
const zipFileBlob = await zipFileWriter.getData();
const zipSize = bytesToMegabytes(zipFileBlob.size);
-
+
if (zipSize > 10) {
parentEpml.request('showSnackBar', get('gifs.gchange27'));
this.isLoading = false;
@@ -552,13 +551,13 @@ setOpenGifModal: { attribute: false }
this.gifsToBeAdded = [];
this.newCollectionName = '';
parentEpml.request('showSnackBar', get('gifs.gchange12'));
- }
+ }
stop = false;
}
};
interval = setInterval(getAnswer, 5000);
});
-
+
this.isLoading = false;
this.setGifsLoading(false);
this.mode = 'myCollection';
@@ -608,7 +607,7 @@ setOpenGifModal: { attribute: false }
-
-
-
+
+
{
this.isOpenLeaveModal = false
}}
class="modal-button"
?disabled="${this.isLoading}"
-
+
>
${translate("general.close")}
diff --git a/plugins/plugins/core/components/ChatGroupManager.js b/plugins/plugins/core/components/ChatGroupManager.js
index a6fc68c2..a4f6f73a 100644
--- a/plugins/plugins/core/components/ChatGroupManager.js
+++ b/plugins/plugins/core/components/ChatGroupManager.js
@@ -1,5 +1,5 @@
-import { LitElement, html, css } from 'lit';
-import { Epml } from '../../../epml';
+import {css, html, LitElement} from 'lit';
+import {Epml} from '../../../epml';
import '@material/mwc-button';
import '@material/mwc-dialog';
import '@polymer/paper-spinner/paper-spinner-lite.js';
@@ -11,9 +11,7 @@ import './TipUser';
import './UserInfo/UserInfo';
import './ChatImage';
import './ReusableImage';
-import {
- get
-} from 'lit-translate';
+import {get} from 'lit-translate';
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
@@ -240,10 +238,10 @@ class ChatGroupsManager extends LitElement {
async getGroups() {
try {
-
+
let endpoint = `/groups`
-
-
+
+
const groups = await parentEpml.request('apiCall', {
type: 'api',
url: endpoint,
@@ -265,7 +263,7 @@ class ChatGroupsManager extends LitElement {
this.getGroups()
}
-
+
elementObserver() {
const options = {
root: this.viewElement,
@@ -314,7 +312,7 @@ class ChatGroupsManager extends LitElement {
render() {
console.log('this.groups', this.groups)
return html`
-
+
{
@@ -334,8 +332,8 @@ class ChatGroupsManager extends LitElement {
this.selectMyImages(e)} ?checked=${this.onlyMyImages}>
diff --git a/plugins/plugins/core/components/ChatGroupSettings.js b/plugins/plugins/core/components/ChatGroupSettings.js
index 76af8645..4caf123d 100644
--- a/plugins/plugins/core/components/ChatGroupSettings.js
+++ b/plugins/plugins/core/components/ChatGroupSettings.js
@@ -1,13 +1,11 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml'
-import snackbar from './snackbar.js'
+import {css, html, LitElement} from 'lit'
+import {Epml} from '../../../epml'
import '@material/mwc-button'
import '@material/mwc-dialog'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@material/mwc-icon'
import './WrapperModal'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {get, translate} from 'lit-translate'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@@ -47,7 +45,7 @@ class ChatGroupSettings extends LitElement {
.top-bar-icon:hover {
color: var(--black)
}
-
+
.modal-button {
font-family: Roboto, sans-serif;
font-size: 16px;
@@ -82,7 +80,7 @@ class ChatGroupSettings extends LitElement {
}
async confirmRelationship() {
-
+
let interval = null
let stop = false
@@ -139,8 +137,8 @@ class ChatGroupSettings extends LitElement {
})
return convertedBytes
}
-
-
+
+
// Make Transaction Request
const makeTransactionRequest = async (lastRef) => {
let groupdialog3 = get("transactions.groupdialog3")
@@ -235,11 +233,11 @@ class ChatGroupSettings extends LitElement {
this.isOpenLeaveModal = true
}} class="top-bar-icon" style="margin: 0px 20px" icon="vaadin:cog" slot="icon">
-
{
if(this.isLoading) return
this.isOpenLeaveModal = false
- } }
+ } }
style=${(this.isOpenLeaveModal) ? "display: block" : "display: none"}>
${translate("grouppage.gchange35")}
@@ -263,15 +261,15 @@ class ChatGroupSettings extends LitElement {
${this.message}
-
-
+
+
{
this.isOpenLeaveModal= false
}}
class="modal-button"
?disabled="${this.isLoading}"
-
+
>
${translate("general.close")}
@@ -280,4 +278,4 @@ class ChatGroupSettings extends LitElement {
}
}
-customElements.define('chat-group-settings', ChatGroupSettings);
\ No newline at end of file
+customElements.define('chat-group-settings', ChatGroupSettings);
diff --git a/plugins/plugins/core/components/ChatGroupsManagement.js b/plugins/plugins/core/components/ChatGroupsManagement.js
index aea8a217..43c2d168 100644
--- a/plugins/plugins/core/components/ChatGroupsManagement.js
+++ b/plugins/plugins/core/components/ChatGroupsManagement.js
@@ -1,7 +1,5 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml'
-import snackbar from './snackbar.js'
+import {css, html, LitElement} from 'lit'
+import {Epml} from '../../../epml'
import '@material/mwc-button'
import '@material/mwc-dialog'
import '@polymer/paper-spinner/paper-spinner-lite.js'
@@ -12,8 +10,7 @@ import '@vaadin/tabs/theme/material/vaadin-tabs.js'
import '@vaadin/avatar'
import '@vaadin/grid'
import '@vaadin/grid/vaadin-grid-filter-column.js'
-import { columnBodyRenderer } from '@vaadin/grid/lit.js'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {get, translate} from 'lit-translate'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@@ -83,9 +80,9 @@ class ChatGroupsManagement extends LitElement {
let _joinedGroups = await this.getJoinedGroups()
this.joinedGroups = _joinedGroups
} catch (error) {
-
+
}
-
+
}
_tabChanged(e) {
@@ -105,7 +102,7 @@ class ChatGroupsManagement extends LitElement {
} catch (error) {
fee = null
}
-
+
return fee
}
@@ -126,7 +123,7 @@ class ChatGroupsManagement extends LitElement {
}
async confirmRelationship() {
-
+
let interval = null
let stop = false
@@ -155,7 +152,7 @@ class ChatGroupsManagement extends LitElement {
async _leaveGroup(groupId, groupName) {
// Reset Default Settings...
this.resetDefaultSettings()
-
+
const leaveFeeInput = await this.unitFee()
if(!leaveFeeInput){
throw Error()
@@ -230,29 +227,29 @@ class ChatGroupsManagement extends LitElement {
return html`
- {
if(this.isLoading) return
this.isOpenLeaveModal = false
- } }
+ } }
customStyle=${"width: 90%; max-width: 900px; height: 90%"}
style=${(this.isOpenLeaveModal) ? "display: block" : "display: none"}>
-
+
-
+
Groups
Group Join Requests
Invites
Blocked Users
-
+
-
+
${this.currentTab === 0 ? html`
-
+
@@ -262,10 +259,10 @@ class ChatGroupsManagement extends LitElement {
Current groups as member
` : ''}
-
-
+
+
-
+
${translate("general.close")}
-
+
`;
}
}
-customElements.define('chat-groups-management', ChatGroupsManagement);
\ No newline at end of file
+customElements.define('chat-groups-management', ChatGroupsManagement);
diff --git a/plugins/plugins/core/components/ChatGroupsModal.js b/plugins/plugins/core/components/ChatGroupsModal.js
index f6a299d0..efd29dce 100644
--- a/plugins/plugins/core/components/ChatGroupsModal.js
+++ b/plugins/plugins/core/components/ChatGroupsModal.js
@@ -1,7 +1,5 @@
-import { LitElement, html, css } from 'lit';
-import {
- translate,
-} from 'lit-translate';
+import {css, html, LitElement} from 'lit';
+import {translate,} from 'lit-translate';
import '@material/mwc-menu';
import '@material/mwc-list/mwc-list-item.js';
import '@material/mwc-dialog'
@@ -22,7 +20,7 @@ export class ChatGroupsModal extends LitElement {
--mdc-dialog-max-width: 85vw;
--mdc-dialog-max-height: 95vh;
}
-
+
.imageContainer {
display: flex;
justify-content: center;
@@ -69,10 +67,10 @@ export class ChatGroupsModal extends LitElement {
render() {
console.log('hello')
return html`
-
-
{
this.setOpenDialogGroupsModal(false)
}}>
diff --git a/plugins/plugins/core/components/ChatHead.js b/plugins/plugins/core/components/ChatHead.js
index 6ea78b2e..50b248aa 100644
--- a/plugins/plugins/core/components/ChatHead.js
+++ b/plugins/plugins/core/components/ChatHead.js
@@ -1,8 +1,7 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml.js'
+import {css, html, LitElement} from 'lit'
+import {Epml} from '../../../epml.js'
import localForage from "localforage"
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {translate} from 'lit-translate'
import '@material/mwc-icon'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@@ -29,7 +28,7 @@ class ChatHead extends LitElement {
static get styles() {
return css`
li {
-
+
width: 100%;
padding: 10px 5px 10px 5px;
cursor: pointer;
@@ -121,7 +120,7 @@ class ChatHead extends LitElement {
imageHTMLRes.onload = () => {
this.isImageLoaded = true;
}
- imageHTMLRes.onerror = () => {
+ imageHTMLRes.onerror = () => {
if (this.imageFetches < 4) {
setTimeout(() => {
this.imageFetches = this.imageFetches + 1
@@ -138,7 +137,7 @@ class ChatHead extends LitElement {
let avatarImg = ''
let backupAvatarImg = ''
let isUnread = false
-
+
if(this.chatInfo.name){
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
@@ -170,16 +169,16 @@ class ChatHead extends LitElement {
${this.chatInfo.groupName ? this.chatInfo.groupName : this.chatInfo.name !== undefined ? this.chatInfo.name : this.chatInfo.address.substr(0, 15)} ${this.chatInfo.groupId !== undefined ? 'lock_open' : 'lock'}
-
+
-
+
${translate('chatpage.cchange90')}
-
+
`
}
@@ -210,7 +209,7 @@ class ChatHead extends LitElement {
parentEpml.subscribe('chat_last_seen', async chatList => {
const parsedChatList = JSON.parse(chatList)
const findChatSeen = parsedChatList.find(chat=> chat.key === this.chatInfo.url)
-
+
if(findChatSeen && this.lastReadMessageTimestamp !== findChatSeen.timestamp){
this.lastReadMessageTimestamp = findChatSeen.timestamp
this.requestUpdate()
@@ -244,20 +243,20 @@ class ChatHead extends LitElement {
return true
}
if(changedProperties.has('chatInfo')){
-
+
const prevChatInfo = changedProperties.get('chatInfo')
if(prevChatInfo.address !== this.chatInfo.address){
-
+
this.isImageLoaded = false
this.requestUpdate()
}
return true
}
-
+
return false
}
-
+
getUrl(chatUrl) {
this.setActiveChatHeadUrl(chatUrl)
}
diff --git a/plugins/plugins/core/components/ChatImage.js b/plugins/plugins/core/components/ChatImage.js
index 35a3fde2..15e4aa38 100644
--- a/plugins/plugins/core/components/ChatImage.js
+++ b/plugins/plugins/core/components/ChatImage.js
@@ -1,13 +1,11 @@
-import { LitElement, html, css } from 'lit';
-import {
- get,
- translate,
-} from 'lit-translate';
+import {css, html, LitElement} from 'lit';
+import {get, translate,} from 'lit-translate';
import axios from 'axios'
-import { RequestQueueWithPromise } from '../../utils/queue';
+import {RequestQueueWithPromise} from '../../utils/queue';
import '@material/mwc-menu';
import '@material/mwc-list/mwc-list-item.js'
-import { Epml } from '../../../epml';
+import {Epml} from '../../../epml';
+
const requestQueue = new RequestQueueWithPromise(5);
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@@ -27,9 +25,9 @@ export class ChatImage extends LitElement {
--mdc-theme-text-primary-on-background: var(--black);
}
img {
- max-width:45vh;
- max-height:40vh;
- border-radius: 5px;
+ max-width:45vh;
+ max-height:40vh;
+ border-radius: 5px;
cursor: pointer;
position: relative;
}
@@ -53,7 +51,7 @@ export class ChatImage extends LitElement {
}
.defaultSize {
- width: 45vh;
+ width: 45vh;
height: 40vh;
}
@@ -152,7 +150,7 @@ getMyNode(){
this.fetchResource()
this.url = `${this.nodeUrl}/arbitrary/${this.resource.service}/${this.resource.name}/${this.resource.identifier}?async=true&apiKey=${this.myNode.apiKey}`
-
+
}
async fetchStatus(){
@@ -167,7 +165,7 @@ getMyNode(){
const intervalId = setInterval(async () => {
if (isCalling) return
isCalling = true
-
+
const data = await requestQueue.enqueue(() => {
return axios.get(`${this.nodeUrl}/arbitrary/resource/status/${this.resource.service}/${this.resource.name}/${this.resource.identifier}?apiKey=${this.myNode.apiKey}`)
});
@@ -191,7 +189,7 @@ getMyNode(){
...res,
status: 'REFETCHING'
}
-
+
setTimeout(() => {
isCalling = false
this.fetchResource()
@@ -200,7 +198,7 @@ getMyNode(){
}
percentLoaded = res.percentLoaded
}
-
+
this.status = res
if(this.status.status === 'DOWNLOADED'){
this.fetchResource()
@@ -240,40 +238,40 @@ getMyNode(){
return true
}
-
+
showContextMenu(e) {
e.preventDefault();
- e.stopPropagation();
+ e.stopPropagation();
const contextMenu = this.shadowRoot.getElementById('contextMenu');
const containerRect = e.currentTarget.getBoundingClientRect();
-
+
// Adjusting the positions
const adjustedX = e.clientX - containerRect.left;
const adjustedY = e.clientY - containerRect.top;
-
+
contextMenu.style.top = `${adjustedY}px`;
contextMenu.style.left = `${adjustedX}px`;
-
+
contextMenu.open = true;
}
-
-
-
+
+
+
async handleCopy(e) {
- e.stopPropagation();
+ e.stopPropagation();
const image = this.shadowRoot.querySelector('img');
-
+
// Create a canvas and draw the image on it.
const canvas = document.createElement('canvas');
- canvas.width = image.naturalWidth;
- canvas.height = image.naturalHeight;
+ canvas.width = image.naturalWidth;
+ canvas.height = image.naturalHeight;
const ctx = canvas.getContext('2d');
ctx.drawImage(image, 0, 0);
-
+
// Convert canvas image to blob
canvas.toBlob(blob => {
try {
@@ -290,10 +288,10 @@ getMyNode(){
}
}, 'image/png');
}
-
-
-
-
+
+
+
+
handleMenuBlur() {
setTimeout(() => {
if (!this.isMenuItemClicked) {
@@ -319,7 +317,7 @@ getMyNode(){
].join(' ')}
>
${
- this.status.status !== 'READY'
+ this.status.status !== 'READY'
? html`
-
+
`
-
-
+
+
}
}
diff --git a/plugins/plugins/core/components/ChatLeaveGroup.js b/plugins/plugins/core/components/ChatLeaveGroup.js
index 1cd2c38d..bdc904f3 100644
--- a/plugins/plugins/core/components/ChatLeaveGroup.js
+++ b/plugins/plugins/core/components/ChatLeaveGroup.js
@@ -1,13 +1,11 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml'
-import snackbar from './snackbar.js'
+import {css, html, LitElement} from 'lit'
+import {Epml} from '../../../epml'
import '@material/mwc-button'
import '@material/mwc-dialog'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@material/mwc-icon'
import './WrapperModal'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {get, translate} from 'lit-translate'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@@ -61,7 +59,7 @@ class ChatLeaveGroup extends LitElement {
}
firstUpdated() {
-
+
}
async unitFee() {
@@ -77,7 +75,7 @@ class ChatLeaveGroup extends LitElement {
} catch (error) {
fee = null
}
-
+
return fee
}
@@ -98,7 +96,7 @@ class ChatLeaveGroup extends LitElement {
}
async confirmRelationship() {
-
+
let interval = null
let stop = false
@@ -127,7 +125,7 @@ class ChatLeaveGroup extends LitElement {
async _leaveGroup(groupId, groupName) {
// Reset Default Settings...
this.resetDefaultSettings()
-
+
const leaveFeeInput = await this.unitFee()
if(!leaveFeeInput){
throw Error()
@@ -195,17 +193,17 @@ class ChatLeaveGroup extends LitElement {
this.isOpenLeaveModal = true
}} class="top-bar-icon" style="margin: 0px 20px" icon="vaadin:exit" slot="icon">
-
{
if(this.isLoading) return
this.isOpenLeaveModal = false
- } }
+ } }
style=${(this.isOpenLeaveModal) ? "display: block" : "display: none"}>
${translate("grouppage.gchange35")}
-
+
${translate("grouppage.gchange4")}
@@ -243,7 +241,7 @@ class ChatLeaveGroup extends LitElement {
${this.message}
-
+
${translate("general.close")}
@@ -266,4 +264,4 @@ class ChatLeaveGroup extends LitElement {
}
}
-customElements.define('chat-leave-group', ChatLeaveGroup);
\ No newline at end of file
+customElements.define('chat-leave-group', ChatLeaveGroup);
diff --git a/plugins/plugins/core/components/ChatMessage.js b/plugins/plugins/core/components/ChatMessage.js
index 49c76c2e..79185a81 100644
--- a/plugins/plugins/core/components/ChatMessage.js
+++ b/plugins/plugins/core/components/ChatMessage.js
@@ -1,7 +1,5 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml.js'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {css, html, LitElement} from 'lit'
+import {Epml} from '../../../epml.js'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
diff --git a/plugins/plugins/core/components/ChatModals.js b/plugins/plugins/core/components/ChatModals.js
index 1da17e7c..5b787673 100644
--- a/plugins/plugins/core/components/ChatModals.js
+++ b/plugins/plugins/core/components/ChatModals.js
@@ -1,8 +1,7 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml'
+import {css, html, LitElement} from 'lit'
+import {Epml} from '../../../epml'
import snackbar from './snackbar.js'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {get, translate} from 'lit-translate'
import '@material/mwc-button'
import '@material/mwc-dialog'
@@ -343,10 +342,10 @@ class ChatModals extends LitElement {
render() {
return html`
-
- this.hideBlockUserModal()}
@@ -408,4 +407,4 @@ class ChatModals extends LitElement {
}
}
-customElements.define('chat-modals', ChatModals)
\ No newline at end of file
+customElements.define('chat-modals', ChatModals)
diff --git a/plugins/plugins/core/components/ChatPage-css.js b/plugins/plugins/core/components/ChatPage-css.js
index 50d62389..2356129b 100644
--- a/plugins/plugins/core/components/ChatPage-css.js
+++ b/plugins/plugins/core/components/ChatPage-css.js
@@ -1,10 +1,10 @@
-import { css } from 'lit'
+import {css} from 'lit'
export const chatpageStyles = css`
html {
scroll-behavior: smooth;
}
-
+
.chat-head-container {
display: flex;
justify-content: flex-start;
@@ -49,7 +49,7 @@ export const chatpageStyles = css`
cursor: pointer;
color: #494c50;
}
-
+
.chat-text-area .typing-area .chatbar {
position: relative;
display: flex;
@@ -159,7 +159,7 @@ export const chatpageStyles = css`
.dialogCustomInner ul {
padding-left: 0px
}
-
+
.dialogCustomInner li {
margin-bottom: 10px;
}
@@ -236,7 +236,7 @@ export const chatpageStyles = css`
align-items: center;
padding: 10px 10px 8px 10px;
}
-
+
.repliedTo-subcontainer {
display: flex;
flex-direction: row;
@@ -286,7 +286,7 @@ export const chatpageStyles = css`
cursor: pointer;
color: #494c50;
}
-
+
.chatbar-container {
width: 100%;
display: flex;
@@ -358,7 +358,7 @@ export const chatpageStyles = css`
left: 48px;
animation-delay: -1.2s;
}
-
+
.lds-grid div:nth-child(9) {
top: 95px;
left: 90px;
@@ -372,7 +372,7 @@ export const chatpageStyles = css`
50% {
opacity: 0.5;
}
- }
+ }
.float-left {
float: left;
@@ -397,7 +397,7 @@ export const chatpageStyles = css`
overflow-x: hidden;
width: 100%;
}
-
+
.repliedTo-container {
display: flex;
flex-direction: row;
@@ -405,14 +405,14 @@ export const chatpageStyles = css`
align-items: center;
padding: 10px 10px 8px 10px;
}
-
+
.senderName {
margin: 0;
color: var(--mdc-theme-primary);
font-weight: bold;
user-select: none;
}
-
+
.original-message {
color: var(--chat-bubble-msg-color);
text-overflow: ellipsis;
@@ -421,19 +421,19 @@ export const chatpageStyles = css`
margin: 0;
width: 800px;
}
-
-
+
+
.close-icon {
color: #676b71;
width: 18px;
transition: all 0.1s ease-in-out;
}
-
+
.close-icon:hover {
cursor: pointer;
color: #494c50;
}
-
+
.chat-text-area .typing-area .chatbar {
position: relative;
display: flex;
@@ -444,7 +444,7 @@ export const chatpageStyles = css`
padding: 5px 5px 5px 7px;
overflow: hidden;
}
-
+
.chat-text-area .typing-area .emoji-button {
width: 45px;
height: 40px;
@@ -456,7 +456,7 @@ export const chatpageStyles = css`
max-height: 40px;
color: var(--black);
}
-
+
.emoji-button-caption {
width: 45px;
height: 40px;
@@ -468,7 +468,7 @@ export const chatpageStyles = css`
max-height: 40px;
color: var(--black);
}
-
+
.caption-container {
width: 100%;
display: flex;
@@ -479,7 +479,7 @@ export const chatpageStyles = css`
padding: 5px;
border-radius: 1px;
}
-
+
.chatbar-caption {
font-family: Roboto, sans-serif;
width: 70%;
@@ -494,19 +494,19 @@ export const chatpageStyles = css`
border-bottom: 1px solid #cac8c8;
padding: 3px;
}
-
+
.message-size-container {
display: flex;
justify-content: flex-end;
width: 100%;
}
-
+
.message-size {
font-family: Roboto, sans-serif;
font-size: 12px;
color: black;
}
-
+
.lds-grid {
width: 120px;
height: 120px;
@@ -514,11 +514,11 @@ export const chatpageStyles = css`
left: 50%;
top: 40%;
}
-
+
img {
border-radius: 25%;
}
-
+
.dialogCustom {
position: fixed;
z-index: 10000;
@@ -530,7 +530,7 @@ export const chatpageStyles = css`
right: 20px;
user-select: none;
}
-
+
.dialogCustomInner {
min-width: 300px;
height: 40px;
@@ -539,19 +539,19 @@ export const chatpageStyles = css`
padding: 10px;
border-radius: 4px;
}
-
+
.dialogCustomInner ul {
padding-left: 0px
}
-
+
.dialogCustomInner li {
margin-bottom: 10px;
}
-
+
.marginLoader {
margin-right: 8px;
}
-
+
.last-message-ref {
position: absolute;
font-size: 18px;
@@ -565,21 +565,21 @@ export const chatpageStyles = css`
border-radius: 50%;
transition: all 0.1s ease-in-out;
}
-
+
.last-message-ref:hover {
cursor: pointer;
transform: scale(1.1);
}
-
+
.arrow-down-icon {
transform: scale(1.15);
}
-
+
.chat-container {
display: grid;
max-height: 100%;
}
-
+
.chat-text-area {
display: flex;
position: relative;
@@ -587,7 +587,7 @@ export const chatpageStyles = css`
min-height: 60px;
max-height: 100%;
}
-
+
.chat-text-area .typing-area {
display: flex;
flex-direction: column;
@@ -598,11 +598,11 @@ export const chatpageStyles = css`
border-radius: 10px;
background: var(--chat-bubble-bg);
}
-
+
.chat-text-area .typing-area textarea {
display: none;
}
-
+
.chat-text-area .typing-area .chat-editor {
display: flex;
max-height: -webkit-fill-available;
@@ -612,7 +612,7 @@ export const chatpageStyles = css`
padding: 0;
border: none;
}
-
+
.repliedTo-container {
display: flex;
flex-direction: row;
@@ -620,7 +620,7 @@ export const chatpageStyles = css`
align-items: center;
padding: 10px 10px 8px 10px;
}
-
+
.repliedTo-subcontainer {
display: flex;
flex-direction: row;
@@ -628,7 +628,7 @@ export const chatpageStyles = css`
gap: 15px;
width: 100%;
}
-
+
.repliedTo-message {
display: flex;
flex-direction: column;
@@ -643,41 +643,41 @@ export const chatpageStyles = css`
margin: 0px;
padding: 0px;
}
-
+
.repliedTo-message pre {
white-space: pre-wrap;
}
-
+
.repliedTo-message p mark {
background-color: #ffe066;
border-radius: 0.25em;
box-decoration-break: clone;
padding: 0.125em 0;
}
-
+
.reply-icon {
width: 20px;
color: var(--mdc-theme-primary);
}
-
+
.close-icon {
color: #676b71;
width: 18px;
transition: all 0.1s ease-in-out;
}
-
+
.close-icon:hover {
cursor: pointer;
color: #494c50;
}
-
+
.chatbar-container {
width: 100%;
display: flex;
height: auto;
overflow: hidden;
}
-
+
.lds-grid {
width: 120px;
height: 120px;
@@ -685,7 +685,7 @@ export const chatpageStyles = css`
left: 50%;
top: 40%;
}
-
+
.lds-grid div {
position: absolute;
width: 34px;
@@ -694,61 +694,61 @@ export const chatpageStyles = css`
background: #03a9f4;
animation: lds-grid 1.2s linear infinite;
}
-
+
.lds-grid div:nth-child(1) {
top: 4px;
left: 4px;
animation-delay: 0s;
}
-
+
.lds-grid div:nth-child(2) {
top: 4px;
left: 48px;
animation-delay: -0.4s;
}
-
+
.lds-grid div:nth-child(3) {
top: 4px;
left: 90px;
animation-delay: -0.8s;
}
-
+
.lds-grid div:nth-child(4) {
top: 50px;
left: 4px;
animation-delay: -0.4s;
}
-
+
.lds-grid div:nth-child(5) {
top: 50px;
left: 48px;
animation-delay: -0.8s;
}
-
+
.lds-grid div:nth-child(6) {
top: 50px;
left: 90px;
animation-delay: -1.2s;
}
-
+
.lds-grid div:nth-child(7) {
top: 95px;
left: 4px;
animation-delay: -0.8s;
}
-
+
.lds-grid div:nth-child(8) {
top: 95px;
left: 48px;
animation-delay: -1.2s;
}
-
+
.lds-grid div:nth-child(9) {
top: 95px;
left: 90px;
animation-delay: -1.6s;
}
-
+
@keyframes lds-grid {
0%, 100% {
opacity: 1;
@@ -756,16 +756,16 @@ export const chatpageStyles = css`
50% {
opacity: 0.5;
}
- }
-
+ }
+
.float-left {
float: left;
}
-
+
img {
border-radius: 25%;
}
-
+
paper-dialog.warning {
width: 50%;
max-width: 50vw;
@@ -782,7 +782,7 @@ export const chatpageStyles = css`
.buttons {
text-align:right;
}
-
+
.dialogCustom {
position: fixed;
z-index: 10000;
@@ -794,11 +794,11 @@ export const chatpageStyles = css`
right: 20px;
user-select: none;
}
-
+
.dialogCustom p {
color: var(--black)
}
-
+
.dialogCustomInner {
min-width: 300px;
height: 40px;
@@ -807,26 +807,26 @@ export const chatpageStyles = css`
padding: 10px;
border-radius: 4px;
}
-
+
.dialogCustomInner ul {
padding-left: 0px
}
-
+
.dialogCustomInner li {
margin-bottom: 10px;
}
-
+
.marginLoader {
margin-right: 8px;
}
-
+
.smallLoading,
.smallLoading:after {
border-radius: 50%;
width: 2px;
height: 2px;
}
-
+
.smallLoading {
border-width: 0.8em;
border-style: solid;
@@ -838,7 +838,7 @@ export const chatpageStyles = css`
transform: translateZ(0px);
animation: 1.1s linear 0s infinite normal none running loadingAnimation;
}
-
+
@-webkit-keyframes loadingAnimation {
0% {
-webkit-transform: rotate(0deg);
@@ -849,7 +849,7 @@ export const chatpageStyles = css`
transform: rotate(360deg);
}
}
-
+
@keyframes loadingAnimation {
0% {
-webkit-transform: rotate(0deg);
@@ -860,9 +860,9 @@ export const chatpageStyles = css`
transform: rotate(360deg);
}
}
-
+
/* Add Image Modal Dialog Styling */
-
+
.dialog-container {
position: relative;
display: flex;
@@ -872,14 +872,14 @@ export const chatpageStyles = css`
gap: 10px;
height: 100%;
}
-
+
.dialog-container-title {
font-family: Montserrat;
color: var(--black);
font-size: 20px;
margin: 15px 0 0 0;
}
-
+
.divider {
height: 1px;
background-color: var(--chat-bubble-msg-color);
@@ -887,7 +887,7 @@ export const chatpageStyles = css`
width: 70%;
margin-bottom: 20px;
}
-
+
.dialog-container-loader {
position: relative;
display: flex;
@@ -896,14 +896,14 @@ export const chatpageStyles = css`
gap: 10px;
height: 100%;
}
-
+
.dialog-image {
width: 100%;
max-height: 300px;
border-radius: 0;
object-fit: contain;
}
-
+
.chat-right-panel {
flex: 0;
border-left: 3px solid rgb(221, 221, 221);
@@ -911,30 +911,30 @@ export const chatpageStyles = css`
overflow-y: auto;
background: transparent;
}
-
+
.movedin {
flex: 1 !important;
background: transparent;
}
-
+
.main-container {
display: flex;
height: 100%;
}
-
+
.group-nav-container {
display: flex;
- height: 40px;
- padding: 5px;
+ height: 40px;
+ padding: 5px;
margin: 0px;
- background-color: var(--chat-bubble-bg);
- box-sizing: border-box;
+ background-color: var(--chat-bubble-bg);
+ box-sizing: border-box;
align-items: center;
justify-content: space-between;
box-shadow: var(--group-drop-shadow);
z-index: 1;
}
-
+
.top-bar-icon {
border-radius: 50%;
color: var(--chat-bubble-msg-color);
@@ -942,13 +942,13 @@ export const chatpageStyles = css`
padding: 5px;
background-color: transparent;
}
-
+
.top-bar-icon:hover {
background-color: #e6e6e69b;
cursor: pointer;
color: var(--black)
}
-
+
.group-name {
font-family: Raleway, sans-serif;
font-size: 16px;
@@ -956,8 +956,8 @@ export const chatpageStyles = css`
margin:0px;
padding:0px;
}
-
-
+
+
.modal-button {
font-family: Roboto, sans-serif;
font-size: 16px;
@@ -968,7 +968,7 @@ export const chatpageStyles = css`
border: none;
transition: all 0.3s ease-in-out;
}
-
+
.modal-button-red {
font-family: Roboto, sans-serif;
font-size: 16px;
@@ -979,17 +979,17 @@ export const chatpageStyles = css`
border: none;
transition: all 0.3s ease-in-out;
}
-
+
.modal-button-red:hover {
cursor: pointer;
background-color: #f4433663;
}
-
+
.modal-button:hover {
cursor: pointer;
background-color: #03a8f475;
}
-
+
.name-input {
width: 100%;
margin-bottom: 15px;
@@ -1003,29 +1003,29 @@ export const chatpageStyles = css`
color: var(--chat-bubble-msg-color);
box-sizing: border-box;
}
-
+
.name-input::selection {
background-color: var(--mdc-theme-primary);
- color: white;
+ color: white;
}
-
+
.name-input::placeholder {
opacity: 0.9;
color: var(--black);
}
-
+
.search-results-div {
position: absolute;
top: 25px;
right: 25px;
}
-
+
.search-field {
width: 100%;
position: relative;
margin-bottom: 5px;
}
-
+
.search-icon {
position: absolute;
right: 3px;
@@ -1037,12 +1037,12 @@ export const chatpageStyles = css`
padding: 6px 3px;
font-size: 21px;
}
-
+
.search-icon:hover {
cursor: pointer;
background: #d7d7d75c;
}
-
+
.user-verified {
position: absolute;
top: 0;
@@ -1053,7 +1053,7 @@ export const chatpageStyles = css`
color: #04aa2e;
font-size: 13px;
}
-
+
.user-selected {
display: flex;
justify-content: space-between;
@@ -1065,30 +1065,30 @@ export const chatpageStyles = css`
border-radius: 5px;
background-color: #ececec96;
}
-
+
.user-selected-name {
font-family: Roboto, sans-serif;
margin: 0;
font-size: 16px;
}
-
+
.forwarding-container {
display: flex;
gap: 15px;
}
-
+
.user-selected-forwarding {
font-family: Livvic, sans-serif;
margin: 0;
font-size: 16px;
}
-
+
.close-forwarding {
color: #676b71;
width: 14px;
transition: all 0.1s ease-in-out;
}
-
+
.close-forwarding:hover {
cursor: pointer;
color: #4e5054;
@@ -1110,7 +1110,7 @@ export const chatpageStyles = css`
to {
transform: translateY(0);
}
- }
+ }
.gifs-backdrop {
top: 0;
@@ -1142,7 +1142,7 @@ export const chatpageStyles = css`
.attachment-icon {
width: 70%;
}
-
+
.attachment-name {
font-family: Work Sans, sans-serif;
font-size: 20px;
diff --git a/plugins/plugins/core/components/ChatPage.js b/plugins/plugins/core/components/ChatPage.js
index c315007d..b00a6d0b 100644
--- a/plugins/plugins/core/components/ChatPage.js
+++ b/plugins/plugins/core/components/ChatPage.js
@@ -1,15 +1,14 @@
-import { LitElement, html } from 'lit'
-import { animate } from '@lit-labs/motion'
-import { Epml } from '../../../epml.js'
-import { get, translate } from 'lit-translate'
-import { generateHTML } from '@tiptap/core'
-import { unsafeHTML } from 'lit/directives/unsafe-html.js'
-import { Editor, Extension } from '@tiptap/core'
-import { escape } from 'html-escaper'
-import { inputKeyCodes } from '../../utils/keyCodes.js'
-import { replaceMessagesEdited } from '../../utils/replace-messages-edited.js'
-import { publishData } from '../../utils/publish-image.js'
-import { EmojiPicker } from 'emoji-picker-js'
+import {html, LitElement} from 'lit'
+import {animate} from '@lit-labs/motion'
+import {Epml} from '../../../epml.js'
+import {get, translate} from 'lit-translate'
+import {Editor, Extension, generateHTML} from '@tiptap/core'
+import {unsafeHTML} from 'lit/directives/unsafe-html.js'
+import {escape} from 'html-escaper'
+import {inputKeyCodes} from '../../utils/keyCodes.js'
+import {replaceMessagesEdited} from '../../utils/replace-messages-edited.js'
+import {publishData} from '../../utils/publish-image.js'
+import {EmojiPicker} from 'emoji-picker-js'
import {ifDefined} from 'lit/directives/if-defined.js';
@@ -45,10 +44,10 @@ import '@material/mwc-dialog'
import '@material/mwc-icon'
import '@polymer/paper-dialog/paper-dialog.js'
import '@polymer/paper-spinner/paper-spinner-lite.js'
-import { RequestQueue } from '../../utils/queue.js'
-import { modalHelper } from '../../utils/publish-modal.js'
-import { generateIdFromAddresses } from '../../utils/id-generation.js'
-import { chatpageStyles } from './ChatPage-css.js'
+import {RequestQueue} from '../../utils/queue.js'
+import {modalHelper} from '../../utils/publish-modal.js'
+import {generateIdFromAddresses} from '../../utils/id-generation.js'
+import {chatpageStyles} from './ChatPage-css.js'
const chatLastSeen = localForage.createInstance({
name: "chat-last-seen",
@@ -141,7 +140,7 @@ class ChatPage extends LitElement {
}
-
+
constructor() {
super()
this.getOldMessage = this.getOldMessage.bind(this)
@@ -308,7 +307,7 @@ class ChatPage extends LitElement {
addToQueue(outSideMsg, messageQueue) {
// Push the new message object to the queue
-
+
this.messageQueue = [...messageQueue, { ...outSideMsg, timestamp: Date.now()}];
// Start processing the queue only if the message we just added is the only one in the queue
@@ -316,7 +315,7 @@ class ChatPage extends LitElement {
if (this.messageQueue.length === 1) {
this.processQueue();
}
-
+
// Notify Lit to update/render due to the property change
this.requestUpdate();
}
@@ -331,7 +330,7 @@ class ChatPage extends LitElement {
} else {
throw new Error('failed')
}
-
+
if (this.messageQueue.length > 0) {
setTimeout(() => this.processQueue(), 2000); // Wait for 10 seconds before retrying
// setTimeout(() => this.processQueue(), 0); // Process the next message immediately
@@ -341,20 +340,20 @@ class ChatPage extends LitElement {
setTimeout(() => this.processQueue(), 10000); // Wait for 10 seconds before retrying
}
}
-
+
async getLastestMessages(){
try {
let getInitialMessages = []
if (this.isReceipient) {
-
+
getInitialMessages = await parentEpml.request('apiCall', {
type: 'api',
url: `/chat/messages?involving=${window.parent.reduxStore.getState().app.selectedAddress.address}&involving=${this._chatId}&limit=${chatLimit}&reverse=true&haschatreference=false&encoding=BASE64`
})
-
+
} else {
getInitialMessages = await parentEpml.request('apiCall', {
@@ -381,15 +380,15 @@ class ChatPage extends LitElement {
console.error('Copy to clipboard error:', err);
}
}
-
+
render() {
return html`
-
-
+
{
if(+this._chatId === 0 || this.isReceipient)return
@@ -400,7 +399,7 @@ class ChatPage extends LitElement {
` : html`
${this.groupInfo && this.groupInfo.groupName}
`}
-
+
${(!this.isReceipient && +this._chatId !== 0 && this.groupInfo.isOpen) ?
@@ -416,7 +415,7 @@ class ChatPage extends LitElement {
: ''}
-
+
${this.isLoadingMessages ?
html`
@@ -434,14 +433,14 @@ class ChatPage extends LitElement {
` :
this.renderChatScroller()}
-
{
if (this.gifsLoading) return;
this.setOpenGifModal(false);
this.editor.commands.focus("end");
this.shadowRoot.querySelector("chat-gifs").clearGifSelections();
- }}
+ }}
style=${this.openGifModal ? "visibility: visible; z-index: 4" : "visibility: hidden; z-index: -100"}>
@@ -449,8 +448,8 @@ class ChatPage extends LitElement {
` : ''}
-
{
const chatScrollerElement = this.shadowRoot.querySelector('chat-scroller');
@@ -462,7 +461,7 @@ class ChatPage extends LitElement {
behavior: 'smooth',
});
}
-
+
}}>
@@ -542,12 +541,12 @@ class ChatPage extends LitElement {
.setOpenGifModal=${(val) => this.setOpenGifModal(val)}
chatId=${this.chatId}
.messageQueue=${this.messageQueue}
- >
+ >
-
+
${(this.isUploadingImage || this.isDeletingImage) ? html`
@@ -557,8 +556,8 @@ class ChatPage extends LitElement {
${this.isDeletingImage ?
translate("chatpage.cchange31") : translate("chatpage.cchange30")}
-
-
+
+
`: ''}
@@ -571,15 +570,15 @@ class ChatPage extends LitElement {
${this.isDeletingAttachment ?
translate("chatpage.cchange76") : translate("chatpage.cchange75")}
-
-
+
+
`: ''}
- {
this.removeImage()
- }}
+ }}
style=${(this.imageFile && !this.isUploadingImage) ? "visibility:visible; z-index:50" : "visibility: hidden;z-index:-100"}>
@@ -622,12 +621,12 @@ class ChatPage extends LitElement {
-
+
- {
this.removeAttachment()
- }}
+ }}
style=${this.attachment && !this.isUploadingAttachment ? "visibility: visible; z-index: 50" : "visibility: hidden; z-index: -100"}>
@@ -674,7 +673,7 @@ class ChatPage extends LitElement {
-
+
${translate("chatpage.cchange41")}
@@ -685,12 +684,12 @@ class ChatPage extends LitElement {
this.sendMessage(this.myTrimmedMeassage)} dialog-confirm>${translate("transpage.tchange3")}
- {
this.openForwardOpen = false
this.forwardActiveChatHeadUrl = {}
this.requestUpdate()
- }}
+ }}
style=${this.openForwardOpen ? "display: block" : "display: none"}>
@@ -700,11 +699,11 @@ class ChatPage extends LitElement {
- {
if (this.forwardActiveChatHeadUrl.selected) {
this.forwardActiveChatHeadUrl = {}
@@ -721,16 +720,16 @@ class ChatPage extends LitElement {
`
) : (
- html`
-
`
)}
-
+
${this.forwardActiveChatHeadUrl.selected ? (
html`
@@ -741,7 +740,7 @@ class ChatPage extends LitElement {
Forwarding...
-
{
return html`
- {
this.forwardActiveChatHeadUrl = {
...this.forwardActiveChatHeadUrl,
url: val
}
this.userFound = []
- }}
+ }}
chatInfo=${JSON.stringify(item)}>
`
})}
`
)}
-
+
{
this.openForwardOpen = false
@@ -794,7 +793,7 @@ class ChatPage extends LitElement {
- {
this.forwardActiveChatHeadUrl = {
...this.forwardActiveChatHeadUrl,
@@ -814,7 +813,7 @@ class ChatPage extends LitElement {
?loading=${this.isLoading}>
-
+
{
@@ -828,12 +827,12 @@ class ChatPage extends LitElement {
.setOpenTipUser=${(val) => this.setOpenTipUser(val)}>
- {
this.setOpenUserInfo(false)
this.setUserName("")
this.setSelectedHead({})
- }}
+ }}
style=${this.openUserInfo ? "display: block" : "display: none"
}>
this.setOpenTipUser(val)}
.setOpenPrivateMessage=${(val) => this.setOpenPrivateMessage(val)}
.userName=${this.userName}
- .selectedHead=${this.selectedHead}
+ .selectedHead=${this.selectedHead}
>
- this.getMoreMembers(val)}
- .toggle=${(val) => this._toggle(val)}
- .selectedAddress=${this.selectedAddress}
- .groupMembers=${this.groupMembers}
- .groupAdmin=${this.groupAdmin}
+ this.getMoreMembers(val)}
+ .toggle=${(val) => this._toggle(val)}
+ .selectedAddress=${this.selectedAddress}
+ .groupMembers=${this.groupMembers}
+ .groupAdmin=${this.groupAdmin}
.leaveGroupObj=${this.groupInfo}
.setOpenPrivateMessage=${(val) => this.setOpenPrivateMessage(val)}
.setOpenTipUser=${(val) => this.setOpenTipUser(val)}
@@ -862,11 +861,11 @@ class ChatPage extends LitElement {
this.getMoreMembers(val)}
- .toggle=${(val) => this._toggleResources(val)}
- .selectedAddress=${this.selectedAddress}
- .groupMembers=${this.groupMembers}
- .groupAdmin=${this.groupAdmin}
+ .getMoreMembers=${(val) => this.getMoreMembers(val)}
+ .toggle=${(val) => this._toggleResources(val)}
+ .selectedAddress=${this.selectedAddress}
+ .groupMembers=${this.groupMembers}
+ .groupAdmin=${this.groupAdmin}
.leaveGroupObj=${this.groupInfo}
.setOpenPrivateMessage=${(val) => this.setOpenPrivateMessage(val)}
.setOpenTipUser=${(val) => this.setOpenTipUser(val)}
@@ -1098,7 +1097,7 @@ class ChatPage extends LitElement {
}
}
}
-
+
async pasteImage(e) {
const event = e
@@ -1166,7 +1165,7 @@ class ChatPage extends LitElement {
return
}
-
+
const findOriginalMessage = this.shadowRoot.querySelector('chat-scroller').shadowRoot.getElementById(clickedOnMessage.signature)
if (findOriginalMessage) {
const messageClientRect = findOriginalMessage.getBoundingClientRect()
@@ -1177,10 +1176,10 @@ class ChatPage extends LitElement {
top: messageClientRect.top,
offsetHeight: findOriginalMessage.offsetHeight
}
-
+
await this.getOldMessageDynamic(0, clickedOnMessage.timestamp, message)
await this.getUpdateComplete()
-
+
const marginElements = Array.from(this.shadowRoot.querySelector('chat-scroller').shadowRoot.querySelectorAll('message-template'))
const findMessage2 = marginElements.find((item) => item.messageObj.signature === message.signature) || marginElements.find((item) => item.messageObj.originalSignature === message.signature) || marginElements.find((item) => item.messageObj.signature === message.originalSignature) || marginElements.find((item) => item.messageObj.originalSignature === message.originalSignature)
if (findMessage2) {
@@ -1412,9 +1411,9 @@ class ChatPage extends LitElement {
async firstUpdated() {
this.changeTheme()
-
+
// this.processQueue();
-
+
window.addEventListener('storage', () => {
const checkLanguage = localStorage.getItem('qortalLanguage')
const checkTheme = localStorage.getItem('qortalTheme')
@@ -1429,9 +1428,9 @@ class ChatPage extends LitElement {
document.querySelector('html').setAttribute('theme', this.theme)
})
-
+
this.lastReadMessageTimestamp = await chatLastSeen.getItem(this.chatId) || 0
-
+
parentEpml.imReady()
const isEnabledChatEnter = localStorage.getItem('isEnabledChatEnter')
@@ -1474,7 +1473,7 @@ class ChatPage extends LitElement {
this.isLoadingMessages = true
this.initUpdate()
-
+
if (previousChatId) {
window.parent.reduxStore.dispatch(window.parent.reduxAction.addChatLastSeen({
@@ -1498,7 +1497,7 @@ class ChatPage extends LitElement {
}
return true
-
+
}
async getName(recipient) {
@@ -1548,11 +1547,11 @@ class ChatPage extends LitElement {
renderChatScroller() {
return html`
- this.setRepliedToMessageObj(val)}
@@ -1560,7 +1559,7 @@ class ChatPage extends LitElement {
.sendMessage=${(val) => this._sendMessage(val)}
.sendMessageForward=${(messageText, typeMessage, chatReference, isForward, forwardParams) => this.sendMessage(messageText, typeMessage, chatReference, isForward, forwardParams)}
.showLastMessageRefScroller=${(val) => this.showLastMessageRefScroller(val)}
- .emojiPicker=${this.emojiPicker}
+ .emojiPicker=${this.emojiPicker}
?isLoadingMessages=${this.isLoadingOldMessages}
.setIsLoadingMessages=${(val) => this.setIsLoadingMessages(val)}
.setForwardProperties=${(forwardedMessage) => this.setForwardProperties(forwardedMessage)}
@@ -1637,19 +1636,19 @@ class ChatPage extends LitElement {
let decodeMsgs = []
await new Promise((res, rej) => {
this.webWorkerDecodeMessages.postMessage({messages: getInitialMessages, isReceipient: this.isReceipient, _publicKey: this._publicKey, privateKey: window.parent.reduxStore.getState().app.selectedAddress.keyPair.privateKey });
-
+
this.webWorkerDecodeMessages.onmessage = e => {
decodeMsgs = e.data
res()
-
+
}
this.webWorkerDecodeMessages.onerror = () => {
rej()
-
+
}
})
-
+
queue.push(() => replaceMessagesEdited({
decodedMessages: decodeMsgs,
parentEpml,
@@ -1661,16 +1660,16 @@ class ChatPage extends LitElement {
let list = [...decodeMsgs]
-
+
await new Promise((res) => {
-
+
this.webWorkerSortMessages.postMessage({list});
-
+
this.webWorkerSortMessages.onmessage = e => {
-
+
list = e.data
res()
-
+
}
})
const lastMsg = list.at(-1)
@@ -1686,10 +1685,10 @@ class ChatPage extends LitElement {
count
}
}
-
+
this.isLoadingOldMessages = false
-
+
} else {
const getInitialMessagesBefore = await parentEpml.request('apiCall', {
type: 'api',
@@ -1704,15 +1703,15 @@ class ChatPage extends LitElement {
let decodeMsgs = []
await new Promise((res, rej) => {
this.webWorkerDecodeMessages.postMessage({messages: getInitialMessages, isReceipient: this.isReceipient, _publicKey: this._publicKey, privateKey: window.parent.reduxStore.getState().app.selectedAddress.keyPair.privateKey });
-
+
this.webWorkerDecodeMessages.onmessage = e => {
decodeMsgs = e.data
res()
-
+
}
this.webWorkerDecodeMessages.onerror = () => {
rej()
-
+
}
})
@@ -1724,22 +1723,22 @@ class ChatPage extends LitElement {
_publicKey: this._publicKey,
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
}));
-
-
+
+
let list = [...decodeMsgs]
-
+
await new Promise((res) => {
-
+
this.webWorkerSortMessages.postMessage({list});
-
+
this.webWorkerSortMessages.onmessage = e => {
-
+
list = e.data
res()
-
+
}
})
-
+
const lastMsg = list.at(-1)
if(lastMsg){
const count = await parentEpml.request('apiCall', {
@@ -1753,11 +1752,11 @@ class ChatPage extends LitElement {
count
}
}
-
+
this.isLoadingOldMessages = false
-
+
}
}
@@ -1778,18 +1777,18 @@ class ChatPage extends LitElement {
let decodeMsgs = []
await new Promise((res, rej) => {
this.webWorkerDecodeMessages.postMessage({messages: getInitialMessages, isReceipient: this.isReceipient, _publicKey: this._publicKey, privateKey: window.parent.reduxStore.getState().app.selectedAddress.keyPair.privateKey });
-
+
this.webWorkerDecodeMessages.onmessage = e => {
decodeMsgs = e.data
res()
-
+
}
this.webWorkerDecodeMessages.onerror = () => {
rej()
-
+
}
})
-
+
queue.push(() => replaceMessagesEdited({
decodedMessages: decodeMsgs,
parentEpml,
@@ -1798,11 +1797,11 @@ class ChatPage extends LitElement {
_publicKey: this._publicKey,
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
}));
-
+
let list = [...decodeMsgs]
-
-
-
+
+
+
this.messagesRendered = {
messages: list,
type: 'old',
@@ -1826,22 +1825,22 @@ class ChatPage extends LitElement {
let decodeMsgs = []
-
+
await new Promise((res, rej) => {
this.webWorkerDecodeMessages.postMessage({messages: getInitialMessages, isReceipient: this.isReceipient, _publicKey: this._publicKey, privateKey: window.parent.reduxStore.getState().app.selectedAddress.keyPair.privateKey });
-
+
this.webWorkerDecodeMessages.onmessage = e => {
decodeMsgs = e.data
res()
-
+
}
this.webWorkerDecodeMessages.onerror = () => {
rej()
-
+
}
})
-
-
+
+
queue.push(() => replaceMessagesEdited({
decodedMessages: decodeMsgs,
parentEpml,
@@ -1851,9 +1850,9 @@ class ChatPage extends LitElement {
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
}));
let list = [...decodeMsgs]
-
-
-
+
+
+
this.messagesRendered = {
messages: list,
type: 'old',
@@ -1878,7 +1877,7 @@ class ChatPage extends LitElement {
return
}
const timestamp = scrollElement.messageObj.timestamp
-
+
if (this.isReceipient) {
const getInitialMessages = await parentEpml.request('apiCall', {
type: 'api',
@@ -1888,19 +1887,19 @@ class ChatPage extends LitElement {
let decodeMsgs = []
await new Promise((res, rej) => {
this.webWorkerDecodeMessages.postMessage({messages: getInitialMessages, isReceipient: this.isReceipient, _publicKey: this._publicKey, privateKey: window.parent.reduxStore.getState().app.selectedAddress.keyPair.privateKey });
-
+
this.webWorkerDecodeMessages.onmessage = e => {
decodeMsgs = e.data
res()
-
+
}
this.webWorkerDecodeMessages.onerror = () => {
rej()
-
+
}
})
-
+
queue.push(() => replaceMessagesEdited({
decodedMessages: decodeMsgs,
parentEpml,
@@ -1909,26 +1908,26 @@ class ChatPage extends LitElement {
_publicKey: this._publicKey,
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
}));
-
+
let list = [ ...decodeMsgs]
-
+
await new Promise((res) => {
-
+
this.webWorkerSortMessages.postMessage({list});
-
+
this.webWorkerSortMessages.onmessage = e => {
-
+
list = e.data
res()
-
+
}
})
-
+
this.messagesRendered = {
messages: list,
type: 'new'
}
-
+
this.isLoadingOldMessages = false
await this.getUpdateComplete()
@@ -1947,19 +1946,19 @@ class ChatPage extends LitElement {
let decodeMsgs = []
await new Promise((res, rej) => {
this.webWorkerDecodeMessages.postMessage({messages: getInitialMessages, isReceipient: this.isReceipient, _publicKey: this._publicKey, privateKey: window.parent.reduxStore.getState().app.selectedAddress.keyPair.privateKey });
-
+
this.webWorkerDecodeMessages.onmessage = e => {
decodeMsgs = e.data
res()
-
+
}
this.webWorkerDecodeMessages.onerror = () => {
rej()
-
+
}
})
-
+
queue.push(() => replaceMessagesEdited({
decodedMessages: decodeMsgs,
parentEpml,
@@ -1969,22 +1968,22 @@ class ChatPage extends LitElement {
addToUpdateMessageHashmap: this.addToUpdateMessageHashmap
}));
-
+
let list = [...decodeMsgs]
-
+
await new Promise((res) => {
-
+
this.webWorkerSortMessages.postMessage({list});
-
+
this.webWorkerSortMessages.onmessage = e => {
-
+
list = e.data
res()
-
+
}
})
-
+
this.messagesRendered = {
messages: list,
type: 'new'
@@ -2002,8 +2001,8 @@ class ChatPage extends LitElement {
}
async addToUpdateMessageHashmap(array){
-
-
+
+
const newObj = {}
@@ -2027,7 +2026,7 @@ class ChatPage extends LitElement {
findContent(identifier, data) {
const [type, id] = identifier.split('/');
-
+
if (type === 'group') {
for (let group of data.groups) {
if (group.groupId === parseInt(id, 10)) {
@@ -2044,7 +2043,7 @@ class ChatPage extends LitElement {
return null;
}
-
+
async processMessages(messages, isInitial, isUnread, count) {
const isReceipient = this.chatId.includes('direct')
@@ -2057,20 +2056,20 @@ class ChatPage extends LitElement {
}
await new Promise((res, rej) => {
this.webWorkerDecodeMessages.postMessage({messages: messages, isReceipient: this.isReceipient, _publicKey: this._publicKey, privateKey: window.parent.reduxStore.getState().app.selectedAddress.keyPair.privateKey });
-
+
this.webWorkerDecodeMessages.onmessage = e => {
decodedMessages = e.data
res()
-
+
}
this.webWorkerDecodeMessages.onerror = () => {
rej()
-
+
}
})
if (isInitial) {
this.chatEditorPlaceholder = await this.renderPlaceholder()
-
+
try {
queue.push(() => replaceMessagesEdited({
@@ -2084,31 +2083,31 @@ class ChatPage extends LitElement {
} catch (error) {
console.log({error})
}
-
-
+
+
let list = decodedMessages
-
+
await new Promise((res) => {
-
+
this.webWorkerSortMessages.postMessage({list});
-
+
this.webWorkerSortMessages.onmessage = e => {
-
+
list = e.data
res()
-
+
}
})
-
+
this._messages = list
// TODO: Determine number of initial messages by screen height...
// this.messagesRendered = this._messages
const lastReadMessageTimestamp = this.lastReadMessageTimestamp
-
+
if(isUnread){
this.messagesRendered = {
@@ -2128,12 +2127,12 @@ class ChatPage extends LitElement {
type: 'initial'
}
}
-
+
this.isLoadingMessages = false
setTimeout(() => this.downElementObserver(), 500)
} else {
-
+
queue.push(() => replaceMessagesEdited({
decodedMessages: decodedMessages,
parentEpml,
@@ -2157,7 +2156,7 @@ class ChatPage extends LitElement {
}))
}
-
+
}
}
@@ -2215,7 +2214,7 @@ class ChatPage extends LitElement {
if (newMessage.sender === this.selectedAddress.address) {
-
+
this.messagesRendered = {
messages: [newMessage],
type: 'newComingInAuto',
@@ -2235,13 +2234,13 @@ class ChatPage extends LitElement {
if(viewElement){
viewElement.scrollTop = viewElement.scrollHeight
}
-
+
} else {
this.messagesRendered = {
messages: [newMessage],
type: 'newComingInAuto',
- }
+ }
await this.getUpdateComplete()
this.showNewMessageBar()
@@ -2250,8 +2249,8 @@ class ChatPage extends LitElement {
/**
* Decode Message Method. Takes in a message object and returns a decoded message object
- * @param {Object} encodedMessageObj
- *
+ * @param {Object} encodedMessageObj
+ *
*/
decodeMessage(encodedMessageObj, isReceipient, _publicKey) {
let isReceipientVar
@@ -2303,9 +2302,9 @@ class ChatPage extends LitElement {
} else {
// Fallback to http
directSocketLink = `ws://${nodeUrl}/websockets/chat/messages?involving=${window.parent.reduxStore.getState().app.selectedAddress.address}&involving=${cid}&encoding=BASE64&limit=1`
- }
+ }
+
-
this.webSocket = new WebSocket(directSocketLink)
// Open Connection
@@ -2320,20 +2319,20 @@ class ChatPage extends LitElement {
directSocketTimeout = setTimeout(pingDirectSocket, 45000)
return
}
-
+
if (initial === 0) {
this.lastReadMessageTimestamp = await chatLastSeen.getItem(this.chatId) || 0
if (noInitial) return
let getInitialMessages = []
let count = 0
let isUnread = false
-
+
const chatId = this.chatId
- const findContent = this.chatHeads.find((item)=> item.url === chatId)
+ const findContent = this.chatHeads.find((item)=> item.url === chatId)
const chatInfoTimestamp = findContent.timestamp || 0
const lastReadMessageTimestamp = this.lastReadMessageTimestamp
-
-
+
+
if(lastReadMessageTimestamp && chatInfoTimestamp){
if(lastReadMessageTimestamp < chatInfoTimestamp){
isUnread = true
@@ -2362,8 +2361,8 @@ class ChatPage extends LitElement {
url: `/chat/messages?involving=${window.parent.reduxStore.getState().app.selectedAddress.address}&involving=${cid}&limit=${chatLimit}&reverse=true&haschatreference=false&encoding=BASE64`
})
}
-
-
+
+
this.processMessages(getInitialMessages, true, isUnread, count)
@@ -2381,9 +2380,9 @@ class ChatPage extends LitElement {
// Closed Event
this.webSocket.onclose = (e) => {
clearTimeout(directSocketTimeout)
-
+
if (e.reason === 'switch chat') return
-
+
restartDirectWebSocket()
}
@@ -2431,7 +2430,7 @@ class ChatPage extends LitElement {
// Fallback to http
groupSocketLink = `ws://${nodeUrl}/websockets/chat/messages?txGroupId=${groupId}&encoding=BASE64&limit=1`
}
-
+
this.webSocket = new WebSocket(groupSocketLink)
// Open Connection
@@ -2453,9 +2452,9 @@ class ChatPage extends LitElement {
const lastReadMessageTimestamp = this.lastReadMessageTimestamp
let isUnread = false
-
+
const chatId = this.chatId
- const findContent = this.chatHeads.find((item)=> item.url === chatId)
+ const findContent = this.chatHeads.find((item)=> item.url === chatId)
const chatInfoTimestamp = findContent.timestamp || 0
if(lastReadMessageTimestamp && chatInfoTimestamp){
@@ -2464,7 +2463,7 @@ class ChatPage extends LitElement {
}
}
if(isUnread){
-
+
const getInitialMessagesBefore = await parentEpml.request('apiCall', {
type: 'api',
@@ -2482,16 +2481,16 @@ class ChatPage extends LitElement {
url: `/chat/messages/count?after=${lastMessage.timestamp}&txGroupId=${groupId}&limit=20&reverse=false`
})
}
-
+
} else {
getInitialMessages = await parentEpml.request('apiCall', {
type: 'api',
url: `/chat/messages?txGroupId=${groupId}&limit=${chatLimit}&reverse=true&haschatreference=false&encoding=BASE64`
})
}
-
-
-
+
+
+
this.processMessages(getInitialMessages, true, isUnread, count)
@@ -2537,7 +2536,7 @@ class ChatPage extends LitElement {
} else {
// ... Render a nice "Error, Go Back" component.
}
- // Add to the messages... TODO: Save messages to localstorage and fetch from it to make it persistent...
+ // Add to the messages... TODO: Save messages to localstorage and fetch from it to make it persistent...
}
resetChatEditor() {
@@ -2553,11 +2552,11 @@ class ChatPage extends LitElement {
}
async _sendMessage(outSideMsg, msg, messageQueue) {
- const _chatId= this._chatId
- const isReceipient= this.isReceipient
- let _publicKey= this._publicKey
+ const _chatId= this._chatId
+ const isReceipient= this.isReceipient
+ let _publicKey= this._publicKey
const attachment= this.attachment
-
+
try {
if (this.isReceipient) {
let hasPublicKey = true
@@ -2580,73 +2579,73 @@ class ChatPage extends LitElement {
_publicKey.hasPubKey = false
}
} catch (error) { /* empty */ }
-
+
if (!hasPublicKey || !_publicKey.hasPubKey) {
let err4string = get("chatpage.cchange39")
parentEpml.request('showSnackBar', `${err4string}`)
return
}
-
+
}
}
// have params to determine if it's a reply or not
// have variable to determine if it's a response, holds signature in constructor
- // need original message signature
+ // need original message signature
// need whole original message object, transform the data and put it in local storage
// create new var called repliedToData and use that to modify the UI
// find specific object property in local
let typeMessage = 'regular'
// this.isLoading = true
const trimmedMessage = msg
-
+
const getName = async (recipient) => {
try {
const getNames = await parentEpml.request("apiCall", {
type: "api",
url: `/names/address/${recipient}`
})
-
+
if (Array.isArray(getNames) && getNames.length > 0) {
return getNames[0].name
} else {
return ''
}
-
+
} catch (error) {
return ""
}
}
-
+
if (outSideMsg && outSideMsg.type === 'delete') {
this.isDeletingImage = true
const userName = outSideMsg.name
const identifier = outSideMsg.identifier
let compressedFile = ''
var str = "iVBORw0KGgoAAAANSUhEUgAAAsAAAAGMAQMAAADuk4YmAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAADlJREFUeF7twDEBAAAAwiD7p7bGDlgYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAGJrAABgPqdWQAAAABJRU5ErkJggg=="
-
+
if (this.webWorkerFile) {
this.webWorkerFile.terminate()
this.webWorkerFile = null
}
-
+
this.webWorkerFile = new WebWorkerFile()
-
+
const b64toBlob = (b64Data, contentType = '', sliceSize = 512) => {
const byteCharacters = atob(b64Data)
const byteArrays = []
-
+
for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {
const slice = byteCharacters.slice(offset, offset + sliceSize)
-
+
const byteNumbers = new Array(slice.length)
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i)
}
-
+
const byteArray = new Uint8Array(byteNumbers)
byteArrays.push(byteArray)
}
-
+
const blob = new Blob(byteArrays, { type: contentType })
return blob
}
@@ -2659,7 +2658,7 @@ class ChatPage extends LitElement {
const file = new File([result], "name", {
type: 'image/png'
})
-
+
compressedFile = file
resolve()
},
@@ -2695,11 +2694,11 @@ class ChatPage extends LitElement {
}
typeMessage = 'edit'
let chatReference = outSideMsg.editedMessageObj.signature
-
+
if (outSideMsg.editedMessageObj.chatReference) {
chatReference = outSideMsg.editedMessageObj.chatReference
}
-
+
let message = ""
try {
const parsedMessageObj = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
@@ -2719,34 +2718,34 @@ class ChatPage extends LitElement {
const str = "iVBORw0KGgoAAAANSUhEUgAAAsAAAAGMAQMAAADuk4YmAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAADlJREFUeF7twDEBAAAAwiD7p7bGDlgYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAGJrAABgPqdWQAAAABJRU5ErkJggg=="
const userName = outSideMsg.name
const identifier = outSideMsg.identifier
-
+
if (this.webWorkerFile) {
this.webWorkerFile.terminate()
this.webWorkerFile = null
}
-
+
this.webWorkerFile = new WebWorkerFile()
-
+
const b64toBlob = (b64Data, contentType = '', sliceSize = 512) => {
const byteCharacters = atob(b64Data)
const byteArrays = []
-
+
for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {
const slice = byteCharacters.slice(offset, offset + sliceSize)
-
+
const byteNumbers = new Array(slice.length)
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i)
}
-
+
const byteArray = new Uint8Array(byteNumbers)
byteArrays.push(byteArray)
}
-
+
const blob = new Blob(byteArrays, { type: contentType })
return blob
}
-
+
const blob = b64toBlob(str, 'image/png')
await new Promise(resolve => {
new Compressor(blob, {
@@ -2756,7 +2755,7 @@ class ChatPage extends LitElement {
const file = new File([result], "name", {
type: 'image/png'
})
-
+
compressedFile = file
resolve()
},
@@ -2792,16 +2791,16 @@ class ChatPage extends LitElement {
}
typeMessage = 'edit'
let chatReference = outSideMsg.editedMessageObj.signature
-
+
if (outSideMsg.editedMessageObj.chatReference) {
chatReference = outSideMsg.editedMessageObj.chatReference
}
-
+
let message = ""
try {
const parsedMessageObj = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
message = parsedMessageObj
-
+
} catch (error) {
message = outSideMsg.editedMessageObj.decodedMessage
}
@@ -2823,8 +2822,8 @@ class ChatPage extends LitElement {
this.imageFile = null
return
}
-
-
+
+
let service = "QCHAT_IMAGE"
let name = userName
let identifier
@@ -2840,16 +2839,16 @@ class ChatPage extends LitElement {
}
);
if (res.action !== 'accept') throw new Error('User declined publish')
-
+
if (this.webWorkerFile) {
this.webWorkerFile.terminate()
this.webWorkerFile = null
}
-
+
this.webWorkerFile = new WebWorkerFile()
const image = this.imageFile
const id = this.uid.rnd()
- let groupPart
+ let groupPart
if(this.isReceipient){
groupPart = `direct_${generateIdFromAddresses(this._chatId, this.selectedAddress.address)}`
} else {
@@ -2880,9 +2879,9 @@ class ChatPage extends LitElement {
this.isUploadingImage = false
return
}
-
+
try {
-
+
await publishData({
registeredName: userName,
file: compressedFile,
@@ -2903,9 +2902,9 @@ class ChatPage extends LitElement {
this.isUploadingImage = false
return
}
-
+
}
-
+
const messageObject = {
messageText: trimmedMessage,
images: [{
@@ -2927,7 +2926,7 @@ class ChatPage extends LitElement {
this.isLoading = false
return
}
-
+
const messageObject = {
messageText: '',
gifs: [{
@@ -2949,14 +2948,14 @@ class ChatPage extends LitElement {
this.isLoading = false
return
}
-
+
if (this.webWorkerFile) {
this.webWorkerFile.terminate()
this.webWorkerFile = null
}
-
+
this.webWorkerFile = new WebWorkerFile()
-
+
// const attachment = attachment
const id = this.uid()
const identifier = `qchat_${id}`
@@ -3014,20 +3013,20 @@ class ChatPage extends LitElement {
const userName = await getName(this.selectedAddress.address)
typeMessage = 'edit'
let chatReference = outSideMsg.editedMessageObj.signature
-
+
if (outSideMsg.editedMessageObj.chatReference) {
chatReference = outSideMsg.editedMessageObj.chatReference
}
-
+
let message = ""
-
+
try {
const parsedMessageObj = JSON.parse(outSideMsg.editedMessageObj.decodedMessage)
message = parsedMessageObj
} catch (error) {
message = outSideMsg.editedMessageObj.decodedMessage
}
-
+
let reactions = message.reactions || []
const findEmojiIndex = reactions.findIndex((reaction) => reaction.type === outSideMsg.reaction)
if (findEmojiIndex !== -1) {
@@ -3084,16 +3083,16 @@ class ChatPage extends LitElement {
} else if (this.editedMessageObj) {
typeMessage = 'edit'
let chatReference = this.editedMessageObj.signature
-
+
if (this.editedMessageObj.chatReference) {
chatReference = this.editedMessageObj.chatReference
}
-
+
let message = ""
try {
const parsedMessageObj = JSON.parse(this.editedMessageObj.decodedMessage)
message = parsedMessageObj
-
+
} catch (error) {
message = this.editedMessageObj.decodedMessage
}
@@ -3112,7 +3111,7 @@ class ChatPage extends LitElement {
version: 3
}
const stringifyMessageObject = JSON.stringify(messageObject)
-
+
if (this.balance < 4) {
this.myTrimmedMeassage = ''
this.myTrimmedMeassage = stringifyMessageObject
@@ -3126,7 +3125,7 @@ class ChatPage extends LitElement {
this.isUploadingImage = false
return
}
-
+
}
async sendMessage({messageText, typeMessage, chatReference, isForward,isReceipient, _chatId, _publicKey, messageQueue}) {
@@ -3141,7 +3140,7 @@ class ChatPage extends LitElement {
if(isForward){
this.isLoading = true
}
-
+
let _reference = new Uint8Array(64)
window.crypto.getRandomValues(_reference)
let reference = window.parent.Base58.encode(_reference)
@@ -3420,7 +3419,7 @@ class ChatPage extends LitElement {
/**
* Method to set if the user's location is down in the chat
- * @param { Boolean } isDown
+ * @param { Boolean } isDown
*/
setIsUserDown(isDown) {
this.isUserDown = isDown
diff --git a/plugins/plugins/core/components/ChatRightPanel.js b/plugins/plugins/core/components/ChatRightPanel.js
index 24a90f59..b3fef699 100644
--- a/plugins/plugins/core/components/ChatRightPanel.js
+++ b/plugins/plugins/core/components/ChatRightPanel.js
@@ -1,8 +1,6 @@
-import { LitElement, html, css } from "lit";
-import { render } from "lit/html.js";
-import { Epml } from "../../../epml";
-import { getUserNameFromAddress } from "../../utils/getUserNameFromAddress";
-import snackbar from "./snackbar.js";
+import {css, html, LitElement} from "lit";
+import {Epml} from "../../../epml";
+import {getUserNameFromAddress} from "../../utils/getUserNameFromAddress";
import "@material/mwc-button";
import "@material/mwc-dialog";
import "@polymer/paper-spinner/paper-spinner-lite.js";
@@ -12,7 +10,6 @@ import '@vaadin/button';
import "./WrapperModal";
import "./TipUser"
import "./UserInfo/UserInfo";
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@@ -93,9 +90,9 @@ class ChatRightPanel extends LitElement {
.container-body {
width: 100%;
- display: flex;
- flex-direction: column;
- flex-grow: 1;
+ display: flex;
+ flex-direction: column;
+ flex-grow: 1;
overflow:auto;
margin-top: 5px;
padding: 0px 6px;
@@ -106,13 +103,13 @@ class ChatRightPanel extends LitElement {
background-color: whitesmoke;
border-radius: 7px;
}
-
+
.container-body::-webkit-scrollbar {
width: 6px;
border-radius: 7px;
background-color: whitesmoke;
}
-
+
.container-body::-webkit-scrollbar-thumb {
background-color: rgb(180, 176, 176);
border-radius: 7px;
@@ -122,7 +119,7 @@ class ChatRightPanel extends LitElement {
.container-body::-webkit-scrollbar-thumb:hover {
background-color: rgb(148, 146, 146);
cursor: pointer;
- }
+ }
p {
color: var(--black);
@@ -196,7 +193,7 @@ class ChatRightPanel extends LitElement {
async updated(changedProperties) {
if (changedProperties && changedProperties.has('selectedHead')) {
- if (this.selectedHead !== {}) {
+ if (this.selectedHead !== {}) {
const userName = await getUserNameFromAddress(this.selectedHead.address);
this.userName = userName;
}
@@ -237,7 +234,7 @@ class ChatRightPanel extends LitElement {
this.toggle(false)} style="margin: 0px 10px" icon="vaadin:close" slot="icon">
-
${this.leaveGroupObj && this.leaveGroupObj.groupName}
+
${this.leaveGroupObj && this.leaveGroupObj.groupName}
${this.leaveGroupObj && this.leaveGroupObj.description}
diff --git a/plugins/plugins/core/components/ChatRightPanelResources.js b/plugins/plugins/core/components/ChatRightPanelResources.js
index 23686aac..23073f52 100644
--- a/plugins/plugins/core/components/ChatRightPanelResources.js
+++ b/plugins/plugins/core/components/ChatRightPanelResources.js
@@ -1,5 +1,5 @@
-import { LitElement, html, css } from 'lit';
-import { Epml } from '../../../epml';
+import {css, html, LitElement} from 'lit';
+import {Epml} from '../../../epml';
import '@material/mwc-button';
import '@material/mwc-dialog';
import '@polymer/paper-spinner/paper-spinner-lite.js';
@@ -11,11 +11,8 @@ import './TipUser';
import './UserInfo/UserInfo';
import './ChatImage';
import './ReusableImage';
-import {
- get,
- translate,
-} from 'lit-translate';
-import { generateIdFromAddresses } from '../../utils/id-generation';
+import {get, translate,} from 'lit-translate';
+import {generateIdFromAddresses} from '../../utils/id-generation';
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
@@ -248,7 +245,7 @@ class ChatRightPanelResources extends LitElement {
const groupPart = this.isReceipient
? `direct_${generateIdFromAddresses(this._chatId, this.myAddress)}`
: `group_${this._chatId}`;
-
+
let offset = reset ? 0 : this.images.length;
let endpoint = `/arbitrary/resources/search?service=QCHAT_IMAGE&identifier=qchat_${groupPart}&reverse=true&limit=20&reverse=true&offset=${offset}`
if(this.onlyMyImages){
@@ -337,7 +334,7 @@ class ChatRightPanelResources extends LitElement {
render() {
return html`
-
+
{
@@ -361,7 +358,7 @@ class ChatRightPanelResources extends LitElement {
this.selectMyImages(e)} ?checked=${this.onlyMyImages}>
-
+
${this.images.map((image) => {
return html` `;
})}
@@ -659,7 +656,7 @@ class ImageParent extends LitElement {
this.repost(this.image)}>repost
` : ''}
-
+
`
: ''}
diff --git a/plugins/plugins/core/components/ChatScroller-css.js b/plugins/plugins/core/components/ChatScroller-css.js
index 2aad505d..2897b76b 100644
--- a/plugins/plugins/core/components/ChatScroller-css.js
+++ b/plugins/plugins/core/components/ChatScroller-css.js
@@ -1,4 +1,4 @@
-import { css } from 'lit'
+import {css} from 'lit'
export const chatStyles = css`
html {
@@ -91,7 +91,7 @@ export const chatStyles = css`
user-select: none;
display: flex;
justify-content: space-between;
- width: 100%;
+ width: 100%;
padding-top: 2px;
}
@@ -126,7 +126,7 @@ export const chatStyles = css`
.message-subcontainer1 {
position: relative;
display: flex;
- align-items: flex-end;
+ align-items: flex-end;
}
.message-subcontainer2 {
@@ -143,7 +143,7 @@ export const chatStyles = css`
min-width: 150px;
}
-
+
.message-myBg {
background-color: var(--chat-bubble-myBg) !important;
}
@@ -234,7 +234,7 @@ export const chatStyles = css`
margin: 0;
padding: 0;
}
-
+
.message {
display: flex;
flex-direction: column;
@@ -252,7 +252,7 @@ export const chatStyles = css`
.message-data-avatar {
margin: 0px 10px 0px 3px;
- width: 42px;
+ width: 42px;
height: 42px;
float: left;
}
@@ -289,7 +289,7 @@ export const chatStyles = css`
vertical-align: bottom;
object-fit: contain;
}
-
+
.align-left {
text-align: left;
}
@@ -351,12 +351,12 @@ export const chatStyles = css`
}
.tooltip {
- position: relative;
+ position: relative;
}
.tooltip:before {
- content: attr(data-text);
- display: none;
+ content: attr(data-text);
+ display: none;
position: absolute;
top: -47px;
left: 50%;
@@ -430,7 +430,7 @@ export const chatStyles = css`
border: 0.5px solid transparent;
cursor: pointer;
}
-
+
.reactions-bg:hover {
border: 0.5px solid var(--reaction-bubble-outline);
}
@@ -446,7 +446,7 @@ export const chatStyles = css`
}
.defaultSize {
- width: 45vh;
+ width: 45vh;
height: 40vh;
}
@@ -473,7 +473,7 @@ export const chatStyles = css`
color: rgb(228, 222, 222);
padding-left: 7px;
}
-
+
.image-delete-icon:hover {
opacity: 1;
}
@@ -704,7 +704,7 @@ export const chatStyles = css`
flex-direction: column;
gap: 5px;
}
-
+
.attachment-name {
font-family: Work Sans, sans-serif;
font-size: 16px;
@@ -725,7 +725,7 @@ export const chatStyles = css`
letter-spacing: 0.3px;
font-weight: 300;
}
-
+
.download-icon {
position: relative;
color: var(--chat-bubble-msg-color);
diff --git a/plugins/plugins/core/components/ChatScroller.js b/plugins/plugins/core/components/ChatScroller.js
index 12b266ce..1c2a249a 100644
--- a/plugins/plugins/core/components/ChatScroller.js
+++ b/plugins/plugins/core/components/ChatScroller.js
@@ -1,15 +1,12 @@
-import { LitElement, html, } from 'lit';
-import { repeat } from 'lit/directives/repeat.js';
-import {
- get,
- translate,
-} from 'lit-translate';
-import { unsafeHTML } from 'lit/directives/unsafe-html.js';
-import { chatStyles } from './ChatScroller-css.js';
-import { Epml } from '../../../epml';
-import { cropAddress } from '../../utils/cropAddress';
-import { roundToNearestDecimal } from '../../utils/roundToNearestDecimal.js';
-import { generateHTML } from '@tiptap/core';
+import {html, LitElement,} from 'lit';
+import {repeat} from 'lit/directives/repeat.js';
+import {get, translate,} from 'lit-translate';
+import {unsafeHTML} from 'lit/directives/unsafe-html.js';
+import {chatStyles} from './ChatScroller-css.js';
+import {Epml} from '../../../epml';
+import {cropAddress} from '../../utils/cropAddress';
+import {roundToNearestDecimal} from '../../utils/roundToNearestDecimal.js';
+import {generateHTML} from '@tiptap/core';
import isElectron from 'is-electron';
import axios from 'axios';
@@ -31,7 +28,7 @@ import '@material/mwc-icon';
import '@vaadin/icon';
import '@vaadin/icons';
import '@vaadin/tooltip';
-import { chatLimit, totalMsgCount } from './ChatPage.js';
+import {chatLimit, totalMsgCount} from './ChatPage.js';
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
let toggledMessage = {};
@@ -503,7 +500,7 @@ class ChatScroller extends LitElement {
!previousMessage ||
!this.shouldGroupWithLastMessage(message, previousMessage)
) {
-
+
if (currentMessageGroup) {
this.messagesToRender.unshift(currentMessageGroup);
}
@@ -690,7 +687,7 @@ class ChatScroller extends LitElement {
}
render() {
-
+
let formattedMessages = this.messagesToRender;
return html`
@@ -1454,19 +1451,19 @@ class MessageTemplate extends LitElement {
return hideit
? html`
`
: html`
-
@@ -2025,7 +2022,7 @@ class MessageTemplate extends LitElement {
`
}
-
+
this.hidePrivateMessageModal()}
.hideBlockUserModal=${() => this.hideBlockUserModal()}
toblockaddress=${this.messageObj.sender}
>
-
{
this.openDialogImage = false;
}}>
@@ -2206,7 +2203,7 @@ class MessageTemplate extends LitElement {
${this.openDialogImage ? html`
` : ''}
-
+
- {
this.openDialogGif = false;
}}>MessageTemplate
@@ -2242,7 +2239,7 @@ class MessageTemplate extends LitElement {
{
this.openDeleteImage = false;
}}>
@@ -2252,10 +2249,10 @@ class MessageTemplate extends LitElement {
` : ''}
-
+
-
-
-
{
this.preventUserSendingImage(e)
}}>
@@ -484,26 +483,26 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
icon="vaadin:paperclip"
slot="icon"
>
-
+
- {
this.insertFile(e.target.files[0]);
const filePickerInput = this.shadowRoot.getElementById('file-picker');
if (filePickerInput) {
filePickerInput.value = "";
- }
+ }
}
}"
id="file-picker"
- class="file-picker-input"
- type="file"
- name="myImage"
+ class="file-picker-input"
+ type="file"
+ name="myImage"
accept="image/*, .doc, .docx, .pdf, .zip, .pdf, .txt, .odt, .ods, .xls, .xlsx, .ppt, .pptx" />
-
+
@@ -532,23 +531,23 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
`}
`
- ) :
+ ) :
html`
-
${this.isLoading === false ? html`
-
{
this.sendMessageFunc(this.messageQueue);
- }}
+ }}
/>
- ` :
+ ` :
html`
`}
@@ -556,14 +555,14 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
`
}
- ${this.chatMessageSize >= 750 ?
+ ${this.chatMessageSize >= 750 ?
html`
${`Your message size is of ${this.chatMessageSize} bytes out of a maximum of 4000`}
- ` :
+ ` :
html``}
`
@@ -582,9 +581,9 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
const item_list = await navigator.clipboard.read();
let image_type; // we will feed this later
const item = item_list.find( item => // choose the one item holding our image
- item.types.some( type => {
+ item.types.some( type => {
if (type.startsWith( 'image/')) {
- image_type = type;
+ image_type = type;
return true;
}
})
@@ -595,29 +594,29 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
type: image_type
});
this.insertFile(file);
- }
+ }
}
}
- async firstUpdated() {
+ async firstUpdated() {
window.addEventListener('storage', () => {
const checkTheme = localStorage.getItem('qortalTheme');
const chatbar = this.shadowRoot.querySelector('.element')
if (checkTheme === 'dark') {
this.theme = 'dark'
chatbar.style.cssText = "color:#ffffff;"
-
+
} else {
this.theme = 'light'
chatbar.style.cssText = "color:#080808;"
-
+
}
})
this.emojiPickerHandler = this.shadowRoot.querySelector('.emoji-button');
this.mirrorChatInput = this.shadowRoot.getElementById('messageBox');
- this.chatMessageInput = this.shadowRoot.querySelector('.element')
-
+ this.chatMessageInput = this.shadowRoot.querySelector('.element')
+
this.emojiPicker = new EmojiPicker({
style: "twemoji",
twemojiBaseUrl: '/emoji/',
@@ -631,7 +630,7 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
});
this.emojiPicker.on('emoji', selection => {
-
+
this.editor.commands.insertContent(selection.emoji, {
parseOptions: {
preserveWhitespace: false
@@ -658,7 +657,7 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
if (changedProperties && changedProperties.has('placeholder') && this.updatePlaceholder && this.editor) {
this.updatePlaceholder(this.editor, this.placeholder )
}
-
+
if (changedProperties && changedProperties.has("imageFile")) {
this.chatMessageInput = "newChat";
}
@@ -749,10 +748,10 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
} catch (error) {
console.error(error)
}
-
+
}
-
+
}
-window.customElements.define("chat-text-editor", ChatTextEditor)
\ No newline at end of file
+window.customElements.define("chat-text-editor", ChatTextEditor)
diff --git a/plugins/plugins/core/components/ChatWelcomePage.js b/plugins/plugins/core/components/ChatWelcomePage.js
index b391f5d7..720af6e7 100644
--- a/plugins/plugins/core/components/ChatWelcomePage.js
+++ b/plugins/plugins/core/components/ChatWelcomePage.js
@@ -1,7 +1,6 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml.js'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {css, html, LitElement} from 'lit'
+import {Epml} from '../../../epml.js'
+import {get, registerTranslateConfig, translate, use} from 'lit-translate'
import isElectron from 'is-electron'
import '@material/mwc-icon'
@@ -214,8 +213,8 @@ class ChatWelcomePage extends LitElement {
chat
${this.myAddress.address}
-
this.setOpenPrivateMessage({
name: "",
open: true
@@ -233,12 +232,12 @@ class ChatWelcomePage extends LitElement {
${translate("welcomepage.wcchange3")}
-
+
-
+
{
this._sendMessage();
}
diff --git a/plugins/plugins/core/components/ImageComponent.js b/plugins/plugins/core/components/ImageComponent.js
index 80bb6c26..4b33d08f 100644
--- a/plugins/plugins/core/components/ImageComponent.js
+++ b/plugins/plugins/core/components/ImageComponent.js
@@ -1,12 +1,5 @@
-import { LitElement, html, css } from 'lit';
-import { render } from 'lit/html.js';
-import {
- use,
- get,
- translate,
- translateUnsafeHTML,
- registerTranslateConfig,
-} from 'lit-translate';
+import {css, html, LitElement} from 'lit';
+import {translate,} from 'lit-translate';
export class ImageComponent extends LitElement {
static get properties() {
diff --git a/plugins/plugins/core/components/LevelFounder.js b/plugins/plugins/core/components/LevelFounder.js
index 635dda40..2f9a8fc7 100644
--- a/plugins/plugins/core/components/LevelFounder.js
+++ b/plugins/plugins/core/components/LevelFounder.js
@@ -1,10 +1,8 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml.js'
-import snackbar from './snackbar.js'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {css, html, LitElement} from 'lit'
+import {Epml} from '../../../epml.js'
+import {translate} from 'lit-translate'
import '@polymer/paper-tooltip/paper-tooltip.js'
-import { RequestQueue } from '../../utils/queue.js'
+import {RequestQueue} from '../../utils/queue.js'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@@ -116,7 +114,7 @@ class LevelFounder extends LitElement {
} catch (error) {
console.error(error)
}
-
+
}
renderFounder() {
diff --git a/plugins/plugins/core/components/NameMenu.js b/plugins/plugins/core/components/NameMenu.js
index 9a0d2e5a..73bda1ec 100644
--- a/plugins/plugins/core/components/NameMenu.js
+++ b/plugins/plugins/core/components/NameMenu.js
@@ -1,8 +1,7 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml.js'
+import {css, html, LitElement} from 'lit'
+import {Epml} from '../../../epml.js'
import snackbar from './snackbar.js'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {get, translate} from 'lit-translate'
import '@material/mwc-snackbar'
import '@material/mwc-button'
import '@material/mwc-dialog'
diff --git a/plugins/plugins/core/components/QortalQrcodeGenerator.js b/plugins/plugins/core/components/QortalQrcodeGenerator.js
index 37e41892..bd1c7429 100644
--- a/plugins/plugins/core/components/QortalQrcodeGenerator.js
+++ b/plugins/plugins/core/components/QortalQrcodeGenerator.js
@@ -1,5 +1,4 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
+import {css, html, LitElement} from 'lit'
import QRCode from './QRCode.js'
export class QortalQrcodeGenerator extends LitElement {
diff --git a/plugins/plugins/core/components/ReusableImage.js b/plugins/plugins/core/components/ReusableImage.js
index 8a61c411..def07f5f 100644
--- a/plugins/plugins/core/components/ReusableImage.js
+++ b/plugins/plugins/core/components/ReusableImage.js
@@ -1,9 +1,7 @@
-import { LitElement, html, css } from 'lit';
-import {
- translate,
-} from 'lit-translate';
+import {css, html, LitElement} from 'lit';
+import {translate,} from 'lit-translate';
import axios from 'axios';
-import { RequestQueueWithPromise } from '../../utils/queue';
+import {RequestQueueWithPromise} from '../../utils/queue';
import '@material/mwc-menu';
import '@material/mwc-list/mwc-list-item.js';
import '@material/mwc-dialog'
@@ -149,7 +147,7 @@ export class ResuableImage extends LitElement {
try {
if (this.isFetching) return;
this.isFetching = true;
-
+
await requestQueue2.enqueue(() => {
return axios.get(
`${this.nodeUrl}/arbitrary/resource/properties/${this.resource.service}/${this.resource.name}/${this.resource.identifier}?apiKey=${this.myNode.apiKey}`
@@ -301,9 +299,9 @@ export class ResuableImage extends LitElement {
: ''}
- {
this.openDialogImage = false;
}}>
@@ -312,7 +310,7 @@ export class ResuableImage extends LitElement {
${this.openDialogImage ? html`
` : ''}
-
+
{
this.sendMoneyLoading = false;
this.btnDisable = false;
}
-
+
if (parseFloat(amount) + parseFloat(0.011) > parseFloat(this.walletBalance)) {
resetState();
const snack1string = get("chatpage.cchange51");
parentEpml.request('showSnackBar', `${snack1string}`);
return false;
}
-
+
if (parseFloat(amount) <= 0) {
resetState();
const snack2string = get("chatpage.cchange52");
parentEpml.request('showSnackBar', `${snack2string}`);
return false;
}
-
+
if (recipient.length === 0) {
resetState();
const snack3string = get("chatpage.cchange53");
parentEpml.request('showSnackBar', `${snack3string}`);
return false;
}
-
+
const validateName = async (receiverName) => {
const myNameRes = await parentEpml.request('apiCall', {
type: 'api',
@@ -139,11 +138,11 @@ export class TipUser extends LitElement {
});
return myNameRes.error === 401 ? false : myNameRes;
};
-
+
const validateAddress = async (receiverAddress) => {
return await window.parent.validateAddress(receiverAddress);
};
-
+
const getName = async (recipient) => {
try {
const getNames = await parentEpml.request("apiCall", {
@@ -155,14 +154,14 @@ export class TipUser extends LitElement {
return "";
}
};
-
+
const makeTransactionRequest = async (receiver, lastRef) => {
const dialogAmount = get("transactions.amount");
const dialogAddress = get("login.address");
const dialogName = get("login.name");
const dialogTo = get("transactions.to");
const recipientName = await getName(receiver);
-
+
return await parentEpml.request('transaction', {
type: 2,
nonce: this.myAddress.nonce,
@@ -179,7 +178,7 @@ export class TipUser extends LitElement {
}
});
};
-
+
const getTxnRequestResponse = (txnResponse) => {
if (txnResponse.success === false && txnResponse.message) {
this.errorMessage = txnResponse.message;
@@ -200,17 +199,17 @@ export class TipUser extends LitElement {
throw new Error(txnResponse);
}
};
-
+
const validateReceiver = async (recipient) => {
let lastRef = await this.getLastRef();
let isAddress;
-
+
try {
isAddress = await validateAddress(recipient);
} catch (err) {
isAddress = false;
}
-
+
if (isAddress) {
const myTransaction = await makeTransactionRequest(recipient, lastRef);
getTxnRequestResponse(myTransaction);
@@ -225,14 +224,14 @@ export class TipUser extends LitElement {
}
}
};
-
+
await validateReceiver(recipient);
}
-
+
render() {
return html`
-
-
+
this.getUrl('chain-messaging')}>Chain-Based Messaging
-
A long-term message that is stored ON CHAIN .
- These messages are able to be sent to groups or individual accounts , and are essentially the 'e-mail' of Qortal .
+
A long-term message that is stored ON CHAIN .
+ These messages are able to be sent to groups or individual accounts , and are essentially the 'e-mail' of Qortal .
Use these messages if you intend on the message being a PERMANENT message that stays when and where you send it.
@@ -121,8 +121,8 @@ class Messaging extends LitElement {
this.getUrl('q-chat')}>Q-Chat
-
Is a custom chat system that is UNLIKE ANY OTHER in existence. It is the FIRST OF ITS KIND IN THE WORLD.
- It is a real-time, blockchain-based chat system that utilizes a memory-based PoW (Proof Of Work) algorithm, to implement a specialized transaction that is 'temporary', on the Qortal blockchain.
+
Is a custom chat system that is UNLIKE ANY OTHER in existence. It is the FIRST OF ITS KIND IN THE WORLD.
+ It is a real-time, blockchain-based chat system that utilizes a memory-based PoW (Proof Of Work) algorithm, to implement a specialized transaction that is 'temporary', on the Qortal blockchain.
Q-Chat messages will DISSAPEAR AFTER 24 HOURS and therefore are not a great choice for things you wish to be permanent.
diff --git a/plugins/plugins/core/messaging/q-chat/computePowWorker.src.js b/plugins/plugins/core/messaging/q-chat/computePowWorker.src.js
index 2ed60a20..b89b9d84 100644
--- a/plugins/plugins/core/messaging/q-chat/computePowWorker.src.js
+++ b/plugins/plugins/core/messaging/q-chat/computePowWorker.src.js
@@ -1,4 +1,4 @@
-import { Sha256 } from 'asmcrypto.js'
+import {Sha256} from 'asmcrypto.js'
function sbrk(size, heap){
@@ -39,7 +39,7 @@ const computePow = async (chatBytes, path, difficulty) => {
const hashAry = new Uint8Array(memory.buffer, hashPtr, 32);
hashAry.set(chatBytesHash);
-
+
const workBufferLength = 8 * 1024 * 1024;
const workBufferPtr = sbrk(workBufferLength, heap);
@@ -72,11 +72,11 @@ loadWebAssembly(path)
}
resolve()
-
+
});
- })
+ })
return response
-}
\ No newline at end of file
+}
diff --git a/plugins/plugins/core/messaging/q-chat/q-chat-css.src.js b/plugins/plugins/core/messaging/q-chat/q-chat-css.src.js
index 80b11a08..08408ca2 100644
--- a/plugins/plugins/core/messaging/q-chat/q-chat-css.src.js
+++ b/plugins/plugins/core/messaging/q-chat/q-chat-css.src.js
@@ -1,4 +1,4 @@
-import { css } from 'lit'
+import {css} from 'lit'
export const qchatStyles = css`
* {
@@ -115,14 +115,14 @@ export const qchatStyles = css`
display: block;
opacity: 1;
animation: fadeIn 0.6s;
-}
+}
@keyframes fadeIn {
from {
opacity: 0;
top: -10px;
}
-
+
to {
opacity: 1;
top: -60px;
@@ -194,7 +194,7 @@ export const qchatStyles = css`
padding: 0px 0px 60px 0px;
height: 85vh;
overflow-y: auto;
- overflow-x: hidden;
+ overflow-x: hidden;
}
.people-list ul::-webkit-scrollbar-track {
@@ -213,7 +213,7 @@ export const qchatStyles = css`
border-radius: 7px;
transition: all 0.3s ease-in-out;
}
-
+
.chat {
width: 80vw;
height: 100vh;
diff --git a/plugins/plugins/core/messaging/q-chat/q-chat.src.js b/plugins/plugins/core/messaging/q-chat/q-chat.src.js
index c25fcc2f..dc54877a 100644
--- a/plugins/plugins/core/messaging/q-chat/q-chat.src.js
+++ b/plugins/plugins/core/messaging/q-chat/q-chat.src.js
@@ -1,10 +1,10 @@
-import { LitElement, html } from 'lit'
-import { render } from 'lit/html.js'
-import { passiveSupport } from 'passive-events-support/src/utils'
-import { Epml } from '../../../../epml.js'
-import { get, translate } from 'lit-translate'
-import { qchatStyles } from './q-chat-css.src.js'
-import { Editor, Extension } from '@tiptap/core'
+import {html, LitElement} from 'lit'
+import {render} from 'lit/html.js'
+import {passiveSupport} from 'passive-events-support/src/utils'
+import {Epml} from '../../../../epml.js'
+import {get, translate} from 'lit-translate'
+import {qchatStyles} from './q-chat-css.src.js'
+import {Editor, Extension} from '@tiptap/core'
import isElectron from 'is-electron'
import WebWorker from 'web-worker:./computePowWorker.src.js'
import StarterKit from '@tiptap/starter-kit'
@@ -108,7 +108,7 @@ class Chat extends LitElement {
async setActiveChatHeadUrl(url) {
this.activeChatHeadUrl = url
this.requestUpdate()
- }
+ }
resetChatEditor(){
this.editor.commands.setContent('')
@@ -188,7 +188,7 @@ class Chat extends LitElement {
updatePlaceholder(editor, text) {
editor.extensionManager.extensions.forEach((extension) => {
if (extension.name === "placeholder") {
-
+
extension.options["placeholder"] = text
editor.commands.focus('end')
}
@@ -236,7 +236,7 @@ class Chat extends LitElement {
-
+
{ this.openTabToGroupManagement() }}>
group_add
${this.isEmptyArray(this.chatHeads) ? this.renderLoadingText() : this.renderChatHead(this.chatHeads)}
-
+
this.scrollToBottom()}>
@@ -270,19 +270,19 @@ class Chat extends LitElement {
${translate("chatpage.cchange5")} keyboard_arrow_down
-
+
${this.activeChatHeadUrl ? html`${this.renderChatPage()}` : html`${this.renderChatWelcomePage()}`}
-
{
this.resetChatEditor()
this.openPrivateMessage = false
this.shadowRoot.getElementById('sendTo').value = ""
this.userFoundModalOpen = false;
this.userFound = []
- } }
+ } }
style=${this.openPrivateMessage ? "visibility:visible;z-index:50" : "visibility: hidden;z-index:-100;position: relative"}>
@@ -292,12 +292,12 @@ class Chat extends LitElement {
- {
this.userSelected = {}
@@ -312,19 +312,19 @@ class Chat extends LitElement {
`
) : (
- html`
-
`
)}
-
-
- {
this.userSelected = result;
this.userFound = [];
@@ -380,7 +380,7 @@ class Chat extends LitElement {
?loading=${this.isLoading}>
-
+
@@ -417,7 +417,7 @@ class Chat extends LitElement {
-
+
`
}
@@ -491,20 +491,20 @@ class Chat extends LitElement {
}
target = target.parentNode;
}
-
+
// If it doesn't, show the default Electron context menu
event.preventDefault();
window.parent.electronAPI.showMyMenu();
});
-
+
}
let configLoaded = false
parentEpml.ready().then(() => {
-
+
parentEpml.subscribe('config', c => {
if (!configLoaded) {
setTimeout(getBlockedUsers, 1)
@@ -534,8 +534,8 @@ class Chat extends LitElement {
window.parent.reduxStore.dispatch(
window.parent.reduxAction.setSideEffectAction(null))
}
-
- }
+
+ }
})
parentEpml.request('apiCall', {
url: `/addresses/balance/${window.parent.reduxStore.getState().app.selectedAddress.address}`
@@ -551,7 +551,7 @@ class Chat extends LitElement {
}, 60000)
}
-
+
clearConsole() {
if (!isElectron()) { /* empty */ } else {
@@ -581,7 +581,7 @@ class Chat extends LitElement {
this.userFound = []
} else {
this.userFound = [
- ...this.userFound,
+ ...this.userFound,
result,
];
}
@@ -596,7 +596,7 @@ class Chat extends LitElement {
window.location.href = `../../group-management/index.html`
}
- async _sendMessage(outSideMsg, msg) {
+ async _sendMessage(outSideMsg, msg) {
this.isLoading = true;
const trimmedMessage = msg
@@ -613,17 +613,17 @@ class Chat extends LitElement {
this.sendMessage(stringifyMessageObject)
}
}
-
+
async sendMessage(messageText) {
this.isLoading = true
-
+
const _recipient = this.shadowRoot.getElementById('sendTo').value
-
+
let recipient
-
- const validateName = async (receiverName) => {
+
+ const validateName = async (receiverName) => {
let myRes
- try {
+ try {
let myNameRes = await parentEpml.request('apiCall', {
type: 'api',
url: `/names/${receiverName}`
@@ -638,23 +638,23 @@ class Chat extends LitElement {
return ""
}
};
-
+
const myNameRes = await validateName(_recipient)
if (!myNameRes) {
recipient = _recipient
} else {
recipient = myNameRes.owner
}
-
+
const getAddressPublicKey = async () => {
let isEncrypted;
let _publicKey;
-
+
let addressPublicKey = await parentEpml.request('apiCall', {
type: 'api',
url: `/addresses/publickey/${recipient}`
})
-
+
if (addressPublicKey.error === 102) {
_publicKey = false
let err4string = get("chatpage.cchange19")
@@ -689,10 +689,10 @@ class Chat extends LitElement {
isText: 1
}
})
-
+
_computePow(chatResponse);
};
-
+
const _computePow = async (chatBytes) => {
const difficulty = this.balance < 4 ? 18 : 8
const path = window.parent.location.origin + '/memory-pow/memory-pow.wasm.full'
@@ -708,16 +708,16 @@ class Chat extends LitElement {
res()
}
})
-
+
let _response = await parentEpml.request('sign_chat', {
nonce: this.selectedAddress.nonce,
chatBytesArray: chatBytesArray,
chatNonce: nonce
});
-
+
getSendChatResponse(_response)
};
-
+
const getSendChatResponse = (response) => {
if (response === true) {
this.setActiveChatHeadUrl(`direct/${recipient}`)
@@ -730,20 +730,20 @@ class Chat extends LitElement {
let err2string = get("chatpage.cchange21")
parentEpml.request('showSnackBar', `${err2string}`)
}
-
+
this.isLoading = false
}
-
+
// Exec..
getAddressPublicKey()
-
+
}
insertImage(file) {
if (file.type.includes('image')) {
this.imageFile = file
return
- }
+ }
parentEpml.request('showSnackBar', get("chatpage.cchange28"))
}
@@ -777,7 +777,7 @@ class Chat extends LitElement {
hidelist.push(item)
})
localStorage.setItem("MessageBlockedAddresses", JSON.stringify(hidelist))
-
+
this.blockedUserList = hidelist
})
}
@@ -885,7 +885,7 @@ class Chat extends LitElement {
renderChatWelcomePage() {
return html`
- this.setOpenPrivateMessage(val)}
>
@@ -902,14 +902,14 @@ class Chat extends LitElement {
// Check for the chat ID from and render chat messages
// Else render Welcome to Q-CHat
- // TODO: DONE: Do the above in the ChatPage
+ // TODO: DONE: Do the above in the ChatPage
return html`
- this.setOpenPrivateMessage(val)}
.setActiveChatHeadUrl=${(val)=> this.setActiveChatHeadUrl(val)}
balance=${this.balance}
@@ -999,4 +999,4 @@ class Chat extends LitElement {
}
}
-window.customElements.define('q-chat', Chat)
\ No newline at end of file
+window.customElements.define('q-chat', Chat)
diff --git a/plugins/plugins/core/minting/minting-info.src.js b/plugins/plugins/core/minting/minting-info.src.js
index 49304129..112b6820 100644
--- a/plugins/plugins/core/minting/minting-info.src.js
+++ b/plugins/plugins/core/minting/minting-info.src.js
@@ -1,18 +1,16 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml.js'
+import {css, html, LitElement} from 'lit'
+import {Epml} from '../../../epml.js'
import isElectron from 'is-electron'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
-
-registerTranslateConfig({
- loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
-})
-
+import {registerTranslateConfig, translate, use} from 'lit-translate'
import '@material/mwc-icon'
import '@material/mwc-button'
import '@material/mwc-dialog'
import '@material/mwc-textfield'
+registerTranslateConfig({
+ loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
+})
+
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
class MintingInfo extends LitElement {
diff --git a/plugins/plugins/core/name-registration/name-registration.src.js b/plugins/plugins/core/name-registration/name-registration.src.js
index ecd51d15..f6ae5623 100644
--- a/plugins/plugins/core/name-registration/name-registration.src.js
+++ b/plugins/plugins/core/name-registration/name-registration.src.js
@@ -1,13 +1,8 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml.js'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {css, html, LitElement} from 'lit'
+import {render} from 'lit/html.js'
+import {Epml} from '../../../epml.js'
+import {get, registerTranslateConfig, translate, use} from 'lit-translate'
import isElectron from 'is-electron'
-
-registerTranslateConfig({
- loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
-})
-
import '@material/mwc-button'
import '@material/mwc-dialog'
import '@material/mwc-formfield'
@@ -21,7 +16,11 @@ import '@vaadin/icon'
import '@vaadin/icons'
import '@vaadin/grid'
import '@vaadin/text-field'
-import { warningModal } from '../../utils/warning-modal.js'
+import {warningModal} from '../../utils/warning-modal.js'
+
+registerTranslateConfig({
+ loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
+})
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@@ -1194,4 +1193,4 @@ class NameRegistration extends LitElement {
}
}
-window.customElements.define('name-registration', NameRegistration)
\ No newline at end of file
+window.customElements.define('name-registration', NameRegistration)
diff --git a/plugins/plugins/core/names-market/names-market.src.js b/plugins/plugins/core/names-market/names-market.src.js
index d3638920..21ca716a 100644
--- a/plugins/plugins/core/names-market/names-market.src.js
+++ b/plugins/plugins/core/names-market/names-market.src.js
@@ -1,14 +1,9 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml.js'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {css, html, LitElement} from 'lit'
+import {render} from 'lit/html.js'
+import {Epml} from '../../../epml.js'
+import {get, registerTranslateConfig, translate, use} from 'lit-translate'
import isElectron from 'is-electron'
import '../components/qortal-info-view.js'
-
-registerTranslateConfig({
- loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
-})
-
import '@material/mwc-button'
import '@material/mwc-dialog'
import '@material/mwc-formfield'
@@ -24,6 +19,10 @@ import '@vaadin/icons'
import '@vaadin/grid'
import '@vaadin/text-field'
+registerTranslateConfig({
+ loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
+})
+
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
class NamesMarket extends LitElement {
@@ -1179,4 +1178,4 @@ class NamesMarket extends LitElement {
}
}
-window.customElements.define('names-market', NamesMarket)
\ No newline at end of file
+window.customElements.define('names-market', NamesMarket)
diff --git a/plugins/plugins/core/node-management/node-management.src.js b/plugins/plugins/core/node-management/node-management.src.js
index 1da06d97..ea61db18 100644
--- a/plugins/plugins/core/node-management/node-management.src.js
+++ b/plugins/plugins/core/node-management/node-management.src.js
@@ -1,13 +1,8 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml.js'
+import {css, html, LitElement} from 'lit'
+import {render} from 'lit/html.js'
+import {Epml} from '../../../epml.js'
import isElectron from 'is-electron'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
-
-registerTranslateConfig({
- loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
-})
-
+import {get, registerTranslateConfig, translate, use} from 'lit-translate'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@material/mwc-icon'
import '@material/mwc-textfield'
@@ -15,6 +10,10 @@ import '@material/mwc-button'
import '@material/mwc-dialog'
import '@vaadin/grid'
+registerTranslateConfig({
+ loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
+})
+
const parentEpml = new Epml({ type: "WINDOW", source: window.parent })
class NodeManagement extends LitElement {
diff --git a/plugins/plugins/core/overview-page/overview-page-css.js b/plugins/plugins/core/overview-page/overview-page-css.js
index a5fe82e8..2e3ef30f 100644
--- a/plugins/plugins/core/overview-page/overview-page-css.js
+++ b/plugins/plugins/core/overview-page/overview-page-css.js
@@ -1,4 +1,4 @@
-import { css } from 'lit'
+import {css} from 'lit'
export const overviewStyle = css`
*,
@@ -742,4 +742,4 @@ p {
.red {
color: #C6011F;
}
-`
\ No newline at end of file
+`
diff --git a/plugins/plugins/core/overview-page/overview-page.src.js b/plugins/plugins/core/overview-page/overview-page.src.js
index 6b6d206e..de8ff4f2 100644
--- a/plugins/plugins/core/overview-page/overview-page.src.js
+++ b/plugins/plugins/core/overview-page/overview-page.src.js
@@ -1,8 +1,8 @@
-import { LitElement, html, css } from 'lit'
-import { Epml } from '../../../epml.js'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
-import { overviewStyle } from './overview-page-css.js'
-import { asyncReplace } from 'lit/directives/async-replace.js'
+import {css, html, LitElement} from 'lit'
+import {Epml} from '../../../epml.js'
+import {get, registerTranslateConfig, translate, use} from 'lit-translate'
+import {overviewStyle} from './overview-page-css.js'
+import {asyncReplace} from 'lit/directives/async-replace.js'
import isElectron from 'is-electron'
import "@material/mwc-button"
@@ -752,7 +752,7 @@ class StartMintingNow extends LitElement {
-
+
${this.openDialogRewardShare ? html`
@@ -806,7 +806,7 @@ class StartMintingNow extends LitElement {
Warning: do not close the Qortal UI until completion!
${this.errorMsg}
-
+
@@ -744,7 +742,7 @@ class QApps extends LitElement {
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
let jsonOffsetUrl = `${nodeUrl}/arbitrary/resources?service=APP&default=true&limit=20&offset=${offset}&reverse=false&includestatus=true&includemetadata=true&excludeblocked=true`
this.isLoading = true
-
+
const jsonOffsetRes = await fetch(jsonOffsetUrl)
const jsonOffsetData = await jsonOffsetRes.json()
diff --git a/plugins/plugins/core/qdn/browser/browser.src.js b/plugins/plugins/core/qdn/browser/browser.src.js
index 70622b23..e1cac571 100644
--- a/plugins/plugins/core/qdn/browser/browser.src.js
+++ b/plugins/plugins/core/qdn/browser/browser.src.js
@@ -1,14 +1,8 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../../epml'
+import {css, html, LitElement} from 'lit'
+import {Epml} from '../../../../epml'
import isElectron from 'is-electron'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {get, registerTranslateConfig, translate, use} from 'lit-translate'
import ShortUniqueId from 'short-unique-id';
-
-registerTranslateConfig({
- loader: (lang) => fetch(`/language/${lang}.json`).then((res) => res.json())
-})
-
import FileSaver from 'file-saver'
import * as actions from '../../components/qdn-action-types'
import '@material/mwc-button'
@@ -16,13 +10,24 @@ import '@material/mwc-icon'
import '@material/mwc-checkbox'
import WebWorker from 'web-worker:./computePowWorkerFile.src.js'
import WebWorkerChat from 'web-worker:./computePowWorker.src.js'
-import { publishData } from '../../../utils/publish-image.js'
-import { Loader } from '../../../utils/loader.js';
-import { QORT_DECIMALS } from '../../../../../crypto/api/constants'
-import nacl from '../../../../../crypto/api/deps/nacl-fast.js'
-import ed2curve from '../../../../../crypto/api/deps/ed2curve.js'
-import { mimeToExtensionMap } from '../../components/qdn-action-constants';
-import { base64ToUint8Array, decryptDeprecatedSingle, decryptGroupData, encryptDataGroup, fileToBase64, uint8ArrayStartsWith, uint8ArrayToBase64 } from '../../components/qdn-action-encryption';
+import {publishData} from '../../../utils/publish-image.js'
+import {Loader} from '../../../utils/loader.js';
+import {QORT_DECIMALS} from '../../../../../crypto/api/constants'
+import {mimeToExtensionMap} from '../../components/qdn-action-constants';
+import {
+ base64ToUint8Array,
+ decryptDeprecatedSingle,
+ decryptGroupData,
+ encryptDataGroup,
+ fileToBase64,
+ uint8ArrayStartsWith,
+ uint8ArrayToBase64
+} from '../../components/qdn-action-encryption';
+
+registerTranslateConfig({
+ loader: (lang) => fetch(`/language/${lang}.json`).then((res) => res.json())
+})
+
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
class WebBrowser extends LitElement {
@@ -117,7 +122,7 @@ class WebBrowser extends LitElement {
input {
outline: none
}
-
+
paper-progress {
--paper-progress-active-color: var(--mdc-theme-primary);
@@ -318,7 +323,7 @@ class WebBrowser extends LitElement {
}
async linkOpenNewTab(link) {
-
+
const value = link
let newQuery = value
if (newQuery.endsWith('/')) {
@@ -337,7 +342,7 @@ class WebBrowser extends LitElement {
if (path) {
query = query + `&path=${path}`
}
-
+
window.parent.reduxStore.dispatch(window.parent.reduxAction.setNewTab({
url: `qdn/browser/index.html${query}`,
id: this.uid.rnd(),
@@ -352,7 +357,7 @@ class WebBrowser extends LitElement {
"parent": false
}
}))
-
+
}
render() {
@@ -716,7 +721,7 @@ class WebBrowser extends LitElement {
let votedialog5 = get("transactions.votedialog5")
let votedialog6 = get("transactions.votedialog6")
let feeDialog = get("walletpage.wchange12")
-
+
let myTxnrequest = await parentEpml.request('transaction', {
type: 8,
nonce: this.selectedAddress.nonce,
@@ -1548,10 +1553,10 @@ class WebBrowser extends LitElement {
}
const pollName = data.pollName
- const pollDescription = data.pollDescription
+ const pollDescription = data.pollDescription
const pollOptions = data.pollOptions
- const pollOwnerAddress = data.pollOwnerAddress
-
+ const pollOwnerAddress = data.pollOwnerAddress
+
try {
this.loader.show()
const resCreatePoll = await this._createPoll(pollName, pollDescription, pollOptions, pollOwnerAddress)
@@ -1589,7 +1594,7 @@ class WebBrowser extends LitElement {
response = JSON.stringify(obj)
break
}
-
+
}
case actions.NOTIFICATIONS_PERMISSION: {
@@ -1609,11 +1614,11 @@ class WebBrowser extends LitElement {
response = false
break
}
-
+
} catch (error) {
break
}
-
+
}
case actions.SEND_LOCAL_NOTIFICATION: {
@@ -1627,10 +1632,10 @@ class WebBrowser extends LitElement {
const interval = appInfo.interval
if (lastNotification && interval) {
const timeDifference = Date.now() - lastNotification
-
+
if (timeDifference > interval) {
parentEpml.request('showNotification', {
- title, type: "qapp-local-notification", sound: '', url, options: { body: message, icon, badge: icon }
+ title, type: "qapp-local-notification", sound: '', url, options: { body: message, icon, badge: icon }
})
response = true
this.updateLastNotification(id, this.name)
@@ -1640,7 +1645,7 @@ class WebBrowser extends LitElement {
}
} else if(!lastNotification){
parentEpml.request('showNotification', {
- title, type: "qapp-local-notification", sound: '', url, options: { body: message, icon, badge: icon }
+ title, type: "qapp-local-notification", sound: '', url, options: { body: message, icon, badge: icon }
})
response = true
this.updateLastNotification(id)
@@ -1648,16 +1653,16 @@ class WebBrowser extends LitElement {
} else {
throw new Error(`invalid data`)
}
-
+
} catch (error) {
const obj = {}
const errorMsg = error.message || "error in pushing notification"
obj['error'] = errorMsg
response = JSON.stringify(obj)
break
-
+
}
-
+
}
case actions.SEND_CHAT_MESSAGE: {
const message = data.message
@@ -2045,7 +2050,7 @@ class WebBrowser extends LitElement {
try {
this.loader.show()
-
+
const resDeployAt = await this._deployAt(data.name, data.description, data.tags, data.creationBytes, data.amount, data.assetId, data.type)
response = JSON.stringify(resDeployAt)
} catch (error) {
@@ -3196,7 +3201,7 @@ class WebBrowser extends LitElement {
if(!appName) throw new Error('unknown app name')
const id = `appNotificationList-${this.selectedAddress.address}`
const checkData = localStorage.getItem(id) ? JSON.parse(localStorage.getItem(id)) : null
-
+
if (!checkData) {
const newData = {
[appName]: {
@@ -3217,7 +3222,7 @@ class WebBrowser extends LitElement {
updateLastNotification(id, appName) {
const checkData = localStorage.getItem(id) ? JSON.parse(localStorage.getItem(id)) : null
-
+
if (checkData) {
const copyData = { ...checkData }
if (copyData[appName]) {
@@ -3231,7 +3236,7 @@ class WebBrowser extends LitElement {
localStorage.setItem(id, JSON.stringify(copyData))
}
}
-
+
renderFollowUnfollowButton() {
// Only show the follow/unfollow button if we have permission to modify the list on this node
@@ -3510,7 +3515,7 @@ async function showModalAndWait(type, data) {
` : ''}
- ${type === actions.PUBLISH_MULTIPLE_QDN_RESOURCES ? `
+ ${type === actions.PUBLISH_MULTIPLE_QDN_RESOURCES ? `
${get("browserpage.bchange19")}
${get("browserpage.bchange45")}: ${data.encrypt ? true : false}
@@ -3593,7 +3598,7 @@ async function showModalAndWait(type, data) {
${get("browserpage.bchange48")}
` : ''}
-
+
${type === actions.DELETE_LIST_ITEM ? `
${get("browserpage.bchange44")}
@@ -3786,7 +3791,7 @@ const styles = `
height: 100%;
background: rgb(186 186 186 / 26%);
overflow: hidden;
- animation: backdrop_blur cubic-bezier(0.22, 1, 0.36, 1) 1s forwards;
+ animation: backdrop_blur cubic-bezier(0.22, 1, 0.36, 1) 1s forwards;
z-index: 1000000;
}
@@ -3795,7 +3800,7 @@ const styles = `
backdrop-filter: blur(0px);
background: transparent;
}
- 100% {
+ 100% {
backdrop-filter: blur(5px);
background: rgb(186 186 186 / 26%);
}
@@ -3882,7 +3887,7 @@ const styles = `
font-weight: 300;
color: var(--black);
margin: 0;
- word-wrap: break-word;
+ word-wrap: break-word;
overflow-wrap: break-word;
}
diff --git a/plugins/plugins/core/qdn/browser/computePowWorker.src.js b/plugins/plugins/core/qdn/browser/computePowWorker.src.js
index 2ed60a20..b89b9d84 100644
--- a/plugins/plugins/core/qdn/browser/computePowWorker.src.js
+++ b/plugins/plugins/core/qdn/browser/computePowWorker.src.js
@@ -1,4 +1,4 @@
-import { Sha256 } from 'asmcrypto.js'
+import {Sha256} from 'asmcrypto.js'
function sbrk(size, heap){
@@ -39,7 +39,7 @@ const computePow = async (chatBytes, path, difficulty) => {
const hashAry = new Uint8Array(memory.buffer, hashPtr, 32);
hashAry.set(chatBytesHash);
-
+
const workBufferLength = 8 * 1024 * 1024;
const workBufferPtr = sbrk(workBufferLength, heap);
@@ -72,11 +72,11 @@ loadWebAssembly(path)
}
resolve()
-
+
});
- })
+ })
return response
-}
\ No newline at end of file
+}
diff --git a/plugins/plugins/core/qdn/browser/computePowWorkerFile.src.js b/plugins/plugins/core/qdn/browser/computePowWorkerFile.src.js
index d9f5f662..b8bd962d 100644
--- a/plugins/plugins/core/qdn/browser/computePowWorkerFile.src.js
+++ b/plugins/plugins/core/qdn/browser/computePowWorkerFile.src.js
@@ -1,5 +1,4 @@
-import { Sha256 } from 'asmcrypto.js'
-
+import {Sha256} from 'asmcrypto.js'
function sbrk(size, heap){
@@ -19,7 +18,7 @@ function sbrk(size, heap){
self.addEventListener('message', async e => {
const response = await computePow(e.data.convertedBytes, e.data.path)
postMessage(response)
-
+
})
@@ -79,14 +78,14 @@ loadWebAssembly(path)
.then(wasmModule => {
response = {
nonce : wasmModule.exports.compute2(hashPtr, workBufferPtr, workBufferLength, difficulty),
-
+
}
resolve()
-
+
});
- })
+ })
return response
-}
\ No newline at end of file
+}
diff --git a/plugins/plugins/core/qdn/data-management/data-management.src.js b/plugins/plugins/core/qdn/data-management/data-management.src.js
index 1bcc2d13..d237f0c2 100644
--- a/plugins/plugins/core/qdn/data-management/data-management.src.js
+++ b/plugins/plugins/core/qdn/data-management/data-management.src.js
@@ -1,13 +1,8 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../../epml'
+import {css, html, LitElement} from 'lit'
+import {render} from 'lit/html.js'
+import {Epml} from '../../../../epml'
import isElectron from 'is-electron'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
-
-registerTranslateConfig({
- loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
-})
-
+import {get, registerTranslateConfig, translate, use} from 'lit-translate'
import '@material/mwc-button'
import '@material/mwc-dialog'
import '@material/mwc-icon'
@@ -18,6 +13,10 @@ import '@vaadin/icon'
import '@vaadin/icons'
import '@vaadin/text-field'
+registerTranslateConfig({
+ loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
+})
+
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
class DataManagement extends LitElement {
diff --git a/plugins/plugins/core/qdn/publish/publish.src.js b/plugins/plugins/core/qdn/publish/publish.src.js
index fd720190..0d292a6c 100644
--- a/plugins/plugins/core/qdn/publish/publish.src.js
+++ b/plugins/plugins/core/qdn/publish/publish.src.js
@@ -1,20 +1,18 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../../epml'
+import {css, html, LitElement} from 'lit'
+import {Epml} from '../../../../epml'
import isElectron from 'is-electron'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
-
-registerTranslateConfig({
- loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
-})
-
+import {get, registerTranslateConfig, translate, use} from 'lit-translate'
import '@material/mwc-button'
import '@material/mwc-textfield'
import '@material/mwc-select'
import '@material/mwc-dialog'
import '@material/mwc-list/mwc-list-item.js'
import '@polymer/paper-progress/paper-progress.js'
-import { modalHelper } from '../../../utils/publish-modal'
+import {modalHelper} from '../../../utils/publish-modal'
+
+registerTranslateConfig({
+ loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
+})
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@@ -315,7 +313,7 @@ class PublishData extends LitElement {
this.feeDialogNo(e, false, false)}" class="red">
${translate("general.no")}
-
this.feeDialogYes(e, false, true)}" class="green">
+ this.feeDialogYes(e, false, true)}" class="green">
${translate("general.yes")}
@@ -479,12 +477,12 @@ class PublishData extends LitElement {
);
if (res.action !== 'accept') throw new Error('User declined publish')
}
-
+
this.publishData(registeredName, path, file, service, identifier, preview, fee)
} catch (error) {
this.shadowRoot.querySelector('#publishWithFeeDialog').close()
}
-
+
}
}
@@ -571,7 +569,7 @@ class PublishData extends LitElement {
if (fee) {
let err9string = get("publishpage.pchange26")
this.generalMessage = `${err9string}`
-
+
} else {
let err9string = get("publishpage.pchange22")
this.generalMessage = `${err9string}`
@@ -699,7 +697,7 @@ class PublishData extends LitElement {
})
} else {
const nonce = window.parent.computePow(hashPtr, workBufferPtr, workBufferLength, difficulty)
-
+
response = await parentEpml.request('sign_arbitrary', {
nonce: this.selectedAddress.nonce,
arbitraryBytesBase58: transactionBytesBase58,
diff --git a/plugins/plugins/core/qdn/websites.src.js b/plugins/plugins/core/qdn/websites.src.js
index 0e501e2a..9065348a 100644
--- a/plugins/plugins/core/qdn/websites.src.js
+++ b/plugins/plugins/core/qdn/websites.src.js
@@ -1,13 +1,8 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml.js'
+import {css, html, LitElement} from 'lit'
+import {render} from 'lit/html.js'
+import {Epml} from '../../../epml.js'
import isElectron from 'is-electron'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
-
-registerTranslateConfig({
- loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
-})
-
+import {get, registerTranslateConfig, translate, use} from 'lit-translate'
import '@material/mwc-dialog'
import '@material/mwc-icon'
import '@material/mwc-button'
@@ -20,6 +15,10 @@ import '@vaadin/icon'
import '@vaadin/icons'
import '@vaadin/text-field'
+registerTranslateConfig({
+ loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
+})
+
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
class Websites extends LitElement {
diff --git a/plugins/plugins/core/qortal-lottery/qortal-lottery.src.js b/plugins/plugins/core/qortal-lottery/qortal-lottery.src.js
index 2f6adc1e..dfc06662 100644
--- a/plugins/plugins/core/qortal-lottery/qortal-lottery.src.js
+++ b/plugins/plugins/core/qortal-lottery/qortal-lottery.src.js
@@ -1,13 +1,8 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml.js'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {css, html, LitElement} from 'lit'
+import {render} from 'lit/html.js'
+import {Epml} from '../../../epml.js'
+import {get, registerTranslateConfig, translate, use} from 'lit-translate'
import isElectron from 'is-electron'
-
-registerTranslateConfig({
- loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
-})
-
import '@material/mwc-button'
import '@material/mwc-dialog'
import '@material/mwc-formfield'
@@ -22,6 +17,10 @@ import '@vaadin/icons'
import '@vaadin/grid'
import '@vaadin/text-field'
+registerTranslateConfig({
+ loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
+})
+
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
class QortalLottery extends LitElement {
@@ -998,4 +997,4 @@ class QortalLottery extends LitElement {
}
}
-window.customElements.define('qortal-lottery', QortalLottery)
\ No newline at end of file
+window.customElements.define('qortal-lottery', QortalLottery)
diff --git a/plugins/plugins/core/reward-share/reward-share.src.js b/plugins/plugins/core/reward-share/reward-share.src.js
index 12e59a25..f1e639e3 100644
--- a/plugins/plugins/core/reward-share/reward-share.src.js
+++ b/plugins/plugins/core/reward-share/reward-share.src.js
@@ -1,13 +1,8 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml.js'
+import {css, html, LitElement} from 'lit'
+import {render} from 'lit/html.js'
+import {Epml} from '../../../epml.js'
import isElectron from 'is-electron'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
-
-registerTranslateConfig({
- loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
-})
-
+import {get, registerTranslateConfig, translate, use} from 'lit-translate'
import '@material/mwc-icon'
import '@material/mwc-button'
import '@material/mwc-textfield'
@@ -16,6 +11,10 @@ import '@material/mwc-slider'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@vaadin/grid'
+registerTranslateConfig({
+ loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
+})
+
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
class RewardShare extends LitElement {
@@ -148,7 +147,7 @@ class RewardShare extends LitElement {
${this.message}
-
+
-
+
- ` : ''}
+ ` : ''}
${sponsorship.name || sponsorship.address}
@@ -159,7 +159,7 @@ class SponsorshipList extends LitElement {
@click=${() => this.removeRewardShare(sponsorship)}
>
delete_forever ${translate('rewardsharepage.rchange17')}
-
+
`)}
@@ -169,7 +169,7 @@ class SponsorshipList extends LitElement {
${translate('sponsorshipspage.schange3')}
${this.sponsorships.length}
-
+
${translate('sponsorshipspage.schange4')}
@@ -240,7 +240,7 @@ class SponsorshipList extends LitElement {
-
+
-
+
`
}
@@ -1308,7 +1307,7 @@ class TradePortal extends LitElement {
${this.renderTradeLockButton()}
-
+
@@ -1455,7 +1454,7 @@ class TradePortal extends LitElement {
}
disconnectedCallback() {
-
+
super.disconnectedCallback();
if(this.intervalID){
clearInterval(this.intervalID);
@@ -2175,7 +2174,7 @@ class TradePortal extends LitElement {
this._historicTradesGrid.clearCache()
}
this.listedCoins.get(offer.foreignBlockchain).tradeOffersSocketCounter > 1 ? addNewHistoricTrade() : null
-
+
}
} catch(e) {
console.log("Error processing redeemed trade offer from "+offer.foreignBlockchain)
@@ -2185,7 +2184,7 @@ class TradePortal extends LitElement {
processTradingTrade(offer) {
try {
if (this.listedCoins.get(offer.foreignBlockchain).name!='') {
-
+
if (offer.qortalCreator === this.selectedAddress.address && this.listedCoins.get(offer.foreignBlockchain).tradeOffersSocketCounter > 1) {
this.updateWalletBalance()
}
@@ -2205,7 +2204,7 @@ class TradePortal extends LitElement {
processRefundedTrade(offer) {
try {
if (this.listedCoins.get(offer.foreignBlockchain).name!='') {
-
+
if (offer.qortalCreator === this.selectedAddress.address) {
if (this.listedCoins.get(offer.foreignBlockchain).tradeOffersSocketCounter > 1) {
this.updateWalletBalance()
@@ -2223,7 +2222,7 @@ class TradePortal extends LitElement {
processCancelledTrade(offer) {
try {
if (this.listedCoins.get(offer.foreignBlockchain).name!='') {
-
+
if (offer.qortalCreator === this.selectedAddress.address) {
if (this.listedCoins.get(offer.foreignBlockchain).tradeOffersSocketCounter > 1) {
this.updateWalletBalance()
@@ -3342,4 +3341,4 @@ class TradePortal extends LitElement {
}
}
-window.customElements.define('trade-portal', TradePortal)
\ No newline at end of file
+window.customElements.define('trade-portal', TradePortal)
diff --git a/plugins/plugins/core/wallet/wallet-app.src.js b/plugins/plugins/core/wallet/wallet-app.src.js
index eb66288e..f712cde0 100644
--- a/plugins/plugins/core/wallet/wallet-app.src.js
+++ b/plugins/plugins/core/wallet/wallet-app.src.js
@@ -1,15 +1,10 @@
-import { LitElement, html, css } from 'lit'
-import { render } from 'lit/html.js'
-import { Epml } from '../../../epml.js'
+import {css, html, LitElement} from 'lit'
+import {render} from 'lit/html.js'
+import {Epml} from '../../../epml.js'
import isElectron from 'is-electron'
-import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate'
+import {get, registerTranslateConfig, translate, use} from 'lit-translate'
import Base58 from '../../../../crypto/api/deps/Base58.js'
-import { encryptData, decryptData } from '../../../../core/src/lockScreen.js'
-
-registerTranslateConfig({
- loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
-})
-
+import {decryptData, encryptData} from '../../../../core/src/lockScreen.js'
import FileSaver from 'file-saver'
import '../components/ButtonIconCopy.js'
import '../components/QortalQrcodeGenerator.js'
@@ -35,6 +30,10 @@ import '@vaadin/icon'
import '@vaadin/icons'
import '@vaadin/password-field'
+registerTranslateConfig({
+ loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
+})
+
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
const coinsNames = ['qort', 'btc', 'ltc', 'doge', 'dgb', 'rvn', 'arrr']
@@ -911,7 +910,7 @@ class MultiWallet extends LitElement {
default:
break
}
-
+
}
render() {
@@ -988,7 +987,7 @@ class MultiWallet extends LitElement {
-
+
${this.loading ? html`
` : ''}
@@ -2871,7 +2870,7 @@ class MultiWallet extends LitElement {
}
firstUpdated() {
-
+
this.changeTheme()
this.changeLanguage()
this.paymentFee()
@@ -2987,7 +2986,7 @@ class MultiWallet extends LitElement {
}
}
-
+
pingCoinBalancesController(){
if(!this._selectedWallet) return
const customEvent = new CustomEvent('ping-coin-controller-with-coin', {
@@ -3003,7 +3002,7 @@ class MultiWallet extends LitElement {
}
disconnectedCallback() {
-
+
super.disconnectedCallback();
if(this.intervalID){
clearInterval(this.intervalID);
diff --git a/plugins/plugins/utils/getUserNameFromAddress.js b/plugins/plugins/utils/getUserNameFromAddress.js
index 1d8bf688..be8a3d69 100644
--- a/plugins/plugins/utils/getUserNameFromAddress.js
+++ b/plugins/plugins/utils/getUserNameFromAddress.js
@@ -1,5 +1,4 @@
-import { Epml } from '../../epml.js';
-import { cropAddress } from './cropAddress.js';
+import {Epml} from '../../epml.js';
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@@ -18,4 +17,4 @@ export const getUserNameFromAddress = async (address) => {
} catch (error) {
console.error(error);
}
-}
\ No newline at end of file
+}
diff --git a/plugins/plugins/utils/publish-modal.js b/plugins/plugins/utils/publish-modal.js
index b55af509..7a040aec 100644
--- a/plugins/plugins/utils/publish-modal.js
+++ b/plugins/plugins/utils/publish-modal.js
@@ -1,4 +1,4 @@
-import { get } from 'lit-translate';
+import {get} from 'lit-translate';
export class ModalHelper {
constructor() {
@@ -11,7 +11,7 @@ export class ModalHelper {
const nodeUrl = `${myNode.protocol}://${myNode.domain}:${myNode.port}`;
const url = `${nodeUrl}/transactions/unitfee?txType=ARBITRARY×tamp=${timestamp}`;
const response = await fetch(url);
-
+
if (!response.ok) {
throw new Error('Error when fetching arbitrary fee');
}
@@ -103,7 +103,7 @@ export class ModalHelper {
--mdc-checkbox-disabled-color: var(--black);
--mdc-checkbox-ink-color: var(--black);
}
-
+
.backdrop {
position: fixed;
top: 0;
@@ -112,21 +112,21 @@ export class ModalHelper {
height: 100%;
background: rgb(186 186 186 / 26%);
overflow: hidden;
- animation: backdrop_blur cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
+ animation: backdrop_blur cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
z-index: 1000000;
}
-
+
@keyframes backdrop_blur {
0% {
backdrop-filter: blur(0px);
background: transparent;
}
- 100% {
+ 100% {
backdrop-filter: blur(5px);
background: rgb(186 186 186 / 26%);
}
}
-
+
@keyframes modal_transition {
0% {
visibility: hidden;
@@ -137,7 +137,7 @@ export class ModalHelper {
opacity: 1;
}
}
-
+
.modal {
position: relative;
display: flex;
@@ -148,7 +148,7 @@ export class ModalHelper {
animation: 0.1s cubic-bezier(0.22, 1, 0.36, 1) 0s 1 normal forwards running modal_transition;
z-index: 1000001;
}
-
+
@keyframes modal_transition {
0% {
visibility: hidden;
@@ -159,7 +159,7 @@ export class ModalHelper {
opacity: 1;
}
}
-
+
.modal-content {
background-color: var(--white);
border-radius: 10px;
@@ -171,11 +171,11 @@ export class ModalHelper {
flex-direction: column;
justify-content: space-between;
}
-
+
.modal-body {
padding: 25px;
}
-
+
.modal-subcontainer {
color: var(--black);
display: flex;
@@ -183,7 +183,7 @@ export class ModalHelper {
align-items: flex-start;
gap: 15px;
}
-
+
.modal-subcontainer-error {
color: var(--black);
display: flex;
@@ -191,7 +191,7 @@ export class ModalHelper {
align-items: center;
gap: 15px;
}
-
+
.modal-paragraph-error {
font-family: Roboto, sans-serif;
font-size: 20px;
@@ -200,7 +200,7 @@ export class ModalHelper {
color: var(--black);
margin: 0;
}
-
+
.modal-paragraph {
font-family: Roboto, sans-serif;
font-size: 18px;
@@ -208,14 +208,14 @@ export class ModalHelper {
font-weight: 300;
color: var(--black);
margin: 0;
- word-wrap: break-word;
+ word-wrap: break-word;
overflow-wrap: break-word;
}
-
+
.capitalize-first {
text-transform: capitalize;
}
-
+
.checkbox-row {
display: flex;
align-items: center;
@@ -223,13 +223,13 @@ export class ModalHelper {
font-weight: 600;
color: var(--black);
}
-
+
.modal-buttons {
display: flex;
justify-content: space-between;
margin-top: 20px;
}
-
+
.modal-buttons button {
background-color: #4caf50;
border: none;
@@ -239,15 +239,15 @@ export class ModalHelper {
cursor: pointer;
transition: background-color 0.2s;
}
-
+
.modal-buttons button:hover {
background-color: #3e8e41;
}
-
+
#cancel-button {
background-color: #f44336;
}
-
+
#cancel-button:hover {
background-color: #d32f2f;
}
@@ -267,4 +267,4 @@ export class ModalHelper {
}
}
-export const modalHelper = ModalHelper.getInstance();
\ No newline at end of file
+export const modalHelper = ModalHelper.getInstance();
diff --git a/plugins/plugins/utils/warning-modal.js b/plugins/plugins/utils/warning-modal.js
index 7bda31cd..88fdd88b 100644
--- a/plugins/plugins/utils/warning-modal.js
+++ b/plugins/plugins/utils/warning-modal.js
@@ -1,4 +1,4 @@
-import { get } from 'lit-translate';
+import {get} from 'lit-translate';
export class WarningModal {
constructor() {
@@ -24,7 +24,7 @@ export class WarningModal {
-
${data.message}
+
${data.message}
@@ -84,7 +84,7 @@ export class WarningModal {
--mdc-checkbox-disabled-color: var(--black);
--mdc-checkbox-ink-color: var(--black);
}
-
+
.backdrop {
position: fixed;
top: 0;
@@ -93,21 +93,21 @@ export class WarningModal {
height: 100%;
background: rgb(186 186 186 / 26%);
overflow: hidden;
- animation: backdrop_blur cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
+ animation: backdrop_blur cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
z-index: 1000000;
}
-
+
@keyframes backdrop_blur {
0% {
backdrop-filter: blur(0px);
background: transparent;
}
- 100% {
+ 100% {
backdrop-filter: blur(5px);
background: rgb(186 186 186 / 26%);
}
}
-
+
@keyframes modal_transition {
0% {
visibility: hidden;
@@ -118,7 +118,7 @@ export class WarningModal {
opacity: 1;
}
}
-
+
.modal {
position: relative;
display: flex;
@@ -129,7 +129,7 @@ export class WarningModal {
animation: 0.1s cubic-bezier(0.22, 1, 0.36, 1) 0s 1 normal forwards running modal_transition;
z-index: 1000001;
}
-
+
@keyframes modal_transition {
0% {
visibility: hidden;
@@ -140,7 +140,7 @@ export class WarningModal {
opacity: 1;
}
}
-
+
.modal-content {
background-color: var(--white);
border-radius: 10px;
@@ -152,11 +152,11 @@ export class WarningModal {
flex-direction: column;
justify-content: space-between;
}
-
+
.modal-body {
padding: 25px;
}
-
+
.modal-subcontainer {
color: var(--black);
display: flex;
@@ -164,7 +164,7 @@ export class WarningModal {
align-items: flex-start;
gap: 15px;
}
-
+
.modal-subcontainer-error {
color: var(--black);
display: flex;
@@ -172,7 +172,7 @@ export class WarningModal {
align-items: center;
gap: 15px;
}
-
+
.modal-paragraph-error {
font-family: Roboto, sans-serif;
font-size: 20px;
@@ -181,7 +181,7 @@ export class WarningModal {
color: var(--black);
margin: 0;
}
-
+
.modal-paragraph {
font-family: Roboto, sans-serif;
font-size: 18px;
@@ -189,14 +189,14 @@ export class WarningModal {
font-weight: 300;
color: var(--black);
margin: 0;
- word-wrap: break-word;
+ word-wrap: break-word;
overflow-wrap: break-word;
}
-
+
.capitalize-first {
text-transform: capitalize;
}
-
+
.checkbox-row {
display: flex;
align-items: center;
@@ -204,13 +204,13 @@ export class WarningModal {
font-weight: 600;
color: var(--black);
}
-
+
.modal-buttons {
display: flex;
justify-content: space-between;
margin-top: 20px;
}
-
+
.modal-buttons button {
background-color: #4caf50;
border: none;
@@ -220,15 +220,15 @@ export class WarningModal {
cursor: pointer;
transition: background-color 0.2s;
}
-
+
.modal-buttons button:hover {
background-color: #3e8e41;
}
-
+
#cancel-button {
background-color: #f44336;
}
-
+
#cancel-button:hover {
background-color: #d32f2f;
}
@@ -240,7 +240,7 @@ export class WarningModal {
document.adoptedStyleSheets = [styleSheet];
}
-
+
static getInstance() {
if (!WarningModal.instance) {
WarningModal.instance = new WarningModal();
@@ -249,4 +249,4 @@ export class WarningModal {
}
}
-export const warningModal = WarningModal.getInstance();
\ No newline at end of file
+export const warningModal = WarningModal.getInstance();