mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
Merge branch 'master' into cleanup-20240306
This commit is contained in:
commit
9b031b5bb9
@ -1 +0,0 @@
|
|||||||
/node_modules
|
|
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"env": {
|
|
||||||
"browser": true,
|
|
||||||
"es2021": true
|
|
||||||
},
|
|
||||||
"plugins": ["lit", "wc"],
|
|
||||||
"extends": ["eslint:recommended", "plugin:lit/recommended", "plugin:wc/recommended"],
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaVersion": 12,
|
|
||||||
"sourceType": "module"
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"no-mixed-spaces-and-tabs": 0
|
|
||||||
}
|
|
||||||
}
|
|
71
.travis.yml
71
.travis.yml
@ -1,71 +0,0 @@
|
|||||||
|
|
||||||
branches:
|
|
||||||
except:
|
|
||||||
- master
|
|
||||||
|
|
||||||
language: node_js
|
|
||||||
node_js: "14.17.0"
|
|
||||||
|
|
||||||
cache:
|
|
||||||
yarn: true
|
|
||||||
directories:
|
|
||||||
- node_modules
|
|
||||||
# - qortal-ui-core/node_modules
|
|
||||||
# - qortal-ui-plugins/node_modules
|
|
||||||
# - qortal-ui-crypto/node_modules
|
|
||||||
- $HOME/.cache/electron
|
|
||||||
- $HOME/.cache/electron-builder
|
|
||||||
|
|
||||||
install:
|
|
||||||
- sh install-dependencies.sh
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- ELECTRON_CACHE=$HOME/.cache/electron
|
|
||||||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
|
||||||
- ELECTRON_ENABLE_LOGGING=true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
- stage: Deploy Linux
|
|
||||||
if: tag IS present
|
|
||||||
os: linux
|
|
||||||
dist: bionic
|
|
||||||
sudo: required
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
# default Electron dependencies
|
|
||||||
- build-essential
|
|
||||||
- gconf2
|
|
||||||
- gconf-service
|
|
||||||
- libgtk-3-0
|
|
||||||
- libnotify4
|
|
||||||
- libxss-dev
|
|
||||||
- libxss1
|
|
||||||
- xdg-utils
|
|
||||||
- libatspi2.0-0
|
|
||||||
- libappindicator1
|
|
||||||
- libxext-dev
|
|
||||||
- libxtst6
|
|
||||||
- libxtst-dev
|
|
||||||
- libnss3
|
|
||||||
script:
|
|
||||||
- newVersion=$(git describe --abbrev=0)
|
|
||||||
- yarn version --new-version $newVersion
|
|
||||||
- sh set-up-snap.sh
|
|
||||||
- yarn run release
|
|
||||||
- stage: Deploy Windows & Mac
|
|
||||||
if: tag IS present
|
|
||||||
os: osx
|
|
||||||
osx_image: xcode12.5.1
|
|
||||||
script:
|
|
||||||
- newVersion=$(git describe --abbrev=0)
|
|
||||||
- yarn version --new-version $newVersion
|
|
||||||
- yarn run release -- --mac --win
|
|
||||||
before_cache:
|
|
||||||
- rm -rf $HOME/.cache/electron-builder/wine
|
|
||||||
# - stage: Update GitHub with Builds
|
|
||||||
# if: tag IS present
|
|
||||||
# script:
|
|
||||||
# - sh push-updates-with-travis-build.sh
|
|
@ -26,7 +26,7 @@ Easiest way to install the lastest required packages on Linux is via nvm.
|
|||||||
``` source ~/.profile ``` (For Debian based distro) <br/>
|
``` source ~/.profile ``` (For Debian based distro) <br/>
|
||||||
``` source ~/.bashrc ``` (For Fedora / CentOS) <br/>
|
``` source ~/.bashrc ``` (For Fedora / CentOS) <br/>
|
||||||
``` nvm ls-remote ``` (Fetch list of available versions) <br/>
|
``` nvm ls-remote ``` (Fetch list of available versions) <br/>
|
||||||
``` nvm install v20.9.0 ``` (LTS: Iron supported by Electron) <br/>
|
``` nvm install v18.17.1 ``` (LTS: Hydrogen supported by Electron V27) <br/>
|
||||||
``` npm --location=global install npm@10.5.0 ``` <br/>
|
``` npm --location=global install npm@10.5.0 ``` <br/>
|
||||||
|
|
||||||
Adding via binary package mirror will only work if you have set the package path. You can do a node or java build via ports instead by downloading ports with portsnap fetch method.
|
Adding via binary package mirror will only work if you have set the package path. You can do a node or java build via ports instead by downloading ports with portsnap fetch method.
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Q-Blog",
|
|
||||||
"defaultFeedIndex": 0,
|
|
||||||
"feed": [
|
|
||||||
{
|
|
||||||
"id": "post-creation",
|
|
||||||
"version": 1,
|
|
||||||
"updated": 1696646223261,
|
|
||||||
"title": "Q-Blog Post creations",
|
|
||||||
"description": "Get your friends Q-Blog posts on your feed",
|
|
||||||
"search": {
|
|
||||||
"query": "-post-",
|
|
||||||
"identifier": "q-blog-",
|
|
||||||
"service": "BLOG_POST",
|
|
||||||
"exactmatchnames": true
|
|
||||||
},
|
|
||||||
"click": "qortal://APP/Q-Blog/$${resource.name}$$/blog/$${resource.identifier}$$",
|
|
||||||
"display": {
|
|
||||||
"title": "$${rawdata.title}$$"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
/node_modules
|
|
@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"extends" : "standard",
|
|
||||||
"rules": {
|
|
||||||
"indent": [
|
|
||||||
"error",
|
|
||||||
4,
|
|
||||||
{
|
|
||||||
"SwitchCase": 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"env": {
|
|
||||||
"es6": true,
|
|
||||||
"browser": true,
|
|
||||||
"worker": true
|
|
||||||
},
|
|
||||||
"parser": "babel-eslint",
|
|
||||||
"parserOptions": {
|
|
||||||
"sourceType": "module",
|
|
||||||
"allowImportExportEverywhere": true
|
|
||||||
}
|
|
||||||
}
|
|
@ -70,7 +70,7 @@ html {
|
|||||||
--login-border-50pct: rgba(0, 167, 245, 0.5);
|
--login-border-50pct: rgba(0, 167, 245, 0.5);
|
||||||
--login-border-10pct: rgba(0, 167, 245, 0.1);
|
--login-border-10pct: rgba(0, 167, 245, 0.1);
|
||||||
--login-button: rgb(3, 169, 244);
|
--login-button: rgb(3, 169, 244);
|
||||||
--accent-color: #03a9f4;
|
--general-color-blue: #03a9f4;
|
||||||
--qchat-name: #03a9f4;
|
--qchat-name: #03a9f4;
|
||||||
--qchat-my-name: #05be0e;
|
--qchat-my-name: #05be0e;
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ html[theme="dark"] {
|
|||||||
--login-border-50pct: rgba(0, 167, 245, 0.5);
|
--login-border-50pct: rgba(0, 167, 245, 0.5);
|
||||||
--login-border-10pct: rgba(0, 167, 245, 0.1);
|
--login-border-10pct: rgba(0, 167, 245, 0.1);
|
||||||
--login-button: rgb(3, 169, 244);
|
--login-button: rgb(3, 169, 244);
|
||||||
--accent-color: #03a9f4;
|
--general-color-blue: #03a9f4;
|
||||||
--qchat-name: #03a9f4;
|
--qchat-name: #03a9f4;
|
||||||
--qchat-my-name: #05be0e;
|
--qchat-my-name: #05be0e;
|
||||||
}
|
}
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "ARRR-Wallet nicht initialisiert!",
|
"arrr1": "ARRR-Wallet nicht initialisiert!",
|
||||||
"arrr2": "Bitte gehen Sie zur Registerkarte „Wallet“ und initialisieren Sie zuerst Ihre arrr-Wallet.",
|
"arrr2": "Bitte gehen Sie zur Registerkarte „Wallet“ und initialisieren Sie zuerst Ihre arrr-Wallet.",
|
||||||
"arrr3": "Core-Update erforderlich!",
|
"arrr3": "Core-Update erforderlich!",
|
||||||
"arrr4": "Um den privaten Schlüssel Ihrer arrr-Wallet zu speichern, benötigen Sie zuerst ein Core-Update!"
|
"arrr4": "Um den privaten Schlüssel Ihrer arrr-Wallet zu speichern, benötigen Sie zuerst ein Core-Update!",
|
||||||
|
"sync_indicator": "Synchronisierungsanzeige-Popup deaktivieren"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Blockhöhe",
|
"blockheight": "Blockhöhe",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "¡Cartera ARRR no inicializada!",
|
"arrr1": "¡Cartera ARRR no inicializada!",
|
||||||
"arrr2": "Por favor, vaya a la pestaña de billetera e inicialice su billetera arrr primero.",
|
"arrr2": "Por favor, vaya a la pestaña de billetera e inicialice su billetera arrr primero.",
|
||||||
"arrr3": "¡Necesita actualización principal!",
|
"arrr3": "¡Necesita actualización principal!",
|
||||||
"arrr4": "¡Para guardar la clave privada de tu billetera arrr, primero necesitas una actualización básica!"
|
"arrr4": "¡Para guardar la clave privada de tu billetera arrr, primero necesitas una actualización básica!",
|
||||||
|
"sync_indicator": "Desactivar la ventana emergente del indicador de sincronización"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Altura del Bloque",
|
"blockheight": "Altura del Bloque",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "ARRR rahakott pole initsialiseeritud!",
|
"arrr1": "ARRR rahakott pole initsialiseeritud!",
|
||||||
"arrr2": "Minge rahakoti vahekaardile ja lähtestage esmalt oma arrr rahakott.",
|
"arrr2": "Minge rahakoti vahekaardile ja lähtestage esmalt oma arrr rahakott.",
|
||||||
"arrr3": "Vaja põhivärskendust!",
|
"arrr3": "Vaja põhivärskendust!",
|
||||||
"arrr4": "Oma arrr rahakoti privaatvõtme salvestamiseks vajate esmalt põhivärskendust!"
|
"arrr4": "Oma arrr rahakoti privaatvõtme salvestamiseks vajate esmalt põhivärskendust!",
|
||||||
|
"sync_indicator": "Keela sünkroonimisindikaatori hüpikaken"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Ploki kõrgus",
|
"blockheight": "Ploki kõrgus",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "ARRR-lompakkoa ei ole alustettu!",
|
"arrr1": "ARRR-lompakkoa ei ole alustettu!",
|
||||||
"arrr2": "Siirry lompakko-välilehdelle ja nollaa ensin ARRR-lompakkosi.",
|
"arrr2": "Siirry lompakko-välilehdelle ja nollaa ensin ARRR-lompakkosi.",
|
||||||
"arrr3": "Tarvitaan iso päivitys!",
|
"arrr3": "Tarvitaan iso päivitys!",
|
||||||
"arrr4": "Jotta voit tallentaa ARRR-lompakkosi yksityisen avaimesi, tarvitset ensin pääpäivityksen!"
|
"arrr4": "Jotta voit tallentaa ARRR-lompakkosi yksityisen avaimesi, tarvitset ensin pääpäivityksen!",
|
||||||
|
"sync_indicator": "Poista synkronoinnin ilmaisimen ponnahdusikkuna"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Lohkon korkeus",
|
"blockheight": "Lohkon korkeus",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "Portefeuille ARRR non initialisé !",
|
"arrr1": "Portefeuille ARRR non initialisé !",
|
||||||
"arrr2": "Veuillez aller dans l'onglet Portefeuille et initialiser d'abord votre portefeuille arrr.",
|
"arrr2": "Veuillez aller dans l'onglet Portefeuille et initialiser d'abord votre portefeuille arrr.",
|
||||||
"arrr3": "Besoin d'une mise à jour principale !",
|
"arrr3": "Besoin d'une mise à jour principale !",
|
||||||
"arrr4": "Pour sauvegarder la clé privée de votre portefeuille arrr, vous avez d'abord besoin d'une mise à jour principale !"
|
"arrr4": "Pour sauvegarder la clé privée de votre portefeuille arrr, vous avez d'abord besoin d'une mise à jour principale !",
|
||||||
|
"sync_indicator": "Désactiver la fenêtre contextuelle de l'indicateur de synchronisation"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Hauteur de bloc",
|
"blockheight": "Hauteur de bloc",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "ARRR वॉलेट प्रारंभ नहीं हुआ!",
|
"arrr1": "ARRR वॉलेट प्रारंभ नहीं हुआ!",
|
||||||
"arrr2": "कृपया वॉलेट टैब पर जाएं और पहले अपना Arrr वॉलेट प्रारंभ करें।",
|
"arrr2": "कृपया वॉलेट टैब पर जाएं और पहले अपना Arrr वॉलेट प्रारंभ करें।",
|
||||||
"arrr3": "मुख्य अद्यतन की आवश्यकता है!",
|
"arrr3": "मुख्य अद्यतन की आवश्यकता है!",
|
||||||
"arrr4": "अपने Arrr वॉलेट की निजी कुंजी को सहेजने के लिए आपको पहले एक कोर अपडेट की आवश्यकता है!"
|
"arrr4": "अपने Arrr वॉलेट की निजी कुंजी को सहेजने के लिए आपको पहले एक कोर अपडेट की आवश्यकता है!",
|
||||||
|
"sync_indicator": "सिंक संकेतक पॉपअप अक्षम करें"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "ब्लॉक ऊँचाई",
|
"blockheight": "ब्लॉक ऊँचाई",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "Novčanik ARRR nije inicijaliziran!",
|
"arrr1": "Novčanik ARRR nije inicijaliziran!",
|
||||||
"arrr2": "Idite na karticu novčanika i prvo inicijalizirajte svoj arrr novčanik.",
|
"arrr2": "Idite na karticu novčanika i prvo inicijalizirajte svoj arrr novčanik.",
|
||||||
"arrr3": "Potrebno je ažuriranje jezgre!",
|
"arrr3": "Potrebno je ažuriranje jezgre!",
|
||||||
"arrr4": "Da biste spremili privatni ključ vašeg arrr novčanika, prvo trebate ažurirati jezgru!"
|
"arrr4": "Da biste spremili privatni ključ vašeg arrr novčanika, prvo trebate ažurirati jezgru!",
|
||||||
|
"sync_indicator": "Onemogući skočni prozor indikatora sinkronizacije"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Visina bloka",
|
"blockheight": "Visina bloka",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "ARRR Wallet nincs inicializálva!",
|
"arrr1": "ARRR Wallet nincs inicializálva!",
|
||||||
"arrr2": "Kérjük, lépjen a Wallet fülre, és először inicializálja arrr pénztárcáját.",
|
"arrr2": "Kérjük, lépjen a Wallet fülre, és először inicializálja arrr pénztárcáját.",
|
||||||
"arrr3": "Alapfrissítésre van szükség!",
|
"arrr3": "Alapfrissítésre van szükség!",
|
||||||
"arrr4": "Az arrr pénztárca privát kulcsának mentéséhez először egy alapvető frissítésre van szükség!"
|
"arrr4": "Az arrr pénztárca privát kulcsának mentéséhez először egy alapvető frissítésre van szükség!",
|
||||||
|
"sync_indicator": "Szinkronizálásjelző előugró ablak letiltása"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Blokk Magassága",
|
"blockheight": "Blokk Magassága",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "Portafoglio ARRR non inizializzato!",
|
"arrr1": "Portafoglio ARRR non inizializzato!",
|
||||||
"arrr2": "Vai alla scheda Portafoglio e inizializza prima il tuo portafoglio arrr.",
|
"arrr2": "Vai alla scheda Portafoglio e inizializza prima il tuo portafoglio arrr.",
|
||||||
"arrr3": "È necessario l'aggiornamento del core!",
|
"arrr3": "È necessario l'aggiornamento del core!",
|
||||||
"arrr4": "Per salvare la chiave privata del tuo portafoglio arrr devi prima aggiornare il core!"
|
"arrr4": "Per salvare la chiave privata del tuo portafoglio arrr devi prima aggiornare il core!",
|
||||||
|
"sync_indicator": "Disabilita il popup dell'indicatore di sincronizzazione"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Altezza blocco",
|
"blockheight": "Altezza blocco",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "ARRR ウォレットが初期化されていません!",
|
"arrr1": "ARRR ウォレットが初期化されていません!",
|
||||||
"arrr2": "ウォレットタブに移動して、まずarrrウォレットを初期化してください。",
|
"arrr2": "ウォレットタブに移動して、まずarrrウォレットを初期化してください。",
|
||||||
"arrr3": "コアのアップデートが必要です!",
|
"arrr3": "コアのアップデートが必要です!",
|
||||||
"arrr4": "arrr ウォレットの秘密キーを保存するには、まずコアのアップデートが必要です!"
|
"arrr4": "arrr ウォレットの秘密キーを保存するには、まずコアのアップデートが必要です!",
|
||||||
|
"sync_indicator": "同期インジケーターのポップアップを無効にする"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "ブロック高",
|
"blockheight": "ブロック高",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "ARRR 지갑이 초기화되지 않았습니다!",
|
"arrr1": "ARRR 지갑이 초기화되지 않았습니다!",
|
||||||
"arrr2": "지갑 탭으로 이동하여 먼저 arrr 지갑을 초기화하세요.",
|
"arrr2": "지갑 탭으로 이동하여 먼저 arrr 지갑을 초기화하세요.",
|
||||||
"arrr3": "핵심 업데이트가 필요합니다!",
|
"arrr3": "핵심 업데이트가 필요합니다!",
|
||||||
"arrr4": "arrr 지갑의 개인 키를 저장하려면 먼저 핵심 업데이트가 필요합니다!"
|
"arrr4": "arrr 지갑의 개인 키를 저장하려면 먼저 핵심 업데이트가 필요합니다!",
|
||||||
|
"sync_indicator": "동기화 표시 팝업 비활성화"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "블록 높이",
|
"blockheight": "블록 높이",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "ARRR portefeuille is niet geïnitialiseerd!",
|
"arrr1": "ARRR portefeuille is niet geïnitialiseerd!",
|
||||||
"arrr2": "Ga naar de portefeuille-tab en initialiseer eerst jouw ARRR portefeuille.",
|
"arrr2": "Ga naar de portefeuille-tab en initialiseer eerst jouw ARRR portefeuille.",
|
||||||
"arrr3": "De 'core' heeft een update nodig!",
|
"arrr3": "De 'core' heeft een update nodig!",
|
||||||
"arrr4": "Om de privé-sleutel van jouw ARRR portefeuille te kunnen bewaren, moet je voor de 'core' eerst een update installeren!"
|
"arrr4": "Om de privé-sleutel van jouw ARRR portefeuille te kunnen bewaren, moet je voor de 'core' eerst een update installeren!",
|
||||||
|
"sync_indicator": "Synchronisatie-indicator pop-up uitschakelen"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Blokhoogte",
|
"blockheight": "Blokhoogte",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "ARRR-lommebok ikke initialisert !",
|
"arrr1": "ARRR-lommebok ikke initialisert !",
|
||||||
"arrr2": "Vennligst gå til lommebok-fanen og initialiser arrr-lommeboken først.",
|
"arrr2": "Vennligst gå til lommebok-fanen og initialiser arrr-lommeboken først.",
|
||||||
"arrr3": "Trenger kjerneoppdatering!",
|
"arrr3": "Trenger kjerneoppdatering!",
|
||||||
"arrr4": "For å lagre den private nøkkelen til arrr-lommeboken din trenger du en kjerneoppdatering først!"
|
"arrr4": "For å lagre den private nøkkelen til arrr-lommeboken din trenger du en kjerneoppdatering først!",
|
||||||
|
"sync_indicator": "Deaktiver popup for synkroniseringsindikator"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Blokkhøyde",
|
"blockheight": "Blokkhøyde",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "Portfel ARRR nie został zainicjowany!",
|
"arrr1": "Portfel ARRR nie został zainicjowany!",
|
||||||
"arrr2": "Przejdź do zakładki portfela i najpierw zainicjalizuj swój portfel arrr.",
|
"arrr2": "Przejdź do zakładki portfela i najpierw zainicjalizuj swój portfel arrr.",
|
||||||
"arrr3": "Potrzebujesz aktualizacji rdzenia!",
|
"arrr3": "Potrzebujesz aktualizacji rdzenia!",
|
||||||
"arrr4": "Aby zapisać klucz prywatny swojego portfela arrr, potrzebujesz najpierw aktualizacji rdzenia!"
|
"arrr4": "Aby zapisać klucz prywatny swojego portfela arrr, potrzebujesz najpierw aktualizacji rdzenia!",
|
||||||
|
"sync_indicator": "Wyłącz wyskakujące okienko wskaźnika synchronizacji"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Wysokość bloku",
|
"blockheight": "Wysokość bloku",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "Carteira ARRR não inicializada!",
|
"arrr1": "Carteira ARRR não inicializada!",
|
||||||
"arrr2": "Por favor, vá para a aba carteira e inicialize sua carteira arrr primeiro.",
|
"arrr2": "Por favor, vá para a aba carteira e inicialize sua carteira arrr primeiro.",
|
||||||
"arrr3": "Precisa de atualização principal!",
|
"arrr3": "Precisa de atualização principal!",
|
||||||
"arrr4": "Para salvar a chave privada da sua carteira arrr você precisa primeiro de uma atualização principal!"
|
"arrr4": "Para salvar a chave privada da sua carteira arrr você precisa primeiro de uma atualização principal!",
|
||||||
|
"sync_indicator": "Desativar pop-up do indicador de sincronização"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Altura do Bloco",
|
"blockheight": "Altura do Bloco",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "Portoletul ARRR nu este inițializat !",
|
"arrr1": "Portoletul ARRR nu este inițializat !",
|
||||||
"arrr2": "Vă rugăm să accesați fila Portofel și să inițializați mai întâi portofelul arrr.",
|
"arrr2": "Vă rugăm să accesați fila Portofel și să inițializați mai întâi portofelul arrr.",
|
||||||
"arrr3": "Am nevoie de actualizare de bază !",
|
"arrr3": "Am nevoie de actualizare de bază !",
|
||||||
"arrr4": "Pentru a salva cheia privată a portofelului dvs. arrr, aveți nevoie mai întâi de o actualizare de bază !"
|
"arrr4": "Pentru a salva cheia privată a portofelului dvs. arrr, aveți nevoie mai întâi de o actualizare de bază !",
|
||||||
|
"sync_indicator": "Dezactivați fereastra pop-up indicator de sincronizare"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Dimensiunea blocului",
|
"blockheight": "Dimensiunea blocului",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "ARRR novčanik nije inicijalizovan!",
|
"arrr1": "ARRR novčanik nije inicijalizovan!",
|
||||||
"arrr2": "Molim vas idite na karticu Novčanik i prvo inicijalizujte svoj arrr novčanik.",
|
"arrr2": "Molim vas idite na karticu Novčanik i prvo inicijalizujte svoj arrr novčanik.",
|
||||||
"arrr3": "Potrebno je ažuriranje jezgra!",
|
"arrr3": "Potrebno je ažuriranje jezgra!",
|
||||||
"arrr4": "Da biste sačuvali privatni ključ vašeg arrr novčanika, prvo vam je potrebno ažuriranje jezgra!"
|
"arrr4": "Da biste sačuvali privatni ključ vašeg arrr novčanika, prvo vam je potrebno ažuriranje jezgra!",
|
||||||
|
"sync_indicator": "Onemogući iskačući prozor indikatora sinhronizacije"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Visina Bloka",
|
"blockheight": "Visina Bloka",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "Кошелек ARRR не инициализирован!",
|
"arrr1": "Кошелек ARRR не инициализирован!",
|
||||||
"arrr2": "Пожалуйста, перейдите на вкладку кошелька и сначала инициализируйте свой кошелек arrr.",
|
"arrr2": "Пожалуйста, перейдите на вкладку кошелька и сначала инициализируйте свой кошелек arrr.",
|
||||||
"arrr3": "Требуется обновление ядра!",
|
"arrr3": "Требуется обновление ядра!",
|
||||||
"arrr4": "Чтобы сохранить закрытый ключ вашего кошелька arrr, вам сначала необходимо обновить ядро!"
|
"arrr4": "Чтобы сохранить закрытый ключ вашего кошелька arrr, вам сначала необходимо обновить ядро!",
|
||||||
|
"sync_indicator": "Отключить всплывающее окно индикатора синхронизации"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Высота блока",
|
"blockheight": "Высота блока",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "ARRR Wallet Not Initialized !",
|
"arrr1": "ARRR Wallet Not Initialized !",
|
||||||
"arrr2": "Please go to wallet tab and initialize your arrr wallet first.",
|
"arrr2": "Please go to wallet tab and initialize your arrr wallet first.",
|
||||||
"arrr3": "Need Core Update !",
|
"arrr3": "Need Core Update !",
|
||||||
"arrr4": "To save the private key of your arrr wallet you need a core update first !"
|
"arrr4": "To save the private key of your arrr wallet you need a core update first !",
|
||||||
|
"sync_indicator": "Disable sync indicator popup"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "Block Height",
|
"blockheight": "Block Height",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "ARRR 钱包未初始化!",
|
"arrr1": "ARRR 钱包未初始化!",
|
||||||
"arrr2": "请先进入钱包选项卡并初始化您的arrr钱包。",
|
"arrr2": "请先进入钱包选项卡并初始化您的arrr钱包。",
|
||||||
"arrr3": "需要核心更新!",
|
"arrr3": "需要核心更新!",
|
||||||
"arrr4": "要保存你的 arr 钱包的私钥,你需要先进行核心更新!"
|
"arrr4": "要保存你的 arr 钱包的私钥,你需要先进行核心更新!",
|
||||||
|
"sync_indicator": "禁用同步指示器弹出窗口"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "区块高度",
|
"blockheight": "区块高度",
|
||||||
|
@ -213,7 +213,8 @@
|
|||||||
"arrr1": "ARRR 錢包未初始化!",
|
"arrr1": "ARRR 錢包未初始化!",
|
||||||
"arrr2": "請先進入錢包標籤並初始化您的arrr錢包。",
|
"arrr2": "請先進入錢包標籤並初始化您的arrr錢包。",
|
||||||
"arrr3": "需要核心更新!",
|
"arrr3": "需要核心更新!",
|
||||||
"arrr4": "要儲存你的 arr 錢包的私鑰,你需要先進行核心更新!"
|
"arrr4": "要儲存你的 arr 錢包的私鑰,你需要先進行核心更新!",
|
||||||
|
"sync_indicator": "停用同步指示器彈出視窗"
|
||||||
},
|
},
|
||||||
"appinfo": {
|
"appinfo": {
|
||||||
"blockheight": "區塊高度",
|
"blockheight": "區塊高度",
|
||||||
|
@ -49,8 +49,6 @@ export const testApiKey = async (apiKey) => {
|
|||||||
let testRes = await api.request(testUrl, {
|
let testRes = await api.request(testUrl, {
|
||||||
method: "GET"
|
method: "GET"
|
||||||
});
|
});
|
||||||
if (testRes === true) {
|
return testRes === true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
@ -1,105 +1,70 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../store.js'
|
import {store} from '../store.js'
|
||||||
import {doPageUrl} from '../redux/app/app-actions.js'
|
import {translate} from '../../translate'
|
||||||
import {translate} from '../../translate/index.js'
|
|
||||||
import WebWorker from 'web-worker:./computePowWorker.js';
|
|
||||||
import {routes} from '../plugins/routes.js';
|
|
||||||
|
|
||||||
import '@material/mwc-icon'
|
|
||||||
import '@material/mwc-button'
|
|
||||||
|
|
||||||
class AppInfo extends connect(store)(LitElement) {
|
class AppInfo extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
blockInfo: { type: Object },
|
|
||||||
nodeStatus: { type: Object },
|
|
||||||
nodeInfo: { type: Array },
|
nodeInfo: { type: Array },
|
||||||
coreInfo: { type: Array },
|
coreInfo: { type: Array },
|
||||||
nodeConfig: { type: Object },
|
nodeConfig: { type: Object },
|
||||||
pageUrl: { type: String },
|
|
||||||
publicizeAddress: { type: String },
|
|
||||||
theme: { type: String, reflect: true }
|
theme: { type: String, reflect: true }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static get styles() {
|
||||||
return [
|
return css`
|
||||||
css`
|
* {
|
||||||
* {
|
--mdc-theme-primary: rgb(3, 169, 244);
|
||||||
--mdc-theme-primary: rgb(3, 169, 244);
|
--paper-input-container-focus-color: var(--mdc-theme-primary);
|
||||||
--paper-input-container-focus-color: var(--mdc-theme-primary);
|
}
|
||||||
}
|
|
||||||
.normal {
|
|
||||||
--mdc-theme-primary: rgb(3, 169, 244);
|
|
||||||
}
|
|
||||||
|
|
||||||
.normal-button {
|
.normal {
|
||||||
--mdc-theme-primary: rgb(3, 169, 244);
|
--mdc-theme-primary: rgb(3, 169, 244);
|
||||||
--mdc-theme-on-primary: white;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
mwc-button.normal-button {
|
#profileInMenu {
|
||||||
--mdc-theme-primary: rgb(3, 169, 244);
|
flex: 0 0 100px;
|
||||||
--mdc-theme-on-primary: white;
|
padding:12px;
|
||||||
}
|
border-top: 1px solid var(--border);
|
||||||
.test-net {
|
background: var(--sidetopbar);
|
||||||
--mdc-theme-primary: black;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.test-net-button {
|
.info {
|
||||||
--mdc-theme-primary: black;
|
margin: 0;
|
||||||
--mdc-theme-on-primary: white;
|
font-size: 14px;
|
||||||
}
|
font-weight: 100;
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
color: var(--black);
|
||||||
|
}
|
||||||
|
|
||||||
mwc-button.test-net-button {
|
.blue {
|
||||||
--mdc-theme-primary: black;
|
color: #03a9f4;
|
||||||
--mdc-theme-on-primary: white;
|
margin: 0;
|
||||||
}
|
font-size: 14px;
|
||||||
#profileInMenu {
|
font-weight: 200;
|
||||||
flex: 0 0 100px;
|
display: inline;
|
||||||
padding:12px;
|
}
|
||||||
border-top: 1px solid var(--border);
|
|
||||||
background: var(--sidetopbar);
|
.black {
|
||||||
}
|
color: var(--black);
|
||||||
.info {
|
margin: 0;
|
||||||
margin: 0;
|
font-size: 14px;
|
||||||
font-size: 14px;
|
font-weight: 200;
|
||||||
font-weight:100;
|
display: inline;
|
||||||
display: inline-block;
|
}
|
||||||
width:100%;
|
`
|
||||||
padding-bottom:8px;
|
|
||||||
color: var(--black);
|
|
||||||
}
|
|
||||||
.blue {
|
|
||||||
color: #03a9f4;
|
|
||||||
margin: 0;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight:200;
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
.black {
|
|
||||||
color: var(--black);
|
|
||||||
margin: 0;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight:200;
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
`
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
this.blockInfo = {}
|
|
||||||
this.nodeInfo = []
|
this.nodeInfo = []
|
||||||
this.coreInfo = []
|
this.coreInfo = []
|
||||||
this.nodeStatus = {}
|
this.nodeConfig = {}
|
||||||
this.pageUrl = ''
|
|
||||||
this.publicizeAddress = ''
|
|
||||||
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
|
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
|
||||||
this.publicKeyisOnChainConfirmation = false
|
|
||||||
this.interval
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@ -115,133 +80,25 @@ class AppInfo extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
firstUpdated() {
|
firstUpdated() {
|
||||||
this.publicizeAddress = store.getState().app.selectedAddress.address + '_publicize'
|
|
||||||
this.setStorage()
|
|
||||||
this.getNodeInfo()
|
this.getNodeInfo()
|
||||||
this.getCoreInfo()
|
this.getCoreInfo()
|
||||||
// try {
|
|
||||||
// this.confirmPublicKeyOnChain(store.getState().app.selectedAddress.address)
|
|
||||||
// } catch (error) {
|
|
||||||
// console.error(error)
|
|
||||||
// }
|
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
this.getNodeInfo()
|
this.getNodeInfo()
|
||||||
this.getCoreInfo()
|
this.getCoreInfo()
|
||||||
}, 30000)
|
}, 60000)
|
||||||
}
|
|
||||||
|
|
||||||
setStorage() {
|
|
||||||
if (localStorage.getItem(this.publicizeAddress) === null) {
|
|
||||||
localStorage.setItem(this.publicizeAddress, 'false')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async confirmPublicKeyOnChain(address) {
|
|
||||||
const _computePow2 = async (chatBytes) => {
|
|
||||||
const difficulty = 14
|
|
||||||
const path = window.parent.location.origin + '/memory-pow/memory-pow.wasm.full'
|
|
||||||
const worker = new WebWorker();
|
|
||||||
let nonce = null
|
|
||||||
let chatBytesArray = null
|
|
||||||
await new Promise((res, rej) => {
|
|
||||||
worker.postMessage({chatBytes, path, difficulty})
|
|
||||||
|
|
||||||
worker.onmessage = e => {
|
|
||||||
worker.terminate()
|
|
||||||
chatBytesArray = e.data.chatBytesArray
|
|
||||||
nonce = e.data.nonce
|
|
||||||
res()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
let _response = await routes.sign_chat({
|
|
||||||
data: {
|
|
||||||
nonce: store.getState().app.selectedAddress.nonce,
|
|
||||||
chatBytesArray: chatBytesArray,
|
|
||||||
chatNonce: nonce
|
|
||||||
},
|
|
||||||
})
|
|
||||||
return _response
|
|
||||||
}
|
|
||||||
|
|
||||||
let stop = false
|
|
||||||
const checkPublicKey = async () => {
|
|
||||||
if (!stop) {
|
|
||||||
stop = true
|
|
||||||
try {
|
|
||||||
if(localStorage.getItem(this.publicizeAddress) === 'true') {
|
|
||||||
clearInterval(this.interval)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const myNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
|
||||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
|
||||||
const url = `${nodeUrl}/addresses/publickey/${address}`
|
|
||||||
const res = await fetch(url)
|
|
||||||
let data = ''
|
|
||||||
try {
|
|
||||||
data = await res.text()
|
|
||||||
} catch (error) {
|
|
||||||
data = {
|
|
||||||
error: 'error'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(data === 'false' && this.nodeInfo.isSynchronizing !== true) {
|
|
||||||
let _reference = new Uint8Array(64)
|
|
||||||
window.crypto.getRandomValues(_reference)
|
|
||||||
let reference = window.parent.Base58.encode(_reference)
|
|
||||||
const chatRes = await routes.chat({
|
|
||||||
data: {
|
|
||||||
type: 19,
|
|
||||||
nonce: store.getState().app.selectedAddress.nonce,
|
|
||||||
params: {
|
|
||||||
lastReference: reference,
|
|
||||||
proofOfWorkNonce: 0,
|
|
||||||
fee: 0,
|
|
||||||
timestamp: Date.now(),
|
|
||||||
},
|
|
||||||
disableModal: true
|
|
||||||
},
|
|
||||||
disableModal: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
try {
|
|
||||||
const powRes = await _computePow2(chatRes)
|
|
||||||
if(powRes === true) {
|
|
||||||
clearInterval(this.interval)
|
|
||||||
localStorage.removeItem(this.publicizeAddress)
|
|
||||||
localStorage.setItem(this.publicizeAddress, 'true')
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!data.error && data !== 'false' && data) {
|
|
||||||
clearInterval(this.interval)
|
|
||||||
localStorage.removeItem(this.publicizeAddress)
|
|
||||||
localStorage.setItem(this.publicizeAddress, 'true')
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
}
|
|
||||||
stop = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.interval = setInterval(checkPublicKey, 5000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getNodeInfo() {
|
async getNodeInfo() {
|
||||||
const appinfoNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const appinfoNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
const appinfoUrl = appinfoNode.protocol + '://' + appinfoNode.domain + ':' + appinfoNode.port
|
const appinfoUrl = appinfoNode.protocol + '://' + appinfoNode.domain + ':' + appinfoNode.port
|
||||||
const url = `${appinfoUrl}/admin/status`
|
const url = `${appinfoUrl}/admin/status`
|
||||||
|
|
||||||
await fetch(url).then(response => {
|
await fetch(url).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
}).then(data => {
|
||||||
.then(data => {
|
|
||||||
this.nodeInfo = data
|
this.nodeInfo = data
|
||||||
})
|
}).catch(err => {
|
||||||
.catch(err => {
|
|
||||||
console.error('Request failed', err)
|
console.error('Request failed', err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -250,13 +107,12 @@ class AppInfo extends connect(store)(LitElement) {
|
|||||||
const appinfoNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const appinfoNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
const appinfoUrl = appinfoNode.protocol + '://' + appinfoNode.domain + ':' + appinfoNode.port
|
const appinfoUrl = appinfoNode.protocol + '://' + appinfoNode.domain + ':' + appinfoNode.port
|
||||||
const url = `${appinfoUrl}/admin/info`
|
const url = `${appinfoUrl}/admin/info`
|
||||||
|
|
||||||
await fetch(url).then(response => {
|
await fetch(url).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
}).then(data => {
|
||||||
.then(data => {
|
|
||||||
this.coreInfo = data
|
this.coreInfo = data
|
||||||
})
|
}).catch(err => {
|
||||||
.catch(err => {
|
|
||||||
console.error('Request failed', err)
|
console.error('Request failed', err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -283,21 +139,8 @@ class AppInfo extends connect(store)(LitElement) {
|
|||||||
return html`<span class="info">${translate("appinfo.coreversion")}: ${this.coreInfo.buildVersion ? this.coreInfo.buildVersion : ''}</span>`
|
return html`<span class="info">${translate("appinfo.coreversion")}: ${this.coreInfo.buildVersion ? this.coreInfo.buildVersion : ''}</span>`
|
||||||
}
|
}
|
||||||
|
|
||||||
gotoPage(url) {
|
|
||||||
const myLink = this.shadowRoot.querySelector('#pageLink')
|
|
||||||
myLink.href = url
|
|
||||||
myLink.click()
|
|
||||||
store.dispatch(doPageUrl(''))
|
|
||||||
}
|
|
||||||
|
|
||||||
stateChanged(state) {
|
stateChanged(state) {
|
||||||
this.blockInfo = state.app.blockInfo
|
|
||||||
this.nodeStatus = state.app.nodeStatus
|
|
||||||
this.nodeConfig = state.app.nodeConfig
|
this.nodeConfig = state.app.nodeConfig
|
||||||
this.pageUrl = state.app.pageUrl
|
|
||||||
if (this.pageUrl.length > 5) {
|
|
||||||
this.gotoPage(this.pageUrl)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { css, html, LitElement } from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import { connect } from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import { store } from '../store.js'
|
import {store} from '../store.js'
|
||||||
import { Epml } from '../epml.js'
|
import {Epml} from '../epml.js'
|
||||||
import { addTradeBotRoutes } from '../tradebot/addTradeBotRoutes.js'
|
import {addTradeBotRoutes} from '../tradebot/addTradeBotRoutes.js'
|
||||||
import { get, translate } from '../../translate/index.js'
|
import {get, translate} from '../../translate'
|
||||||
import localForage from 'localforage'
|
import localForage from 'localforage'
|
||||||
import { decryptData, encryptData } from '../lockScreen.js'
|
import {decryptData, encryptData} from '../lockScreen.js'
|
||||||
import { setChatLastSeen } from '../redux/app/app-actions.js'
|
import {setChatLastSeen} from '../redux/app/app-actions.js'
|
||||||
import isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
@ -35,7 +35,6 @@ import './search-modal.js'
|
|||||||
import './user-info-view/user-info-view.js'
|
import './user-info-view/user-info-view.js'
|
||||||
import '../functional-components/side-menu.js'
|
import '../functional-components/side-menu.js'
|
||||||
import '../functional-components/side-menu-item.js'
|
import '../functional-components/side-menu-item.js'
|
||||||
import './start-minting.js'
|
|
||||||
import './notification-view/notification-bell.js'
|
import './notification-view/notification-bell.js'
|
||||||
import './notification-view/notification-bell-general.js'
|
import './notification-view/notification-bell-general.js'
|
||||||
import './friends-view/friends-side-panel-parent.js'
|
import './friends-view/friends-side-panel-parent.js'
|
||||||
@ -147,7 +146,8 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
lockSet: { type: String },
|
lockSet: { type: String },
|
||||||
myLockScreenPass: { type: String },
|
myLockScreenPass: { type: String },
|
||||||
myLockScreenSet: { type: String },
|
myLockScreenSet: { type: String },
|
||||||
helperMessage: { type: String }
|
helperMessage: { type: String },
|
||||||
|
showSyncMessages: { type: Boolean }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -548,7 +548,6 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
getTourElements(){
|
getTourElements(){
|
||||||
let els = {}
|
let els = {}
|
||||||
console.log('this.shadowRoot.querySelector("core-sync-status")', this.shadowRoot.querySelector("core-sync-status"))
|
|
||||||
const el1 = this.shadowRoot.querySelector("core-sync-status").shadowRoot.getElementById("core-sync-status-id")
|
const el1 = this.shadowRoot.querySelector("core-sync-status").shadowRoot.getElementById("core-sync-status-id")
|
||||||
const el2 = this.shadowRoot.querySelector("show-plugin").shadowRoot.getElementById("showPluginId")
|
const el2 = this.shadowRoot.querySelector("show-plugin").shadowRoot.getElementById("showPluginId")
|
||||||
const el3 = this.shadowRoot.querySelector("beginner-checklist").shadowRoot.getElementById("popover-notification")
|
const el3 = this.shadowRoot.querySelector("beginner-checklist").shadowRoot.getElementById("popover-notification")
|
||||||
@ -561,7 +560,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
if(el3) {
|
if(el3) {
|
||||||
els['checklist'] = el3
|
els['checklist'] = el3
|
||||||
}
|
}
|
||||||
|
|
||||||
return els
|
return els
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -625,7 +624,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
</app-header>
|
</app-header>
|
||||||
<show-plugin></show-plugin>
|
<show-plugin></show-plugin>
|
||||||
<tour-component .getElements=${this.getTourElements}></tour-component>
|
<tour-component .getElements=${this.getTourElements}></tour-component>
|
||||||
<sync-indicator ></sync-indicator>
|
${!this.showSyncMessages ? html`<sync-indicator></sync-indicator>` : html``}
|
||||||
</app-header-layout>
|
</app-header-layout>
|
||||||
</app-drawer-layout>
|
</app-drawer-layout>
|
||||||
<user-info-view></user-info-view>
|
<user-info-view></user-info-view>
|
||||||
@ -698,6 +697,8 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
this.helperMessage = this.renderHelperPass()
|
this.helperMessage = this.renderHelperPass()
|
||||||
|
|
||||||
|
this.showSyncMessages = store.getState().app.showSyncIndicator
|
||||||
|
|
||||||
this.salt = ''
|
this.salt = ''
|
||||||
this.salt = Base58.encode(store.getState().app.wallet._addresses[0].keyPair.privateKey)
|
this.salt = Base58.encode(store.getState().app.wallet._addresses[0].keyPair.privateKey)
|
||||||
|
|
||||||
@ -745,7 +746,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
drawerTog.click()
|
drawerTog.click()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.getNodeType()
|
await this.getNodeType()
|
||||||
|
|
||||||
const myAppNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const myAppNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
const nodeAppUrl = myAppNode.protocol + '://' + myAppNode.domain + ':' + myAppNode.port
|
const nodeAppUrl = myAppNode.protocol + '://' + myAppNode.domain + ':' + myAppNode.port
|
||||||
@ -914,7 +915,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await filterOpenOfferBTC()
|
await filterOpenOfferBTC()
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
filterMyBotPriceTradesBTC()
|
await filterMyBotPriceTradesBTC()
|
||||||
setTimeout(getOpenTradesBTC, 150000)
|
setTimeout(getOpenTradesBTC, 150000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -922,11 +923,9 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
const filterMyBotPriceTradesBTC = async () => {
|
const filterMyBotPriceTradesBTC = async () => {
|
||||||
const tradeBotBtcUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=BITCOIN&apiKey=${this.getApiKey()}`
|
const tradeBotBtcUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=BITCOIN&apiKey=${this.getApiKey()}`
|
||||||
|
|
||||||
const tradeBotBtcAt = await fetch(tradeBotBtcUrl).then(response => {
|
this.tradeBotBtcAt = await fetch(tradeBotBtcUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.tradeBotBtcAt = tradeBotBtcAt
|
|
||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
@ -964,7 +963,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotAvailableBtcQortal) === true) {
|
if (this.isEmptyArray(this.tradeBotAvailableBtcQortal) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const botbtcprice = this.round(parseFloat(this.tradeBotBtcBook[0].botBtcPrice))
|
const botbtcprice = this.round(parseFloat(this.tradeBotBtcBook[0].botBtcPrice))
|
||||||
const changebtcamount = parseFloat(this.tradeBotBtcBook[0].botBtcQortAmount)
|
const changebtcamount = parseFloat(this.tradeBotBtcBook[0].botBtcQortAmount)
|
||||||
@ -995,7 +994,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
this.buyBtcAction()
|
await this.buyBtcAction()
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotBtcBook) === true) {
|
if (this.isEmptyArray(this.tradeBotBtcBook) === true) {
|
||||||
return
|
return
|
||||||
@ -1008,7 +1007,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotBtcBook) === true) {
|
if (this.isEmptyArray(this.tradeBotBtcBook) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const checkBotBtcFunds = this.round(parseFloat(this.tradeBotBtcBook[0].botBtcQortAmount) * parseFloat(this.tradeBotBtcBook[0].botBtcPrice))
|
const checkBotBtcFunds = this.round(parseFloat(this.tradeBotBtcBook[0].botBtcQortAmount) * parseFloat(this.tradeBotBtcBook[0].botBtcPrice))
|
||||||
const myBotBtcFunds = this.round(parseFloat(this.btcWalletBalance))
|
const myBotBtcFunds = this.round(parseFloat(this.btcWalletBalance))
|
||||||
@ -1111,7 +1110,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await filterOpenOfferLTC()
|
await filterOpenOfferLTC()
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
filterMyBotPriceTradesLTC()
|
await filterMyBotPriceTradesLTC()
|
||||||
setTimeout(getOpenTradesLTC, 150000)
|
setTimeout(getOpenTradesLTC, 150000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1119,11 +1118,9 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
const filterMyBotPriceTradesLTC = async () => {
|
const filterMyBotPriceTradesLTC = async () => {
|
||||||
const tradeBotLtcUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=LITECOIN&apiKey=${this.getApiKey()}`
|
const tradeBotLtcUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=LITECOIN&apiKey=${this.getApiKey()}`
|
||||||
|
|
||||||
const tradeBotLtcAt = await fetch(tradeBotLtcUrl).then(response => {
|
this.tradeBotLtcAt = await fetch(tradeBotLtcUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.tradeBotLtcAt = tradeBotLtcAt
|
|
||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
@ -1161,7 +1158,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotAvailableLtcQortal) === true) {
|
if (this.isEmptyArray(this.tradeBotAvailableLtcQortal) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const botltcprice = this.round(parseFloat(this.tradeBotLtcBook[0].botLtcPrice))
|
const botltcprice = this.round(parseFloat(this.tradeBotLtcBook[0].botLtcPrice))
|
||||||
const changeltcamount = parseFloat(this.tradeBotLtcBook[0].botLtcQortAmount)
|
const changeltcamount = parseFloat(this.tradeBotLtcBook[0].botLtcQortAmount)
|
||||||
@ -1192,7 +1189,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
this.buyLtcAction()
|
await this.buyLtcAction()
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotLtcBook) === true) {
|
if (this.isEmptyArray(this.tradeBotLtcBook) === true) {
|
||||||
return
|
return
|
||||||
@ -1205,7 +1202,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotLtcBook) === true) {
|
if (this.isEmptyArray(this.tradeBotLtcBook) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const checkBotLtcFunds = this.round(parseFloat(this.tradeBotLtcBook[0].botLtcQortAmount) * parseFloat(this.tradeBotLtcBook[0].botLtcPrice))
|
const checkBotLtcFunds = this.round(parseFloat(this.tradeBotLtcBook[0].botLtcQortAmount) * parseFloat(this.tradeBotLtcBook[0].botLtcPrice))
|
||||||
const myBotLtcFunds = this.round(parseFloat(this.ltcWalletBalance))
|
const myBotLtcFunds = this.round(parseFloat(this.ltcWalletBalance))
|
||||||
@ -1297,7 +1294,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await filterOpenOfferDOGE()
|
await filterOpenOfferDOGE()
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
filterMyBotPriceTradesDOGE()
|
await filterMyBotPriceTradesDOGE()
|
||||||
setTimeout(getOpenTradesDOGE, 150000)
|
setTimeout(getOpenTradesDOGE, 150000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1305,11 +1302,9 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
const filterMyBotPriceTradesDOGE = async () => {
|
const filterMyBotPriceTradesDOGE = async () => {
|
||||||
const tradeBotDogeUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=DOGECOIN&apiKey=${this.getApiKey()}`
|
const tradeBotDogeUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=DOGECOIN&apiKey=${this.getApiKey()}`
|
||||||
|
|
||||||
const tradeBotDogeAt = await fetch(tradeBotDogeUrl).then(response => {
|
this.tradeBotDogeAt = await fetch(tradeBotDogeUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.tradeBotDogeAt = tradeBotDogeAt
|
|
||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
@ -1347,7 +1342,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotAvailableDogeQortal) === true) {
|
if (this.isEmptyArray(this.tradeBotAvailableDogeQortal) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const botdogeprice = this.round(parseFloat(this.tradeBotDogeBook[0].botDogePrice))
|
const botdogeprice = this.round(parseFloat(this.tradeBotDogeBook[0].botDogePrice))
|
||||||
const changedogeamount = parseFloat(this.tradeBotDogeBook[0].botDogeQortAmount)
|
const changedogeamount = parseFloat(this.tradeBotDogeBook[0].botDogeQortAmount)
|
||||||
@ -1378,7 +1373,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
this.buyDogeAction()
|
await this.buyDogeAction()
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotDogeBook) === true) {
|
if (this.isEmptyArray(this.tradeBotDogeBook) === true) {
|
||||||
return
|
return
|
||||||
@ -1391,7 +1386,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotDogeBook) === true) {
|
if (this.isEmptyArray(this.tradeBotDogeBook) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const checkBotDogeFunds = this.round(parseFloat(this.tradeBotDogeBook[0].botDogeQortAmount) * parseFloat(this.tradeBotDogeBook[0].botDogePrice))
|
const checkBotDogeFunds = this.round(parseFloat(this.tradeBotDogeBook[0].botDogeQortAmount) * parseFloat(this.tradeBotDogeBook[0].botDogePrice))
|
||||||
const myBotDogeFunds = this.round(parseFloat(this.dogeWalletBalance))
|
const myBotDogeFunds = this.round(parseFloat(this.dogeWalletBalance))
|
||||||
@ -1483,7 +1478,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await filterOpenOfferDGB()
|
await filterOpenOfferDGB()
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
filterMyBotPriceTradesDGB()
|
await filterMyBotPriceTradesDGB()
|
||||||
setTimeout(getOpenTradesDGB, 150000)
|
setTimeout(getOpenTradesDGB, 150000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1491,11 +1486,9 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
const filterMyBotPriceTradesDGB = async () => {
|
const filterMyBotPriceTradesDGB = async () => {
|
||||||
const tradeBotDgbUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=DIGIBYTE&apiKey=${this.getApiKey()}`
|
const tradeBotDgbUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=DIGIBYTE&apiKey=${this.getApiKey()}`
|
||||||
|
|
||||||
const tradeBotDgbAt = await fetch(tradeBotDgbUrl).then(response => {
|
this.tradeBotDgbAt = await fetch(tradeBotDgbUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.tradeBotDgbAt = tradeBotDgbAt
|
|
||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
@ -1533,7 +1526,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotAvailableDgbQortal) === true) {
|
if (this.isEmptyArray(this.tradeBotAvailableDgbQortal) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const botdgbprice = this.round(parseFloat(this.tradeBotDgbBook[0].botDgbPrice))
|
const botdgbprice = this.round(parseFloat(this.tradeBotDgbBook[0].botDgbPrice))
|
||||||
const changedgbamount = parseFloat(this.tradeBotDgbBook[0].botDgbQortAmount)
|
const changedgbamount = parseFloat(this.tradeBotDgbBook[0].botDgbQortAmount)
|
||||||
@ -1564,7 +1557,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
this.buyDgbAction()
|
await this.buyDgbAction()
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotDgbBook) === true) {
|
if (this.isEmptyArray(this.tradeBotDgbBook) === true) {
|
||||||
return
|
return
|
||||||
@ -1577,7 +1570,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotDgbBook) === true) {
|
if (this.isEmptyArray(this.tradeBotDgbBook) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const checkBotDgbFunds = this.round(parseFloat(this.tradeBotDgbBook[0].botDgbQortAmount) * parseFloat(this.tradeBotDgbBook[0].botDgbPrice))
|
const checkBotDgbFunds = this.round(parseFloat(this.tradeBotDgbBook[0].botDgbQortAmount) * parseFloat(this.tradeBotDgbBook[0].botDgbPrice))
|
||||||
const myBotDgbFunds = this.round(parseFloat(this.dgbWalletBalance))
|
const myBotDgbFunds = this.round(parseFloat(this.dgbWalletBalance))
|
||||||
@ -1669,7 +1662,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await filterOpenOfferRVN()
|
await filterOpenOfferRVN()
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
filterMyBotPriceTradesRVN()
|
await filterMyBotPriceTradesRVN()
|
||||||
setTimeout(getOpenTradesRVN, 150000)
|
setTimeout(getOpenTradesRVN, 150000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1677,11 +1670,9 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
const filterMyBotPriceTradesRVN = async () => {
|
const filterMyBotPriceTradesRVN = async () => {
|
||||||
const tradeBotRvnUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=RAVENCOIN&apiKey=${this.getApiKey()}`
|
const tradeBotRvnUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=RAVENCOIN&apiKey=${this.getApiKey()}`
|
||||||
|
|
||||||
const tradeBotRvnAt = await fetch(tradeBotRvnUrl).then(response => {
|
this.tradeBotRvnAt = await fetch(tradeBotRvnUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.tradeBotRvnAt = tradeBotRvnAt
|
|
||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
@ -1719,7 +1710,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotAvailableRvnQortal) === true) {
|
if (this.isEmptyArray(this.tradeBotAvailableRvnQortal) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const botrvnprice = this.round(parseFloat(this.tradeBotRvnBook[0].botRvnPrice))
|
const botrvnprice = this.round(parseFloat(this.tradeBotRvnBook[0].botRvnPrice))
|
||||||
const changervnamount = parseFloat(this.tradeBotRvnBook[0].botRvnQortAmount)
|
const changervnamount = parseFloat(this.tradeBotRvnBook[0].botRvnQortAmount)
|
||||||
@ -1750,7 +1741,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
this.buyRvnAction()
|
await this.buyRvnAction()
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotRvnBook) === true) {
|
if (this.isEmptyArray(this.tradeBotRvnBook) === true) {
|
||||||
return
|
return
|
||||||
@ -1763,7 +1754,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotRvnBook) === true) {
|
if (this.isEmptyArray(this.tradeBotRvnBook) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const checkBotRvnFunds = this.round(parseFloat(this.tradeBotRvnBook[0].botRvnQortAmount) * parseFloat(this.tradeBotRvnBook[0].botRvnPrice))
|
const checkBotRvnFunds = this.round(parseFloat(this.tradeBotRvnBook[0].botRvnQortAmount) * parseFloat(this.tradeBotRvnBook[0].botRvnPrice))
|
||||||
const myBotRvnFunds = this.round(parseFloat(this.rvnWalletBalance))
|
const myBotRvnFunds = this.round(parseFloat(this.rvnWalletBalance))
|
||||||
@ -1855,7 +1846,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await filterOpenOfferARRR()
|
await filterOpenOfferARRR()
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
filterMyBotPriceTradesARRR()
|
await filterMyBotPriceTradesARRR()
|
||||||
setTimeout(getOpenTradesARRR, 150000)
|
setTimeout(getOpenTradesARRR, 150000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1863,11 +1854,9 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
const filterMyBotPriceTradesARRR = async () => {
|
const filterMyBotPriceTradesARRR = async () => {
|
||||||
const tradeBotArrrUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=PIRATECHAIN&apiKey=${this.getApiKey()}`
|
const tradeBotArrrUrl = `${nodeAppUrl}/crosschain/tradebot?foreignBlockchain=PIRATECHAIN&apiKey=${this.getApiKey()}`
|
||||||
|
|
||||||
const tradeBotArrrAt = await fetch(tradeBotArrrUrl).then(response => {
|
this.tradeBotArrrAt = await fetch(tradeBotArrrUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.tradeBotArrrAt = tradeBotArrrAt
|
|
||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
@ -1905,7 +1894,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotAvailableArrrQortal) === true) {
|
if (this.isEmptyArray(this.tradeBotAvailableArrrQortal) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const botarrrprice = this.round(parseFloat(this.tradeBotArrrBook[0].botArrrPrice))
|
const botarrrprice = this.round(parseFloat(this.tradeBotArrrBook[0].botArrrPrice))
|
||||||
const changearrramount = parseFloat(this.tradeBotArrrBook[0].botArrrQortAmount)
|
const changearrramount = parseFloat(this.tradeBotArrrBook[0].botArrrQortAmount)
|
||||||
@ -1936,7 +1925,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
|
|
||||||
this.buyArrrAction()
|
await this.buyArrrAction()
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotArrrBook) === true) {
|
if (this.isEmptyArray(this.tradeBotArrrBook) === true) {
|
||||||
return
|
return
|
||||||
@ -1949,7 +1938,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.isEmptyArray(this.tradeBotArrrBook) === true) {
|
if (this.isEmptyArray(this.tradeBotArrrBook) === true) {
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
const checkBotArrrFunds = this.round(parseFloat(this.tradeBotArrrBook[0].botArrrQortAmount) * parseFloat(this.tradeBotArrrBook[0].botArrrPrice))
|
const checkBotArrrFunds = this.round(parseFloat(this.tradeBotArrrBook[0].botArrrQortAmount) * parseFloat(this.tradeBotArrrBook[0].botArrrPrice))
|
||||||
const myBotArrrFunds = this.round(parseFloat(this.arrrWalletBalance))
|
const myBotArrrFunds = this.round(parseFloat(this.arrrWalletBalance))
|
||||||
@ -2117,10 +2106,6 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
${this.renderNodeManagement()}
|
${this.renderNodeManagement()}
|
||||||
</side-menu-item>
|
</side-menu-item>
|
||||||
|
|
||||||
<div>
|
|
||||||
<start-minting></start-minting>
|
|
||||||
</div>
|
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2246,7 +2231,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
this.helperMessage = this.renderHelperErr()
|
this.helperMessage = this.renderHelperErr()
|
||||||
await errDelay(3000)
|
await errDelay(3000)
|
||||||
this.helperMessage = this.renderHelperPass()
|
this.helperMessage = this.renderHelperPass()
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2454,12 +2439,11 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async buyBtcAction() {
|
async buyBtcAction() {
|
||||||
const makeRequest = async () => {
|
const makeRequest = async () => {
|
||||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
return await parentEpml.request('tradeBotRespondRequest', {
|
||||||
atAddress: this.botBtcBuyAtAddress,
|
atAddress: this.botBtcBuyAtAddress,
|
||||||
foreignKey: store.getState().app.selectedAddress.btcWallet.derivedMasterPrivateKey,
|
foreignKey: store.getState().app.selectedAddress.btcWallet.derivedMasterPrivateKey,
|
||||||
receivingAddress: store.getState().app.selectedAddress.address,
|
receivingAddress: store.getState().app.selectedAddress.address,
|
||||||
})
|
})
|
||||||
return response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const manageResponse = (response) => {
|
const manageResponse = (response) => {
|
||||||
@ -2512,12 +2496,11 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async buyLtcAction() {
|
async buyLtcAction() {
|
||||||
const makeRequest = async () => {
|
const makeRequest = async () => {
|
||||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
return await parentEpml.request('tradeBotRespondRequest', {
|
||||||
atAddress: this.botLtcBuyAtAddress,
|
atAddress: this.botLtcBuyAtAddress,
|
||||||
foreignKey: store.getState().app.selectedAddress.ltcWallet.derivedMasterPrivateKey,
|
foreignKey: store.getState().app.selectedAddress.ltcWallet.derivedMasterPrivateKey,
|
||||||
receivingAddress: store.getState().app.selectedAddress.address,
|
receivingAddress: store.getState().app.selectedAddress.address,
|
||||||
})
|
})
|
||||||
return response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const manageResponse = (response) => {
|
const manageResponse = (response) => {
|
||||||
@ -2570,12 +2553,11 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async buyDogeAction() {
|
async buyDogeAction() {
|
||||||
const makeRequest = async () => {
|
const makeRequest = async () => {
|
||||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
return await parentEpml.request('tradeBotRespondRequest', {
|
||||||
atAddress: this.botDogeBuyAtAddress,
|
atAddress: this.botDogeBuyAtAddress,
|
||||||
foreignKey: store.getState().app.selectedAddress.dogeWallet.derivedMasterPrivateKey,
|
foreignKey: store.getState().app.selectedAddress.dogeWallet.derivedMasterPrivateKey,
|
||||||
receivingAddress: store.getState().app.selectedAddress.address,
|
receivingAddress: store.getState().app.selectedAddress.address,
|
||||||
})
|
})
|
||||||
return response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const manageResponse = (response) => {
|
const manageResponse = (response) => {
|
||||||
@ -2628,12 +2610,11 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async buyDgbAction() {
|
async buyDgbAction() {
|
||||||
const makeRequest = async () => {
|
const makeRequest = async () => {
|
||||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
return await parentEpml.request('tradeBotRespondRequest', {
|
||||||
atAddress: this.botDgbBuyAtAddress,
|
atAddress: this.botDgbBuyAtAddress,
|
||||||
foreignKey: store.getState().app.selectedAddress.dgbWallet.derivedMasterPrivateKey,
|
foreignKey: store.getState().app.selectedAddress.dgbWallet.derivedMasterPrivateKey,
|
||||||
receivingAddress: store.getState().app.selectedAddress.address,
|
receivingAddress: store.getState().app.selectedAddress.address,
|
||||||
})
|
})
|
||||||
return response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const manageResponse = (response) => {
|
const manageResponse = (response) => {
|
||||||
@ -2686,12 +2667,11 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async buyRvnAction() {
|
async buyRvnAction() {
|
||||||
const makeRequest = async () => {
|
const makeRequest = async () => {
|
||||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
return await parentEpml.request('tradeBotRespondRequest', {
|
||||||
atAddress: this.botRvnBuyAtAddress,
|
atAddress: this.botRvnBuyAtAddress,
|
||||||
foreignKey: store.getState().app.selectedAddress.rvnWallet.derivedMasterPrivateKey,
|
foreignKey: store.getState().app.selectedAddress.rvnWallet.derivedMasterPrivateKey,
|
||||||
receivingAddress: store.getState().app.selectedAddress.address,
|
receivingAddress: store.getState().app.selectedAddress.address,
|
||||||
})
|
})
|
||||||
return response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const manageResponse = (response) => {
|
const manageResponse = (response) => {
|
||||||
@ -2744,12 +2724,11 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async buyArrrAction() {
|
async buyArrrAction() {
|
||||||
const makeRequest = async () => {
|
const makeRequest = async () => {
|
||||||
const response = await parentEpml.request('tradeBotRespondRequest', {
|
return await parentEpml.request('tradeBotRespondRequest', {
|
||||||
atAddress: this.botArrrBuyAtAddress,
|
atAddress: this.botArrrBuyAtAddress,
|
||||||
foreignKey: store.getState().app.selectedAddress.arrrWallet.seed58,
|
foreignKey: store.getState().app.selectedAddress.arrrWallet.seed58,
|
||||||
receivingAddress: store.getState().app.selectedAddress.address,
|
receivingAddress: store.getState().app.selectedAddress.address,
|
||||||
})
|
})
|
||||||
return response
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const manageResponse = (response) => {
|
const manageResponse = (response) => {
|
||||||
@ -2806,6 +2785,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
this.config = state.config
|
this.config = state.config
|
||||||
this.urls = state.app.registeredUrls
|
this.urls = state.app.registeredUrls
|
||||||
this.addressInfo = state.app.accountInfo.addressInfo
|
this.addressInfo = state.app.accountInfo.addressInfo
|
||||||
|
this.showSyncMessages = state.app.showSyncIndicator
|
||||||
|
|
||||||
if (sideurl === "minting") {
|
if (sideurl === "minting") {
|
||||||
this.shadowRoot.getElementById('qminter').setAttribute('selected', 'selected')
|
this.shadowRoot.getElementById('qminter').setAttribute('selected', 'selected')
|
||||||
@ -3350,8 +3330,7 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey
|
return apiNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isEmptyArray(arr) {
|
isEmptyArray(arr) {
|
||||||
@ -3362,9 +3341,8 @@ class AppView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
round(number) {
|
round(number) {
|
||||||
let result = (Math.round(parseFloat(number) * 1e8) / 1e8).toFixed(8)
|
return (Math.round(parseFloat(number) * 1e8) / 1e8).toFixed(8)
|
||||||
return result
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.customElements.define('app-view', AppView)
|
window.customElements.define('app-view', AppView)
|
||||||
|
@ -1,30 +1,34 @@
|
|||||||
import { LitElement, html, css } from 'lit';
|
import {css, html, LitElement} from 'lit'
|
||||||
import { store } from '../../store';
|
import {store} from '../../store'
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers'
|
||||||
import '@material/mwc-icon';
|
import {translate} from '../../../translate'
|
||||||
import { translate } from '../../../translate';
|
import {parentEpml} from '../show-plugin'
|
||||||
import { parentEpml } from '../show-plugin';
|
|
||||||
|
import '@material/mwc-icon'
|
||||||
|
|
||||||
class SyncIndicator extends connect(store)(LitElement) {
|
class SyncIndicator extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
isBehind: { type: Boolean },
|
|
||||||
blocksBehind: { type: Number },
|
blocksBehind: { type: Number },
|
||||||
|
nodeUrl: { type: String },
|
||||||
|
address: { type: String },
|
||||||
|
isBehind: { type: Boolean },
|
||||||
isSynchronizing: { type: Boolean },
|
isSynchronizing: { type: Boolean },
|
||||||
hasCoreRunning: { type: Boolean },
|
hasCoreRunning: { type: Boolean }
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super()
|
||||||
this.isBehind = null;
|
this.blocksBehind = 0
|
||||||
this.blocksBehind = 0;
|
this.nodeUrl = ''
|
||||||
this.nodeUrl = this.getNodeUrl();
|
this.address = ''
|
||||||
this.myNode = this.getMyNode();
|
this.isBehind = false
|
||||||
this.interval = null;
|
this.isSynchronizing = false
|
||||||
this.hasCoreRunning = true;
|
this.hasCoreRunning = true
|
||||||
this.seenWelcomeSync = false;
|
this.interval = null
|
||||||
this.numberOfTries = 0;
|
this.seenWelcomeSync = false
|
||||||
|
this.numberOfTries = 0
|
||||||
this.hasOpened = false
|
this.hasOpened = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,13 +38,15 @@ class SyncIndicator extends connect(store)(LitElement) {
|
|||||||
--mdc-theme-text-primary-on-background: var(--black);
|
--mdc-theme-text-primary-on-background: var(--black);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 25px;
|
bottom: 50px;
|
||||||
right: 25px;
|
right: 25px;
|
||||||
z-index: 50000;
|
z-index: 50000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.parent {
|
.parent {
|
||||||
width: 360px;
|
width: 360px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
@ -52,17 +58,20 @@ class SyncIndicator extends connect(store)(LitElement) {
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
background: var(--white);
|
background: var(--white);
|
||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.column {
|
.column {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bootstrap-button {
|
.bootstrap-button {
|
||||||
font-family: Roboto, sans-serif;
|
font-family: Roboto, sans-serif;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@ -78,60 +87,96 @@ class SyncIndicator extends connect(store)(LitElement) {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: #03a8f475;
|
background-color: #03a8f475;
|
||||||
}
|
}
|
||||||
`;
|
`
|
||||||
}
|
}
|
||||||
async firstUpdated() {
|
|
||||||
|
render() {
|
||||||
|
return html`
|
||||||
|
${!this.hasCoreRunning ? html`
|
||||||
|
<div class="parent">
|
||||||
|
<span>
|
||||||
|
<mwc-icon id="notification-general-icon" style="color: red; cursor:pointer;user-select:none">
|
||||||
|
priority_high
|
||||||
|
</mwc-icon>
|
||||||
|
</span>
|
||||||
|
<p>
|
||||||
|
${translate("tour.tour17")}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
` : (this.blocksBehind > 1050 && this.isSynchronizing) ? html`
|
||||||
|
<div class="parent">
|
||||||
|
<div class="column">
|
||||||
|
<div class="row">
|
||||||
|
<span>
|
||||||
|
<img src="/img/syncing.png" style="height: 24px; width: 24px;" />
|
||||||
|
</span>
|
||||||
|
<p>
|
||||||
|
${this.blocksBehind} ${translate("tour.tour20")}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="justify-content: center">
|
||||||
|
<button class="bootstrap-button" @click="${() => {this.bootstrap()}}">
|
||||||
|
${translate("tour.tour18")}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
` : this.isSynchronizing ? html`
|
||||||
|
<div class="parent">
|
||||||
|
<span>
|
||||||
|
<img src="/img/syncing.png" style="height: 24px; width: 24px;" />
|
||||||
|
</span>
|
||||||
|
<p>
|
||||||
|
${translate("tour.tour19")} ${this.blocksBehind ? this.blocksBehind : ""} ${this.blocksBehind ? translate("tour.tour21"): ""}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
` : "" }
|
||||||
|
`
|
||||||
|
}
|
||||||
|
|
||||||
|
firstUpdated() {
|
||||||
|
this.getNodeUrl()
|
||||||
this.address = store.getState().app.selectedAddress.address
|
this.address = store.getState().app.selectedAddress.address
|
||||||
|
|
||||||
const seenWelcomeSync = JSON.parse(
|
this.seenWelcomeSync = JSON.parse(
|
||||||
localStorage.getItem(`welcome-sync-${this.address}`) || 'false'
|
localStorage.getItem(`welcome-sync-${this.address}`) || 'false'
|
||||||
);
|
)
|
||||||
this.seenWelcomeSync = seenWelcomeSync;
|
|
||||||
|
setInterval(() => {
|
||||||
|
this.getNodeUrl()
|
||||||
|
}, 60000)
|
||||||
}
|
}
|
||||||
|
|
||||||
getNodeUrl() {
|
getNodeUrl() {
|
||||||
const myNode =
|
const syncInfoNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
const syncInfoUrl = syncInfoNode.protocol + '://' + syncInfoNode.domain + ':' + syncInfoNode.port
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
this.nodeUrl = syncInfoUrl
|
||||||
];
|
|
||||||
|
|
||||||
const nodeUrl =
|
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
|
||||||
getMyNode() {
|
|
||||||
const myNode =
|
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getDaySummary() {
|
async getDaySummary() {
|
||||||
try {
|
try {
|
||||||
this.fetchingSummary = true
|
this.fetchingSummary = true
|
||||||
|
|
||||||
|
|
||||||
const endpointLastBlock = `${this.nodeUrl}/blocks/last`;
|
const endpointLastBlock = `${this.nodeUrl}/blocks/last`
|
||||||
const resLastBlock = await fetch(endpointLastBlock);
|
const resLastBlock = await fetch(endpointLastBlock)
|
||||||
const dataLastBlock = await resLastBlock.json();
|
const dataLastBlock = await resLastBlock.json()
|
||||||
const timestampNow = Date.now();
|
const timestampNow = Date.now()
|
||||||
const currentBlockTimestamp = dataLastBlock.timestamp;
|
const currentBlockTimestamp = dataLastBlock.timestamp
|
||||||
|
|
||||||
if (currentBlockTimestamp < timestampNow) {
|
if (currentBlockTimestamp < timestampNow) {
|
||||||
const diff = timestampNow - currentBlockTimestamp;
|
const diff = timestampNow - currentBlockTimestamp
|
||||||
const inSeconds = diff / 1000; // millisecs to secs
|
const inSeconds = diff / 1000
|
||||||
const inBlocks = inSeconds / 70;
|
const inBlocks = inSeconds / 70
|
||||||
this.blocksBehind = parseInt(inBlocks);
|
this.blocksBehind = parseInt(inBlocks)
|
||||||
if (inBlocks >= 100) {
|
if (inBlocks >= 100) {
|
||||||
this.isBehind = true;
|
this.isBehind = true
|
||||||
} else {
|
} else {
|
||||||
this.isBehind = false;
|
this.isBehind = false
|
||||||
this.blocksBehind = 0;
|
this.blocksBehind = 0
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.blocksBehind = 0;
|
this.blocksBehind = 0
|
||||||
this.isBehind = false;
|
this.isBehind = false
|
||||||
}
|
}
|
||||||
} catch (error) {} finally {
|
} catch (error) {} finally {
|
||||||
this.fetchingSummary = false
|
this.fetchingSummary = false
|
||||||
@ -140,141 +185,76 @@ class SyncIndicator extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async checkHowManyBlocksBehind() {
|
async checkHowManyBlocksBehind() {
|
||||||
try {
|
try {
|
||||||
this.getDaySummary();
|
await this.getDaySummary()
|
||||||
this.interval = setInterval(() => {
|
this.interval = setInterval(() => {
|
||||||
if(this.fetchingSummary) return
|
if(this.fetchingSummary) return
|
||||||
if (this.isBehind === false) {
|
if (this.isBehind === false) {
|
||||||
this.isBehind = null;
|
this.isBehind = null
|
||||||
clearInterval(this.interval);
|
clearInterval(this.interval)
|
||||||
}
|
}
|
||||||
this.getDaySummary();
|
this.getDaySummary()
|
||||||
}, 20000);
|
}, 20000)
|
||||||
} catch (error) {}
|
} catch (error) {
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async bootstrap() {
|
||||||
|
try {
|
||||||
|
const endpoint = `${this.nodeUrl}/admin/bootstrap/?apiKey=${this.getApiKey()}`
|
||||||
|
const res = await fetch(endpoint)
|
||||||
|
const data = await res.json()
|
||||||
|
if (data === true) {
|
||||||
|
parentEpml.request('showSnackBar', get('tour.tour22'))
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getApiKey() {
|
||||||
|
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
|
return apiNode.apiKey
|
||||||
}
|
}
|
||||||
|
|
||||||
stateChanged(state) {
|
stateChanged(state) {
|
||||||
|
this.address = store.getState().app.selectedAddress.address
|
||||||
|
|
||||||
if(!this.seenWelcomeSync && state.app.nodeStatus && state.app.nodeStatus.syncPercent === 100 && this.hasOpened === false){
|
if (!this.seenWelcomeSync && state.app.nodeStatus && state.app.nodeStatus.syncPercent === 100 && this.hasOpened === false) {
|
||||||
this.hasOpened = true
|
this.hasOpened = true
|
||||||
this.dispatchEvent(
|
this.dispatchEvent(
|
||||||
new CustomEvent('open-welcome-modal-sync', {
|
new CustomEvent('open-welcome-modal-sync', {
|
||||||
bubbles: true,
|
bubbles: true,
|
||||||
composed: true,
|
composed: true,
|
||||||
})
|
})
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
if (
|
|
||||||
state.app.nodeStatus &&
|
if (state.app.nodeStatus && Object.keys(state.app.nodeStatus).length === 0) {
|
||||||
Object.keys(state.app.nodeStatus).length === 0
|
|
||||||
) {
|
|
||||||
if (this.numberOfTries > 5) {
|
if (this.numberOfTries > 5) {
|
||||||
this.hasCoreRunning = false;
|
this.hasCoreRunning = false
|
||||||
} else {
|
} else {
|
||||||
this.numberOfTries = this.numberOfTries + 1;
|
this.numberOfTries = this.numberOfTries + 1
|
||||||
}
|
}
|
||||||
} else if(state.app.nodeStatus && state.app.nodeStatus.syncPercent === 100 && state.app.nodeStatus.syncPercent !== this.syncPercentage){
|
} else if (state.app.nodeStatus && state.app.nodeStatus.syncPercent === 100 && state.app.nodeStatus.syncPercent !== this.syncPercentage) {
|
||||||
this.syncPercentage = state.app.nodeStatus.syncPercent;
|
this.syncPercentage = state.app.nodeStatus.syncPercent
|
||||||
this.isSynchronizing = false;
|
this.isSynchronizing = false
|
||||||
|
} else if (state.app.nodeStatus) {
|
||||||
} else if (
|
|
||||||
state.app.nodeStatus
|
|
||||||
) {
|
|
||||||
this.hasCoreRunning = true
|
this.hasCoreRunning = true
|
||||||
this.numberOfTries = 0
|
this.numberOfTries = 0
|
||||||
this.syncPercentage = state.app.nodeStatus.syncPercent;
|
this.syncPercentage = state.app.nodeStatus.syncPercent
|
||||||
|
|
||||||
if (state.app.nodeStatus.syncPercent !== 100) {
|
if (state.app.nodeStatus.syncPercent !== 100) {
|
||||||
this.isSynchronizing = true;
|
this.isSynchronizing = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (!this.interval && this.isBehind === null && state.app.nodeStatus.isSynchronizing && state.app.nodeStatus.syncPercent !== 100) {
|
||||||
!this.interval &&
|
this.checkHowManyBlocksBehind()
|
||||||
this.isBehind === null &&
|
|
||||||
state.app.nodeStatus.isSynchronizing &&
|
|
||||||
state.app.nodeStatus.syncPercent !== 100
|
|
||||||
) {
|
|
||||||
this.checkHowManyBlocksBehind();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.hasCoreRunning = true;
|
this.hasCoreRunning = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async bootstrap(){
|
|
||||||
try {
|
|
||||||
const endpoint = `${this.nodeUrl}/admin/bootstrap/?apiKey=${this.myNode.apiKey}`;
|
|
||||||
const res = await fetch(endpoint);
|
|
||||||
const data = await res.json();
|
|
||||||
if(data === true){
|
|
||||||
parentEpml.request('showSnackBar', get('tour.tour22'));
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return html`
|
|
||||||
${!this.hasCoreRunning
|
|
||||||
? html`
|
|
||||||
<div class="parent">
|
|
||||||
<span
|
|
||||||
><mwc-icon
|
|
||||||
id="notification-general-icon"
|
|
||||||
style="color: red; cursor:pointer;user-select:none"
|
|
||||||
>priority_high</mwc-icon
|
|
||||||
></span
|
|
||||||
>
|
|
||||||
<p>
|
|
||||||
${translate("tour.tour17")}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
`
|
|
||||||
: (this.blocksBehind > 1050 && this.isSynchronizing)
|
|
||||||
? html`
|
|
||||||
<div class="parent">
|
|
||||||
<div class="column">
|
|
||||||
<div class="row">
|
|
||||||
<span
|
|
||||||
><img
|
|
||||||
src="/img/syncing.png"
|
|
||||||
style="height: 24px; width: 24px;"
|
|
||||||
/></span>
|
|
||||||
<p>
|
|
||||||
${this.blocksBehind} ${translate("tour.tour20")}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="row"
|
|
||||||
style="justify-content: center"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="bootstrap-button"
|
|
||||||
@click="${() => {
|
|
||||||
this.bootstrap()
|
|
||||||
}}"
|
|
||||||
>
|
|
||||||
${translate("tour.tour18")}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`
|
|
||||||
: this.isSynchronizing
|
|
||||||
? html`
|
|
||||||
<div class="parent">
|
|
||||||
<span
|
|
||||||
><img
|
|
||||||
src="/img/syncing.png"
|
|
||||||
style="height: 24px; width: 24px;"
|
|
||||||
/></span>
|
|
||||||
<p>
|
|
||||||
${translate("tour.tour19")} ${this.blocksBehind ? this.blocksBehind : ""} ${this.blocksBehind ? translate("tour.tour21"): ""}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
`
|
|
||||||
: "" }
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
customElements.define('sync-indicator', SyncIndicator);
|
|
||||||
|
customElements.define('sync-indicator', SyncIndicator)
|
@ -1,16 +1,17 @@
|
|||||||
import { LitElement, html, css } from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import { driver } from 'driver.js';
|
import {driver} from 'driver.js';
|
||||||
import 'driver.js/dist/driver.css';
|
import 'driver.js/dist/driver.css';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
||||||
import '@vaadin/tooltip';
|
import '@vaadin/tooltip';
|
||||||
import '@material/mwc-button';
|
import '@material/mwc-button';
|
||||||
import { get, translate } from '../../../translate/index.js';
|
import {get, translate} from '../../../translate';
|
||||||
import '@polymer/paper-dialog/paper-dialog.js';
|
import '@polymer/paper-dialog/paper-dialog.js';
|
||||||
import { setNewTab } from '../../redux/app/app-actions.js';
|
import {setNewTab} from '../../redux/app/app-actions.js';
|
||||||
import { store } from '../../store.js';
|
import {store} from '../../store.js';
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import './tour.css';
|
import './tour.css';
|
||||||
|
|
||||||
class TourComponent extends connect(store)(LitElement) {
|
class TourComponent extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
@ -116,7 +117,7 @@ class TourComponent extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
_controlOpenWelcomeModal() {
|
_controlOpenWelcomeModal() {
|
||||||
this.isSynced = true
|
this.isSynced = true
|
||||||
|
|
||||||
const seenWelcomeSync = JSON.parse(
|
const seenWelcomeSync = JSON.parse(
|
||||||
localStorage.getItem('welcome-sync') || 'false'
|
localStorage.getItem('welcome-sync') || 'false'
|
||||||
);
|
);
|
||||||
@ -175,19 +176,14 @@ class TourComponent extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getName(recipient) {
|
async getName(recipient) {
|
||||||
@ -280,7 +276,7 @@ class TourComponent extends connect(store)(LitElement) {
|
|||||||
<span><img src="/img/syncing.png" style="height: 24px; width: 24px; padding-top: 4px;" /></span>
|
<span><img src="/img/syncing.png" style="height: 24px; width: 24px; padding-top: 4px;" /></span>
|
||||||
<p style="margin:0px;padding:0px">${get("tour.tour4")}</p>
|
<p style="margin:0px;padding:0px">${get("tour.tour4")}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -397,7 +393,7 @@ class TourComponent extends connect(store)(LitElement) {
|
|||||||
class="close-button"
|
class="close-button"
|
||||||
@click=${()=> {
|
@click=${()=> {
|
||||||
this.onClose()
|
this.onClose()
|
||||||
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
${translate("general.close")}
|
${translate("general.close")}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {translate} from '../../translate/index.js'
|
import {translate} from '../../translate'
|
||||||
import isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
|
|
||||||
import '@polymer/paper-icon-button/paper-icon-button.js'
|
import '@polymer/paper-icon-button/paper-icon-button.js'
|
||||||
|
@ -27,19 +27,14 @@ class CoinBalancesController extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
store.getState().app.nodeConfig.knownNodes[
|
||||||
store.getState().app.nodeConfig.node
|
store.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return store.getState().app.nodeConfig.knownNodes[
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
store.getState().app.nodeConfig.node
|
||||||
store.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {get} from '../../../translate/index.js'
|
import {get} from '../../../translate'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
import '@vaadin/tooltip';
|
import '@vaadin/tooltip';
|
||||||
|
|
||||||
@ -206,11 +206,9 @@ class ChatSideNavHeads extends LitElement {
|
|||||||
if(changedProperties.has('chatInfo')){
|
if(changedProperties.has('chatInfo')){
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if(changedProperties.has('isImageLoaded')){
|
return !!changedProperties.has('isImageLoaded');
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getUrl(chatUrl) {
|
getUrl(chatUrl) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import {translate,} from '../../../translate/index.js'
|
import {translate,} from '../../../translate'
|
||||||
import '@material/mwc-button';
|
import '@material/mwc-button';
|
||||||
import '@material/mwc-dialog';
|
import '@material/mwc-dialog';
|
||||||
import '@material/mwc-checkbox';
|
import '@material/mwc-checkbox';
|
||||||
@ -202,17 +202,12 @@ class AddFriendsModal extends connect(store)(LitElement) {
|
|||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
];
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return store.getState().app.nodeConfig.knownNodes[
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clearFields() {
|
clearFields() {
|
||||||
@ -267,7 +262,7 @@ class AddFriendsModal extends connect(store)(LitElement) {
|
|||||||
changedProperties &&
|
changedProperties &&
|
||||||
changedProperties.has('isOpen') && this.isOpen
|
changedProperties.has('isOpen') && this.isOpen
|
||||||
) {
|
) {
|
||||||
this.getAvailableFeedSchemas()
|
await this.getAvailableFeedSchemas()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -281,11 +276,9 @@ class AddFriendsModal extends connect(store)(LitElement) {
|
|||||||
if (data.error === 401) {
|
if (data.error === 401) {
|
||||||
this.availableFeeedSchemas = [];
|
this.availableFeeedSchemas = [];
|
||||||
} else {
|
} else {
|
||||||
const result = data.filter(
|
this.availableFeeedSchemas = data.filter(
|
||||||
(item) => item.identifier === 'ui_schema_feed'
|
(item) => item.identifier === 'ui_schema_feed'
|
||||||
);
|
);
|
||||||
|
|
||||||
this.availableFeeedSchemas = result;
|
|
||||||
}
|
}
|
||||||
this.userFoundModalOpen = true;
|
this.userFoundModalOpen = true;
|
||||||
} catch (error) {} finally {
|
} catch (error) {} finally {
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
import { LitElement, html, css } from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import { get, translate } from '../../../translate/index.js'
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import '@material/mwc-menu';
|
import '@material/mwc-menu';
|
||||||
import '@material/mwc-list/mwc-list-item.js';
|
import '@material/mwc-list/mwc-list-item.js';
|
||||||
import { RequestQueueWithPromise } from '../../../../plugins/plugins/utils/queue';
|
import {RequestQueueWithPromise} from '../../../../plugins/plugins/utils/queue';
|
||||||
import '../../../../plugins/plugins/core/components/TimeAgo';
|
import '../../../../plugins/plugins/core/components/TimeAgo';
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import { store } from '../../store';
|
import {store} from '../../store';
|
||||||
import { setNewTab } from '../../redux/app/app-actions';
|
|
||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
|
|
||||||
const requestQueue = new RequestQueueWithPromise(3);
|
const requestQueue = new RequestQueueWithPromise(3);
|
||||||
@ -125,17 +123,12 @@ export class AvatarComponent extends connect(store)(LitElement) {
|
|||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
];
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
@ -143,8 +136,7 @@ export class AvatarComponent extends connect(store)(LitElement) {
|
|||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
];
|
||||||
let apiKey = myNode.apiKey;
|
return myNode.apiKey;
|
||||||
return apiKey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fetchResource() {
|
async fetchResource() {
|
||||||
@ -161,7 +153,7 @@ export class AvatarComponent extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fetchVideoUrl() {
|
async fetchVideoUrl() {
|
||||||
this.fetchResource();
|
await this.fetchResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
async getRawData() {
|
async getRawData() {
|
||||||
@ -249,7 +241,7 @@ export class AvatarComponent extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
this.status = res;
|
this.status = res;
|
||||||
if (this.status.status === 'DOWNLOADED') {
|
if (this.status.status === 'DOWNLOADED') {
|
||||||
this.fetchResource();
|
await this.fetchResource();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,8 +256,8 @@ export class AvatarComponent extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
async _fetchImage() {
|
async _fetchImage() {
|
||||||
try {
|
try {
|
||||||
this.fetchVideoUrl();
|
await this.fetchVideoUrl();
|
||||||
this.fetchStatus();
|
await this.fetchStatus();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
/* empty */
|
/* empty */
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
import { css, html, LitElement } from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
|
|
||||||
import '@vaadin/item';
|
import '@vaadin/item';
|
||||||
import '@vaadin/list-box';
|
import '@vaadin/list-box';
|
||||||
import '@polymer/paper-icon-button/paper-icon-button.js';
|
import '@polymer/paper-icon-button/paper-icon-button.js';
|
||||||
import '@polymer/iron-icons/iron-icons.js';
|
import '@polymer/iron-icons/iron-icons.js';
|
||||||
import { store } from '../../store.js';
|
import {store} from '../../store.js';
|
||||||
import { setNewTab } from '../../redux/app/app-actions.js';
|
import {setNewTab} from '../../redux/app/app-actions.js';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import { get, translate } from '../../../translate/index.js';
|
import {get} from '../../../translate';
|
||||||
import { repeat } from 'lit/directives/repeat.js';
|
|
||||||
import '../../../../plugins/plugins/core/components/TimeAgo.js';
|
import '../../../../plugins/plugins/core/components/TimeAgo.js';
|
||||||
import '../notification-view/popover.js';
|
import '../notification-view/popover.js';
|
||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
@ -74,17 +73,12 @@ class BeginnerChecklist extends connect(store)(LitElement) {
|
|||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
];
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getName(recipient) {
|
async getName(recipient) {
|
||||||
@ -94,11 +88,7 @@ class BeginnerChecklist extends connect(store)(LitElement) {
|
|||||||
const res = await fetch(endpoint);
|
const res = await fetch(endpoint);
|
||||||
const getNames = await res.json();
|
const getNames = await res.json();
|
||||||
|
|
||||||
if (Array.isArray(getNames) && getNames.length > 0) {
|
this.hasName = Array.isArray(getNames) && getNames.length > 0;
|
||||||
this.hasName = true;
|
|
||||||
} else {
|
|
||||||
this.hasName = false;
|
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@ -132,7 +122,7 @@ class BeginnerChecklist extends connect(store)(LitElement) {
|
|||||||
state.app.accountInfo.names.length > 0
|
state.app.accountInfo.names.length > 0
|
||||||
) {
|
) {
|
||||||
this.hasName = true;
|
this.hasName = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleBlur() {
|
handleBlur() {
|
||||||
|
@ -1,128 +1,150 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {store} from '../../store'
|
import {store} from '../../store'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
class CoreSyncStatus extends connect(store)(LitElement) {
|
class CoreSyncStatus extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
nodeStatus: {type: Object},
|
nodeInfos: { type: Array },
|
||||||
coreInfos: { type: Array }
|
coreInfos: { type: Array },
|
||||||
|
theme: { type: String, reflect: true }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
this.nodeStatus = {}
|
this.nodeInfos = []
|
||||||
this.coreInfos = []
|
this.coreInfos = []
|
||||||
|
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
|
||||||
}
|
}
|
||||||
|
|
||||||
static styles = css`
|
static get styles() {
|
||||||
.lineHeight {
|
return css`
|
||||||
line-height: 33%;
|
.lineHeight {
|
||||||
}
|
line-height: 33%;
|
||||||
|
}
|
||||||
|
|
||||||
.tooltip {
|
.tooltip {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip .bottom {
|
.tooltip .bottom {
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
max-width: 250px;
|
max-width: 250px;
|
||||||
top: 35px;
|
top: 35px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, 0);
|
transform: translate(-50%, 0);
|
||||||
padding: 10px 10px;
|
padding: 10px 10px;
|
||||||
color: var(--black);
|
color: var(--black);
|
||||||
background-color: var(--white);
|
background-color: var(--white);
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 99999999;
|
z-index: 99999999;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
box-shadow: 0 1px 8px rgba(0,0,0,0.5);
|
box-shadow: 0 1px 8px rgba(0,0,0,0.5);
|
||||||
border: 1px solid var(--black);
|
border: 1px solid var(--black);
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.8s;
|
transition: opacity 0.8s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip:hover .bottom {
|
.tooltip:hover .bottom {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip .bottom i {
|
.tooltip .bottom i {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 100%;
|
bottom: 100%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin-left: -12px;
|
margin-left: -12px;
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 12px;
|
height: 12px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip .bottom i::after {
|
.tooltip .bottom i::after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 12px;
|
width: 12px;
|
||||||
height: 12px;
|
height: 12px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%,50%) rotate(45deg);
|
transform: translate(-50%,50%) rotate(45deg);
|
||||||
background-color: var(--white);
|
background-color: var(--white);
|
||||||
border: 1px solid var(--black);
|
border: 1px solid var(--black);
|
||||||
box-shadow: 0 1px 8px rgba(0,0,0,0.5);
|
box-shadow: 0 1px 8px rgba(0,0,0,0.5);
|
||||||
}
|
}
|
||||||
|
`
|
||||||
`
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return html`
|
return html`
|
||||||
<div id="core-sync-status-id">
|
<div id="core-sync-status-id">
|
||||||
${this.renderSyncStatusIcon()}
|
${this.renderSyncStatusIcon()}
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
firstUpdated() {
|
firstUpdated() {
|
||||||
|
this.getNodeInfos()
|
||||||
this.getCoreInfos()
|
this.getCoreInfos()
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
|
this.getNodeInfos()
|
||||||
this.getCoreInfos()
|
this.getCoreInfos()
|
||||||
}, 60000)
|
}, 30000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async getNodeInfos() {
|
||||||
|
const appInfoNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
|
const appInfoUrl = appInfoNode.protocol + '://' + appInfoNode.domain + ':' + appInfoNode.port
|
||||||
|
const nodeInfoUrl = `${appInfoUrl}/admin/status`
|
||||||
|
|
||||||
|
await fetch(nodeInfoUrl).then(response => {
|
||||||
|
return response.json()
|
||||||
|
}).then(data => {
|
||||||
|
this.nodeInfos = data
|
||||||
|
}).catch(err => {
|
||||||
|
console.error('Request failed', err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
async getCoreInfos() {
|
async getCoreInfos() {
|
||||||
const corInfo = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const appCoreNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
const coreInfoUrl = corInfo.protocol + '://' + corInfo.domain + ':' + corInfo.port
|
const appCoreUrl = appCoreNode.protocol + '://' + appCoreNode.domain + ':' + appCoreNode.port
|
||||||
const infoUrl = `${coreInfoUrl}/admin/info`
|
const coreInfoUrl = `${appCoreUrl}/admin/info`
|
||||||
await fetch(infoUrl).then(response => {
|
|
||||||
|
await fetch(coreInfoUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
this.coreInfos = data
|
this.coreInfos = data
|
||||||
|
}).catch(err => {
|
||||||
|
console.error('Request failed', err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
renderSyncStatusIcon() {
|
renderSyncStatusIcon() {
|
||||||
if (this.nodeStatus.isSynchronizing === true && this.nodeStatus.syncPercent === 99) {
|
if (this.nodeInfos.isSynchronizing === true && this.nodeInfos.syncPercent === 99) {
|
||||||
return html`
|
return html`
|
||||||
<div class="tooltip" style="display: inline;">
|
<div class="tooltip" style="display: inline;">
|
||||||
<span><img src="/img/syncing.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
<span><img src="/img/syncing.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<h3>${translate("walletprofile.wp3")}</h3>
|
<h3>${translate("walletprofile.wp3")}</h3>
|
||||||
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
||||||
<h4 class="lineHeight">${translate("appinfo.synchronizing")}... <span style="color: #03a9f4">${this.nodeStatus.syncPercent !== undefined ? this.nodeStatus.syncPercent + '%' : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.synchronizing")}... <span style="color: #03a9f4">${this.nodeInfos.syncPercent !== undefined ? this.nodeInfos.syncPercent + '%' : ''}</span></h4>
|
||||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeStatus.height ? this.nodeStatus.height : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.height : ''}</span></h4>
|
||||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeStatus.numberOfConnections ? this.nodeStatus.numberOfConnections : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
} else if (this.nodeStatus.isSynchronizing === true && this.nodeStatus.isMintingPossible === false && this.nodeStatus.syncPercent === 100) {
|
} else if (this.nodeInfos.isSynchronizing === true && this.nodeInfos.isMintingPossible === false && this.nodeInfos.syncPercent === 100) {
|
||||||
return html`
|
return html`
|
||||||
<div class="tooltip" style="display: inline;">
|
<div class="tooltip" style="display: inline;">
|
||||||
<span><img src="/img/synced.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
<span><img src="/img/synced.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
||||||
@ -130,13 +152,13 @@ class CoreSyncStatus extends connect(store)(LitElement) {
|
|||||||
<h3>${translate("walletprofile.wp3")}</h3>
|
<h3>${translate("walletprofile.wp3")}</h3>
|
||||||
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
||||||
<h4 class="lineHeight">${translate("walletprofile.wp4")} ${translate("walletprofile.wp2")}</h4>
|
<h4 class="lineHeight">${translate("walletprofile.wp4")} ${translate("walletprofile.wp2")}</h4>
|
||||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeStatus.height ? this.nodeStatus.height : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.height : ''}</span></h4>
|
||||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeStatus.numberOfConnections ? this.nodeStatus.numberOfConnections : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
} else if (this.nodeStatus.isSynchronizing === false && this.nodeStatus.isMintingPossible === false && this.nodeStatus.syncPercent === 100) {
|
} else if (this.nodeInfos.isSynchronizing === false && this.nodeInfos.isMintingPossible === false && this.nodeInfos.syncPercent === 100) {
|
||||||
return html`
|
return html`
|
||||||
<div class="tooltip" style="display: inline;">
|
<div class="tooltip" style="display: inline;">
|
||||||
<span><img src="/img/synced.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
<span><img src="/img/synced.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
||||||
@ -144,13 +166,13 @@ class CoreSyncStatus extends connect(store)(LitElement) {
|
|||||||
<h3>${translate("walletprofile.wp3")}</h3>
|
<h3>${translate("walletprofile.wp3")}</h3>
|
||||||
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
||||||
<h4 class="lineHeight">${translate("walletprofile.wp4")} ${translate("walletprofile.wp2")}</h4>
|
<h4 class="lineHeight">${translate("walletprofile.wp4")} ${translate("walletprofile.wp2")}</h4>
|
||||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeStatus.height ? this.nodeStatus.height : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.height : ''}</span></h4>
|
||||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeStatus.numberOfConnections ? this.nodeStatus.numberOfConnections : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
} else if (this.nodeStatus.isSynchronizing === true && this.nodeStatus.isMintingPossible === true && this.nodeStatus.syncPercent === 100) {
|
} else if (this.nodeInfos.isSynchronizing === true && this.nodeInfos.isMintingPossible === true && this.nodeInfos.syncPercent === 100) {
|
||||||
return html`
|
return html`
|
||||||
<div class="tooltip" style="display: inline;">
|
<div class="tooltip" style="display: inline;">
|
||||||
<span><img src="/img/synced_minting.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
<span><img src="/img/synced_minting.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
||||||
@ -158,13 +180,13 @@ class CoreSyncStatus extends connect(store)(LitElement) {
|
|||||||
<h3>${translate("walletprofile.wp3")}</h3>
|
<h3>${translate("walletprofile.wp3")}</h3>
|
||||||
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
||||||
<h4 class="lineHeight">${translate("walletprofile.wp4")} <span style="color: #03a9f4">( ${translate("walletprofile.wp1")} )</span></h4>
|
<h4 class="lineHeight">${translate("walletprofile.wp4")} <span style="color: #03a9f4">( ${translate("walletprofile.wp1")} )</span></h4>
|
||||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeStatus.height ? this.nodeStatus.height : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.height : ''}</span></h4>
|
||||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeStatus.numberOfConnections ? this.nodeStatus.numberOfConnections : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
} else if (this.nodeStatus.isSynchronizing === false && this.nodeStatus.isMintingPossible === true && this.nodeStatus.syncPercent === 100) {
|
} else if (this.nodeInfos.isSynchronizing === false && this.nodeInfos.isMintingPossible === true && this.nodeInfos.syncPercent === 100) {
|
||||||
return html`
|
return html`
|
||||||
<div class="tooltip" style="display: inline;">
|
<div class="tooltip" style="display: inline;">
|
||||||
<span><img src="/img/synced_minting.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
<span><img src="/img/synced_minting.png" style="height: 24px; width: 24px; padding-top: 4px;"></span>
|
||||||
@ -172,8 +194,8 @@ class CoreSyncStatus extends connect(store)(LitElement) {
|
|||||||
<h3>${translate("walletprofile.wp3")}</h3>
|
<h3>${translate("walletprofile.wp3")}</h3>
|
||||||
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
||||||
<h4 class="lineHeight">${translate("walletprofile.wp4")} <span style="color: #03a9f4">( ${translate("walletprofile.wp1")} )</span></h4>
|
<h4 class="lineHeight">${translate("walletprofile.wp4")} <span style="color: #03a9f4">( ${translate("walletprofile.wp1")} )</span></h4>
|
||||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeStatus.height ? this.nodeStatus.height : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.height : ''}</span></h4>
|
||||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeStatus.numberOfConnections ? this.nodeStatus.numberOfConnections : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -185,9 +207,9 @@ class CoreSyncStatus extends connect(store)(LitElement) {
|
|||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<h3>${translate("walletprofile.wp3")}</h3>
|
<h3>${translate("walletprofile.wp3")}</h3>
|
||||||
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.coreversion")}: <span style="color: #03a9f4">${this.coreInfos.buildVersion ? (this.coreInfos.buildVersion).substring(0,12) : ''}</span></h4>
|
||||||
<h4 class="lineHeight">${translate("appinfo.synchronizing")}... <span style="color: #03a9f4">${this.nodeStatus.syncPercent !== undefined ? this.nodeStatus.syncPercent + '%' : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.synchronizing")}... <span style="color: #03a9f4">${this.nodeInfos.syncPercent !== undefined ? this.nodeInfos.syncPercent + '%' : ''}</span></h4>
|
||||||
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeStatus.height ? this.nodeStatus.height : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.blockheight")}: <span style="color: #03a9f4">${this.nodeInfos.height ? this.nodeInfos.height : ''}</span></h4>
|
||||||
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeStatus.numberOfConnections ? this.nodeStatus.numberOfConnections : ''}</span></h4>
|
<h4 class="lineHeight">${translate("appinfo.peers")}: <span style="color: #03a9f4">${this.nodeInfos.numberOfConnections ? this.nodeInfos.numberOfConnections : ''}</span></h4>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -196,7 +218,7 @@ class CoreSyncStatus extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stateChanged(state) {
|
stateChanged(state) {
|
||||||
this.nodeStatus = state.app.nodeStatus
|
// ...
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import {translate,} from '../../../translate/index.js'
|
import {translate,} from '../../../translate'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import '@material/mwc-menu';
|
import '@material/mwc-menu';
|
||||||
import '@material/mwc-list/mwc-list-item.js'
|
import '@material/mwc-list/mwc-list-item.js'
|
||||||
@ -174,13 +174,10 @@ export class FeedItem extends connect(store)(LitElement) {
|
|||||||
getNodeUrl(){
|
getNodeUrl(){
|
||||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
|
|
||||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
return nodeUrl
|
|
||||||
}
|
}
|
||||||
getMyNode(){
|
getMyNode(){
|
||||||
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
|
|
||||||
return myNode
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
@ -188,8 +185,7 @@ getMyNode(){
|
|||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
];
|
||||||
let apiKey = myNode.apiKey;
|
return myNode.apiKey;
|
||||||
return apiKey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fetchResource() {
|
async fetchResource() {
|
||||||
@ -206,7 +202,7 @@ getMyNode(){
|
|||||||
|
|
||||||
async fetchVideoUrl() {
|
async fetchVideoUrl() {
|
||||||
|
|
||||||
this.fetchResource()
|
await this.fetchResource()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,7 +307,7 @@ getMyNode(){
|
|||||||
|
|
||||||
this.status = res
|
this.status = res
|
||||||
if(this.status.status === 'DOWNLOADED'){
|
if(this.status.status === 'DOWNLOADED'){
|
||||||
this.fetchResource()
|
await this.fetchResource()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,8 +328,8 @@ getMyNode(){
|
|||||||
|
|
||||||
async _fetchImage() {
|
async _fetchImage() {
|
||||||
try {
|
try {
|
||||||
this.fetchVideoUrl()
|
await this.fetchVideoUrl()
|
||||||
this.fetchStatus()
|
await this.fetchStatus()
|
||||||
} catch (error) { /* empty */ }
|
} catch (error) { /* empty */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
// popover-component.js
|
// popover-component.js
|
||||||
import { css, html, LitElement } from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import { createPopper } from '@popperjs/core';
|
import {createPopper} from '@popperjs/core';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import { translate } from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
import { store } from '../../store';
|
import {store} from '../../store';
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import { setNewTab, setSideEffectAction } from '../../redux/app/app-actions';
|
import {setNewTab, setSideEffectAction} from '../../redux/app/app-actions';
|
||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
|
|
||||||
export class FriendItemActions extends connect(store)(LitElement) {
|
export class FriendItemActions extends connect(store)(LitElement) {
|
||||||
@ -79,11 +79,9 @@ export class FriendItemActions extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
store.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
firstUpdated() {
|
firstUpdated() {
|
||||||
|
@ -5,7 +5,7 @@ import {friendsViewStyles} from './friends-view-css';
|
|||||||
import {connect} from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import {store} from '../../store';
|
import {store} from '../../store';
|
||||||
import './feed-item'
|
import './feed-item'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||||
|
|
||||||
@ -53,24 +53,18 @@ class FriendsFeed extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
store.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return store.getState().app.nodeConfig.knownNodes[
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateFeeds(event) {
|
_updateFeeds(event) {
|
||||||
const detail = event.detail
|
this.mySelectedFeeds = event.detail
|
||||||
this.mySelectedFeeds = detail
|
|
||||||
this.reFetchFeedData()
|
this.reFetchFeedData()
|
||||||
this.requestUpdate()
|
this.requestUpdate()
|
||||||
}
|
}
|
||||||
@ -170,7 +164,7 @@ class FriendsFeed extends connect(store)(LitElement) {
|
|||||||
if(this.mySelectedFeeds.length === 0){
|
if(this.mySelectedFeeds.length === 0){
|
||||||
await this.getEndpoints()
|
await this.getEndpoints()
|
||||||
|
|
||||||
this.loadAndMergeData();
|
await this.loadAndMergeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getFeedOnInterval()
|
this.getFeedOnInterval()
|
||||||
@ -190,7 +184,7 @@ this.getFeedOnInterval()
|
|||||||
async refresh(){
|
async refresh(){
|
||||||
try {
|
try {
|
||||||
await this.getEndpoints()
|
await this.getEndpoints()
|
||||||
this.reFetchFeedData()
|
await this.reFetchFeedData()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -216,7 +210,7 @@ this.getFeedOnInterval()
|
|||||||
|
|
||||||
observerHandler(entries) {
|
observerHandler(entries) {
|
||||||
if (!entries[0].isIntersecting) {
|
if (!entries[0].isIntersecting) {
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
if (this.feedToRender.length < 20) {
|
if (this.feedToRender.length < 20) {
|
||||||
return;
|
return;
|
||||||
@ -326,8 +320,7 @@ this.getFeedOnInterval()
|
|||||||
|
|
||||||
let clickValue1 = newItem.schema.click;
|
let clickValue1 = newItem.schema.click;
|
||||||
|
|
||||||
const resolvedClickValue1 = replacePlaceholders(clickValue1, resource, newItem.schema.customParams);
|
newItem.link = replacePlaceholders(clickValue1, resource, newItem.schema.customParams)
|
||||||
newItem.link = resolvedClickValue1
|
|
||||||
newData.push(newItem)
|
newData.push(newItem)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -375,7 +368,7 @@ this.getFeedOnInterval()
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async loadAndMergeData() {
|
async loadAndMergeData() {
|
||||||
let allData = this.feed
|
let allData = this.feed
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
import './friends-side-panel.js'
|
import './friends-side-panel.js'
|
||||||
import '@vaadin/tooltip'
|
import '@vaadin/tooltip'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
class FriendsSidePanelParent extends LitElement {
|
class FriendsSidePanelParent extends LitElement {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit';
|
|||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import './friends-view'
|
import './friends-view'
|
||||||
import './friends-feed'
|
import './friends-feed'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
class FriendsSidePanel extends LitElement {
|
class FriendsSidePanel extends LitElement {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
@ -13,7 +13,7 @@ import './ChatSideNavHeads';
|
|||||||
import '../../../../plugins/plugins/core/components/ChatSearchResults'
|
import '../../../../plugins/plugins/core/components/ChatSearchResults'
|
||||||
import './add-friends-modal'
|
import './add-friends-modal'
|
||||||
|
|
||||||
import {translate,} from '../../../translate/index.js'
|
import {translate,} from '../../../translate'
|
||||||
import {store} from '../../store';
|
import {store} from '../../store';
|
||||||
import {friendsViewStyles} from './friends-view-css';
|
import {friendsViewStyles} from './friends-view-css';
|
||||||
import {parentEpml} from '../show-plugin';
|
import {parentEpml} from '../show-plugin';
|
||||||
@ -74,19 +74,14 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
store.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return store.getState().app.nodeConfig.knownNodes[
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getMoreFriends() {}
|
getMoreFriends() {}
|
||||||
@ -105,12 +100,10 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_updateFriends(event) {
|
_updateFriends(event) {
|
||||||
const detail = event.detail
|
this.friendList = event.detail
|
||||||
this.friendList = detail
|
|
||||||
}
|
}
|
||||||
_updateFeed(event) {
|
_updateFeed(event) {
|
||||||
const detail = event.detail
|
this.mySelectedFeeds = event.detail
|
||||||
this.mySelectedFeeds = detail
|
|
||||||
this.requestUpdate()
|
this.requestUpdate()
|
||||||
}
|
}
|
||||||
_addFriend(event){
|
_addFriend(event){
|
||||||
@ -125,7 +118,7 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
name
|
name
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isOpenAddFriendsModal = true
|
this.isOpenAddFriendsModal = true
|
||||||
this.openSidePanel()
|
this.openSidePanel()
|
||||||
}
|
}
|
||||||
@ -165,7 +158,7 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
observerHandler(entries) {
|
observerHandler(entries) {
|
||||||
if (!entries[0].isIntersecting) {
|
if (!entries[0].isIntersecting) {
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
if (this.friendList.length < 20) {
|
if (this.friendList.length < 20) {
|
||||||
return;
|
return;
|
||||||
@ -201,8 +194,7 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey
|
return apiNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async myFollowName(name) {
|
async myFollowName(name) {
|
||||||
@ -211,7 +203,7 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
]
|
]
|
||||||
let namesJsonString = JSON.stringify({ "items": items })
|
let namesJsonString = JSON.stringify({ "items": items })
|
||||||
|
|
||||||
let ret = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
url: `/lists/followedNames?apiKey=${this.getApiKey()}`,
|
url: `/lists/followedNames?apiKey=${this.getApiKey()}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
@ -219,9 +211,6 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
},
|
},
|
||||||
body: `${namesJsonString}`
|
body: `${namesJsonString}`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
return ret
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async unFollowName(name) {
|
async unFollowName(name) {
|
||||||
@ -230,7 +219,7 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
]
|
]
|
||||||
let namesJsonString = JSON.stringify({ "items": items })
|
let namesJsonString = JSON.stringify({ "items": items })
|
||||||
|
|
||||||
let ret = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
url: `/lists/followedNames?apiKey=${this.getApiKey()}`,
|
url: `/lists/followedNames?apiKey=${this.getApiKey()}`,
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: {
|
headers: {
|
||||||
@ -238,9 +227,6 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
},
|
},
|
||||||
body: `${namesJsonString}`
|
body: `${namesJsonString}`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
return ret
|
|
||||||
}
|
}
|
||||||
async addToFriendList(val, isRemove){
|
async addToFriendList(val, isRemove){
|
||||||
const copyVal = {...val}
|
const copyVal = {...val}
|
||||||
@ -260,9 +246,9 @@ class FriendsView extends connect(store)(LitElement) {
|
|||||||
this.friendList = [...this.friendList, copyVal]
|
this.friendList = [...this.friendList, copyVal]
|
||||||
}
|
}
|
||||||
if(!copyVal.willFollow || isRemove) {
|
if(!copyVal.willFollow || isRemove) {
|
||||||
this.unFollowName(copyVal.name)
|
await this.unFollowName(copyVal.name)
|
||||||
} else if(copyVal.willFollow){
|
} else if(copyVal.willFollow){
|
||||||
this.myFollowName(copyVal.name)
|
await this.myFollowName(copyVal.name)
|
||||||
}
|
}
|
||||||
this.setMySelectedFeeds(val.mySelectedFeeds)
|
this.setMySelectedFeeds(val.mySelectedFeeds)
|
||||||
await new Promise((res)=> {
|
await new Promise((res)=> {
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
import { LitElement, html, css } from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import { render } from 'lit/html.js';
|
import {get, translate} from '../../../translate'
|
||||||
import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from '../../../translate/index.js'
|
|
||||||
import '@material/mwc-button';
|
import '@material/mwc-button';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import '@vaadin/tooltip';
|
import '@vaadin/tooltip';
|
||||||
import '@material/mwc-dialog';
|
import '@material/mwc-dialog';
|
||||||
import '@material/mwc-checkbox';
|
import '@material/mwc-checkbox';
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import { store } from '../../store';
|
import {store} from '../../store';
|
||||||
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
||||||
import { parentEpml } from '../show-plugin';
|
import {parentEpml} from '../show-plugin';
|
||||||
|
|
||||||
class ProfileModalUpdate extends connect(store)(LitElement) {
|
class ProfileModalUpdate extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -274,7 +273,7 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
|
|||||||
this.requestUpdate();
|
this.requestUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async firstUpdated() {
|
async firstUpdated() {
|
||||||
@ -335,19 +334,14 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
store.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return store.getState().app.nodeConfig.knownNodes[
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clearFields() {
|
clearFields() {
|
||||||
@ -549,12 +543,12 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
|
|||||||
<div
|
<div
|
||||||
style="display:flex;justify-content:center;flex-direction:column;gap:25px"
|
style="display:flex;justify-content:center;flex-direction:column;gap:25px"
|
||||||
>
|
>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style="display:flex;gap:15px;align-items:center"
|
style="display:flex;gap:15px;align-items:center"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
|
|
||||||
style="color: var(--black);font-size:16px"
|
style="color: var(--black);font-size:16px"
|
||||||
>
|
>
|
||||||
${key}
|
${key}
|
||||||
@ -592,9 +586,9 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
|
|||||||
>
|
>
|
||||||
${translate('general.close')}
|
${translate('general.close')}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div style="display:flex;gap:10px;align-items:center">
|
<div style="display:flex;gap:10px;align-items:center">
|
||||||
|
|
||||||
<button
|
<button
|
||||||
?disabled="${this.isLoading}"
|
?disabled="${this.isLoading}"
|
||||||
class="modal-button"
|
class="modal-button"
|
||||||
@ -718,7 +712,7 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
|
|||||||
class="input"
|
class="input"
|
||||||
.value=${this.newFieldName}
|
.value=${this.newFieldName}
|
||||||
@change=${(e) => {
|
@change=${(e) => {
|
||||||
this.newFieldName = e.target.value
|
this.newFieldName = e.target.value
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { LitElement, html, css } from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import './friends-side-panel.js';
|
import './friends-side-panel.js';
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import { store } from '../../store.js';
|
import {store} from '../../store.js';
|
||||||
import WebWorker2 from '../WebWorkerFile.js';
|
import WebWorker2 from '../WebWorkerFile.js';
|
||||||
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
||||||
import '@vaadin/tooltip';
|
import '@vaadin/tooltip';
|
||||||
import { get, translate } from '../../../translate/index.js'
|
import {get, translate} from '../../../translate'
|
||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
import '@polymer/paper-dialog/paper-dialog.js';
|
import '@polymer/paper-dialog/paper-dialog.js';
|
||||||
|
|
||||||
@ -14,20 +14,15 @@ import {
|
|||||||
decryptGroupData,
|
decryptGroupData,
|
||||||
encryptDataGroup,
|
encryptDataGroup,
|
||||||
objectToBase64,
|
objectToBase64,
|
||||||
uint8ArrayToBase64,
|
|
||||||
uint8ArrayToObject,
|
uint8ArrayToObject,
|
||||||
} from '../../../../plugins/plugins/core/components/qdn-action-encryption.js';
|
} from '../../../../plugins/plugins/core/components/qdn-action-encryption.js';
|
||||||
import { publishData } from '../../../../plugins/plugins/utils/publish-image.js';
|
import {publishData} from '../../../../plugins/plugins/utils/publish-image.js';
|
||||||
import { parentEpml } from '../show-plugin.js';
|
import {parentEpml} from '../show-plugin.js';
|
||||||
import '../notification-view/popover.js';
|
import '../notification-view/popover.js';
|
||||||
import './avatar.js';
|
import './avatar.js';
|
||||||
import {
|
import {setNewTab, setProfileData, setSideEffectAction,} from '../../redux/app/app-actions.js';
|
||||||
setNewTab,
|
|
||||||
setProfileData,
|
|
||||||
setSideEffectAction,
|
|
||||||
} from '../../redux/app/app-actions.js';
|
|
||||||
import './profile-modal-update.js';
|
import './profile-modal-update.js';
|
||||||
import { modalHelper } from '../../../../plugins/plugins/utils/publish-modal.js';
|
import {modalHelper} from '../../../../plugins/plugins/utils/publish-modal.js';
|
||||||
|
|
||||||
class ProfileQdn extends connect(store)(LitElement) {
|
class ProfileQdn extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -288,19 +283,14 @@ class ProfileQdn extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getRawData(dataItem) {
|
async getRawData(dataItem) {
|
||||||
@ -323,10 +313,9 @@ class ProfileQdn extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async followNames(names) {
|
async followNames(names) {
|
||||||
let items = names;
|
let namesJsonString = JSON.stringify({ items: names });
|
||||||
let namesJsonString = JSON.stringify({ items: items });
|
|
||||||
|
|
||||||
let ret = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
url: `/lists/followedNames?apiKey=${this.myNode.apiKey}`,
|
url: `/lists/followedNames?apiKey=${this.myNode.apiKey}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
@ -334,8 +323,6 @@ class ProfileQdn extends connect(store)(LitElement) {
|
|||||||
},
|
},
|
||||||
body: `${namesJsonString}`,
|
body: `${namesJsonString}`,
|
||||||
});
|
});
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async setValues(response, resource) {
|
async setValues(response, resource) {
|
||||||
@ -426,8 +413,7 @@ class ProfileQdn extends connect(store)(LitElement) {
|
|||||||
async getProfile() {
|
async getProfile() {
|
||||||
try {
|
try {
|
||||||
this.error = '';
|
this.error = '';
|
||||||
const arbFee = await this.getArbitraryFee();
|
this.fee = await this.getArbitraryFee();
|
||||||
this.fee = arbFee;
|
|
||||||
this.hasAttemptedToFetchResource = true;
|
this.hasAttemptedToFetchResource = true;
|
||||||
let resource;
|
let resource;
|
||||||
|
|
||||||
@ -459,7 +445,7 @@ class ProfileQdn extends connect(store)(LitElement) {
|
|||||||
try {
|
try {
|
||||||
const response = await this.getRawData(dataItem);
|
const response = await this.getRawData(dataItem);
|
||||||
if (response.wallets) {
|
if (response.wallets) {
|
||||||
this.setValues(response, dataItem);
|
await this.setValues(response, dataItem);
|
||||||
} else {
|
} else {
|
||||||
this.error = 'Cannot get saved user settings';
|
this.error = 'Cannot get saved user settings';
|
||||||
}
|
}
|
||||||
@ -574,11 +560,10 @@ class ProfileQdn extends connect(store)(LitElement) {
|
|||||||
const toBase64 = await objectToBase64(
|
const toBase64 = await objectToBase64(
|
||||||
newObject.customData[key]
|
newObject.customData[key]
|
||||||
);
|
);
|
||||||
const encryptedData = encryptDataGroup({
|
newObject['customData'][key] = encryptDataGroup({
|
||||||
data64: toBase64,
|
data64: toBase64,
|
||||||
publicKeys: [],
|
publicKeys: [],
|
||||||
});
|
});
|
||||||
newObject['customData'][key] = encryptedData;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
newObject['customData'][key] = newObject.customData[key];
|
newObject['customData'][key] = newObject.customData[key];
|
||||||
@ -814,11 +799,7 @@ class ProfileQdn extends connect(store)(LitElement) {
|
|||||||
const findIndex = friendList.findIndex(
|
const findIndex = friendList.findIndex(
|
||||||
(friend) => friend.name === name
|
(friend) => friend.name === name
|
||||||
);
|
);
|
||||||
if (findIndex !== -1) {
|
this.isFriend = findIndex !== -1;
|
||||||
this.isFriend = true;
|
|
||||||
} else {
|
|
||||||
this.isFriend = false;
|
|
||||||
}
|
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
import {css, html, LitElement} from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import './friends-side-panel.js';
|
import './friends-side-panel.js';
|
||||||
import { connect } from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import { store } from '../../store.js';
|
import {store} from '../../store.js';
|
||||||
import WebWorker from '../WebWorkerFile.js';
|
import WebWorker from '../WebWorkerFile.js';
|
||||||
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
import '@polymer/paper-spinner/paper-spinner-lite.js';
|
||||||
import '@vaadin/tooltip';
|
import '@vaadin/tooltip';
|
||||||
import { get, translate } from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
decryptGroupData,
|
decryptGroupData,
|
||||||
|
|
||||||
encryptDataGroup,
|
encryptDataGroup,
|
||||||
objectToBase64,
|
objectToBase64,
|
||||||
uint8ArrayToObject,
|
uint8ArrayToObject,
|
||||||
@ -19,7 +18,7 @@ import {
|
|||||||
import {publishData} from '../../../../plugins/plugins/utils/publish-image.js';
|
import {publishData} from '../../../../plugins/plugins/utils/publish-image.js';
|
||||||
import {parentEpml} from '../show-plugin.js';
|
import {parentEpml} from '../show-plugin.js';
|
||||||
import '../notification-view/popover.js';
|
import '../notification-view/popover.js';
|
||||||
import { setNewTab } from '../../redux/app/app-actions.js';
|
import {setNewTab} from '../../redux/app/app-actions.js';
|
||||||
|
|
||||||
class SaveSettingsQdn extends connect(store)(LitElement) {
|
class SaveSettingsQdn extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -144,19 +143,14 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getRawData(dataItem) {
|
async getRawData(dataItem) {
|
||||||
@ -165,8 +159,7 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
const data = await res.text();
|
const data = await res.text();
|
||||||
if (data.error) throw new Error('Cannot retrieve your data from qdn');
|
if (data.error) throw new Error('Cannot retrieve your data from qdn');
|
||||||
const decryptedData = decryptGroupData(data);
|
const decryptedData = decryptGroupData(data);
|
||||||
const decryptedDataToBase64 = uint8ArrayToObject(decryptedData);
|
return uint8ArrayToObject(decryptedData);
|
||||||
return decryptedDataToBase64;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getMyFollowedNames() {
|
async getMyFollowedNames() {
|
||||||
@ -184,10 +177,9 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async followNames(names) {
|
async followNames(names) {
|
||||||
let items = names
|
let namesJsonString = JSON.stringify({ "items": names })
|
||||||
let namesJsonString = JSON.stringify({ "items": items })
|
|
||||||
|
|
||||||
let ret = await parentEpml.request('apiCall', {
|
return await parentEpml.request('apiCall', {
|
||||||
url: `/lists/followedNames?apiKey=${this.myNode.apiKey}`,
|
url: `/lists/followedNames?apiKey=${this.myNode.apiKey}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
@ -195,9 +187,6 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
},
|
},
|
||||||
body: `${namesJsonString}`
|
body: `${namesJsonString}`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
return ret
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async setValues(response, resource) {
|
async setValues(response, resource) {
|
||||||
@ -322,8 +311,7 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
async getGeneralSettingsQdn() {
|
async getGeneralSettingsQdn() {
|
||||||
try {
|
try {
|
||||||
this.error = ""
|
this.error = ""
|
||||||
const arbFee = await this.getArbitraryFee();
|
this.fee = await this.getArbitraryFee();
|
||||||
this.fee = arbFee;
|
|
||||||
this.hasAttemptedToFetchResource = true;
|
this.hasAttemptedToFetchResource = true;
|
||||||
let resource;
|
let resource;
|
||||||
let nameObject
|
let nameObject
|
||||||
@ -331,7 +319,7 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
nameObject = store.getState().app.accountInfo.names[0];
|
nameObject = store.getState().app.accountInfo.names[0];
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!nameObject) {
|
if (!nameObject) {
|
||||||
this.name = null;
|
this.name = null;
|
||||||
@ -358,7 +346,7 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
try {
|
try {
|
||||||
const response = await this.getRawData(dataItem);
|
const response = await this.getRawData(dataItem);
|
||||||
if (response.version) {
|
if (response.version) {
|
||||||
this.setValues(response, dataItem);
|
await this.setValues(response, dataItem);
|
||||||
} else {
|
} else {
|
||||||
this.error = 'Cannot get saved user settings';
|
this.error = 'Cannot get saved user settings';
|
||||||
}
|
}
|
||||||
@ -514,9 +502,9 @@ class SaveSettingsQdn extends connect(store)(LitElement) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.resourceExists = true;
|
this.resourceExists = true;
|
||||||
this.setValues(newObject, {
|
await this.setValues(newObject, {
|
||||||
updated: Date.now(),
|
updated: Date.now(),
|
||||||
});
|
});
|
||||||
localStorage.setItem('temp-settings-data', JSON.stringify({}));
|
localStorage.setItem('temp-settings-data', JSON.stringify({}));
|
||||||
this.valuesToBeSavedOnQdn = {};
|
this.valuesToBeSavedOnQdn = {};
|
||||||
worker.terminate();
|
worker.terminate();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {registerTranslateConfig, translate, use} from '../../translate/index.js'
|
import {registerTranslateConfig, translate, use} from '../../translate'
|
||||||
|
|
||||||
registerTranslateConfig({
|
registerTranslateConfig({
|
||||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import {get, translate} from '../../../translate/index.js'
|
import {get, translate} from '../../../translate'
|
||||||
|
|
||||||
import {createWallet} from '../../../../crypto/api/createWallet.js'
|
import {createWallet} from '../../../../crypto/api/createWallet.js'
|
||||||
import {doLogin, doLogout, doSelectAddress} from '../../redux/app/app-actions.js'
|
import {doLogin, doLogout, doSelectAddress} from '../../redux/app/app-actions.js'
|
||||||
@ -593,7 +593,7 @@ class CreateAccountSection extends connect(store)(LitElement) {
|
|||||||
const dataString = JSON.stringify(data)
|
const dataString = JSON.stringify(data)
|
||||||
const blob = new Blob([dataString], { type: 'text/plain;charset=utf-8' })
|
const blob = new Blob([dataString], { type: 'text/plain;charset=utf-8' })
|
||||||
backupname = "qortal_backup_" + wallet.addresses[0].address + ".json"
|
backupname = "qortal_backup_" + wallet.addresses[0].address + ".json"
|
||||||
this.saveFileToDisk(blob, backupname)
|
await this.saveFileToDisk(blob, backupname)
|
||||||
}
|
}
|
||||||
|
|
||||||
async downloadSeedphrase() {
|
async downloadSeedphrase() {
|
||||||
@ -601,7 +601,7 @@ class CreateAccountSection extends connect(store)(LitElement) {
|
|||||||
const seed = this.shadowRoot.getElementById('randSentence').parsedString
|
const seed = this.shadowRoot.getElementById('randSentence').parsedString
|
||||||
const blob = new Blob([seed], { type: 'text/plain;charset=utf-8' })
|
const blob = new Blob([seed], { type: 'text/plain;charset=utf-8' })
|
||||||
seedname = "qortal_seedphrase.txt"
|
seedname = "qortal_seedphrase.txt"
|
||||||
this.saveFileToDisk(blob, seedname)
|
await this.saveFileToDisk(blob, seedname)
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveFileToDisk(blob, fileName) {
|
async saveFileToDisk(blob, fileName) {
|
||||||
|
@ -2,14 +2,21 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import {checkApiKey} from '../../apiKeyUtils.js'
|
import {checkApiKey} from '../../apiKeyUtils.js'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
import {doLogin, doSelectAddress} from '../../redux/app/app-actions.js'
|
||||||
|
import {doRemoveWallet, doStoreWallet} from '../../redux/user/user-actions.js'
|
||||||
|
import {createWallet} from '../../../../crypto/api/createWallet.js'
|
||||||
|
import snackbar from '../../functional-components/snackbar.js'
|
||||||
|
import '../../custom-elements/frag-file-input.js'
|
||||||
|
import ripple from '../../functional-components/loading-ripple.js'
|
||||||
|
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-checkbox'
|
import '@material/mwc-checkbox'
|
||||||
import '@material/mwc-textfield'
|
|
||||||
import '@material/mwc-icon'
|
|
||||||
import '@material/mwc-dialog'
|
import '@material/mwc-dialog'
|
||||||
import '@material/mwc-formfield'
|
import '@material/mwc-formfield'
|
||||||
|
import '@material/mwc-icon'
|
||||||
|
import '@material/mwc-icon-button'
|
||||||
|
import '@material/mwc-textfield'
|
||||||
import '@polymer/iron-pages'
|
import '@polymer/iron-pages'
|
||||||
import '@polymer/paper-input/paper-input-container.js'
|
import '@polymer/paper-input/paper-input-container.js'
|
||||||
import '@polymer/paper-input/paper-input.js'
|
import '@polymer/paper-input/paper-input.js'
|
||||||
@ -18,12 +25,6 @@ import '@polymer/iron-collapse'
|
|||||||
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||||
import '@vaadin/text-field/vaadin-text-field.js'
|
import '@vaadin/text-field/vaadin-text-field.js'
|
||||||
import '@vaadin/password-field/vaadin-password-field.js'
|
import '@vaadin/password-field/vaadin-password-field.js'
|
||||||
import {doLogin, doSelectAddress} from '../../redux/app/app-actions.js'
|
|
||||||
import {doRemoveWallet, doStoreWallet} from '../../redux/user/user-actions.js'
|
|
||||||
import {createWallet} from '../../../../crypto/api/createWallet.js'
|
|
||||||
import snackbar from '../../functional-components/snackbar.js'
|
|
||||||
import '../../custom-elements/frag-file-input.js'
|
|
||||||
import ripple from '../../functional-components/loading-ripple.js'
|
|
||||||
|
|
||||||
class LoginSection extends connect(store)(LitElement) {
|
class LoginSection extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -124,15 +125,15 @@ class LoginSection extends connect(store)(LitElement) {
|
|||||||
return html`
|
return html`
|
||||||
<style>
|
<style>
|
||||||
#loginSection {
|
#loginSection {
|
||||||
padding:0;
|
padding: 0;
|
||||||
text-align:left;
|
text-align: left;
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
--paper-spinner-color: var(--mdc-theme-primary);
|
--paper-spinner-color: var(--mdc-theme-primary);
|
||||||
--paper-spinner-stroke-width: 2px;
|
--paper-spinner-stroke-width: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#loginPages{
|
#loginPages{
|
||||||
overflow:visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
#walletsPage {
|
#walletsPage {
|
||||||
@ -167,7 +168,7 @@ class LoginSection extends connect(store)(LitElement) {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
margin:0;
|
margin: 0;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
@ -213,21 +214,21 @@ class LoginSection extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
*[hidden] {
|
*[hidden] {
|
||||||
display:none !important;
|
display: none !important;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
padding-top:0;
|
padding-top: 0;
|
||||||
margin:0;
|
margin: 0;
|
||||||
font-size:24px;
|
font-size: 24px;
|
||||||
font-weight:100;
|
font-weight: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
.accountIcon {
|
.accountIcon {
|
||||||
font-size:42px;
|
font-size: 42px;
|
||||||
padding-top:8px;
|
padding-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#unlockStoredPage {
|
#unlockStoredPage {
|
||||||
@ -241,9 +242,9 @@ class LoginSection extends connect(store)(LitElement) {
|
|||||||
@media only screen and (max-width: ${getComputedStyle(document.body).getPropertyValue('--layout-breakpoint-tablet')}) {
|
@media only screen and (max-width: ${getComputedStyle(document.body).getPropertyValue('--layout-breakpoint-tablet')}) {
|
||||||
/* Mobile */
|
/* Mobile */
|
||||||
#wallets {
|
#wallets {
|
||||||
height:100%;
|
height: 100%;
|
||||||
overflow-y:auto;
|
overflow-y: auto;
|
||||||
overflow-x:hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#loginSection {
|
#loginSection {
|
||||||
@ -256,15 +257,15 @@ class LoginSection extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.backButton {
|
.backButton {
|
||||||
padding:14px;
|
padding: 14px;
|
||||||
text-align:left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pagesContainer {
|
#pagesContainer {
|
||||||
max-height: calc(var(--window-height) - 184px);
|
max-height: calc(var(--window-height) - 184px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkboxLabel:hover{
|
.checkboxLabel:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import {stateAwait} from '../../stateAwait.js'
|
import {stateAwait} from '../../stateAwait.js'
|
||||||
import {get} from '../../../translate/index.js'
|
import {get} from '../../../translate'
|
||||||
|
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
@ -22,10 +22,12 @@ import {
|
|||||||
allowQAPPAutoAuth,
|
allowQAPPAutoAuth,
|
||||||
allowQAPPAutoFriendsList,
|
allowQAPPAutoFriendsList,
|
||||||
allowQAPPAutoLists,
|
allowQAPPAutoLists,
|
||||||
|
allowShowSyncIndicator,
|
||||||
removeAutoLoadImageChat,
|
removeAutoLoadImageChat,
|
||||||
removeQAPPAutoAuth,
|
removeQAPPAutoAuth,
|
||||||
removeQAPPAutoFriendsList,
|
removeQAPPAutoFriendsList,
|
||||||
removeQAPPAutoLists,
|
removeQAPPAutoLists,
|
||||||
|
removeShowSyncIndicator,
|
||||||
setNewNotification,
|
setNewNotification,
|
||||||
setNewTab,
|
setNewTab,
|
||||||
setSideEffectAction,
|
setSideEffectAction,
|
||||||
@ -47,7 +49,9 @@ window.reduxAction = {
|
|||||||
setNewNotification: setNewNotification,
|
setNewNotification: setNewNotification,
|
||||||
setSideEffectAction: setSideEffectAction,
|
setSideEffectAction: setSideEffectAction,
|
||||||
allowQAPPAutoFriendsList: allowQAPPAutoFriendsList,
|
allowQAPPAutoFriendsList: allowQAPPAutoFriendsList,
|
||||||
removeQAPPAutoFriendsList: removeQAPPAutoFriendsList
|
removeQAPPAutoFriendsList: removeQAPPAutoFriendsList,
|
||||||
|
allowShowSyncIndicator: allowShowSyncIndicator,
|
||||||
|
removeShowSyncIndicator: removeShowSyncIndicator
|
||||||
}
|
}
|
||||||
|
|
||||||
const animationDuration = 0.7 // Seconds
|
const animationDuration = 0.7 // Seconds
|
||||||
|
@ -346,8 +346,7 @@ var pJS = function (tag_id, params) {
|
|||||||
var shape_type = pJS.particles.shape.type
|
var shape_type = pJS.particles.shape.type
|
||||||
if (typeof (shape_type) === 'object') {
|
if (typeof (shape_type) === 'object') {
|
||||||
if (shape_type instanceof Array) {
|
if (shape_type instanceof Array) {
|
||||||
var shape_selected = shape_type[Math.floor(Math.random() * shape_type.length)]
|
this.shape = shape_type[Math.floor(Math.random() * shape_type.length)]
|
||||||
this.shape = shape_selected
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.shape = shape_type
|
this.shape = shape_type
|
||||||
@ -1255,11 +1254,11 @@ function hexToRgb(hex) {
|
|||||||
g: parseInt(result[2], 16),
|
g: parseInt(result[2], 16),
|
||||||
b: parseInt(result[3], 16)
|
b: parseInt(result[3], 16)
|
||||||
} : null
|
} : null
|
||||||
};
|
}
|
||||||
|
|
||||||
function clamp(number, min, max) {
|
function clamp(number, min, max) {
|
||||||
return Math.min(Math.max(number, min), max)
|
return Math.min(Math.max(number, min), max)
|
||||||
};
|
}
|
||||||
|
|
||||||
function isInArray(value, array) {
|
function isInArray(value, array) {
|
||||||
return array.indexOf(value) > -1
|
return array.indexOf(value) > -1
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
|
|
||||||
@ -13,68 +13,56 @@ class WelcomePage extends LitElement {
|
|||||||
backDisabled: { type: Boolean, notify: true },
|
backDisabled: { type: Boolean, notify: true },
|
||||||
backText: { type: String, notify: true },
|
backText: { type: String, notify: true },
|
||||||
hideNav: { type: Boolean, notify: true },
|
hideNav: { type: Boolean, notify: true },
|
||||||
|
welcomeMessage: { type: String },
|
||||||
theme: { type: String, reflect: true }
|
theme: { type: String, reflect: true }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static get styles() {
|
||||||
return [
|
return css`
|
||||||
css`
|
* {
|
||||||
* {
|
--mdc-theme-primary: var(--login-button);
|
||||||
--mdc-theme-primary: var(--login-button);
|
--mdc-theme-secondary: var(--mdc-theme-primary);
|
||||||
--mdc-theme-secondary: var(--mdc-theme-primary);
|
--mdc-button-outline-color: var(--general-color-blue);
|
||||||
--mdc-button-outline-color: var(--accent-color);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
mwc-button {
|
.button-outline {
|
||||||
margin: 6px;
|
margin: 6px;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
max-width:90vw;
|
max-width:90vw;
|
||||||
margin: 4px;
|
border-top: 0;
|
||||||
}
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.welcome-page {
|
.welcome-page {
|
||||||
padding: 12px 0;
|
padding: 12px 0;
|
||||||
}
|
overflow: hidden;
|
||||||
`
|
}
|
||||||
]
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
this.hideNav = true
|
this.hideNav = true
|
||||||
this.nextText = ''
|
this.nextText = ''
|
||||||
const welcomeMessage = 'Welcome to Qortal';
|
this.welcomeMessage = 'Welcome to Qortal'
|
||||||
this.welcomeMessage = welcomeMessage
|
|
||||||
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
|
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
|
||||||
}
|
}
|
||||||
|
|
||||||
firstUpdated() {
|
firstUpdated() {}
|
||||||
// ...
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return html`
|
return html`
|
||||||
<style>
|
<div class="welcome-page">
|
||||||
#mobile-logo {}
|
<mwc-button class="button-outline" @click=${() => this.navigate('login')} outlined>${translate("login.login")}</mwc-button>
|
||||||
@media only screen and (min-width: ${getComputedStyle(document.body).getPropertyValue('--layout-breakpoint-tablet')}) {
|
<mwc-button class="button-outline" @click=${() => this.navigate('create-account')} outlined>${translate("login.createaccount")}</mwc-button>
|
||||||
#mobile-logo {
|
|
||||||
display:hidden;
|
|
||||||
visibility:none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<div class='welcome-page' style="overflow:hidden;">
|
|
||||||
<div id="mobile-logo"></div>
|
|
||||||
<mwc-button @click=${() => this.navigate('login')} outlined style="border-top:0; border-bottom:0;">${translate("login.login")}</mwc-button>
|
|
||||||
<mwc-button @click=${() => this.navigate('create-account')} outlined style="border-top:0; border-bottom:0;">${translate("login.createaccount")}</mwc-button>
|
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
back() { }
|
back() {}
|
||||||
|
|
||||||
next() { }
|
next() {}
|
||||||
|
|
||||||
navigate(page) {
|
navigate(page) {
|
||||||
this.dispatchEvent(new CustomEvent('navigate', {
|
this.dispatchEvent(new CustomEvent('navigate', {
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import {doLogout} from '../../redux/app/app-actions.js'
|
import {doLogout} from '../../redux/app/app-actions.js'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
import '@polymer/paper-dialog/paper-dialog.js'
|
import '@polymer/paper-dialog/paper-dialog.js'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {registerTranslateConfig, translate, use} from '../../translate/index.js'
|
import {registerTranslateConfig, translate, use} from '../../translate'
|
||||||
|
|
||||||
registerTranslateConfig({
|
registerTranslateConfig({
|
||||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
||||||
|
@ -8,7 +8,7 @@ import '@polymer/iron-icons/iron-icons.js';
|
|||||||
import {store} from '../../store.js';
|
import {store} from '../../store.js';
|
||||||
import {setNewNotification} from '../../redux/app/app-actions.js';
|
import {setNewNotification} from '../../redux/app/app-actions.js';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import {get, translate} from '../../../translate/index.js'
|
import {get, translate} from '../../../translate'
|
||||||
import {repeat} from 'lit/directives/repeat.js';
|
import {repeat} from 'lit/directives/repeat.js';
|
||||||
import '../../../../plugins/plugins/core/components/TimeAgo.js';
|
import '../../../../plugins/plugins/core/components/TimeAgo.js';
|
||||||
import './popover.js';
|
import './popover.js';
|
||||||
@ -20,7 +20,6 @@ class NotificationBellGeneral extends connect(store)(LitElement) {
|
|||||||
showNotifications: { type: Boolean },
|
showNotifications: { type: Boolean },
|
||||||
notificationCount: { type: Boolean },
|
notificationCount: { type: Boolean },
|
||||||
theme: { type: String, reflect: true },
|
theme: { type: String, reflect: true },
|
||||||
notifications: { type: Array },
|
|
||||||
currentNotification: { type: Object },
|
currentNotification: { type: Object },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -294,19 +293,14 @@ class NotificationItemTx extends connect(store)(LitElement) {
|
|||||||
const myNode =
|
const myNode =
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
store.getState().app.nodeConfig.knownNodes[
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
];
|
]
|
||||||
|
|
||||||
const nodeUrl =
|
return myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
|
||||||
return nodeUrl;
|
|
||||||
}
|
}
|
||||||
getMyNode() {
|
getMyNode() {
|
||||||
const myNode =
|
return store.getState().app.nodeConfig.knownNodes[
|
||||||
store.getState().app.nodeConfig.knownNodes[
|
window.parent.reduxStore.getState().app.nodeConfig.node
|
||||||
window.parent.reduxStore.getState().app.nodeConfig.node
|
]
|
||||||
];
|
|
||||||
|
|
||||||
return myNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getStatus() {
|
async getStatus() {
|
||||||
@ -314,11 +308,10 @@ class NotificationItemTx extends connect(store)(LitElement) {
|
|||||||
let stop = false;
|
let stop = false;
|
||||||
const getAnswer = async () => {
|
const getAnswer = async () => {
|
||||||
const getTx = async (minterAddr) => {
|
const getTx = async (minterAddr) => {
|
||||||
const url = `${this.nodeUrl}/transactions/signature/${this.signature}`;
|
const url = `${this.nodeUrl}/transactions/signature/${this.signature}`
|
||||||
const res = await fetch(url);
|
const res = await fetch(url)
|
||||||
const data = await res.json();
|
return await res.json()
|
||||||
return data;
|
}
|
||||||
};
|
|
||||||
|
|
||||||
if (!stop) {
|
if (!stop) {
|
||||||
stop = true;
|
stop = true;
|
||||||
|
@ -43,8 +43,7 @@ class NotificationBell extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey
|
return apiNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getNotifications() {
|
async getNotifications() {
|
||||||
@ -69,8 +68,7 @@ class NotificationBell extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const data = await response.json()
|
return await response.json()
|
||||||
return data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stop && !this.showNotifications) {
|
if (!stop && !this.showNotifications) {
|
||||||
@ -97,25 +95,41 @@ class NotificationBell extends connect(store)(LitElement) {
|
|||||||
if (!this.initialFetch && notificationsToShow.length > 0) {
|
if (!this.initialFetch && notificationsToShow.length > 0) {
|
||||||
const mail = notificationsToShow[0]
|
const mail = notificationsToShow[0]
|
||||||
const urlPic = `${nodeUrl}/arbitrary/THUMBNAIL/${mail.name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
const urlPic = `${nodeUrl}/arbitrary/THUMBNAIL/${mail.name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||||
routes.showNotification({
|
await routes.showNotification({
|
||||||
data: { title: "New Q-Mail", type: "qapp", sound: config.messageAlert, url: "", options: { body: `You have an unread mail from ${mail.name}`, icon: urlPic, badge: urlPic } }
|
data: {
|
||||||
|
title: "New Q-Mail",
|
||||||
|
type: "qapp",
|
||||||
|
sound: config.messageAlert,
|
||||||
|
url: "",
|
||||||
|
options: {
|
||||||
|
body: `You have an unread mail from ${mail.name}`,
|
||||||
|
icon: urlPic,
|
||||||
|
badge: urlPic
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} else if (notificationsToShow.length > 0) {
|
} else if (notificationsToShow.length > 0) {
|
||||||
if (notificationsToShow[0].created > (this.notifications[0]?.created || 0)) {
|
if (notificationsToShow[0].created > (this.notifications[0]?.created || 0)) {
|
||||||
const mail = notificationsToShow[0]
|
const mail = notificationsToShow[0]
|
||||||
const urlPic = `${nodeUrl}/arbitrary/THUMBNAIL/${mail.name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
const urlPic = `${nodeUrl}/arbitrary/THUMBNAIL/${mail.name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||||
routes.showNotification({
|
await routes.showNotification({
|
||||||
data: { title: "New Q-Mail", type: "qapp", sound: config.messageAlert, url: "", options: { body: `You have an unread mail from ${mail.name}`, icon: urlPic, badge: urlPic } }
|
data: {
|
||||||
|
title: "New Q-Mail",
|
||||||
|
type: "qapp",
|
||||||
|
sound: config.messageAlert,
|
||||||
|
url: "",
|
||||||
|
options: {
|
||||||
|
body: `You have an unread mail from ${mail.name}`,
|
||||||
|
icon: urlPic,
|
||||||
|
badge: urlPic
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.notifications = notificationsToShow
|
this.notifications = notificationsToShow
|
||||||
|
|
||||||
if (this.notifications.length === 0) {
|
this.notificationCount = this.notifications.length !== 0;
|
||||||
this.notificationCount = false
|
|
||||||
} else {
|
|
||||||
this.notificationCount = true
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.initialFetch) this.initialFetch = true
|
if (!this.initialFetch) this.initialFetch = true
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {get, translate} from '../../translate/index.js'
|
import {get, translate} from '../../translate'
|
||||||
import snackbar from '../functional-components/snackbar.js'
|
import snackbar from '../functional-components/snackbar.js'
|
||||||
|
|
||||||
import '@polymer/paper-icon-button/paper-icon-button.js'
|
import '@polymer/paper-icon-button/paper-icon-button.js'
|
||||||
@ -118,7 +118,7 @@ class SearchModal extends LitElement {
|
|||||||
dismiss: true
|
dismiss: true
|
||||||
})
|
})
|
||||||
this.shadowRoot.getElementById('searchContent').value = this.searchContentString
|
this.shadowRoot.getElementById('searchContent').value = this.searchContentString
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
let sendInfoAddress = this.shadowRoot.getElementById('searchContent').value
|
let sendInfoAddress = this.shadowRoot.getElementById('searchContent').value
|
||||||
const infoDialog = document.getElementById('main-app').shadowRoot.querySelector('app-view').shadowRoot.querySelector('user-info-view')
|
const infoDialog = document.getElementById('main-app').shadowRoot.querySelector('app-view').shadowRoot.querySelector('user-info-view')
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { LitElement, html, css } from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import { connect } from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import { store } from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import { get, translate } from '../../../translate/index.js'
|
import {get, translate} from '../../../translate'
|
||||||
|
|
||||||
class AccountView extends connect(store)(LitElement) {
|
class AccountView extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -127,8 +127,7 @@ class AccountView extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey
|
return apiNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stateChanged(state) {
|
stateChanged(state) {
|
||||||
@ -136,4 +135,4 @@ class AccountView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.customElements.define('account-view', AccountView)
|
window.customElements.define('account-view', AccountView)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import { Epml } from '../../epml.js'
|
import {Epml} from '../../epml.js'
|
||||||
import { addTradeBotRoutes } from '../../tradebot/addTradeBotRoutes.js'
|
import {addTradeBotRoutes} from '../../tradebot/addTradeBotRoutes.js'
|
||||||
import {get, translate} from '../../../translate/index.js'
|
import {get, translate} from '../../../translate'
|
||||||
import snackbar from '../../functional-components/snackbar.js'
|
import snackbar from '../../functional-components/snackbar.js'
|
||||||
import FileSaver from 'file-saver'
|
import FileSaver from 'file-saver'
|
||||||
|
|
||||||
@ -427,7 +427,7 @@ class ExportKeys extends connect(store)(LitElement) {
|
|||||||
addTradeBotRoutes(parentEpml)
|
addTradeBotRoutes(parentEpml)
|
||||||
parentEpml.imReady()
|
parentEpml.imReady()
|
||||||
await this.fetchArrrWalletAddress()
|
await this.fetchArrrWalletAddress()
|
||||||
this.checkArrrWalletPrivateKey()
|
await this.checkArrrWalletPrivateKey()
|
||||||
}
|
}
|
||||||
|
|
||||||
async fetchArrrWalletAddress() {
|
async fetchArrrWalletAddress() {
|
||||||
@ -518,10 +518,10 @@ class ExportKeys extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
if (resRepair != null && resRepair.error != 128) {
|
if (resRepair != null && resRepair.error != 128) {
|
||||||
this.shadowRoot.querySelector('#pleaseWaitDialog').close()
|
this.shadowRoot.querySelector('#pleaseWaitDialog').close()
|
||||||
this.openOkDialog()
|
await this.openOkDialog()
|
||||||
} else {
|
} else {
|
||||||
this.shadowRoot.querySelector('#pleaseWaitDialog').close()
|
this.shadowRoot.querySelector('#pleaseWaitDialog').close()
|
||||||
this.openErrorDialog()
|
await this.openErrorDialog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,7 +558,7 @@ class ExportKeys extends connect(store)(LitElement) {
|
|||||||
const myCoinAddress = cAddress
|
const myCoinAddress = cAddress
|
||||||
const blob = new Blob([`${myPrivateMasterKey}`], { type: 'text/plain;charset=utf-8' })
|
const blob = new Blob([`${myPrivateMasterKey}`], { type: 'text/plain;charset=utf-8' })
|
||||||
exportname = "Private_Master_Key_" + myCoinName + "_" + myCoinAddress + ".txt"
|
exportname = "Private_Master_Key_" + myCoinName + "_" + myCoinAddress + ".txt"
|
||||||
this.saveFileToDisk(blob, exportname)
|
await this.saveFileToDisk(blob, exportname)
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveFileToDisk(blob, fileName) {
|
async saveFileToDisk(blob, fileName) {
|
||||||
@ -590,8 +590,7 @@ class ExportKeys extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey
|
return apiNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
|
import {allowShowSyncIndicator, removeShowSyncIndicator} from '../../redux/app/app-actions.js'
|
||||||
import {doSetQChatNotificationConfig} from '../../redux/user/user-actions.js'
|
import {doSetQChatNotificationConfig} from '../../redux/user/user-actions.js'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
import isElectron from 'is-electron'
|
import isElectron from 'is-electron'
|
||||||
|
|
||||||
import '@material/mwc-checkbox'
|
import '@material/mwc-checkbox'
|
||||||
|
|
||||||
|
|
||||||
class NotificationsView extends connect(store)(LitElement) {
|
class NotificationsView extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
notificationConfig: { type: Object },
|
notificationConfig: { type: Object },
|
||||||
q_chatConfig: { type: Object },
|
q_chatConfig: { type: Object },
|
||||||
theme: { type: String, reflect: true },
|
theme: { type: String, reflect: true },
|
||||||
appNotificationList: {type: Array}
|
appNotificationList: { type: Array }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,8 +26,8 @@ class NotificationsView extends connect(store)(LitElement) {
|
|||||||
this.appNotificationList = [] // Fetch the list of apps from local storage
|
this.appNotificationList = [] // Fetch the list of apps from local storage
|
||||||
}
|
}
|
||||||
|
|
||||||
firstUpdated(){
|
firstUpdated() {
|
||||||
this.appNotificationList = this.getAppsFromStorage();
|
this.appNotificationList = this.getAppsFromStorage()
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static get styles() {
|
||||||
@ -54,6 +54,16 @@ class NotificationsView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.checkbox-row {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
align-content: center;
|
||||||
|
font-family: Montserrat, sans-serif;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--black);
|
||||||
|
}
|
||||||
|
|
||||||
.content-box {
|
.content-box {
|
||||||
border: 1px solid #a1a1a1;
|
border: 1px solid #a1a1a1;
|
||||||
padding: 10px 25px;
|
padding: 10px 25px;
|
||||||
@ -112,82 +122,91 @@ class NotificationsView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.remove-button {
|
.remove-button {
|
||||||
font-family: Roboto, sans-serif;
|
font-family: Roboto, sans-serif;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: var(--mdc-theme-primary);
|
color: var(--mdc-theme-primary);
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
padding: 8px 10px;
|
padding: 8px 10px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border: none;
|
border: none;
|
||||||
transition: all 0.3s ease-in-out;
|
transition: all 0.3s ease-in-out;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return html`
|
return html`
|
||||||
<div class="sub-main">
|
<div class="sub-main">
|
||||||
<div class="notification-box">
|
<div class="notification-box">
|
||||||
<div class="content-box">
|
<div class="content-box">
|
||||||
<h4> Q-Chat ${translate("settings.notifications")} </h4>
|
<h4> Q-Chat ${translate("settings.notifications")} </h4>
|
||||||
|
|
||||||
<div style="line-height: 3rem;">
|
<div style="line-height: 3rem;">
|
||||||
<mwc-checkbox id="qChatPlaySound" @click=${e => this.setQChatNotificationConfig({ type: 'PLAY_SOUND', value: e.target.checked })} ?checked=${this.q_chatConfig.playSound}></mwc-checkbox>
|
<mwc-checkbox id="qChatPlaySound" @click=${e => this.setQChatNotificationConfig({ type: 'PLAY_SOUND', value: e.target.checked })} ?checked=${this.q_chatConfig.playSound}></mwc-checkbox>
|
||||||
<label
|
<label
|
||||||
for="qChatPlaySound"
|
for="qChatPlaySound"
|
||||||
@click=${() => this.shadowRoot.getElementById('qChatPlaySound').click()}
|
@click=${() => this.shadowRoot.getElementById('qChatPlaySound').click()}
|
||||||
>${translate("settings.playsound")}</label>
|
>
|
||||||
</div>
|
${translate("settings.playsound")}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="line-height: 3rem;">
|
<div style="line-height: 3rem;">
|
||||||
<mwc-checkbox id="qChatShowNotification" @click=${e => this.setQChatNotificationConfig({ type: 'SHOW_NOTIFICATION', value: e.target.checked })} ?checked=${this.q_chatConfig.showNotification}></mwc-checkbox>
|
<mwc-checkbox id="qChatShowNotification" @click=${e => this.setQChatNotificationConfig({ type: 'SHOW_NOTIFICATION', value: e.target.checked })} ?checked=${this.q_chatConfig.showNotification}></mwc-checkbox>
|
||||||
<label
|
<label
|
||||||
for="qChatShowNotification"
|
for="qChatShowNotification"
|
||||||
@click=${() => this.shadowRoot.getElementById('qChatShowNotification').click()}
|
@click=${() => this.shadowRoot.getElementById('qChatShowNotification').click()}
|
||||||
>${translate("settings.shownotifications")}</label>
|
>
|
||||||
</div>
|
${translate("settings.shownotifications")}
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-box">
|
|
||||||
<h4>${translate("settings.qappNotification1")}</h4>
|
|
||||||
${this.appNotificationList.map((app)=> html`
|
|
||||||
<div style="display: flex; justify-content: space-between; margin-top: 10px;">
|
|
||||||
${app}
|
|
||||||
<button class="remove-button" @click=${() => this.removeApp(app)}>Remove</button>
|
|
||||||
</div>
|
|
||||||
`)}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
${this.renderSetCoreButton()}
|
<div class="content-box">
|
||||||
|
<h4>${translate("settings.qappNotification1")}</h4>
|
||||||
|
${this.appNotificationList.map((app) => html`
|
||||||
|
<div style="display: flex; justify-content: space-between; margin-top: 10px;">
|
||||||
|
${app}
|
||||||
|
<button class="remove-button" @click=${() => this.removeApp(app)}>Remove</button>
|
||||||
|
</div>
|
||||||
|
`)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="checkbox-row">
|
||||||
|
<label for="syncIndicator" id="syncIndicatorLabel" style="color: var(--black);">
|
||||||
|
${translate("settings.sync_indicator")}
|
||||||
|
</label>
|
||||||
|
<mwc-checkbox style="margin-right: -15px;" id="syncIndicator" @click=${(e) => this.checkForSyncMessages(e)} ?checked=${store.getState().app.showSyncIndicator}></mwc-checkbox>
|
||||||
|
</div>
|
||||||
|
${this.renderSetCoreButton()}
|
||||||
|
</div>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
getAppsFromStorage() {
|
getAppsFromStorage() {
|
||||||
// Your method to fetch the list of apps from local storage
|
// Your method to fetch the list of apps from local storage
|
||||||
// Example:
|
// Example:
|
||||||
const address= store.getState().app.selectedAddress.address
|
const address = store.getState().app.selectedAddress.address
|
||||||
const id = `appNotificationList-${address}`;
|
const id = `appNotificationList-${address}`
|
||||||
const data = localStorage.getItem(id);
|
const data = localStorage.getItem(id)
|
||||||
return data ? Object.keys(JSON.parse(data)) : [];
|
return data ? Object.keys(JSON.parse(data)) : []
|
||||||
}
|
}
|
||||||
|
|
||||||
removeApp(appName) {
|
removeApp(appName) {
|
||||||
// Remove the app from local storage
|
// Remove the app from local storage
|
||||||
this.removeAppFromStorage(appName);
|
this.removeAppFromStorage(appName);
|
||||||
// Update the apps list in the component
|
// Update the apps list in the component
|
||||||
this.appNotificationList = this.appNotificationList.filter(app => app !== appName);
|
this.appNotificationList = this.appNotificationList.filter(app => app !== appName);
|
||||||
}
|
}
|
||||||
|
|
||||||
removeAppFromStorage(appName) {
|
removeAppFromStorage(appName) {
|
||||||
// Your method to remove the app from local storage
|
// Your method to remove the app from local storage
|
||||||
const address= store.getState().app.selectedAddress.address
|
const address= store.getState().app.selectedAddress.address
|
||||||
const id = `appNotificationList-${address}`;
|
const id = `appNotificationList-${address}`;
|
||||||
const data = JSON.parse(localStorage.getItem(id) || '{}');
|
const data = JSON.parse(localStorage.getItem(id) || '{}');
|
||||||
delete data[appName];
|
delete data[appName];
|
||||||
localStorage.setItem(id, JSON.stringify(data));
|
localStorage.setItem(id, JSON.stringify(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
renderSetCoreButton() {
|
renderSetCoreButton() {
|
||||||
if (!isElectron()) {
|
if (!isElectron()) {
|
||||||
@ -205,6 +224,14 @@ class NotificationsView extends connect(store)(LitElement) {
|
|||||||
window.electronAPI.setStartCore()
|
window.electronAPI.setStartCore()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkForSyncMessages(e) {
|
||||||
|
if (e.target.checked) {
|
||||||
|
store.dispatch(removeShowSyncIndicator(false))
|
||||||
|
} else {
|
||||||
|
store.dispatch(allowShowSyncIndicator(true))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stateChanged(state) {
|
stateChanged(state) {
|
||||||
this.notificationConfig = state.user.notifications
|
this.notificationConfig = state.user.notifications
|
||||||
this.q_chatConfig = this.notificationConfig.q_chat
|
this.q_chatConfig = this.notificationConfig.q_chat
|
||||||
@ -226,8 +253,6 @@ class NotificationsView extends connect(store)(LitElement) {
|
|||||||
store.dispatch(doSetQChatNotificationConfig(data))
|
store.dispatch(doSetQChatNotificationConfig(data))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.customElements.define('notifications-view', NotificationsView)
|
window.customElements.define('notifications-view', NotificationsView)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
import '@material/mwc-textfield'
|
import '@material/mwc-textfield'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
|
@ -10,7 +10,7 @@ import {
|
|||||||
removeQAPPAutoLists,
|
removeQAPPAutoLists,
|
||||||
setIsOpenDevDialog
|
setIsOpenDevDialog
|
||||||
} from '../../redux/app/app-actions.js'
|
} from '../../redux/app/app-actions.js'
|
||||||
import {get, translate} from '../../../translate/index.js'
|
import {get, translate} from '../../../translate'
|
||||||
import snackbar from '../../functional-components/snackbar.js'
|
import snackbar from '../../functional-components/snackbar.js'
|
||||||
import FileSaver from 'file-saver'
|
import FileSaver from 'file-saver'
|
||||||
|
|
||||||
@ -145,11 +145,11 @@ class SecurityView extends connect(store)(LitElement) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr style="margin-top: 20px;">
|
<hr style="margin-top: 20px;">
|
||||||
<div class="checkbox-row">
|
<div class="checkbox-row">
|
||||||
<label for="authButton" id="authButtonLabel" style="color: var(--black);">
|
<label for="authButton" id="authButtonLabel" style="color: var(--black);">
|
||||||
${get('browserpage.bchange26')}
|
${get('browserpage.bchange26')}
|
||||||
</label>
|
</label>
|
||||||
<mwc-checkbox style="margin-right: -15px;" id="authButton" @click=${(e) => this.checkForAuth(e)} ?checked=${store.getState().app.qAPPAutoAuth}></mwc-checkbox>
|
<mwc-checkbox style="margin-right: -15px;" id="authButton" @click=${(e) => this.checkForAuth(e)} ?checked=${store.getState().app.qAPPAutoAuth}></mwc-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox-row">
|
<div class="checkbox-row">
|
||||||
<label for="authButton" id="authButtonLabel" style="color: var(--black);">
|
<label for="authButton" id="authButtonLabel" style="color: var(--black);">
|
||||||
@ -158,19 +158,20 @@ class SecurityView extends connect(store)(LitElement) {
|
|||||||
<mwc-checkbox style="margin-right: -15px;" id="authButton" @click=${(e) => this.checkForLists(e)} ?checked=${store.getState().app.qAPPAutoLists}></mwc-checkbox>
|
<mwc-checkbox style="margin-right: -15px;" id="authButton" @click=${(e) => this.checkForLists(e)} ?checked=${store.getState().app.qAPPAutoLists}></mwc-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox-row">
|
<div class="checkbox-row">
|
||||||
<label for="authButton" id="authButtonLabel" style="color: var(--black);">
|
<label for="authButton" id="authButtonLabel" style="color: var(--black);">
|
||||||
${get('browserpage.bchange53')}
|
${get('browserpage.bchange53')}
|
||||||
</label>
|
</label>
|
||||||
<mwc-checkbox style="margin-right: -15px;" id="authButton" @click=${(e) => this.checkForFriends(e)} ?checked=${store.getState().app.qAPPFriendsList}></mwc-checkbox>
|
<mwc-checkbox style="margin-right: -15px;" id="authButton" @click=${(e) => this.checkForFriends(e)} ?checked=${store.getState().app.qAPPFriendsList}></mwc-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox-row">
|
<div class="checkbox-row">
|
||||||
<button
|
<button
|
||||||
class="add-dev-button"
|
class="add-dev-button"
|
||||||
title="${translate('tabmenu.tm18')}"
|
title="${translate('tabmenu.tm18')}"
|
||||||
@click=${this.openDevDialog}
|
@click=${this.openDevDialog}
|
||||||
>${translate('tabmenu.tm38')}</button>
|
>
|
||||||
|
${translate('tabmenu.tm38')}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
@ -231,7 +232,7 @@ class SecurityView extends connect(store)(LitElement) {
|
|||||||
const dataString = JSON.stringify(data)
|
const dataString = JSON.stringify(data)
|
||||||
const blob = new Blob([dataString], { type: 'text/plain;charset=utf-8' })
|
const blob = new Blob([dataString], { type: 'text/plain;charset=utf-8' })
|
||||||
backupname = "qortal_backup_" + state.app.selectedAddress.address + ".json"
|
backupname = "qortal_backup_" + state.app.selectedAddress.address + ".json"
|
||||||
this.saveFileToDisk(blob, backupname)
|
await this.saveFileToDisk(blob, backupname)
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveFileToDisk(blob, fileName) {
|
async saveFileToDisk(blob, fileName) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import {translate} from '../../../translate/index.js'
|
import {translate} from '../../../translate'
|
||||||
|
|
||||||
import '@polymer/paper-dialog/paper-dialog.js'
|
import '@polymer/paper-dialog/paper-dialog.js'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
|
@ -8,7 +8,7 @@ import {repeat} from 'lit/directives/repeat.js';
|
|||||||
import ShortUniqueId from 'short-unique-id';
|
import ShortUniqueId from 'short-unique-id';
|
||||||
import {setIsOpenDevDialog, setNewTab} from '../redux/app/app-actions.js'
|
import {setIsOpenDevDialog, setNewTab} from '../redux/app/app-actions.js'
|
||||||
import FileSaver from 'file-saver'
|
import FileSaver from 'file-saver'
|
||||||
import {get, registerTranslateConfig, translate, use} from '../../translate/index.js'
|
import {get, registerTranslateConfig, translate, use} from '../../translate'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-dialog'
|
import '@material/mwc-dialog'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
@ -19,13 +19,12 @@ import '@polymer/paper-dialog/paper-dialog.js'
|
|||||||
import '@vaadin/grid'
|
import '@vaadin/grid'
|
||||||
import '@vaadin/text-field'
|
import '@vaadin/text-field'
|
||||||
import '../custom-elements/frag-file-input.js'
|
import '../custom-elements/frag-file-input.js'
|
||||||
import { defaultQappsTabs } from '../data/defaultQapps.js'
|
import {defaultQappsTabs} from '../data/defaultQapps.js'
|
||||||
|
|
||||||
registerTranslateConfig({
|
registerTranslateConfig({
|
||||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
export const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
|
export const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
|
||||||
|
|
||||||
class ShowPlugin extends connect(store)(LitElement) {
|
class ShowPlugin extends connect(store)(LitElement) {
|
||||||
@ -43,7 +42,7 @@ class ShowPlugin extends connect(store)(LitElement) {
|
|||||||
chatLastSeen: { type: Array },
|
chatLastSeen: { type: Array },
|
||||||
chatHeads: { type: Array },
|
chatHeads: { type: Array },
|
||||||
proxyPort: { type: Number },
|
proxyPort: { type: Number },
|
||||||
isOpenDevDialog: {type: Boolean}
|
isOpenDevDialog: { type: Boolean }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,7 +210,7 @@ class ShowPlugin extends connect(store)(LitElement) {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
color: var(--accent-color);
|
color: var(--general-color-blue);
|
||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: color 0.3s;
|
transition: color 0.3s;
|
||||||
@ -229,7 +228,7 @@ class ShowPlugin extends connect(store)(LitElement) {
|
|||||||
max-height: 28px;
|
max-height: 28px;
|
||||||
padding: 5px 5px;
|
padding: 5px 5px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
background-color: var(--accent-color);
|
background-color: var(--general-color-blue);
|
||||||
color: white;
|
color: white;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
@ -248,7 +247,7 @@ class ShowPlugin extends connect(store)(LitElement) {
|
|||||||
.iconActive {
|
.iconActive {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
color: var(--accent-color);
|
color: var(--general-color-blue);
|
||||||
--mdc-icon-size: 24px;
|
--mdc-icon-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,7 +259,7 @@ class ShowPlugin extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tab:hover .iconInactive {
|
.tab:hover .iconInactive {
|
||||||
color: var(--accent-color);
|
color: var(--general-color-blue);
|
||||||
}
|
}
|
||||||
|
|
||||||
.count {
|
.count {
|
||||||
@ -843,7 +842,7 @@ class ShowPlugin extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
store.dispatch(setNewTab(null))
|
store.dispatch(setNewTab(null))
|
||||||
} else if (!this.tabs.find((tab) => tab.id === newTab.id)) {
|
} else if (!this.tabs.find((tab) => tab.id === newTab.id)) {
|
||||||
this.addTab(newTab)
|
await this.addTab(newTab)
|
||||||
this.currentTab = this.tabs.length - 1
|
this.currentTab = this.tabs.length - 1
|
||||||
store.dispatch(setNewTab(null))
|
store.dispatch(setNewTab(null))
|
||||||
//clear newTab
|
//clear newTab
|
||||||
@ -1078,7 +1077,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.resetIcon:hover {
|
.resetIcon:hover {
|
||||||
color: var(--accent-color);
|
color: var(--general-color-blue);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1092,7 +1091,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.searchIcon:hover {
|
.searchIcon:hover {
|
||||||
color: var(--accent-color);
|
color: var(--general-color-blue);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1106,7 +1105,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.importIcon:hover {
|
.importIcon:hover {
|
||||||
color: var(--accent-color);
|
color: var(--general-color-blue);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1120,7 +1119,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.exportIcon:hover {
|
.exportIcon:hover {
|
||||||
color: var(--accent-color);
|
color: var(--general-color-blue);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1141,7 +1140,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
paper-dialog button {
|
paper-dialog button {
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
background-color: var(--accent-color);
|
background-color: var(--general-color-blue);
|
||||||
color: white;
|
color: white;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
@ -1175,7 +1174,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
vaadin-text-field[focused]::part(input-field) {
|
vaadin-text-field[focused]::part(input-field) {
|
||||||
border-color: var(--accent-color);
|
border-color: var(--general-color-blue);
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
@ -1474,8 +1473,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
res()
|
res()
|
||||||
}, 1000);
|
}, 1000);
|
||||||
})
|
})
|
||||||
const detail = event.detail
|
this.myMenuPlugins = event.detail
|
||||||
this.myMenuPlugins = detail
|
|
||||||
const addressInfo = this.addressInfo
|
const addressInfo = this.addressInfo
|
||||||
const isMinter = addressInfo?.error !== 124 && +addressInfo?.level > 0
|
const isMinter = addressInfo?.error !== 124 && +addressInfo?.level > 0
|
||||||
const isSponsor = +addressInfo?.level >= 5
|
const isSponsor = +addressInfo?.level >= 5
|
||||||
@ -1589,11 +1587,9 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getMyFollowedNames() {
|
async getMyFollowedNames() {
|
||||||
let myFollowedNames = await parentEpml.request('apiCall', {
|
this.myFollowedNames = await parentEpml.request('apiCall', {
|
||||||
url: `/lists/followedNames?apiKey=${this.getApiKey()}`
|
url: `/lists/followedNames?apiKey=${this.getApiKey()}`
|
||||||
})
|
})
|
||||||
|
|
||||||
this.myFollowedNames = myFollowedNames
|
|
||||||
}
|
}
|
||||||
|
|
||||||
searchNameKeyListener(e) {
|
searchNameKeyListener(e) {
|
||||||
@ -1693,7 +1689,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
let err3string = get("appspage.schange22")
|
let err3string = get("appspage.schange22")
|
||||||
parentEpml.request('showSnackBar', `${err3string}`)
|
parentEpml.request('showSnackBar', `${err3string}`)
|
||||||
}
|
}
|
||||||
this.getMyFollowedNamesList()
|
await this.getMyFollowedNamesList()
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1719,7 +1715,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
let err4string = get("appspage.schange23")
|
let err4string = get("appspage.schange23")
|
||||||
parentEpml.request('showSnackBar', `${err4string}`)
|
parentEpml.request('showSnackBar', `${err4string}`)
|
||||||
}
|
}
|
||||||
this.getMyFollowedNamesList()
|
await this.getMyFollowedNamesList()
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1996,11 +1992,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
this.myPluginNameRes = res
|
this.myPluginNameRes = res
|
||||||
})
|
})
|
||||||
|
|
||||||
if (this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0) {
|
myPluginName = !(this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0);
|
||||||
myPluginName = false
|
|
||||||
} else {
|
|
||||||
myPluginName = true
|
|
||||||
}
|
|
||||||
return myPluginName
|
return myPluginName
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2061,11 +2053,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
this.myPluginNameRes = res
|
this.myPluginNameRes = res
|
||||||
})
|
})
|
||||||
|
|
||||||
if (this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0 ) {
|
myPluginName = !(this.myPluginNameRes === undefined || this.myPluginNameRes.length == 0);
|
||||||
myPluginName = false
|
|
||||||
} else {
|
|
||||||
myPluginName = true
|
|
||||||
}
|
|
||||||
return myPluginName
|
return myPluginName
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2407,7 +2395,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
async handlePasteLink(e) {
|
async handlePasteLink(e) {
|
||||||
try {
|
try {
|
||||||
const value = this.shadowRoot.getElementById('linkInput').value
|
const value = this.shadowRoot.getElementById('linkInput').value
|
||||||
this.getQuery(value)
|
await this.getQuery(value)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2416,7 +2404,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
if (e.key === 'Enter') {
|
if (e.key === 'Enter') {
|
||||||
try {
|
try {
|
||||||
const value = this.shadowRoot.getElementById('linkInput').value
|
const value = this.shadowRoot.getElementById('linkInput').value
|
||||||
this.getQuery(value)
|
await this.getQuery(value)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2424,8 +2412,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
const apiNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey
|
return apiNode.apiKey
|
||||||
return apiKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isEmptyArray(arr) {
|
isEmptyArray(arr) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit';
|
import {css, html, LitElement} from 'lit';
|
||||||
import {connect} from 'pwa-helpers';
|
import {connect} from 'pwa-helpers';
|
||||||
import {store} from '../store.js';
|
import {store} from '../store.js';
|
||||||
import {get, translate} from '../../translate/index.js'
|
import {get, translate} from '../../translate'
|
||||||
import {asyncReplace} from 'lit/directives/async-replace.js';
|
import {asyncReplace} from 'lit/directives/async-replace.js';
|
||||||
|
|
||||||
import '../functional-components/my-button.js';
|
import '../functional-components/my-button.js';
|
||||||
@ -235,9 +235,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
const url = `${nodeUrl}/admin/mintingaccounts`;
|
const url = `${nodeUrl}/admin/mintingaccounts`;
|
||||||
try {
|
try {
|
||||||
const res = await fetch(url);
|
const res = await fetch(url);
|
||||||
const mintingAccountData = await res.json();
|
this.mintingAccountData = await res.json();
|
||||||
|
|
||||||
this.mintingAccountData = mintingAccountData;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.errorMsg = this.renderErrorMsg1();
|
this.errorMsg = this.renderErrorMsg1();
|
||||||
}
|
}
|
||||||
@ -286,14 +284,14 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await addMintingAccount(this.privateRewardShareKey);
|
await addMintingAccount(this.privateRewardShareKey);
|
||||||
routes.showSnackBar({
|
await routes.showSnackBar({
|
||||||
data: translate('becomeMinterPage.bchange19'),
|
data: translate('becomeMinterPage.bchange19'),
|
||||||
});
|
});
|
||||||
this.status = 5;
|
this.status = 5;
|
||||||
this.getMintingAcccounts();
|
await this.getMintingAcccounts();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.errorMsg = this.renderErrorMsg3();
|
this.errorMsg = this.renderErrorMsg3();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,8 +309,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
const rewardShares = async (minterAddr) => {
|
const rewardShares = async (minterAddr) => {
|
||||||
const url = `${nodeUrl}/addresses/rewardshares?minters=${minterAddr}&recipients=${minterAddr}`;
|
const url = `${nodeUrl}/addresses/rewardshares?minters=${minterAddr}&recipients=${minterAddr}`;
|
||||||
const res = await fetch(url);
|
const res = await fetch(url);
|
||||||
const data = await res.json();
|
return await res.json();
|
||||||
return data;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!stop) {
|
if (!stop) {
|
||||||
@ -352,7 +349,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
let rewarddialog3 = get('transactions.rewarddialog3');
|
let rewarddialog3 = get('transactions.rewarddialog3');
|
||||||
let rewarddialog4 = get('transactions.rewarddialog4');
|
let rewarddialog4 = get('transactions.rewarddialog4');
|
||||||
|
|
||||||
let myTxnrequest = await routes.transaction({
|
return await routes.transaction({
|
||||||
data: {
|
data: {
|
||||||
type: 38,
|
type: 38,
|
||||||
nonce: nonce,
|
nonce: nonce,
|
||||||
@ -368,7 +365,6 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
},
|
},
|
||||||
disableModal: true,
|
disableModal: true,
|
||||||
});
|
});
|
||||||
return myTxnrequest;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const getTxnRequestResponse = (txnResponse) => {
|
const getTxnRequestResponse = (txnResponse) => {
|
||||||
@ -404,8 +400,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
const getLastRef = async () => {
|
const getLastRef = async () => {
|
||||||
const url = `${nodeUrl}/addresses/lastreference/${address}`;
|
const url = `${nodeUrl}/addresses/lastreference/${address}`;
|
||||||
const res = await fetch(url);
|
const res = await fetch(url);
|
||||||
const data = await res.text();
|
return await res.text();
|
||||||
return data;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const startMinting = async () => {
|
const startMinting = async () => {
|
||||||
@ -422,11 +417,11 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
this.privateRewardShareKey = await createSponsorshipKey();
|
this.privateRewardShareKey = await createSponsorshipKey();
|
||||||
this.confirmRelationship(publicAddress)
|
await this.confirmRelationship(publicAddress)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log({ error })
|
console.log({ error })
|
||||||
this.errorMsg = (error && error.data && error.data.message) ? error.data.message : this.renderErrorMsg4();
|
this.errorMsg = (error && error.data && error.data.message) ? error.data.message : this.renderErrorMsg4();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -438,7 +433,7 @@ const nonce = selectedAddress && selectedAddress.nonce;
|
|||||||
.onClick=${async () => {
|
.onClick=${async () => {
|
||||||
await startMinting();
|
await startMinting();
|
||||||
if (this.errorMsg) {
|
if (this.errorMsg) {
|
||||||
routes.showSnackBar({
|
await routes.showSnackBar({
|
||||||
data: this.errorMsg,
|
data: this.errorMsg,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {translate} from '../../translate/index.js'
|
import {translate} from '../../translate'
|
||||||
import '@polymer/paper-icon-button/paper-icon-button.js'
|
import '@polymer/paper-icon-button/paper-icon-button.js'
|
||||||
import '@polymer/iron-icons/image-icons.js'
|
import '@polymer/iron-icons/image-icons.js'
|
||||||
import '@polymer/iron-icons/iron-icons.js'
|
import '@polymer/iron-icons/iron-icons.js'
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {render} from 'lit/html.js'
|
import {render} from 'lit/html.js'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../../store.js'
|
import {store} from '../../store.js'
|
||||||
import {get, translate} from '../../../translate/index.js'
|
import {get, translate} from '../../../translate'
|
||||||
|
|
||||||
import '@polymer/paper-dialog/paper-dialog.js'
|
import '@polymer/paper-dialog/paper-dialog.js'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
@ -1374,13 +1374,11 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
const fromNameUrl = `${nodeUrl}/names/${fromName}`
|
const fromNameUrl = `${nodeUrl}/names/${fromName}`
|
||||||
|
|
||||||
const qortalNameInfo = await fetch(fromNameUrl).then(response => {
|
this.nameAddressResult = await fetch(fromNameUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.nameAddressResult = qortalNameInfo
|
|
||||||
const nameAddress = this.nameAddressResult.owner
|
const nameAddress = this.nameAddressResult.owner
|
||||||
this.getAllWithAddress(nameAddress)
|
await this.getAllWithAddress(nameAddress)
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAllWithAddress(myAddress) {
|
async getAllWithAddress(myAddress) {
|
||||||
@ -1401,11 +1399,9 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
const infoAddressUrl = `${nodeUrl}/addresses/${infoAddress}`
|
const infoAddressUrl = `${nodeUrl}/addresses/${infoAddress}`
|
||||||
|
|
||||||
const qortalAddressInfo = await fetch(infoAddressUrl).then(response => {
|
this.addressResult = await fetch(infoAddressUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.addressResult = qortalAddressInfo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAddressUserAvatar(avatarAddress) {
|
async getAddressUserAvatar(avatarAddress) {
|
||||||
@ -1427,8 +1423,7 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const myImageUrl = `${nodeUrl}/arbitrary/THUMBNAIL/${this.imageName}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
this.imageUrl = `${nodeUrl}/arbitrary/THUMBNAIL/${this.imageName}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||||
this.imageUrl = myImageUrl
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAddressUserBalance(balanceAddress) {
|
async getAddressUserBalance(balanceAddress) {
|
||||||
@ -1451,19 +1446,15 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
|
|
||||||
if (checkBlocks === 0) {
|
if (checkBlocks === 0) {
|
||||||
let noMinterString = get("explorerpage.exp16")
|
this.startMintTime = get("explorerpage.exp16")
|
||||||
this.startMintTime = noMinterString
|
|
||||||
} else {
|
} else {
|
||||||
const rewardshareUrl = `${nodeUrl}/transactions/search?txType=REWARD_SHARE&address=${mintAddress}&confirmationStatus=CONFIRMED&limit=1&reverse=false`
|
const rewardshareUrl = `${nodeUrl}/transactions/search?txType=REWARD_SHARE&address=${mintAddress}&confirmationStatus=CONFIRMED&limit=1&reverse=false`
|
||||||
|
|
||||||
const startMinting = await fetch(rewardshareUrl).then(response => {
|
this.startMinting = await fetch(rewardshareUrl).then(response => {
|
||||||
return response.json()
|
return response.json()
|
||||||
})
|
})
|
||||||
|
|
||||||
this.startMinting = startMinting
|
this.startMintTime = new Date(this.startMinting[0].timestamp).toLocaleDateString()
|
||||||
|
|
||||||
const mintString = new Date(this.startMinting[0].timestamp).toLocaleDateString()
|
|
||||||
this.startMintTime = mintString
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1928,9 +1919,8 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node];
|
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey;
|
return apiNode.apiKey
|
||||||
return apiKey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isEmptyArray(arr) {
|
isEmptyArray(arr) {
|
||||||
@ -1941,8 +1931,7 @@ class UserInfoView extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
round(number) {
|
round(number) {
|
||||||
let result = (Math.round(parseFloat(number) * 1e8) / 1e8).toFixed(8)
|
return (Math.round(parseFloat(number) * 1e8) / 1e8).toFixed(8)
|
||||||
return result
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../store.js'
|
import {store} from '../store.js'
|
||||||
import {translate} from '../../translate/index.js'
|
import {translate} from '../../translate'
|
||||||
|
|
||||||
import '@polymer/paper-toast'
|
|
||||||
import '@material/mwc-icon-button'
|
|
||||||
|
|
||||||
class WalletProfile extends connect(store)(LitElement) {
|
class WalletProfile extends connect(store)(LitElement) {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -12,82 +9,76 @@ class WalletProfile extends connect(store)(LitElement) {
|
|||||||
wallet: { type: Object },
|
wallet: { type: Object },
|
||||||
nodeConfig: { type: Object },
|
nodeConfig: { type: Object },
|
||||||
accountInfo: { type: Object },
|
accountInfo: { type: Object },
|
||||||
imageUrl: { type: String },
|
|
||||||
theme: { type: String, reflect: true }
|
theme: { type: String, reflect: true }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles() {
|
static get styles() {
|
||||||
return [
|
return css`
|
||||||
css`
|
#profileInMenu {
|
||||||
`
|
padding: 12px;
|
||||||
]
|
border-top: var(--border);
|
||||||
|
background: var(--sidetopbar);
|
||||||
|
color: var(--black);
|
||||||
|
}
|
||||||
|
|
||||||
|
#accountName {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 500;
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#blocksMinted {
|
||||||
|
margin:0;
|
||||||
|
margin-top: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #03a9f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
#address {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
margin:0;
|
||||||
|
margin-top: 8px;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.round-fullinfo {
|
||||||
|
position: relative;
|
||||||
|
width: 68px;
|
||||||
|
height: 68px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.full-info-logo {
|
||||||
|
width: 68px;
|
||||||
|
height: 68px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-block-child {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
|
this.wallet = {}
|
||||||
this.nodeConfig = {}
|
this.nodeConfig = {}
|
||||||
this.accountInfo = {
|
this.accountInfo = {
|
||||||
names: [],
|
names: [],
|
||||||
addressInfo: {}
|
addressInfo: {}
|
||||||
}
|
}
|
||||||
this.imageUrl = ''
|
|
||||||
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
|
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return html`
|
return html`
|
||||||
<style>
|
|
||||||
#profileInMenu {
|
|
||||||
padding: 12px;
|
|
||||||
border-top: var(--border);
|
|
||||||
background: var(--sidetopbar);
|
|
||||||
color: var(--black);
|
|
||||||
}
|
|
||||||
#profileInMenu:hover {
|
|
||||||
}
|
|
||||||
#accountIcon {
|
|
||||||
font-size:48px;
|
|
||||||
color: var(--mdc-theme-primary);
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
#accountName {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight:500;
|
|
||||||
width:100%;
|
|
||||||
padding-bottom:8px;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
#blocksMinted {
|
|
||||||
margin:0;
|
|
||||||
margin-top: 0;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #03a9f4;
|
|
||||||
}
|
|
||||||
#address {
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
margin:0;
|
|
||||||
margin-top:8px;
|
|
||||||
font-size:11px;
|
|
||||||
}
|
|
||||||
.round-fullinfo {
|
|
||||||
position: relative;
|
|
||||||
width: 68px;
|
|
||||||
height: 68px;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
.full-info-logo {
|
|
||||||
width: 68px;
|
|
||||||
height: 68px;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
.inline-block-child {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<div id="profileInMenu">
|
<div id="profileInMenu">
|
||||||
<div style="padding: 8px 0;">
|
<div style="padding: 8px 0;">
|
||||||
<div id="accountName">
|
<div id="accountName">
|
||||||
@ -102,26 +93,10 @@ class WalletProfile extends connect(store)(LitElement) {
|
|||||||
<p id="address">${this.wallet.addresses[0].address}</p>
|
<p id="address">${this.wallet.addresses[0].address}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<paper-toast id="toast" horizontal-align="right" vertical-align="top" vertical-offset="64"></paper-toast>
|
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
firstUpdated() {
|
firstUpdated() {}
|
||||||
|
|
||||||
const container = document.body.querySelector('main-app').shadowRoot.querySelector('app-view').shadowRoot;
|
|
||||||
const toast = this.shadowRoot.getElementById('toast')
|
|
||||||
const isMobile = window.matchMedia(`(max-width: ${getComputedStyle(document.body).getPropertyValue('--layout-breakpoint-tablet')})`).matches
|
|
||||||
|
|
||||||
if (isMobile) {
|
|
||||||
toast.verticalAlign = 'bottom'
|
|
||||||
toast.verticalOffset = 0
|
|
||||||
}
|
|
||||||
this.toast = container.appendChild(toast)
|
|
||||||
}
|
|
||||||
|
|
||||||
async getAllWithAddress(myAddress) {
|
|
||||||
await this.getAddressUserAvatar(myAddress)
|
|
||||||
}
|
|
||||||
|
|
||||||
getAvatar() {
|
getAvatar() {
|
||||||
if (this.accountInfo.names.length === 0) {
|
if (this.accountInfo.names.length === 0) {
|
||||||
@ -135,9 +110,8 @@ class WalletProfile extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node];
|
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
let apiKey = apiNode.apiKey;
|
return apiNode.apiKey
|
||||||
return apiKey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stateChanged(state) {
|
stateChanged(state) {
|
||||||
|
@ -3,7 +3,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
import '@material/mwc-icon'
|
import '@material/mwc-icon'
|
||||||
|
|
||||||
import {translate} from '../../translate/index.js'
|
import {translate} from '../../translate'
|
||||||
|
|
||||||
class FragFileInput extends LitElement {
|
class FragFileInput extends LitElement {
|
||||||
static get properties () {
|
static get properties () {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {css, html, LitElement} from 'lit'
|
import {css, html, LitElement} from 'lit'
|
||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../store.js'
|
import {store} from '../store.js'
|
||||||
import {get, translate} from '../../translate/index.js'
|
import {get, translate} from '../../translate'
|
||||||
|
|
||||||
import {listenForRequest} from '../transactionRequest.js'
|
import {listenForRequest} from '../transactionRequest.js'
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../store.js'
|
import {store} from '../store.js'
|
||||||
import {testApiKey} from '../apiKeyUtils.js'
|
import {testApiKey} from '../apiKeyUtils.js'
|
||||||
import {get, translate} from '../../translate/index.js'
|
import {get, translate} from '../../translate'
|
||||||
|
|
||||||
import '@material/mwc-dialog'
|
import '@material/mwc-dialog'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
|
@ -2,7 +2,7 @@ import {css, html, LitElement} from 'lit'
|
|||||||
import {connect} from 'pwa-helpers'
|
import {connect} from 'pwa-helpers'
|
||||||
import {store} from '../store.js'
|
import {store} from '../store.js'
|
||||||
import {doAddNode, doEditNode, doLoadNodeConfig, doRemoveNode, doSetNode} from '../redux/app/app-actions.js'
|
import {doAddNode, doEditNode, doLoadNodeConfig, doRemoveNode, doSetNode} from '../redux/app/app-actions.js'
|
||||||
import {get, registerTranslateConfig, translate, use} from '../../translate/index.js'
|
import {get, registerTranslateConfig, translate, use} from '../../translate'
|
||||||
import snackbar from './snackbar.js'
|
import snackbar from './snackbar.js'
|
||||||
import '../components/language-selector.js'
|
import '../components/language-selector.js'
|
||||||
import '../custom-elements/frag-file-input.js'
|
import '../custom-elements/frag-file-input.js'
|
||||||
@ -70,7 +70,7 @@ class SettingsPage extends connect(store)(LitElement) {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--accent-color);
|
color: var(--general-color-blue);
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ class SettingsPage extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.buttonBlue {
|
.buttonBlue {
|
||||||
color: var(--accent-color);
|
color: var(--general-color-blue);
|
||||||
}
|
}
|
||||||
|
|
||||||
.floatleft {
|
.floatleft {
|
||||||
@ -211,8 +211,7 @@ class SettingsPage extends connect(store)(LitElement) {
|
|||||||
|
|
||||||
// Set the selected value for mwc-select
|
// Set the selected value for mwc-select
|
||||||
const protocolList = dialog.querySelector('#protocolList')
|
const protocolList = dialog.querySelector('#protocolList')
|
||||||
const desiredProtocol = currentValues.protocol
|
protocolList.value = currentValues.protocol
|
||||||
protocolList.value = desiredProtocol
|
|
||||||
this.isBeingEdited = true
|
this.isBeingEdited = true
|
||||||
this.isBeingEditedIndex = index
|
this.isBeingEditedIndex = index
|
||||||
this.shadowRoot.querySelector('#addNodeDialog').show()
|
this.shadowRoot.querySelector('#addNodeDialog').show()
|
||||||
|
@ -171,9 +171,7 @@ export const newMessageNotificationQappLocal = (data) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
notify.onclick = async(e) => {
|
notify.onclick = async(e) => {
|
||||||
const url = data?.url
|
let newQuery = data?.url;
|
||||||
const value = url
|
|
||||||
let newQuery = value;
|
|
||||||
if (newQuery.endsWith('/')) {
|
if (newQuery.endsWith('/')) {
|
||||||
newQuery = newQuery.slice(0, -1);
|
newQuery = newQuery.slice(0, -1);
|
||||||
}
|
}
|
||||||
@ -217,9 +215,7 @@ export const newMessageNotificationQappLocal = (data) => {
|
|||||||
const notify = new Notification(data.title, data.options)
|
const notify = new Notification(data.title, data.options)
|
||||||
|
|
||||||
notify.onclick = async(e) => {
|
notify.onclick = async(e) => {
|
||||||
const url = data?.url
|
let newQuery = data?.url;
|
||||||
const value = url
|
|
||||||
let newQuery = value;
|
|
||||||
if (newQuery.endsWith('/')) {
|
if (newQuery.endsWith('/')) {
|
||||||
newQuery = newQuery.slice(0, -1);
|
newQuery = newQuery.slice(0, -1);
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,7 @@ const sendCoin = async (coin, req) => {
|
|||||||
try {
|
try {
|
||||||
const sendFn = api[`send${coin}`]
|
const sendFn = api[`send${coin}`]
|
||||||
if (sendFn) {
|
if (sendFn) {
|
||||||
const res = await sendFn(req.data)
|
response = await sendFn(req.data)
|
||||||
response = res
|
|
||||||
} else {
|
} else {
|
||||||
response = `Unsupported blockchain: ${coin}`
|
response = `Unsupported blockchain: ${coin}`
|
||||||
}
|
}
|
||||||
@ -209,11 +208,8 @@ export const routes = {
|
|||||||
|
|
||||||
username: async (req) => {
|
username: async (req) => {
|
||||||
const state = store.getState()
|
const state = store.getState()
|
||||||
const username =
|
return state.user.storedWallets[state.app.wallet.addresses[0].address]
|
||||||
state.user.storedWallets[state.app.wallet.addresses[0].address]
|
.name
|
||||||
.name
|
|
||||||
|
|
||||||
return username
|
|
||||||
},
|
},
|
||||||
|
|
||||||
chat: async (req) => {
|
chat: async (req) => {
|
||||||
@ -354,9 +350,7 @@ export const routes = {
|
|||||||
tradeBotRespondRequest: async (req) => {
|
tradeBotRespondRequest: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await tradeBotRespondRequest(req.data)
|
response = await tradeBotRespondRequest(req.data)
|
||||||
|
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -396,10 +390,9 @@ export const routes = {
|
|||||||
cancelAllOffers: async (req) => {
|
cancelAllOffers: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await cancelAllOffers(
|
response = await cancelAllOffers(
|
||||||
store.getState().app.selectedAddress
|
store.getState().app.selectedAddress
|
||||||
)
|
)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
|
@ -20,9 +20,11 @@ import {
|
|||||||
UPDATE_BLOCK_INFO,
|
UPDATE_BLOCK_INFO,
|
||||||
UPDATE_NODE_INFO,
|
UPDATE_NODE_INFO,
|
||||||
UPDATE_NODE_STATUS,
|
UPDATE_NODE_STATUS,
|
||||||
SET_PROFILE_DATA,
|
SET_PROFILE_DATA,
|
||||||
ALLOW_QAPP_FRIENDS_LIST,
|
ALLOW_QAPP_FRIENDS_LIST,
|
||||||
REMOVE_QAPP_FRIENDS_LIST
|
REMOVE_QAPP_FRIENDS_LIST,
|
||||||
|
ALLOW_SHOW_SYNC_INDICATOR,
|
||||||
|
REMOVE_SHOW_SYNC_INDICATOR
|
||||||
} from '../app-action-types.js'
|
} from '../app-action-types.js'
|
||||||
|
|
||||||
export const doUpdateBlockInfo = (blockObj) => {
|
export const doUpdateBlockInfo = (blockObj) => {
|
||||||
@ -164,18 +166,21 @@ export const setNewTab = (payload) => {
|
|||||||
payload
|
payload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const setNewNotification = (payload) => {
|
export const setNewNotification = (payload) => {
|
||||||
return {
|
return {
|
||||||
type: SET_NEW_NOTIFICATION,
|
type: SET_NEW_NOTIFICATION,
|
||||||
payload
|
payload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export const setIsOpenDevDialog = (payload)=> {
|
|
||||||
|
export const setIsOpenDevDialog = (payload) => {
|
||||||
return {
|
return {
|
||||||
type: IS_OPEN_DEV_DIALOG,
|
type: IS_OPEN_DEV_DIALOG,
|
||||||
payload
|
payload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const addTabInfo = (payload) => {
|
export const addTabInfo = (payload) => {
|
||||||
return {
|
return {
|
||||||
type: ADD_TAB_INFO,
|
type: ADD_TAB_INFO,
|
||||||
@ -196,16 +201,31 @@ export const setSideEffectAction = (payload)=> {
|
|||||||
payload
|
payload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export const setProfileData = (payload)=> {
|
|
||||||
|
export const setProfileData = (payload) => {
|
||||||
return {
|
return {
|
||||||
type: SET_PROFILE_DATA,
|
type: SET_PROFILE_DATA,
|
||||||
payload
|
payload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const setCoinBalances = (payload)=> {
|
export const setCoinBalances = (payload) => {
|
||||||
return {
|
return {
|
||||||
type: SET_COIN_BALANCES,
|
type: SET_COIN_BALANCES,
|
||||||
payload
|
payload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const allowShowSyncIndicator = (payload) => {
|
||||||
|
return {
|
||||||
|
type: ALLOW_SHOW_SYNC_INDICATOR,
|
||||||
|
payload
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const removeShowSyncIndicator = (payload) => {
|
||||||
|
return {
|
||||||
|
type: REMOVE_SHOW_SYNC_INDICATOR,
|
||||||
|
payload
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -34,6 +34,8 @@ export const IS_OPEN_DEV_DIALOG = 'IS_OPEN_DEV_DIALOG'
|
|||||||
export const SET_NEW_NOTIFICATION = 'SET_NEW_NOTIFICATION'
|
export const SET_NEW_NOTIFICATION = 'SET_NEW_NOTIFICATION'
|
||||||
export const SET_SIDE_EFFECT= 'SET_SIDE_EFFECT'
|
export const SET_SIDE_EFFECT= 'SET_SIDE_EFFECT'
|
||||||
export const SET_PROFILE_DATA = 'SET_PROFILE_DATA'
|
export const SET_PROFILE_DATA = 'SET_PROFILE_DATA'
|
||||||
export const SET_COIN_BALANCES= 'SET_COIN_BALANCES'
|
export const SET_COIN_BALANCES = 'SET_COIN_BALANCES'
|
||||||
export const ALLOW_QAPP_FRIENDS_LIST= 'ALLOW_QAPP_FRIENDS_LIST'
|
export const ALLOW_QAPP_FRIENDS_LIST = 'ALLOW_QAPP_FRIENDS_LIST'
|
||||||
export const REMOVE_QAPP_FRIENDS_LIST= 'REMOVE_QAPP_FRIENDS_LIST'
|
export const REMOVE_QAPP_FRIENDS_LIST = 'REMOVE_QAPP_FRIENDS_LIST'
|
||||||
|
export const ALLOW_SHOW_SYNC_INDICATOR = 'ALLOW_SHOW_SYNC_INDICATOR'
|
||||||
|
export const REMOVE_SHOW_SYNC_INDICATOR = 'REMOVE_SHOW_SYNC_INDICATOR'
|
||||||
|
@ -36,9 +36,11 @@ import {
|
|||||||
UPDATE_BLOCK_INFO,
|
UPDATE_BLOCK_INFO,
|
||||||
UPDATE_NODE_INFO,
|
UPDATE_NODE_INFO,
|
||||||
UPDATE_NODE_STATUS,
|
UPDATE_NODE_STATUS,
|
||||||
SET_PROFILE_DATA,
|
SET_PROFILE_DATA,
|
||||||
ALLOW_QAPP_FRIENDS_LIST,
|
ALLOW_QAPP_FRIENDS_LIST,
|
||||||
REMOVE_QAPP_FRIENDS_LIST
|
REMOVE_QAPP_FRIENDS_LIST,
|
||||||
|
ALLOW_SHOW_SYNC_INDICATOR,
|
||||||
|
REMOVE_SHOW_SYNC_INDICATOR
|
||||||
} from './app-action-types.js'
|
} from './app-action-types.js'
|
||||||
import {initWorkersReducer} from './reducers/init-workers.js'
|
import {initWorkersReducer} from './reducers/init-workers.js'
|
||||||
import {loginReducer} from './reducers/login-reducer.js'
|
import {loginReducer} from './reducers/login-reducer.js'
|
||||||
@ -49,8 +51,6 @@ const chatLastSeen = localForage.createInstance({
|
|||||||
name: "chat-last-seen",
|
name: "chat-last-seen",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const INITIAL_STATE = {
|
const INITIAL_STATE = {
|
||||||
loggedIn: false,
|
loggedIn: false,
|
||||||
drawerOpen: false,
|
drawerOpen: false,
|
||||||
@ -88,6 +88,7 @@ const INITIAL_STATE = {
|
|||||||
qAPPAutoAuth: loadStateFromLocalStorage('qAPPAutoAuth') || false,
|
qAPPAutoAuth: loadStateFromLocalStorage('qAPPAutoAuth') || false,
|
||||||
qAPPAutoLists: loadStateFromLocalStorage('qAPPAutoLists') || false,
|
qAPPAutoLists: loadStateFromLocalStorage('qAPPAutoLists') || false,
|
||||||
qAPPFriendsList: loadStateFromLocalStorage('qAPPFriendsList') || false,
|
qAPPFriendsList: loadStateFromLocalStorage('qAPPFriendsList') || false,
|
||||||
|
showSyncIndicator: loadStateFromLocalStorage('showSyncIndicator') || false,
|
||||||
chatLastSeen: [],
|
chatLastSeen: [],
|
||||||
newTab: null,
|
newTab: null,
|
||||||
tabInfo: {},
|
tabInfo: {},
|
||||||
@ -228,6 +229,7 @@ export default (state = INITIAL_STATE, action) => {
|
|||||||
qAPPAutoAuth: action.payload
|
qAPPAutoAuth: action.payload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case ALLOW_QAPP_AUTO_LISTS: {
|
case ALLOW_QAPP_AUTO_LISTS: {
|
||||||
saveStateToLocalStorage("qAPPAutoLists", true)
|
saveStateToLocalStorage("qAPPAutoLists", true)
|
||||||
return {
|
return {
|
||||||
@ -266,6 +268,7 @@ export default (state = INITIAL_STATE, action) => {
|
|||||||
chatLastSeen: action.payload
|
chatLastSeen: action.payload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case ADD_CHAT_LAST_SEEN: {
|
case ADD_CHAT_LAST_SEEN: {
|
||||||
const chatId = action.payload.key
|
const chatId = action.payload.key
|
||||||
const timestamp = action.payload.timestamp
|
const timestamp = action.payload.timestamp
|
||||||
@ -299,12 +302,14 @@ export default (state = INITIAL_STATE, action) => {
|
|||||||
newTab: action.payload
|
newTab: action.payload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case IS_OPEN_DEV_DIALOG: {
|
case IS_OPEN_DEV_DIALOG: {
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
isOpenDevDialog: action.payload
|
isOpenDevDialog: action.payload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case ADD_TAB_INFO: {
|
case ADD_TAB_INFO: {
|
||||||
const newTabInfo = action.payload
|
const newTabInfo = action.payload
|
||||||
if (state.tabInfo[newTabInfo.id] && state.tabInfo[newTabInfo.id].name && newTabInfo.name === state.tabInfo[newTabInfo.id].name) break
|
if (state.tabInfo[newTabInfo.id] && state.tabInfo[newTabInfo.id].name && newTabInfo.name === state.tabInfo[newTabInfo.id].name) break
|
||||||
@ -319,6 +324,7 @@ export default (state = INITIAL_STATE, action) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case SET_TAB_NOTIFICATIONS: {
|
case SET_TAB_NOTIFICATIONS: {
|
||||||
const count = action.payload.count
|
const count = action.payload.count
|
||||||
const name = action.payload.name
|
const name = action.payload.name
|
||||||
@ -346,18 +352,21 @@ export default (state = INITIAL_STATE, action) => {
|
|||||||
newNotification: action.payload
|
newNotification: action.payload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case SET_SIDE_EFFECT: {
|
case SET_SIDE_EFFECT: {
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
sideEffectAction: action.payload
|
sideEffectAction: action.payload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case SET_PROFILE_DATA: {
|
case SET_PROFILE_DATA: {
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
profileData: action.payload
|
profileData: action.payload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case SET_COIN_BALANCES: {
|
case SET_COIN_BALANCES: {
|
||||||
const copyBalances = {...state.coinBalances}
|
const copyBalances = {...state.coinBalances}
|
||||||
copyBalances[action.payload.type] = {
|
copyBalances[action.payload.type] = {
|
||||||
@ -370,6 +379,22 @@ export default (state = INITIAL_STATE, action) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case ALLOW_SHOW_SYNC_INDICATOR: {
|
||||||
|
saveStateToLocalStorage("showSyncIndicator", true)
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
showSyncIndicator: action.payload
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
case REMOVE_SHOW_SYNC_INDICATOR: {
|
||||||
|
saveStateToLocalStorage("showSyncIndicator", false)
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
showSyncIndicator: action.payload
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return state
|
return state
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,7 @@ const sendCoin = async (coin, req) => {
|
|||||||
try {
|
try {
|
||||||
const sendFn = api[`send${coin}`]
|
const sendFn = api[`send${coin}`]
|
||||||
if (sendFn) {
|
if (sendFn) {
|
||||||
const res = await sendFn(req.data)
|
response = await sendFn(req.data)
|
||||||
response = res
|
|
||||||
} else {
|
} else {
|
||||||
response = `Unsupported blockchain: ${coin}`
|
response = `Unsupported blockchain: ${coin}`
|
||||||
}
|
}
|
||||||
@ -125,8 +124,7 @@ export const routes = {
|
|||||||
store.getState().app.selectedAddress.keyPair
|
store.getState().app.selectedAddress.keyPair
|
||||||
)
|
)
|
||||||
|
|
||||||
const res = await processTransaction(signedTxnBytes)
|
response = await processTransaction(signedTxnBytes)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -138,8 +136,7 @@ export const routes = {
|
|||||||
tradeBotRespondRequest: async (req) => {
|
tradeBotRespondRequest: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await tradeBotRespondRequest(req.data)
|
response = await tradeBotRespondRequest(req.data)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -158,9 +155,7 @@ export const routes = {
|
|||||||
store.getState().app.selectedAddress.keyPair
|
store.getState().app.selectedAddress.keyPair
|
||||||
)
|
)
|
||||||
|
|
||||||
const res = await processTransaction(signedTxnBytes)
|
response = await processTransaction(signedTxnBytes)
|
||||||
|
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
@ -172,10 +167,9 @@ export const routes = {
|
|||||||
cancelAllOffers: async (req) => {
|
cancelAllOffers: async (req) => {
|
||||||
let response
|
let response
|
||||||
try {
|
try {
|
||||||
const res = await cancelAllOffers(
|
response = await cancelAllOffers(
|
||||||
store.getState().app.selectedAddress
|
store.getState().app.selectedAddress
|
||||||
)
|
)
|
||||||
response = res
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
console.error(e.message)
|
console.error(e.message)
|
||||||
|
@ -17,20 +17,15 @@ const uiCoreController = (type) => {
|
|||||||
const { createServer } = require('./server/server.js')
|
const { createServer } = require('./server/server.js')
|
||||||
return createServer
|
return createServer
|
||||||
case BUILD:
|
case BUILD:
|
||||||
const build = require('./tooling/build.js')
|
return require('./tooling/build.js')
|
||||||
return build
|
|
||||||
case WATCH:
|
case WATCH:
|
||||||
const watch = require('./tooling/watch.js')
|
return require('./tooling/watch.js')
|
||||||
return watch
|
|
||||||
case WATCH_INLINE:
|
case WATCH_INLINE:
|
||||||
const watchInlines = require('./tooling/watch-inlines.js')
|
return require('./tooling/watch-inlines.js')
|
||||||
return watchInlines
|
|
||||||
case DEFAULT_CONFIG:
|
case DEFAULT_CONFIG:
|
||||||
const defaultConfig = require('./config/config.js')
|
return require('./config/config.js')
|
||||||
return defaultConfig
|
|
||||||
case GENERATE_BUILD_CONFIG:
|
case GENERATE_BUILD_CONFIG:
|
||||||
const generateBuildConfig = require('./tooling/generateBuildConfig.js')
|
return require('./tooling/generateBuildConfig.js')
|
||||||
return generateBuildConfig
|
|
||||||
default:
|
default:
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -309,8 +309,7 @@ export default class AltcoinHDWallet {
|
|||||||
|
|
||||||
// PublicKey Hash
|
// PublicKey Hash
|
||||||
const publicKeySHA256 = new Sha256().process(new Uint8Array(this.publicKey)).finish().result
|
const publicKeySHA256 = new Sha256().process(new Uint8Array(this.publicKey)).finish().result
|
||||||
const _publicKeyHash = new RIPEMD160().update(Buffer.from(publicKeySHA256)).digest('hex')
|
this.publicKeyHash = new RIPEMD160().update(Buffer.from(publicKeySHA256)).digest('hex')
|
||||||
this.publicKeyHash = _publicKeyHash
|
|
||||||
}
|
}
|
||||||
|
|
||||||
generateMainnetMasterPrivateKey() {
|
generateMainnetMasterPrivateKey() {
|
||||||
@ -505,8 +504,7 @@ export default class AltcoinHDWallet {
|
|||||||
|
|
||||||
// PublicKey Hash
|
// PublicKey Hash
|
||||||
const childPublicKeySHA256 = new Sha256().process(new Uint8Array(this.childPublicKey)).finish().result
|
const childPublicKeySHA256 = new Sha256().process(new Uint8Array(this.childPublicKey)).finish().result
|
||||||
const _childPublicKeyHash = new RIPEMD160().update(Buffer.from(childPublicKeySHA256)).digest('hex')
|
this.childPublicKeyHash = new RIPEMD160().update(Buffer.from(childPublicKeySHA256)).digest('hex')
|
||||||
this.childPublicKeyHash = _childPublicKeyHash
|
|
||||||
|
|
||||||
|
|
||||||
// Call deriveExtendedPublicChildKey // WIll be hardcoding the values...
|
// Call deriveExtendedPublicChildKey // WIll be hardcoding the values...
|
||||||
@ -658,8 +656,7 @@ export default class AltcoinHDWallet {
|
|||||||
|
|
||||||
// PublicKey Hash
|
// PublicKey Hash
|
||||||
const grandChildPublicKeySHA256 = new Sha256().process(new Uint8Array(this.grandChildPublicKey)).finish().result
|
const grandChildPublicKeySHA256 = new Sha256().process(new Uint8Array(this.grandChildPublicKey)).finish().result
|
||||||
const _grandChildPublicKeyHash = new RIPEMD160().update(Buffer.from(grandChildPublicKeySHA256)).digest('hex')
|
this.grandChildPublicKeyHash = new RIPEMD160().update(Buffer.from(grandChildPublicKeySHA256)).digest('hex')
|
||||||
this.grandChildPublicKeyHash = _grandChildPublicKeyHash
|
|
||||||
|
|
||||||
|
|
||||||
// Call deriveExtendedPublicChildKey // WIll be hardcoding the values...
|
// Call deriveExtendedPublicChildKey // WIll be hardcoding the values...
|
||||||
|
@ -24,6 +24,5 @@ export const createWallet = async (sourceType, source, statusUpdateFn) => {
|
|||||||
throw 'sourceType ' + sourceType + ' not recognized'
|
throw 'sourceType ' + sourceType + ' not recognized'
|
||||||
}
|
}
|
||||||
|
|
||||||
const wallet = new PhraseWallet(seed, version)
|
return new PhraseWallet(seed, version)
|
||||||
return wallet
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Base58 from './deps/Base58.js'
|
import Base58 from './deps/Base58.js'
|
||||||
import {kdf} from './kdf.js'
|
import {kdf} from './kdf.js'
|
||||||
import {AES_CBC, HmacSha512} from 'asmcrypto.js'
|
import {AES_CBC, HmacSha512} from 'asmcrypto.js'
|
||||||
import {get, registerTranslateConfig} from '../../core/translate/index.js'
|
import {get, registerTranslateConfig} from '../../core/translate'
|
||||||
|
|
||||||
registerTranslateConfig({
|
registerTranslateConfig({
|
||||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
||||||
@ -27,6 +27,5 @@ export const decryptStoredWallet = async (password, wallet, statusFn = () => { }
|
|||||||
}
|
}
|
||||||
const sfn5 = get("login.lp16")
|
const sfn5 = get("login.lp16")
|
||||||
statusFn(sfn5)
|
statusFn(sfn5)
|
||||||
const decryptedBytes = AES_CBC.decrypt(encryptedSeedBytes, encryptionKey, false, iv)
|
return AES_CBC.decrypt(encryptedSeedBytes, encryptionKey, false, iv)
|
||||||
return decryptedBytes
|
|
||||||
}
|
}
|
||||||
|
@ -14,11 +14,10 @@ Base64.decode = function (string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const decoder = new TextDecoder();
|
const decoder = new TextDecoder();
|
||||||
const decodedString = decoder.decode(bytes);
|
return decoder.decode(bytes);
|
||||||
return decodedString;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default Base64;
|
export default Base64;
|
||||||
|
@ -593,7 +593,7 @@
|
|||||||
}
|
}
|
||||||
dst(c1);
|
dst(c1);
|
||||||
}
|
}
|
||||||
if (c2 !== null) dst(c2);
|
if (false) dst(c2);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2378,7 +2378,7 @@ nacl.verify = function(x, y) {
|
|||||||
// Zero length arguments are considered not equal.
|
// Zero length arguments are considered not equal.
|
||||||
if (x.length === 0 || y.length === 0) return false;
|
if (x.length === 0 || y.length === 0) return false;
|
||||||
if (x.length !== y.length) return false;
|
if (x.length !== y.length) return false;
|
||||||
return (vn(x, 0, y, 0, x.length) === 0) ? true : false;
|
return (vn(x, 0, y, 0, x.length) === 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
nacl.setPRNG = function(fn) {
|
nacl.setPRNG = function(fn) {
|
||||||
@ -2419,4 +2419,4 @@ nacl.setPRNG = function(fn) {
|
|||||||
|
|
||||||
// == CHANGE TO ES6 EXPORT == //
|
// == CHANGE TO ES6 EXPORT == //
|
||||||
//})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {}));
|
//})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {}));
|
||||||
export default nacl
|
export default nacl
|
||||||
|
@ -21,8 +21,7 @@ export async function request(url, options) {
|
|||||||
body,
|
body,
|
||||||
}).then(async (response) => {
|
}).then(async (response) => {
|
||||||
try {
|
try {
|
||||||
const json = await response.clone().json()
|
return await response.clone().json()
|
||||||
return json
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return await response.text()
|
return await response.text()
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ import {store} from '../api_deps.js'
|
|||||||
import {stateAwait} from './utils/stateAwait.js'
|
import {stateAwait} from './utils/stateAwait.js'
|
||||||
import {Sha512} from 'asmcrypto.js'
|
import {Sha512} from 'asmcrypto.js'
|
||||||
import utils from '../api/deps/utils.js'
|
import utils from '../api/deps/utils.js'
|
||||||
import {get, registerTranslateConfig} from '../../core/translate/index.js'
|
import {get, registerTranslateConfig} from '../../core/translate'
|
||||||
|
|
||||||
registerTranslateConfig({
|
registerTranslateConfig({
|
||||||
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
|
||||||
|
@ -30,9 +30,7 @@ const signArbitrary = (arbitraryBytesBase58, arbitraryBytesForSigningBase58, non
|
|||||||
|
|
||||||
const signature = nacl.sign.detached(arbitraryBytesForSigningBuffer, keyPair.privateKey)
|
const signature = nacl.sign.detached(arbitraryBytesForSigningBuffer, keyPair.privateKey)
|
||||||
|
|
||||||
const signedBytes = utils.appendBuffer(arbitraryBytesBuffer, signature)
|
return utils.appendBuffer(arbitraryBytesBuffer, signature)
|
||||||
|
|
||||||
return signedBytes
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default signArbitrary
|
export default signArbitrary
|
||||||
|
@ -21,13 +21,11 @@ const signArbitraryWithFee = (arbitraryBytesBase58, arbitraryBytesForSigningBase
|
|||||||
const _arbitraryBytesForSigningBuffer = Object.keys(arbitraryBytesForSigning).map(function (key) { return arbitraryBytesForSigning[key]; })
|
const _arbitraryBytesForSigningBuffer = Object.keys(arbitraryBytesForSigning).map(function (key) { return arbitraryBytesForSigning[key]; })
|
||||||
const arbitraryBytesForSigningBuffer = new Uint8Array(_arbitraryBytesForSigningBuffer)
|
const arbitraryBytesForSigningBuffer = new Uint8Array(_arbitraryBytesForSigningBuffer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const signature = nacl.sign.detached(arbitraryBytesForSigningBuffer, keyPair.privateKey)
|
const signature = nacl.sign.detached(arbitraryBytesForSigningBuffer, keyPair.privateKey)
|
||||||
|
|
||||||
const signedBytes = utils.appendBuffer(arbitraryBytesBuffer, signature)
|
return utils.appendBuffer(arbitraryBytesBuffer, signature)
|
||||||
|
|
||||||
return signedBytes
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default signArbitraryWithFee
|
export default signArbitraryWithFee
|
||||||
|
@ -25,18 +25,14 @@ const signChat = (chatBytes, nonce, keyPair) => {
|
|||||||
|
|
||||||
const signature = nacl.sign.detached(chatBytesBuffer, keyPair.privateKey)
|
const signature = nacl.sign.detached(chatBytesBuffer, keyPair.privateKey)
|
||||||
|
|
||||||
const signedBytes = utils.appendBuffer(chatBytesBuffer, signature)
|
return utils.appendBuffer(chatBytesBuffer, signature)
|
||||||
|
|
||||||
return signedBytes
|
|
||||||
} else {
|
} else {
|
||||||
const chatBytesBuffer = new Uint8Array(chatBytes)
|
const chatBytesBuffer = new Uint8Array(chatBytes)
|
||||||
chatBytesBuffer.set(_nonce, 112)
|
chatBytesBuffer.set(_nonce, 112)
|
||||||
|
|
||||||
const signature = nacl.sign.detached(chatBytesBuffer, keyPair.privateKey)
|
const signature = nacl.sign.detached(chatBytesBuffer, keyPair.privateKey)
|
||||||
|
|
||||||
const signedBytes = utils.appendBuffer(chatBytesBuffer, signature)
|
return utils.appendBuffer(chatBytesBuffer, signature)
|
||||||
|
|
||||||
return signedBytes
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,14 +17,10 @@ const signTradeBotTransaction = (unsignedTxn, keyPair) => {
|
|||||||
const _privateKey = Object.keys(keyPair.privateKey).map(function (key) { return keyPair.privateKey[key]; })
|
const _privateKey = Object.keys(keyPair.privateKey).map(function (key) { return keyPair.privateKey[key]; })
|
||||||
const privateKey = new Uint8Array(_privateKey)
|
const privateKey = new Uint8Array(_privateKey)
|
||||||
const signature = nacl.sign.detached(txnBuffer, privateKey)
|
const signature = nacl.sign.detached(txnBuffer, privateKey)
|
||||||
const signedBytes = utils.appendBuffer(txnBuffer, signature)
|
return utils.appendBuffer(txnBuffer, signature)
|
||||||
|
|
||||||
return signedBytes
|
|
||||||
} else {
|
} else {
|
||||||
const signature = nacl.sign.detached(txnBuffer, keyPair.privateKey)
|
const signature = nacl.sign.detached(txnBuffer, keyPair.privateKey)
|
||||||
const signedBytes = utils.appendBuffer(txnBuffer, signature)
|
return utils.appendBuffer(txnBuffer, signature)
|
||||||
|
|
||||||
return signedBytes
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,8 +9,7 @@ export const cancelAllOffers = async (requestObject) => {
|
|||||||
|
|
||||||
const getMyOpenOffers = async () => {
|
const getMyOpenOffers = async () => {
|
||||||
const res = await request('/crosschain/tradeoffers')
|
const res = await request('/crosschain/tradeoffers')
|
||||||
const myOpenTradeOrders = await res.filter(order => order.mode === "OFFERING" && order.qortalCreator === address)
|
return await res.filter(order => order.mode === "OFFERING" && order.qortalCreator === address)
|
||||||
return myOpenTradeOrders
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const myOpenOffers = await getMyOpenOffers()
|
const myOpenOffers = await getMyOpenOffers()
|
||||||
|
@ -3,6 +3,5 @@ import Base58 from '../deps/Base58.js'
|
|||||||
|
|
||||||
export const base58PublicKeyToAddress = (base58pubkey, qora = false) => {
|
export const base58PublicKeyToAddress = (base58pubkey, qora = false) => {
|
||||||
const decodePubKey = Base58.decode(base58pubkey)
|
const decodePubKey = Base58.decode(base58pubkey)
|
||||||
const address = publicKeyToAddress(decodePubKey, qora)
|
return publicKeyToAddress(decodePubKey, qora)
|
||||||
return address
|
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,6 @@ import Base58 from '../deps/Base58.js'
|
|||||||
export const validateAddress = (address) => {
|
export const validateAddress = (address) => {
|
||||||
const decodePubKey = Base58.decode(address)
|
const decodePubKey = Base58.decode(address)
|
||||||
|
|
||||||
if (!(decodePubKey instanceof Uint8Array && decodePubKey.length == 25)) {
|
return decodePubKey instanceof Uint8Array && decodePubKey.length == 25;
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
118
electron.js
118
electron.js
@ -2,16 +2,12 @@ const {
|
|||||||
app,
|
app,
|
||||||
BrowserWindow,
|
BrowserWindow,
|
||||||
ipcMain,
|
ipcMain,
|
||||||
ipcRenderer,
|
|
||||||
Menu,
|
Menu,
|
||||||
Notification,
|
Notification,
|
||||||
Tray,
|
Tray,
|
||||||
nativeImage,
|
|
||||||
dialog,
|
dialog,
|
||||||
webContents,
|
|
||||||
nativeTheme,
|
nativeTheme,
|
||||||
crashReporter,
|
crashReporter
|
||||||
webFrame
|
|
||||||
} = require('electron')
|
} = require('electron')
|
||||||
|
|
||||||
const { autoUpdater } = require('electron-updater')
|
const { autoUpdater } = require('electron-updater')
|
||||||
@ -42,16 +38,16 @@ crashReporter.start({
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (myMemory > 16000000000) {
|
if (myMemory > 16000000000) {
|
||||||
app.commandLine.appendSwitch('js-flags', '--max-executable-size=192', '--max-old-space-size=8192', '--max-semi-space-size=2')
|
app.commandLine.appendSwitch('js-flags', '--max-executable-size=192 --max-old-space-size=8192 --max-semi-space-size=2')
|
||||||
log.info("Memory Size Is 16GB Using JS Memory Heap Size 8GB")
|
log.info("Memory Size Is 16GB Using JS Memory Heap Size 8GB")
|
||||||
} else if (myMemory > 12000000000) {
|
} else if (myMemory > 12000000000) {
|
||||||
app.commandLine.appendSwitch('js-flags', '--max-executable-size=192', '--max-old-space-size=6144', '--max-semi-space-size=2')
|
app.commandLine.appendSwitch('js-flags', '--max-executable-size=192 --max-old-space-size=6144 --max-semi-space-size=2')
|
||||||
log.info("Memory Size Is 12GB Using JS Memory Heap Size 6GB")
|
log.info("Memory Size Is 12GB Using JS Memory Heap Size 6GB")
|
||||||
} else if (myMemory > 7000000000) {
|
} else if (myMemory > 7000000000) {
|
||||||
app.commandLine.appendSwitch('js-flags', '--max-executable-size=192', '--max-old-space-size=4096', '--max-semi-space-size=2')
|
app.commandLine.appendSwitch('js-flags', '--max-executable-size=192 --max-old-space-size=4096 --max-semi-space-size=2')
|
||||||
log.info("Memory Size Is 8GB Using JS Memory Heap Size 4GB")
|
log.info("Memory Size Is 8GB Using JS Memory Heap Size 4GB")
|
||||||
} else {
|
} else {
|
||||||
app.commandLine.appendSwitch('js-flags', '--max-executable-size=192', '--max-old-space-size=2048', '--max-semi-space-size=2')
|
app.commandLine.appendSwitch('js-flags', '--max-executable-size=192 --max-old-space-size=2048 --max-semi-space-size=2')
|
||||||
log.info("Memory Size Is 4GB Using JS Memory Heap Size 2GB")
|
log.info("Memory Size Is 4GB Using JS Memory Heap Size 2GB")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,15 +164,11 @@ const isRunning = (query, cb) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function doesFileExist(urlToJavaFile) {
|
function doesFileExist(urlToJavaFile) {
|
||||||
var xhr = new XMLHttpRequest()
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open('HEAD', urlToJavaFile, true)
|
xhr.open('HEAD', urlToJavaFile, true)
|
||||||
xhr.send()
|
xhr.send()
|
||||||
|
|
||||||
if (xhr.status == "404") {
|
return xhr.status != "404";
|
||||||
return false
|
|
||||||
} else {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function checkWin() {
|
async function checkWin() {
|
||||||
@ -201,7 +193,7 @@ async function checkWin() {
|
|||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
} else {
|
} else {
|
||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -219,7 +211,7 @@ async function checkWin() {
|
|||||||
if (returnValue.response === 0) {
|
if (returnValue.response === 0) {
|
||||||
downloadWindows()
|
downloadWindows()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -227,11 +219,11 @@ async function checkWin() {
|
|||||||
|
|
||||||
async function checkOsPlatform() {
|
async function checkOsPlatform() {
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
startElectronWin()
|
await startElectronWin()
|
||||||
} else if (process.platform === 'linux' || process.platform === 'darwin') {
|
} else if (process.platform === 'linux' || process.platform === 'darwin') {
|
||||||
startElectronUnix()
|
startElectronUnix()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,7 +248,7 @@ async function startElectronWin() {
|
|||||||
if (returnValue.response === 0) {
|
if (returnValue.response === 0) {
|
||||||
downloadWindows()
|
downloadWindows()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -283,7 +275,7 @@ function startElectronUnix() {
|
|||||||
if (returnValue.response === 0) {
|
if (returnValue.response === 0) {
|
||||||
downloadQortal()
|
downloadQortal()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -298,7 +290,7 @@ async function downloadWindows() {
|
|||||||
alwaysOnTop: true,
|
alwaysOnTop: true,
|
||||||
show: false
|
show: false
|
||||||
})
|
})
|
||||||
winLoader.loadFile(path.join(__dirname + '/splash/download.html'))
|
await winLoader.loadFile(path.join(__dirname + '/splash/download.html'))
|
||||||
|
|
||||||
winLoader.show()
|
winLoader.show()
|
||||||
await electronDl.download(myWindow, winurl, {
|
await electronDl.download(myWindow, winurl, {
|
||||||
@ -329,7 +321,7 @@ async function removeQortalExe() {
|
|||||||
log.info('renove error', err)
|
log.info('renove error', err)
|
||||||
}
|
}
|
||||||
|
|
||||||
checkWin()
|
await checkWin()
|
||||||
}
|
}
|
||||||
|
|
||||||
async function checkPort() {
|
async function checkPort() {
|
||||||
@ -344,7 +336,7 @@ async function checkPort() {
|
|||||||
|
|
||||||
async function checkResponseStatus(res) {
|
async function checkResponseStatus(res) {
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
return
|
|
||||||
} else if (process.platform === 'win32') {
|
} else if (process.platform === 'win32') {
|
||||||
await checkWin()
|
await checkWin()
|
||||||
} else {
|
} else {
|
||||||
@ -353,7 +345,7 @@ async function checkResponseStatus(res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function javaversion() {
|
async function javaversion() {
|
||||||
var stderrChunks = []
|
let stderrChunks = [];
|
||||||
let checkJava = await spawn('java', ['-version'], { shell: true })
|
let checkJava = await spawn('java', ['-version'], { shell: true })
|
||||||
if (process.platform === 'linux') {
|
if (process.platform === 'linux') {
|
||||||
if (process.arch === 'x64') {
|
if (process.arch === 'x64') {
|
||||||
@ -386,8 +378,8 @@ async function javaversion() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
checkJava.stderr.on('end', () => {
|
checkJava.stderr.on('end', () => {
|
||||||
datres = Buffer.concat(stderrChunks).toString().split('\n')[0]
|
let datres = Buffer.concat(stderrChunks).toString().split('\n')[0]
|
||||||
var javaVersion = new RegExp('(java|openjdk) version').test(datres) ? datres.split(' ')[2].replace(/"/g, '') : false
|
const javaVersion = new RegExp('(java|openjdk) version').test(datres) ? datres.split(' ')[2].replace(/"/g, '') : false;
|
||||||
log.info("Java Version", javaVersion)
|
log.info("Java Version", javaVersion)
|
||||||
if (javaVersion != false) {
|
if (javaVersion != false) {
|
||||||
checkQortal()
|
checkQortal()
|
||||||
@ -403,7 +395,7 @@ async function javaversion() {
|
|||||||
if (returnValue.response === 0) {
|
if (returnValue.response === 0) {
|
||||||
installJava()
|
installJava()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -419,7 +411,7 @@ async function installJava() {
|
|||||||
alwaysOnTop: true,
|
alwaysOnTop: true,
|
||||||
show: false
|
show: false
|
||||||
})
|
})
|
||||||
splashLoader.loadFile(path.join(__dirname + '/splash/download.html'))
|
await splashLoader.loadFile(path.join(__dirname + '/splash/download.html'))
|
||||||
|
|
||||||
if (process.platform === 'linux') {
|
if (process.platform === 'linux') {
|
||||||
if (process.arch === 'x64') {
|
if (process.arch === 'x64') {
|
||||||
@ -435,7 +427,7 @@ async function installJava() {
|
|||||||
log.info('Download JAVA error', err)
|
log.info('Download JAVA error', err)
|
||||||
}
|
}
|
||||||
splashLoader.destroy()
|
splashLoader.destroy()
|
||||||
unzipJavaX64Linux()
|
await unzipJavaX64Linux()
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
splashLoader.show()
|
splashLoader.show()
|
||||||
@ -448,7 +440,7 @@ async function installJava() {
|
|||||||
log.info('Download JAVA error', err)
|
log.info('Download JAVA error', err)
|
||||||
}
|
}
|
||||||
splashLoader.destroy()
|
splashLoader.destroy()
|
||||||
unzipJavaX64Linux()
|
await unzipJavaX64Linux()
|
||||||
}
|
}
|
||||||
} else if (process.arch === 'arm64') {
|
} else if (process.arch === 'arm64') {
|
||||||
if (doesFileExist(linjavaarm64url) == true) {
|
if (doesFileExist(linjavaarm64url) == true) {
|
||||||
@ -463,7 +455,7 @@ async function installJava() {
|
|||||||
log.info('Download JAVA error', err)
|
log.info('Download JAVA error', err)
|
||||||
}
|
}
|
||||||
splashLoader.destroy()
|
splashLoader.destroy()
|
||||||
unzipJavaArm64Linux()
|
await unzipJavaArm64Linux()
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
splashLoader.show()
|
splashLoader.show()
|
||||||
@ -476,7 +468,7 @@ async function installJava() {
|
|||||||
log.info('Download JAVA error', err)
|
log.info('Download JAVA error', err)
|
||||||
}
|
}
|
||||||
splashLoader.destroy()
|
splashLoader.destroy()
|
||||||
unzipJavaArm64Linux()
|
await unzipJavaArm64Linux()
|
||||||
}
|
}
|
||||||
} else if (process.arch === 'arm') {
|
} else if (process.arch === 'arm') {
|
||||||
if (doesFileExist(linjavaarmurl) == true) {
|
if (doesFileExist(linjavaarmurl) == true) {
|
||||||
@ -491,7 +483,7 @@ async function installJava() {
|
|||||||
log.info('Download JAVA error', err)
|
log.info('Download JAVA error', err)
|
||||||
}
|
}
|
||||||
splashLoader.destroy()
|
splashLoader.destroy()
|
||||||
unzipJavaArmLinux()
|
await unzipJavaArmLinux()
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
splashLoader.show()
|
splashLoader.show()
|
||||||
@ -504,7 +496,7 @@ async function installJava() {
|
|||||||
log.info('Download JAVA error', err)
|
log.info('Download JAVA error', err)
|
||||||
}
|
}
|
||||||
splashLoader.destroy()
|
splashLoader.destroy()
|
||||||
unzipJavaArmLinux()
|
await unzipJavaArmLinux()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (process.platform === 'darwin') {
|
} else if (process.platform === 'darwin') {
|
||||||
@ -521,7 +513,7 @@ async function installJava() {
|
|||||||
log.info('Download JAVA error', err)
|
log.info('Download JAVA error', err)
|
||||||
}
|
}
|
||||||
splashLoader.destroy()
|
splashLoader.destroy()
|
||||||
unzipJavaX64Mac()
|
await unzipJavaX64Mac()
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
splashLoader.show()
|
splashLoader.show()
|
||||||
@ -534,7 +526,7 @@ async function installJava() {
|
|||||||
log.info('Download JAVA error', err)
|
log.info('Download JAVA error', err)
|
||||||
}
|
}
|
||||||
splashLoader.destroy()
|
splashLoader.destroy()
|
||||||
unzipJavaX64Mac()
|
await unzipJavaX64Mac()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (doesFileExist(macjavaaarch64url) == true) {
|
if (doesFileExist(macjavaaarch64url) == true) {
|
||||||
@ -549,7 +541,7 @@ async function installJava() {
|
|||||||
log.info('Download JAVA error', err)
|
log.info('Download JAVA error', err)
|
||||||
}
|
}
|
||||||
splashLoader.destroy()
|
splashLoader.destroy()
|
||||||
unzipJavaAarch64Mac()
|
await unzipJavaAarch64Mac()
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
splashLoader.show()
|
splashLoader.show()
|
||||||
@ -562,7 +554,7 @@ async function installJava() {
|
|||||||
log.info('Download JAVA error', err)
|
log.info('Download JAVA error', err)
|
||||||
}
|
}
|
||||||
splashLoader.destroy()
|
splashLoader.destroy()
|
||||||
unzipJavaAarch64Mac()
|
await unzipJavaAarch64Mac()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -575,7 +567,7 @@ async function unzipJavaX64Linux() {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.info('Unzip Java error', err)
|
log.info('Unzip Java error', err)
|
||||||
}
|
}
|
||||||
chmodJava()
|
await chmodJava()
|
||||||
}
|
}
|
||||||
|
|
||||||
async function unzipJavaArm64Linux() {
|
async function unzipJavaArm64Linux() {
|
||||||
@ -585,7 +577,7 @@ async function unzipJavaArm64Linux() {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.info('Unzip Java error', err)
|
log.info('Unzip Java error', err)
|
||||||
}
|
}
|
||||||
chmodJava()
|
await chmodJava()
|
||||||
}
|
}
|
||||||
|
|
||||||
async function unzipJavaArmLinux() {
|
async function unzipJavaArmLinux() {
|
||||||
@ -595,7 +587,7 @@ async function unzipJavaArmLinux() {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.info('Unzip Java error', err)
|
log.info('Unzip Java error', err)
|
||||||
}
|
}
|
||||||
chmodJava()
|
await chmodJava()
|
||||||
}
|
}
|
||||||
|
|
||||||
async function unzipJavaX64Mac() {
|
async function unzipJavaX64Mac() {
|
||||||
@ -605,7 +597,7 @@ async function unzipJavaX64Mac() {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.info('Unzip Java error', err)
|
log.info('Unzip Java error', err)
|
||||||
}
|
}
|
||||||
chmodJava()
|
await chmodJava()
|
||||||
}
|
}
|
||||||
|
|
||||||
async function unzipJavaAarch64Mac() {
|
async function unzipJavaAarch64Mac() {
|
||||||
@ -615,7 +607,7 @@ async function unzipJavaAarch64Mac() {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.info('Unzip Java error', err)
|
log.info('Unzip Java error', err)
|
||||||
}
|
}
|
||||||
chmodJava()
|
await chmodJava()
|
||||||
}
|
}
|
||||||
|
|
||||||
async function chmodJava() {
|
async function chmodJava() {
|
||||||
@ -627,7 +619,7 @@ async function chmodJava() {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.info('chmod error', err)
|
log.info('chmod error', err)
|
||||||
}
|
}
|
||||||
removeJavaZip()
|
await removeJavaZip()
|
||||||
}
|
}
|
||||||
|
|
||||||
async function removeJavaZip() {
|
async function removeJavaZip() {
|
||||||
@ -710,7 +702,7 @@ function checkQortal() {
|
|||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
} else {
|
} else {
|
||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -728,7 +720,7 @@ function checkQortal() {
|
|||||||
if (returnValue.response === 0) {
|
if (returnValue.response === 0) {
|
||||||
downloadQortal()
|
downloadQortal()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -743,7 +735,7 @@ async function downloadQortal() {
|
|||||||
alwaysOnTop: true,
|
alwaysOnTop: true,
|
||||||
show: false
|
show: false
|
||||||
})
|
})
|
||||||
qortalLoader.loadFile(path.join(__dirname + '/splash/download.html'))
|
await qortalLoader.loadFile(path.join(__dirname + '/splash/download.html'))
|
||||||
|
|
||||||
try {
|
try {
|
||||||
qortalLoader.show()
|
qortalLoader.show()
|
||||||
@ -756,7 +748,7 @@ async function downloadQortal() {
|
|||||||
log.info('Download Qortal error', err)
|
log.info('Download Qortal error', err)
|
||||||
}
|
}
|
||||||
qortalLoader.destroy()
|
qortalLoader.destroy()
|
||||||
unzipQortal()
|
await unzipQortal()
|
||||||
}
|
}
|
||||||
|
|
||||||
async function unzipQortal() {
|
async function unzipQortal() {
|
||||||
@ -766,7 +758,7 @@ async function unzipQortal() {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.info('Unzip Qortal error', err)
|
log.info('Unzip Qortal error', err)
|
||||||
}
|
}
|
||||||
chmodQortal()
|
await chmodQortal()
|
||||||
}
|
}
|
||||||
|
|
||||||
async function chmodQortal() {
|
async function chmodQortal() {
|
||||||
@ -778,7 +770,7 @@ async function chmodQortal() {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.info('chmod error', err)
|
log.info('chmod error', err)
|
||||||
}
|
}
|
||||||
removeQortalZip()
|
await removeQortalZip()
|
||||||
}
|
}
|
||||||
|
|
||||||
async function removeQortalZip() {
|
async function removeQortalZip() {
|
||||||
@ -790,7 +782,7 @@ async function removeQortalZip() {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.info('rm error', err)
|
log.info('rm error', err)
|
||||||
}
|
}
|
||||||
checkAndStart()
|
await checkAndStart()
|
||||||
}
|
}
|
||||||
|
|
||||||
async function checkAndStart() {
|
async function checkAndStart() {
|
||||||
@ -811,7 +803,7 @@ async function checkAndStart() {
|
|||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
} else {
|
} else {
|
||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -990,7 +982,7 @@ const editMenu = Menu.buildFromTemplate([
|
|||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
} else {
|
} else {
|
||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -1147,7 +1139,7 @@ const createTray = () => {
|
|||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
} else {
|
} else {
|
||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -1208,8 +1200,10 @@ if (!isLock) {
|
|||||||
app.whenReady().then(async () => {
|
app.whenReady().then(async () => {
|
||||||
createWindow()
|
createWindow()
|
||||||
createTray()
|
createTray()
|
||||||
await checkAll()
|
if (!store.get('askingCore')) {
|
||||||
autoUpdater.checkForUpdatesAndNotify()
|
await checkAll()
|
||||||
|
}
|
||||||
|
await autoUpdater.checkForUpdatesAndNotify()
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
autoUpdater.checkForUpdatesAndNotify()
|
autoUpdater.checkForUpdatesAndNotify()
|
||||||
}, 1000 * 60 * 720)
|
}, 1000 * 60 * 720)
|
||||||
@ -1245,7 +1239,7 @@ if (!isLock) {
|
|||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
} else {
|
} else {
|
||||||
store.set('askingCore', returnValue.checkboxChecked)
|
store.set('askingCore', returnValue.checkboxChecked)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -1331,7 +1325,7 @@ if (!isLock) {
|
|||||||
})
|
})
|
||||||
dl.show()
|
dl.show()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -1353,7 +1347,7 @@ if (!isLock) {
|
|||||||
if (returnValue.response === 0) {
|
if (returnValue.response === 0) {
|
||||||
autoUpdater.quitAndInstall()
|
autoUpdater.quitAndInstall()
|
||||||
} else {
|
} else {
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -1374,4 +1368,4 @@ if (!isLock) {
|
|||||||
process.on('uncaughtException', function (err) {
|
process.on('uncaughtException', function (err) {
|
||||||
log.info("*** WHOOPS TIME ***" + err)
|
log.info("*** WHOOPS TIME ***" + err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1,71 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Qortal Blockchain Project - 2021
|
|
||||||
|
|
||||||
# Travis Script to install dependencies...
|
|
||||||
|
|
||||||
set -ev
|
|
||||||
|
|
||||||
# install every repository needed, install dependencies, clone git repos, do yarn linking and building, and build and run final UI
|
|
||||||
|
|
||||||
install_dependencies()
|
|
||||||
{
|
|
||||||
echo -e '---INSTALLING DEPENDENCIES!---'
|
|
||||||
echo -e '---INSTALLING ALL UI REPOSITORIES---'
|
|
||||||
|
|
||||||
cd ../
|
|
||||||
cd qortal-ui-core
|
|
||||||
yarn install --pure-lockfile
|
|
||||||
cd ../
|
|
||||||
mkdir qortal-ui/qortal-ui-core
|
|
||||||
rsync -a qortal-ui-core/ qortal-ui/qortal-ui-core --exclude .git
|
|
||||||
cd qortal-ui/qortal-ui-core
|
|
||||||
yarn link
|
|
||||||
cd ../../
|
|
||||||
|
|
||||||
cd qortal-ui-plugins
|
|
||||||
yarn install --pure-lockfile
|
|
||||||
cd ../
|
|
||||||
mkdir qortal-ui/qortal-ui-plugins
|
|
||||||
rsync -a qortal-ui-plugins/ qortal-ui/qortal-ui-plugins --exclude .git
|
|
||||||
cd qortal-ui/qortal-ui-plugins
|
|
||||||
yarn link
|
|
||||||
cd ../../
|
|
||||||
|
|
||||||
cd qortal-ui-crypto
|
|
||||||
yarn install --pure-lockfile
|
|
||||||
cd ../
|
|
||||||
mkdir qortal-ui/qortal-ui-crypto
|
|
||||||
rsync -a qortal-ui-crypto/ qortal-ui/qortal-ui-crypto --exclude .git
|
|
||||||
cd qortal-ui/qortal-ui-crypto
|
|
||||||
yarn link
|
|
||||||
cd ../
|
|
||||||
|
|
||||||
echo -e '---INSTALL ALL DEPENDENCIES---'
|
|
||||||
yarn install --pure-lockfile
|
|
||||||
|
|
||||||
echo -e '---LINKING UI FOLDERS ---'
|
|
||||||
yarn link qortal-ui-core
|
|
||||||
yarn link qortal-ui-crypto
|
|
||||||
yarn link qortal-ui-plugins
|
|
||||||
|
|
||||||
echo -e '---BUILDING UI DEPENDENCIES!---'
|
|
||||||
yarn build
|
|
||||||
|
|
||||||
echo -e '---UPDATE PACKAGE-JSON UI DEPENDENCIES!---'
|
|
||||||
yarn update-package-json
|
|
||||||
|
|
||||||
echo -e '---REMOVE MODULES AND UNUSED DEPENDENCIES!---'
|
|
||||||
cd qortal-ui-core
|
|
||||||
yarn install --production --ignore-scripts --prefer-offline
|
|
||||||
cd ../
|
|
||||||
cd qortal-ui-plugins
|
|
||||||
rm -R node_modules
|
|
||||||
cd ../
|
|
||||||
cd qortal-ui-crypto
|
|
||||||
rm -R node_modules
|
|
||||||
cd ../
|
|
||||||
rm -R qortal-ui-crypto
|
|
||||||
}
|
|
||||||
|
|
||||||
install_dependencies
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user