Update deps and upgrade to latest vaadin. Minor fixes

This commit is contained in:
AlphaX-Projects 2022-02-19 03:23:59 -08:00 committed by GitHub
parent 4f5d3ad138
commit fcdd4c99ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 3782 additions and 3900 deletions

View File

@ -15,10 +15,10 @@ const aliases = {
const generateRollupConfig = (inputFile, outputFile) => {
return {
inputOptions: {
onwarn: (warning, rollupWarn) => {
if (warning.code !== "CIRCULAR_DEPENDENCY") {
rollupWarn(warning);
}
onwarn(warning, warn) {
if (warning.code === 'THIS_IS_UNDEFINED') return;
if (warning.code !== 'CIRCULAR_DEPENDENCY') throw new Error(warning.message);
warn(warning);
},
input: inputFile,
plugins: [

View File

@ -22,7 +22,7 @@
"emoji-picker-js": "https://github.com/Qortal/emoji-picker-js"
},
"devDependencies": {
"@babel/core": "^7.17.2",
"@babel/core": "^7.17.5",
"@github/time-elements": "^3.1.2",
"@material/mwc-button": "^0.25.3",
"@material/mwc-dialog": "^0.25.3",
@ -39,11 +39,11 @@
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-replace": "^3.1.0",
"@vaadin/vaadin-grid": "^5.9.3",
"@vaadin/grid": "^22.0.5",
"epml": "^0.3.3",
"html-escaper": "^3.0.3",
"lit": "^2.1.3",
"rollup": "^2.67.2",
"lit": "^2.2.0",
"rollup": "^2.67.3",
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-progress": "^1.1.2",
"rollup-plugin-terser": "^7.0.2"

View File

@ -2,11 +2,9 @@ import { LitElement, html, css } from 'lit'
import { Epml } from '../../../epml.js'
import { escape, unescape } from 'html-escaper';
import { inputKeyCodes } from '../../utils/keyCodes.js';
import { inputKeyCodes } from '../../utils/keyCodes.js'
import './ChatScroller.js'
import './TimeAgo.js'
import { EmojiPicker } from 'emoji-picker-js';
import '@polymer/paper-spinner/paper-spinner-lite.js'

View File

@ -46,7 +46,6 @@ class TimeAgo extends LitElement {
}
firstUpdated() {
// ...
}
}

View File

@ -1,7 +1,6 @@
import { LitElement, html, css } from 'lit'
import { Epml } from '../../../epml.js'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
class ToolTip extends LitElement {
@ -92,7 +91,6 @@ class ToolTip extends LitElement {
})
parentEpml.subscribe('config', c => {
if (!configLoaded) {
// setTimeout(getGroupIdFromURL, 1)
configLoaded = true
}
this.config = JSON.parse(c)

View File

@ -6,11 +6,9 @@ import '@material/mwc-icon'
import '@material/mwc-button'
import '@material/mwc-textfield'
import '@material/mwc-dialog'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@vaadin/vaadin-grid/vaadin-grid.js'
import '@vaadin/vaadin-grid/theme/material/all-imports.js'
import '@vaadin/grid/vaadin-grid.js'
import '@vaadin/grid/theme/material/all-imports.js'
import '@github/time-elements'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@ -143,7 +141,7 @@ class GroupManagement extends LitElement {
<div class="divCard">
<h3 style="margin: 0; margin-bottom: 1em; text-align: center;">Your Joined Groups</h3>
<vaadin-grid id="joinedGroupsGrid" style="height:auto;" ?hidden="${this.isEmptyArray(this.joinedGroups)}" aria-label="Joined Groups" .items="${this.joinedGroups}" height-by-rows>
<vaadin-grid theme="compact" id="joinedGroupsGrid" ?hidden="${this.isEmptyArray(this.joinedGroups)}" .items="${this.joinedGroups}" aria-label="Joined Groups" all-rows-visible>
<vaadin-grid-column header="Name" path="groupName"></vaadin-grid-column>
<vaadin-grid-column header="Description" path="description"></vaadin-grid-column>
<vaadin-grid-column width="9.8rem" flex-grow="0" header="Role" .renderer=${(root, column, data) => {
@ -160,7 +158,7 @@ class GroupManagement extends LitElement {
<div class="divCard">
<h3 style="margin: 0; margin-bottom: 1em; text-align: center;">Public Groups</h3>
<vaadin-grid id="publicGroupsGrid" style="height:auto;" ?hidden="${this.isEmptyArray(this.publicGroups)}" aria-label="Public Open Groups" .items="${this.publicGroups}" height-by-rows>
<vaadin-grid theme="compact" id="publicGroupsGrid" ?hidden="${this.isEmptyArray(this.publicGroups)}" .items="${this.publicGroups}" aria-label="Public Open Groups" all-rows-visible>
<vaadin-grid-column path="groupName"></vaadin-grid-column>
<vaadin-grid-column header="Description" path="description"></vaadin-grid-column>
<vaadin-grid-column path="owner"></vaadin-grid-column>

View File

@ -1,19 +1,8 @@
import { LitElement, html, css } from 'lit'
// import { render } from 'lit/html.js'
// import { Epml } from '../../../src/epml.js'
import { Epml } from '../../../../epml.js'
import '@polymer/paper-spinner/paper-spinner-lite.js'
// import * as thing from 'time-elements'
// import '@vaadin/vaadin-grid/vaadin-grid.js'
// import '@vaadin/vaadin-grid/theme/material/all-imports.js'
// import '@material/mwc-icon'
// import '@material/mwc-textfield'
// import '@material/mwc-button'
// import '@material/mwc-dialog'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
class GroupTransaction extends LitElement {
@ -75,7 +64,6 @@ class GroupTransaction extends LitElement {
}
.group-transaction-card {
/* margin:12px; */
padding:12px 24px;
background:#fff;
border-radius:2px;
@ -132,121 +120,16 @@ class GroupTransaction extends LitElement {
render() {
return html`
<div id="group-transaction-page">
<div class="group-transaction-card">
<h2>Group Transaction</h2>
<p>${this.addMintingAccountMessage}</p>
</div>
</div>
`
}
// getMintingAccountGrid() {
// const myGrid = this.shadowRoot.querySelector('#mintingAccountsGrid')
// myGrid.addEventListener('click', (e) => {
// this.tempMintingAccount = myGrid.getEventContext(e).item
// this.shadowRoot.querySelector('#removeMintingAccountDialog').show()
// })
// }
// addPeer(e) {
// this.addPeerLoading = true
// const addPeerAddress = this.shadowRoot.querySelector('#addPeerAddress').value
// parentEpml.request('apiCall', {
// url: `/peers`,
// method: 'POST',
// body: addPeerAddress
// }).then(res => {
// this.addPeerMessage = res.message
// this.addPeerLoading = false
// })
// }
// addMintingAccount(e) {
// this.addMintingAccountLoading = true
// this.addMintingAccountMessage = "Loading..."
// this.addMintingAccountKey = this.shadowRoot.querySelector('#addMintingAccountKey').value
// parentEpml.request('apiCall', {
// url: `/admin/mintingaccounts`,
// method: 'POST',
// body: this.addMintingAccountKey
// }).then(res => {
// if (res === true) {
// this.updateMintingAccounts()
// this.addMintingAccountKey = ''
// this.addMintingAccountMessage = 'Minting Node Added Successfully!'
// this.addMintingAccountLoading = false
// } else {
// this.addMintingAccountKey = ''
// this.addMintingAccountMessage = 'Failed to Add Minting Node!' // Corrected an error here thanks to crow (-_-)
// this.addMintingAccountLoading = false
// }
// })
// }
// updateMintingAccounts() {
// parentEpml.request('apiCall', {
// url: `/admin/mintingaccounts`
// }).then(res => {
// this.mintingAccounts = []
// setTimeout(() => { this.mintingAccounts = res }, 1)
// })
// // setTimeout(updateMintingAccounts, this.config.user.nodeSettings.pingInterval) // Perhaps should be slower...?
// }
// removeMintingAccount(e) {
// this.removeMintingAccountLoading = true
// this.removeMintingAccountMessage = "Loading..."
// this.removeMintingAccountKey = this.shadowRoot.querySelector('#removeMintingAccountKey').value
// this.mintingAccounts.forEach(mintingAccount => {
// if (this.tempMintingAccount.recipientAccount === mintingAccount.recipientAccount) {
// parentEpml.request('apiCall', {
// url: `/admin/mintingaccounts`,
// method: 'DELETE',
// body: this.removeMintingAccountKey
// }).then(res => {
// if (res === true) {
// this.updateMintingAccounts()
// this.removeMintingAccountKey = ''
// this.removeMintingAccountMessage = 'Minting Node Removed Successfully!'
// this.removeMintingAccountLoading = false
// } else {
// this.removeMintingAccountKey = ''
// this.removeMintingAccountMessage = 'Failed to Remove Minting Node!'
// this.removeMintingAccountLoading = false
// }
// })
// }
// })
// }
firstUpdated() {
// Call getMintingAccountGrid
// this.getMintingAccountGrid()
// Call updateMintingAccounts
// this.updateMintingAccounts()
const getGroupIdFromURL = () => {
let tempUrl = document.location.href
let decodeTempUrl = decodeURI(tempUrl)
@ -276,7 +159,6 @@ class GroupTransaction extends LitElement {
})
})
parentEpml.imReady()
}

View File

@ -4,6 +4,30 @@
<head>
<link rel="stylesheet" href="/font/material-icons.css">
<style>
html {
--scrollbarBG: #a1a1a1;
--thumbBG: #6a6c75;
}
*::-webkit-scrollbar {
width: 11px;
}
* {
scrollbar-width: thin;
scrollbar-color: var(--thumbBG) var(--scrollbarBG);
}
*::-webkit-scrollbar-track {
background: var(--scrollbarBG);
}
*::-webkit-scrollbar-thumb {
background-color: var(--thumbBG);
border-radius: 6px;
border: 3px solid var(--scrollbarBG);
}
html,
body {
margin: 0;
@ -15,7 +39,6 @@
<body>
<group-transaction></group-transaction>
<script src="group-transaction.js"></script>
</body>

View File

@ -39,7 +39,6 @@
<body>
<group-management></group-management>
<script src="group-management.js"></script>
</body>

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@ import { LitElement, html, css } from 'lit'
class ChainMessaging extends LitElement {
static get properties() {
return {
loading: { type: Boolean },
loading: { type: Boolean }
}
}
@ -30,13 +30,11 @@ class ChainMessaging extends LitElement {
constructor() {
super()
// ...
}
render() {
return html`
<div id="chain-messaging-page">
<h2 style="text-align: center; margin-top: 3rem;">Coming Soon!</h2>
</div>
`

View File

@ -28,6 +28,7 @@
border: 3px solid var(--scrollbarBG);
}
html,
body {
margin: 0;
font-family: "Roboto", sans-serif;
@ -38,7 +39,6 @@
<body>
<q-messaging></q-messaging>
<script src="messaging.js"></script>
</body>

View File

@ -40,7 +40,6 @@ class Messaging extends LitElement {
color: rgb(3, 169, 244);
margin-top: .5rem;
font-weight: 400;
/* font-size: 19px; */
text-align: center;
}
@ -60,7 +59,6 @@ class Messaging extends LitElement {
.divCard {
border: 1px solid #eee;
padding: 1em;
/** box-shadow: 0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 2px 0 rgba(0,0,0,0.20); **/
box-shadow: 0 .3px 1px 0 rgba(0,0,0,0.14), 0 1px 1px -1px rgba(0,0,0,0.12), 0 1px 2px 0 rgba(0,0,0,0.20);
margin-bottom: 1.5rem;
}

View File

@ -33,14 +33,13 @@
margin: 0;
font-family: "Roboto", sans-serif;
background-color: #fff;
overflow: hidden;
}
</style>
</head>
<body>
<q-chat></q-chat>
<script type="module" src="q-chat.js"></script>
<script src="q-chat.js"></script>
</body>
</html>

View File

@ -2,13 +2,10 @@ import { LitElement, html, css } from 'lit'
import { render } from 'lit/html.js'
import { Epml } from '../../../../epml.js'
// Components
import '../../components/ChatWelcomePage.js'
import '../../components/ChatHead.js'
import '../../components/ChatPage.js'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@material/mwc-icon'
import '@material/mwc-button'
import '@material/mwc-dialog'
@ -300,7 +297,6 @@ class Chat extends LitElement {
<span style="flex: 1;">New Message</span>
<span>(Click to scroll down) <mwc-icon style="font-size: 16px; vertical-align: bottom;">keyboard_arrow_down</mwc-icon></span>
</div>
<div class="chat-history">
${window.parent.location.pathname !== "/app/q-chat" ? html`${this.renderChatPage(this.chatId)}` : html`${this.renderChatWelcomePage()}`}
</div>
@ -474,9 +470,7 @@ class Chat extends LitElement {
})
parentEpml.subscribe('chat_heads', chatHeads => {
chatHeads = JSON.parse(chatHeads)
// setTimeout(() => {
this.getChatHeadFromState(chatHeads)
// }, 5000)
})
parentEpml.request('apiCall', {
url: `/addresses/balance/${window.parent.reduxStore.getState().app.selectedAddress.address}`

View File

@ -32,7 +32,7 @@
body {
margin: 0;
font-family: "Roboto", sans-serif;
background: #fff;
background-color: #fff;
}
</style>
</head>

View File

@ -1,13 +1,13 @@
import { LitElement, html, css } from "lit";
import { render } from "lit/html.js";
import { Epml } from "../../../epml.js";
import { LitElement, html, css } from 'lit'
import { render } from 'lit/html.js'
import { Epml } from '../../../epml.js'
import "@material/mwc-icon";
import "@material/mwc-button";
import "@material/mwc-dialog";
import "@material/mwc-textfield";
import '@material/mwc-icon'
import '@material/mwc-button'
import '@material/mwc-dialog'
import '@material/mwc-textfield'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
class MintingInfo extends LitElement {
static get properties() {
@ -18,7 +18,7 @@ class MintingInfo extends LitElement {
nodeInfo: { type: Array },
sampleBlock: { type: Array },
addressInfo: { type: Array },
addressLevel: { type: Array },
addressLevel: { type: Array }
}
}

View File

@ -32,14 +32,14 @@
body {
margin: 0;
font-family: "Roboto", sans-serif;
background: #fff;
background-color: #fff;
}
</style>
</head>
<body>
<name-registration></name-registration>
<script type="module" src="name-registration.js"></script>
<script src="name-registration.js"></script>
</body>
</html>

View File

@ -6,10 +6,9 @@ import '@material/mwc-icon'
import '@material/mwc-button'
import '@material/mwc-textfield'
import '@material/mwc-dialog'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@vaadin/vaadin-grid/vaadin-grid.js'
import '@vaadin/vaadin-grid/theme/material/all-imports.js'
import '@vaadin/grid/vaadin-grid.js'
import '@vaadin/grid/theme/material/all-imports.js'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@ -86,7 +85,7 @@ class NameRegistration extends LitElement {
<div class="divCard">
<h3 style="margin: 0; margin-bottom: 1em; text-align: center;">Registered Names</h3>
<vaadin-grid id="namesGrid" style="height:auto;" ?hidden="${this.isEmptyArray(this.names)}" aria-label="Names" .items="${this.names}" height-by-rows>
<vaadin-grid theme="compact" id="namesGrid" ?hidden="${this.isEmptyArray(this.names)}" aria-label="Names" .items="${this.names}" all-rows-visible>
<vaadin-grid-column width="5rem" flex-grow="0" header="Avatar" .renderer=${(root, column, data) => {
render(html`${this.renderAvatar(data.item)}`, root)
}}></vaadin-grid-column>
@ -248,7 +247,7 @@ class NameRegistration extends LitElement {
const nameInput = this.shadowRoot.getElementById("nameInput").value
const descInput = this.shadowRoot.getElementById("descInput").value
// Check for valid...^
// Check for valid...
this.registerNameLoading = true
// Get Last Ref

View File

@ -1,16 +1,16 @@
import { LitElement, html, css } from "lit";
import { LitElement, html, css } from 'lit'
import { render } from 'lit/html.js'
import { Epml } from "../../../epml.js";
import { Epml } from '../../../epml.js'
import "@polymer/paper-spinner/paper-spinner-lite.js";
import "@vaadin/vaadin-grid/vaadin-grid.js";
import "@vaadin/vaadin-grid/theme/material/all-imports.js";
import "@material/mwc-icon";
import "@material/mwc-textfield";
import "@material/mwc-button";
import "@material/mwc-dialog";
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@material/mwc-icon'
import '@material/mwc-textfield'
import '@material/mwc-button'
import '@material/mwc-dialog'
import '@vaadin/grid/vaadin-grid.js'
import '@vaadin/grid/theme/material/all-imports.js'
const parentEpml = new Epml({ type: "WINDOW", source: window.parent });
const parentEpml = new Epml({ type: "WINDOW", source: window.parent })
class NodeManagement extends LitElement {
static get properties() {
@ -31,7 +31,7 @@ class NodeManagement extends LitElement {
removeMintingAccountMessage: { type: String },
tempMintingAccount: { type: Object },
nodeConfig: { type: Object },
nodeDomain: { type: String },
nodeDomain: { type: String }
};
}
@ -72,7 +72,6 @@ class NodeManagement extends LitElement {
}
.node-card {
/* margin:12px; */
padding: 12px 24px;
background: #fff;
border-radius: 2px;
@ -95,6 +94,7 @@ class NodeManagement extends LitElement {
display: hidden !important;
visibility: none !important;
}
.details {
display: flex;
font-size: 18px;
@ -201,7 +201,7 @@ class NodeManagement extends LitElement {
</mwc-button>
</mwc-dialog>
<vaadin-grid id="mintingAccountsGrid" style="height:auto;" ?hidden="${this.isEmptyArray(this.mintingAccounts)}" aria-label="Minting Accounts" .items="${this.mintingAccounts}" height-by-rows>
<vaadin-grid theme="compact" id="mintingAccountsGrid" ?hidden="${this.isEmptyArray(this.mintingAccounts)}" .items="${this.mintingAccounts}" aria-label="Minting Accounts" all-rows-visible>
<vaadin-grid-column auto-width header="Minting Account" path="mintingAccount"></vaadin-grid-column>
<vaadin-grid-column auto-width header="Recipient Account" path="recipientAccount"></vaadin-grid-column>
<vaadin-grid-column width="12em" header="Action" .renderer=${(root, column, data) => {
@ -253,7 +253,7 @@ class NodeManagement extends LitElement {
</mwc-button>
</mwc-dialog>
<vaadin-grid id="peersGrid" style="height:auto;" ?hidden="${this.isEmptyArray(this.peers)}" aria-label="Peers" .items="${this.peers}" height-by-rows>
<vaadin-grid theme="compact" id="peersGrid" ?hidden="${this.isEmptyArray(this.peers)}" .items="${this.peers}" aria-label="Peers" all-rows-visible>
<vaadin-grid-column path="address"></vaadin-grid-column>
<vaadin-grid-column path="lastHeight"></vaadin-grid-column>
<vaadin-grid-column path="version" header="Build Version"></vaadin-grid-column>

View File

@ -32,14 +32,14 @@
body {
margin: 0;
font-family: "Roboto", sans-serif;
background: #fff;
background-color: #fff;
}
</style>
</head>
<body>
<puzzles-info></puzzles-info>
<script type="module" src="puzzles.js"></script>
<script src="puzzles.js"></script>
</body>
</html>

View File

@ -6,18 +6,17 @@ import { Epml } from '../../../epml.js'
import nacl from '../../../../qortal-ui-crypto/api/deps/nacl-fast.js'
import Base58 from '../../../../qortal-ui-crypto/api/deps/Base58.js'
import publicKeyToAddress from '../../../../qortal-ui-crypto/api/wallet/publicKeyToAddress.js'
import '@material/mwc-icon'
import '@material/mwc-button'
import '@material/mwc-textfield'
import '@material/mwc-dialog'
import '@material/mwc-slider'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@vaadin/vaadin-grid/vaadin-grid.js'
import '@vaadin/vaadin-grid/theme/material/all-imports.js'
import '@vaadin/grid/vaadin-grid.js'
import '@vaadin/grid/theme/material/all-imports.js'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
const DEFAULT_FEE = 0.001
const PAYMENT_TX_TYPE = 2
@ -85,8 +84,8 @@ class Puzzles extends LitElement {
<div style="min-height:48px; display: flex; padding-bottom: 6px;">
<h3 style="margin: 0; flex: 1; padding-top: 8px; display: inline;">Puzzles</h3>
</div>
<vaadin-grid id="puzzlesGrid" style="height:auto;" ?hidden="${this.isEmptyArray(this.puzzles)}" .items="${this.puzzles}" height-by-rows>
<div class="divCard">
<vaadin-grid theme="compact" id="puzzlesGrid" ?hidden="${this.isEmptyArray(this.puzzles)}" .items="${this.puzzles}" aria-label="Puzzles" all-rows-visible>
<vaadin-grid-column auto-width header="Reward" .renderer=${(root, column, data) => {
if (data.item.isSolved) {
render(html`<span style="font-size: smaller;">SOLVED by ${data.item.winner}</span>`, root)
@ -122,7 +121,8 @@ class Puzzles extends LitElement {
<paper-spinner-lite
style="margin-top:12px;"
?active="${this.loading}"
alt="Claiming puzzle reward"></paper-spinner-lite>
alt="Claiming puzzle reward">
</paper-spinner-lite>
</span>
<span ?hidden=${this.message === ''} style="${this.error ? 'color:red;' : ''}">
${this.message}

View File

@ -19,7 +19,7 @@ class WebBrowser extends LitElement {
service: { type: String },
identifier: { type: String },
followedNames: { type: Array },
blockedNames: { type: Array },
blockedNames: { type: Array }
}
}
@ -40,8 +40,6 @@ class WebBrowser extends LitElement {
}
#websitesWrapper .buttons {
/* --paper-button-ink-color: var(--paper-green-500);
color: var(--paper-green-500); */
width: auto !important;
}
@ -366,14 +364,13 @@ class WebBrowser extends LitElement {
const urlParams = new URLSearchParams(window.location.search);
this.name = urlParams.get('name');
this.service = urlParams.get('service');
this.identifier = null; // FUTURE: add support for identifiers
// FUTURE: add support for identifiers
this.identifier = null;
this.followedNames = []
this.blockedNames = []
const getFollowedNames = async () => {
// this.followedNames = []
let followedNames = await parentEpml.request('apiCall', {
url: `/lists/followedNames?apiKey=${this.getApiKey()}`
@ -384,7 +381,6 @@ class WebBrowser extends LitElement {
}
const getBlockedNames = async () => {
// this.blockedNames = []
let blockedNames = await parentEpml.request('apiCall', {
url: `/lists/blockedNames?apiKey=${this.getApiKey()}`

View File

@ -32,6 +32,7 @@
body {
margin: 0;
font-family: "Roboto", sans-serif;
background-color: #fff;
}
</style>
</head>

View File

@ -4,9 +4,8 @@ import { Epml } from '../../../../epml'
import '@material/mwc-icon'
import '@material/mwc-button'
import '@vaadin/vaadin-grid/vaadin-grid.js'
import '@vaadin/vaadin-grid/theme/material/all-imports.js'
import '@vaadin/grid/vaadin-grid.js'
import '@vaadin/grid/theme/material/all-imports.js'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@ -147,7 +146,7 @@ class DataManagement extends LitElement {
</div>
<div class="divCard">
<h3 style="margin: 0; margin-bottom: 1em; text-align: center;">Data hosted by this node</h3>
<vaadin-grid id="resourcesGrid" style="height:auto;" ?hidden="${this.isEmptyArray(this.datres)}" page-size="20" height-by-rows>
<vaadin-grid theme="compact" id="resourcesGrid" ?hidden="${this.isEmptyArray(this.datres)}" aria-label="Data Hosted" page-size="20" all-rows-visible>
<vaadin-grid-column header="Registered Name" path="name"></vaadin-grid-column>
<vaadin-grid-column header="Service" path="service"></vaadin-grid-column>
<vaadin-grid-column header="Identifier" .renderer=${(root, column, data) => {

View File

@ -39,7 +39,6 @@
<body>
<websites-list></websites-list>
<script src="websites.js"></script>
</body>

View File

@ -32,6 +32,7 @@
body {
margin: 0;
font-family: "Roboto", sans-serif;
background-color: #fff;
}
</style>
</head>

View File

@ -28,14 +28,12 @@ class PublishData extends LitElement {
selectedName: { type: String },
path: { type: String },
portForwardingEnabled: { type: Boolean },
//selectedAddress: { type: Object },
amount: { type: Number },
generalMessage: { type: String },
successMessage: { type: String },
errorMessage: { type: String },
loading: { type: Boolean },
btnDisable: { type: Boolean },
btnDisable: { type: Boolean }
}
}
@ -56,8 +54,6 @@ class PublishData extends LitElement {
}
#publishWrapper .buttons {
/* --paper-button-ink-color: var(--paper-green-500);
color: var(--paper-green-500); */
width: auto !important;
}
@ -417,12 +413,12 @@ class PublishData extends LitElement {
}
}
this.portForwardingEnabled = true // Default to true so the message doesn't appear and disappear quickly
// Default to true so the message doesn't appear and disappear quickly
this.portForwardingEnabled = true
this.names = []
this.registeredName = ''
this.selectedName = 'invalid'
this.path = ''
//this.selectedAddress = {}
this.successMessage = ''
this.generalMessage = ''
this.errorMessage = ''

View File

@ -5,9 +5,8 @@ import { Epml } from '../../../epml.js'
import '@material/mwc-icon'
import '@material/mwc-button'
import '@material/mwc-textfield'
import '@vaadin/vaadin-grid/vaadin-grid.js'
import '@vaadin/vaadin-grid/theme/material/all-imports.js'
import '@vaadin/grid/vaadin-grid.js'
import '@vaadin/grid/theme/material/all-imports.js'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@ -185,7 +184,7 @@ class Websites extends LitElement {
<mwc-textfield outlined label="Name To Search" id="searchName" type="text" value="${this.searchName}"></mwc-textfield>&nbsp;&nbsp;<br>
<mwc-button raised icon="search" @click="${(e) => this.doSearch(e)}">Search</mwc-button>
</div><br />
<vaadin-grid id="searchResourcesGrid" style="height:auto;" ?hidden="${this.isEmptyArray(this.searchResources)}" .items="${this.searchResources}" height-by-rows>
<vaadin-grid theme="compact" id="searchResourcesGrid" ?hidden="${this.isEmptyArray(this.searchResources)}" .items="${this.searchResources}" aria-label="Search Websites" all-rows-visible>
<vaadin-grid-column width="5rem" flex-grow="0" header="Avatar" .renderer=${(root, column, data) => {
render(html`${this.renderSearchAvatar(data.item)}`, root)
}}></vaadin-grid-column>
@ -205,8 +204,10 @@ class Websites extends LitElement {
render(html`${this.renderSearchBlockUnblockButton(data.item)}`, root);
}}></vaadin-grid-column>
</vaadin-grid><br />
</div>
<div class="divCard">
<h3 style="margin: 0; margin-bottom: 1em; text-align: center;">Websites</h3>
<vaadin-grid id="resourcesGrid" style="height:auto;" ?hidden="${this.isEmptyArray(this.resources)}" page-size="20" height-by-rows>
<vaadin-grid theme="compact" id="resourcesGrid" ?hidden="${this.isEmptyArray(this.resources)}" aria-label="Websites" page-size="20" all-rows-visible>
<vaadin-grid-column width="5rem" flex-grow="0" header="Avatar" .renderer=${(root, column, data) => {
render(html`${this.renderAvatar(data.item)}`, root)
}}></vaadin-grid-column>
@ -246,7 +247,7 @@ class Websites extends LitElement {
})
this.followedNames = followedNames
setTimeout(getFollowedNames, this.config.user.nodeSettings.pingInterval)
setTimeout(getFollowedNames, 60000)
}
const getBlockedNames = async () => {
@ -255,7 +256,7 @@ class Websites extends LitElement {
})
this.blockedNames = blockedNames
setTimeout(getBlockedNames, this.config.user.nodeSettings.pingInterval)
setTimeout(getBlockedNames, 60000)
}
const getSearchFollowedNames = async () => {
@ -264,7 +265,7 @@ class Websites extends LitElement {
})
this.searchFollowedNames = searchFollowedNames
setTimeout(getSearchFollowedNames, this.config.user.nodeSettings.pingInterval)
setTimeout(getSearchFollowedNames, 60000)
}
const getSearchBlockedNames = async () => {
@ -273,7 +274,7 @@ class Websites extends LitElement {
})
this.searchBlockedNames = searchBlockedNames
setTimeout(getSearchBlockedNames, this.config.user.nodeSettings.pingInterval)
setTimeout(getSearchBlockedNames, 60000)
}
const getRelayMode = async () => {
@ -282,7 +283,7 @@ class Websites extends LitElement {
})
this.relayMode = relayMode;
setTimeout(getRelayMode, this.config.user.nodeSettings.pingInterval)
setTimeout(getRelayMode, 60000)
}
@ -318,7 +319,7 @@ class Websites extends LitElement {
setTimeout(getSearchFollowedNames, 1)
setTimeout(getSearchBlockedNames, 1)
setTimeout(getRelayMode, 1)
setInterval(this.getArbitraryResources, 120 * 1000)
setInterval(this.getArbitraryResources, 120000)
configLoaded = true
}
this.config = JSON.parse(c)

View File

@ -32,14 +32,14 @@
body {
margin: 0;
font-family: "Roboto", sans-serif;
background: #fff;
background-color: #fff;
}
</style>
</head>
<body>
<reward-share></reward-share>
<script type="module" src="reward-share.js"></script>
<script src="reward-share.js"></script>
</body>
</html>

View File

@ -7,10 +7,9 @@ import '@material/mwc-button'
import '@material/mwc-textfield'
import '@material/mwc-dialog'
import '@material/mwc-slider'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@vaadin/vaadin-grid/vaadin-grid.js'
import '@vaadin/vaadin-grid/theme/material/all-imports.js'
import '@vaadin/grid/vaadin-grid.js'
import '@vaadin/grid/theme/material/all-imports.js'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@ -43,6 +42,12 @@ class RewardShare extends LitElement {
padding: 12px 24px;
}
.divCard {
border: 1px solid #eee;
padding: 1em;
box-shadow: 0 .3px 1px 0 rgba(0,0,0,0.14), 0 1px 1px -1px rgba(0,0,0,0.12), 0 1px 2px 0 rgba(0,0,0,0.20);
}
h2 {
margin:0;
}
@ -73,11 +78,13 @@ class RewardShare extends LitElement {
return html`
<div id="reward-share-page">
<div style="min-height:48px; display: flex; padding-bottom: 6px;">
<h3 style="margin: 0; flex: 1; padding-top: 8px; display: inline;">Rewardshares involving this account</h3>
<h3 style="margin: 0; flex: 1; padding-top: 8px; display: inline;">Rewardshares</h3>
<mwc-button style="float:right;" @click=${() => this.shadowRoot.querySelector('#createRewardShareDialog').show()}><mwc-icon>add</mwc-icon>Create reward share</mwc-button>
</div>
<vaadin-grid id="accountRewardSharesGrid" style="height:auto;" ?hidden="${this.isEmptyArray(this.rewardShares)}" .items="${this.rewardShares}" height-by-rows>
<div class="divCard">
<h3 style="margin: 0; margin-bottom: 1em; text-align: center;">Rewardshares Involving In This Account</h3>
<vaadin-grid theme="compact" id="accountRewardSharesGrid" ?hidden="${this.isEmptyArray(this.rewardShares)}" .items="${this.rewardShares}" all-rows-visible>
<vaadin-grid-column auto-width path="mintingAccount"></vaadin-grid-column>
<vaadin-grid-column auto-width path="sharePercent"></vaadin-grid-column>
<vaadin-grid-column auto-width path="recipient"></vaadin-grid-column>
@ -85,6 +92,7 @@ class RewardShare extends LitElement {
render(html`${this.renderRemoveRewardShareButton(data.item)}`, root)
}}></vaadin-grid-column>
</vaadin-grid>
</div>
<mwc-dialog id="createRewardShareDialog" scrimClickAction="${this.createRewardShareLoading ? '' : 'close'}">
<div>Level 1 - 4 can create a Self Share and Level 5 or above can create a Reward Share!</div>
@ -248,7 +256,7 @@ class RewardShare extends LitElement {
const recipientPublicKey = this.shadowRoot.getElementById("recipientPublicKey").value
const percentageShare = this.shadowRoot.getElementById("rewardSharePercentageSlider").value
// Check for valid...^
// Check for valid...
this.createRewardShareLoading = true
let recipientAddress = window.parent.base58PublicKeyToAddress(recipientPublicKey)
@ -339,8 +347,8 @@ class RewardShare extends LitElement {
this.error = true
this.message = `CANNOT CREATE SELF SHARE! at level ${accountDetails.level}`
}
} else { //Check for creating reward shares
} else {
//Check for creating reward shares
if (accountDetails.level >= 5) {
this.error = false
@ -402,7 +410,7 @@ class RewardShare extends LitElement {
async removeRewardShare(rewardShareObject) {
const myPercentageShare = -1
// Check for valid...^
// Check for valid...
this.removeRewardShareLoading = true
// Get Last Ref

View File

@ -32,6 +32,7 @@
body {
margin: 0;
font-family: "Roboto", sans-serif;
background-color: #fff;
}
</style>
</head>

View File

@ -77,7 +77,6 @@ class SendMoneyPage extends LitElement {
.address-icon {
border-radius: 50%;
border: 5px solid;
/*border-left: 4px solid;*/
padding: 8px;
}

View File

@ -3,7 +3,6 @@
<head>
<link rel="stylesheet" href="/font/material-icons.css">
<meta charset="UTF-8">
<style>
html {
--scrollbarBG: #a1a1a1;
@ -33,14 +32,14 @@
body {
margin: 0;
font-family: "Roboto", sans-serif;
background: #fff;
background-color: #fff;
}
</style>
</head>
<body>
<trade-portal></trade-portal>
<script type="module" src="trade-portal.js"></script>
<script src="trade-portal.js"></script>
</body>
</html>

View File

@ -1,21 +1,21 @@
import { LitElement, html, css } from 'lit';
import { render } from 'lit/html.js';
import { Epml } from '../../../epml.js';
import { LitElement, html, css } from 'lit'
import { render } from 'lit/html.js'
import { Epml } from '../../../epml.js'
import '@material/mwc-button';
import '@material/mwc-textfield';
import '@material/mwc-icon-button';
import '@material/mwc-dialog';
import '@material/mwc-tab-bar';
import '@material/mwc-tab';
import '@material/mwc-list/mwc-list-item';
import '@material/mwc-select';
import '@polymer/paper-spinner/paper-spinner-lite.js';
import '@vaadin/vaadin-grid/vaadin-grid.js';
import '@vaadin/vaadin-grid/vaadin-grid-sorter';
import '@vaadin/vaadin-grid/theme/material/all-imports.js';
import '@material/mwc-button'
import '@material/mwc-textfield'
import '@material/mwc-icon-button'
import '@material/mwc-dialog'
import '@material/mwc-tab-bar'
import '@material/mwc-tab'
import '@material/mwc-list/mwc-list-item'
import '@material/mwc-select'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@vaadin/grid/vaadin-grid.js'
import '@vaadin/grid/vaadin-grid-sorter'
import '@vaadin/grid/theme/material/all-imports.js'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent });
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
let workers = new Map();
@ -35,7 +35,7 @@ class TradePortal extends LitElement {
selectedCoin: { type: String },
isLoadingHistoricTrades: { type: Boolean },
isLoadingOpenTrades: { type: Boolean },
isLoadingMyOpenOrders: { type: Boolean },
isLoadingMyOpenOrders: { type: Boolean }
}
}

View File

@ -1,7 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="/font/material-icons.css" />
<link rel="stylesheet" href="/font/material-icons.css">
<style>
html {
--scrollbarBG: #a1a1a1;
@ -30,8 +31,8 @@
html,
body {
margin: 0;
background: white;
font-family: 'Roboto', sans-serif;
font-family: "Roboto", sans-serif;
background-color: #fff;
}
</style>
</head>
@ -40,4 +41,5 @@
<multi-wallet></multi-wallet>
<script src="wallet-app.js"></script>
</body>
</html>

View File

@ -3,18 +3,16 @@ import { render } from 'lit/html.js'
import { Epml } from '../../../epml.js'
import '../components/ButtonIconCopy'
import '@material/mwc-icon'
import '@material/mwc-button'
import '@material/mwc-dialog'
import '@polymer/paper-spinner/paper-spinner-lite.js'
import '@vaadin/vaadin-grid/vaadin-grid.js'
import '@vaadin/vaadin-grid/theme/material/all-imports.js'
import '@vaadin/grid/vaadin-grid.js'
import '@vaadin/grid/theme/material/all-imports.js'
import '@github/time-elements'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
const coinsNames = ['qort', 'btc', 'ltc', 'doge']
class MultiWallet extends LitElement {
@ -114,7 +112,6 @@ class MultiWallet extends LitElement {
table td,
th {
white-space: nowrap;
/* padding:10px; */
text-align: left;
font-size: 14px;
padding: 0 12px;
@ -151,8 +148,6 @@ class MultiWallet extends LitElement {
padding: 0;
}
#transactionList > * {
/* padding-left:24px;
padding-right:24px; */
}
.color-in {
color: #02977e;
@ -254,7 +249,6 @@ class MultiWallet extends LitElement {
border-top: 1px solid #e5e5e5;
padding-top: 0px;
height: 100%;
/* overflow: auto; */
}
.show {
@ -498,9 +492,9 @@ class MultiWallet extends LitElement {
fetchingWalletBalance: false,
fetchingWalletTransactions: false
}
coinsNames.forEach((c,i)=>{//reset fetching status, c:coin, i:index
coinsNames.forEach((c, i) => {
this.wallets.set(c, { ...coinProp })
},this)//thisArg=this
}, this)
this.wallets.get('qort').wallet = window.parent.reduxStore.getState().app.selectedAddress
this.wallets.get('btc').wallet = window.parent.reduxStore.getState().app.selectedAddress.btcWallet
@ -518,7 +512,6 @@ class MultiWallet extends LitElement {
this.wallets.get('btc').wallet = window.parent.reduxStore.getState().app.selectedAddress.btcWallet
this.wallets.get('ltc').wallet = window.parent.reduxStore.getState().app.selectedAddress.ltcWallet
this.wallets.get('doge').wallet = window.parent.reduxStore.getState().app.selectedAddress.dogeWallet
// this.updateAccountTransactions();
})
parentEpml.subscribe('copy_menu_switch', async (value) => {
@ -599,9 +592,7 @@ class MultiWallet extends LitElement {
<span class="title">Receiver</span>
<br />
<div><span class="">${this.selectedTransaction.recipient}</span></div>
${!this.selectedTransaction.amount
? ''
: html`
${!this.selectedTransaction.amount ? '' : html`
<span class="title">Amount</span>
<br />
<div><span class="">${this.selectedTransaction.amount} QORT</span></div>
@ -685,7 +676,7 @@ class MultiWallet extends LitElement {
</template>
</dom-module>
<div style="padding-left:12px;" ?hidden="${!this.isEmptyArray(transactions)}">Address has no transactions yet.</div>
<vaadin-grid theme="${coin}" id="${coin}TransactionsGrid" ?hidden="${this.isEmptyArray(this.wallets.get(this._selectedWallet).transactions)}" page-size="20" height-by-rows>
<vaadin-grid theme="${coin}" id="${coin}TransactionsGrid" ?hidden="${this.isEmptyArray(this.wallets.get(this._selectedWallet).transactions)}" page-size="20" all-rows-visible>
<vaadin-grid-column
auto-width
.renderer=${(root, column, data) => {
@ -732,7 +723,7 @@ class MultiWallet extends LitElement {
renderBTCLikeTransactions(transactions, coin) {
return html`
<div style="padding-left:12px;" ?hidden="${!this.isEmptyArray(transactions)}">Address has no transactions yet.</div>
<vaadin-grid id="${coin}TransactionsGrid" ?hidden="${this.isEmptyArray(this.wallets.get(this._selectedWallet).transactions)}" page-size="20" height-by-rows>
<vaadin-grid id="${coin}TransactionsGrid" ?hidden="${this.isEmptyArray(this.wallets.get(this._selectedWallet).transactions)}" page-size="20" all-rows-visible>
<vaadin-grid-column auto-width resizable header="Transaction Hash" path="txHash"></vaadin-grid-column>
<vaadin-grid-column
auto-width
@ -937,7 +928,8 @@ async showWallet(){
}
const coin = this._selectedWallet
await this.fetchWalletDetails(this._selectedWallet)
if(this._selectedWallet == coin){//if the wallet didn't switch
if (this._selectedWallet == coin) {
//if the wallet didn't switch
await this.renderTransactions()
await this.getTransactionGrid(this._selectedWallet)
await this.updateItemsFromPage(1, true)
@ -945,7 +937,8 @@ async showWallet(){
this.transactionsDOM.hidden = false
}
}
async fetchWalletDetails(coin){//this function will fetch the balance and transactions of the given wallet
async fetchWalletDetails(coin) {
//this function will fetch the balance and transactions of the given wallet
this.balanceString = "Fetching balance ..."
switch (coin) {
case 'qort':
@ -958,7 +951,8 @@ async showWallet(){
if (isNaN(Number(res))) {
parentEpml.request('showSnackBar', `Failed to Fetch QORT Balance. Try again!`)
} else {
if(this._selectedWallet==coin){//check if we are still fetching wallet balance ...
if (this._selectedWallet == coin) {
//check if we are still fetching wallet balance ...
this.wallets.get(coin).balance = res
this.balanceString = this.wallets.get(this._selectedWallet).balance + " " + this._selectedWallet.toLocaleUpperCase()
}
@ -987,7 +981,8 @@ async showWallet(){
if (isNaN(Number(res))) {
parentEpml.request('showSnackBar', `Failed to Fetch ${coin.toLocaleUpperCase()} Balance. Try again!`)
} else {
if(this._selectedWallet==coin){//check if we are still fetching wallet balance ...
if (this._selectedWallet == coin) {
//check if we are still fetching wallet balance ...
this.wallets.get(this._selectedWallet).balance = (Number(res) / 1e8).toFixed(8)
this.balanceString = this.wallets.get(this._selectedWallet).balance + " " + this._selectedWallet.toLocaleUpperCase()
}
@ -1039,8 +1034,8 @@ async showWallet(){
}
decimals(num) {
num = parseFloat(num) // So that conversion to string can get rid of insignificant zeros
// return isNaN(num) ? 0 : (num + "").split(".")[1]
num = parseFloat(num)
// So that conversion to string can get rid of insignificant zeros
return num % 1 > 0 ? (num + '').split('.')[1] : '0'
}