Rework tabs and add overview page
This commit is contained in:
parent
29f45faffa
commit
f0559f9c5f
@ -28,7 +28,7 @@ Easiest way to install the lastest required packages on Linux is via nvm.
|
|||||||
``` 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 v18.14.0 ``` (LTS: Hydrogen supported by Electron) <br/>
|
``` nvm install v18.14.0 ``` (LTS: Hydrogen supported by Electron) <br/>
|
||||||
``` npm --location=global install npm@9.7.1 ``` <br/>
|
``` npm --location=global install npm@9.7.2 ``` <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.
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ html {
|
|||||||
--app-background-1: #045de9;
|
--app-background-1: #045de9;
|
||||||
--app-background-2: #09c6f9;
|
--app-background-2: #09c6f9;
|
||||||
--app-icon: #ffffff;
|
--app-icon: #ffffff;
|
||||||
|
--app-hr: rgba(0, 0, 0, .3);
|
||||||
}
|
}
|
||||||
|
|
||||||
html[theme="dark"] {
|
html[theme="dark"] {
|
||||||
@ -130,4 +131,5 @@ html[theme="dark"] {
|
|||||||
--app-background-1: #7f5a83;
|
--app-background-1: #7f5a83;
|
||||||
--app-background-2: #0d324d;
|
--app-background-2: #0d324d;
|
||||||
--app-icon: #03a9f4;
|
--app-icon: #03a9f4;
|
||||||
|
--app-hr: rgba(255, 255, 255, .3);
|
||||||
}
|
}
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "Plugin-Typ:",
|
"tm24": "Plugin-Typ:",
|
||||||
"tm25": "Bitte wählen Sie einen Plugin-Typ aus!",
|
"tm25": "Bitte wählen Sie einen Plugin-Typ aus!",
|
||||||
"tm26": "Neues Plugin zum Menü hinzufügen",
|
"tm26": "Neues Plugin zum Menü hinzufügen",
|
||||||
"tm27": "Plugin aus Menü entfernen"
|
"tm27": "Plugin aus Menü entfernen",
|
||||||
|
"tm28": "Übersichtsseite"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "Einloggen",
|
"login": "Einloggen",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "Minter Level",
|
"minterlevel": "Minter Level",
|
||||||
"blocksminted": "Blöcke Geprägt"
|
"blocksminted": "Blöcke Geprägt",
|
||||||
|
"wp1": "Prägung",
|
||||||
|
"wp2": "Nicht am Prägen",
|
||||||
|
"wp3": "Kerninformationen",
|
||||||
|
"wp4": "Synchronisiert"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "Ja",
|
"yes": "Ja",
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "Tipo de complemento:",
|
"tm24": "Tipo de complemento:",
|
||||||
"tm25": "¡Seleccione un tipo de complemento!",
|
"tm25": "¡Seleccione un tipo de complemento!",
|
||||||
"tm26": "Agregar nuevo complemento al menú",
|
"tm26": "Agregar nuevo complemento al menú",
|
||||||
"tm27": "Eliminar complemento del menú"
|
"tm27": "Eliminar complemento del menú",
|
||||||
|
"tm28": "Página de inicio"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "Iniciar sesión",
|
"login": "Iniciar sesión",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "Nivel del acuñador",
|
"minterlevel": "Nivel del acuñador",
|
||||||
"blocksminted": "Bloques acuñados"
|
"blocksminted": "Bloques acuñados",
|
||||||
|
"wp1": "Acuñación",
|
||||||
|
"wp2": "Sin acuñar",
|
||||||
|
"wp3": "Información básica",
|
||||||
|
"wp4": "Sincronizado"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "Sí",
|
"yes": "Sí",
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "Type de plug-in :",
|
"tm24": "Type de plug-in :",
|
||||||
"tm25": "Veuillez sélectionner un type de plugin !",
|
"tm25": "Veuillez sélectionner un type de plugin !",
|
||||||
"tm26": "Ajouter un nouveau plugin au menu",
|
"tm26": "Ajouter un nouveau plugin au menu",
|
||||||
"tm27": "Supprimer le plugin du menu"
|
"tm27": "Supprimer le plugin du menu",
|
||||||
|
"tm28": "Page de présentation"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "Connexion",
|
"login": "Connexion",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "Niveau de frappeur",
|
"minterlevel": "Niveau de frappeur",
|
||||||
"blocksminted": "Blocs frappés"
|
"blocksminted": "Blocs frappés",
|
||||||
|
"wp1": "Monnaie",
|
||||||
|
"wp2": "Pas de frappe",
|
||||||
|
"wp3": "Informations de base",
|
||||||
|
"wp4": "Synchronisé"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "Oui",
|
"yes": "Oui",
|
||||||
|
@ -70,7 +70,8 @@
|
|||||||
"tm24": "प्लगइन प्रकार:",
|
"tm24": "प्लगइन प्रकार:",
|
||||||
"tm25": "कृपया प्लगइन प्रकार चुनें!",
|
"tm25": "कृपया प्लगइन प्रकार चुनें!",
|
||||||
"tm26": "मेनू में नया प्लगइन जोड़ें",
|
"tm26": "मेनू में नया प्लगइन जोड़ें",
|
||||||
"tm27": "मेनू से प्लगइन हटाएं"
|
"tm27": "मेनू से प्लगइन हटाएं",
|
||||||
|
"tm28": "अवलोकन पृष्ठ"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "लॉग इन करें",
|
"login": "लॉग इन करें",
|
||||||
@ -179,7 +180,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "मिन्टर लेवल",
|
"minterlevel": "मिन्टर लेवल",
|
||||||
"blocksminted": "ब्लॉक मिंटेड"
|
"blocksminted": "ब्लॉक मिंटेड",
|
||||||
|
"wp1": "खनन",
|
||||||
|
"wp2": "नॉट मिंटिंग",
|
||||||
|
"wp3": "मुख्य जानकारी",
|
||||||
|
"wp4": "सिंक्रोनाइज़्ड"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "हाँ",
|
"yes": "हाँ",
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "Vrsta dodatka:",
|
"tm24": "Vrsta dodatka:",
|
||||||
"tm25": "Molimo odaberite vrstu dodatka!",
|
"tm25": "Molimo odaberite vrstu dodatka!",
|
||||||
"tm26": "Dodaj novi dodatak u izbornik",
|
"tm26": "Dodaj novi dodatak u izbornik",
|
||||||
"tm27": "Ukloni dodatak iz izbornika"
|
"tm27": "Ukloni dodatak iz izbornika",
|
||||||
|
"tm28": "Stranica pregleda"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "Prijavi se",
|
"login": "Prijavi se",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "Minter Level",
|
"minterlevel": "Minter Level",
|
||||||
"blocksminted": "Mintani blokovi"
|
"blocksminted": "Mintani blokovi",
|
||||||
|
"wp1": "Kovanje",
|
||||||
|
"wp2": "Nije kovano",
|
||||||
|
"wp3": "Osnovne informacije",
|
||||||
|
"wp4": "Sinkronizirano"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "Da",
|
"yes": "Da",
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "Plugin Type:",
|
"tm24": "Plugin Type:",
|
||||||
"tm25": "Kérjük, válasszon beépülő modul típust!",
|
"tm25": "Kérjük, válasszon beépülő modul típust!",
|
||||||
"tm26": "Új beépülő modul hozzáadása a menühöz",
|
"tm26": "Új beépülő modul hozzáadása a menühöz",
|
||||||
"tm27": "Plugin eltávolítása a menüből"
|
"tm27": "Plugin eltávolítása a menüből",
|
||||||
|
"tm28": "Áttekintő oldal"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "Bejelentkezés",
|
"login": "Bejelentkezés",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "Pénzverő Szint",
|
"minterlevel": "Pénzverő Szint",
|
||||||
"blocksminted": "Vert blokkok"
|
"blocksminted": "Vert blokkok",
|
||||||
|
"wp1": "verés",
|
||||||
|
"wp2": "Nem pénzverés",
|
||||||
|
"wp3": "Alapinformációk",
|
||||||
|
"wp4": "Szinkronizált"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "Igen",
|
"yes": "Igen",
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "Tipo di plug-in:",
|
"tm24": "Tipo di plug-in:",
|
||||||
"tm25": "Seleziona un tipo di plugin!",
|
"tm25": "Seleziona un tipo di plugin!",
|
||||||
"tm26": "Aggiungi nuovo plugin al menu",
|
"tm26": "Aggiungi nuovo plugin al menu",
|
||||||
"tm27": "Rimuovi plugin dal menu"
|
"tm27": "Rimuovi plugin dal menu",
|
||||||
|
"tm28": "Pagina panoramica"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "Login",
|
"login": "Login",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "Livello Minter",
|
"minterlevel": "Livello Minter",
|
||||||
"blocksminted": "Blocchi Minati"
|
"blocksminted": "Blocchi Minati",
|
||||||
|
"wp1": "Conio",
|
||||||
|
"wp2": "Non conio",
|
||||||
|
"wp3": "Informazioni principali",
|
||||||
|
"wp4": "Sincronizzato"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "Yes",
|
"yes": "Yes",
|
||||||
|
@ -71,7 +71,8 @@
|
|||||||
"tm24": "プラグインの種類:",
|
"tm24": "プラグインの種類:",
|
||||||
"tm25": "プラグインの種類を選択してください!",
|
"tm25": "プラグインの種類を選択してください!",
|
||||||
"tm26": "新しいプラグインをメニューに追加",
|
"tm26": "新しいプラグインをメニューに追加",
|
||||||
"tm27": "メニューからプラグインを削除"
|
"tm27": "メニューからプラグインを削除",
|
||||||
|
"tm28": "概要ページ"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "ログイン",
|
"login": "ログイン",
|
||||||
@ -180,7 +181,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "ミンターレベル",
|
"minterlevel": "ミンターレベル",
|
||||||
"blocksminted": "ミントしたブロック"
|
"blocksminted": "ミントしたブロック",
|
||||||
|
"wp1": "ミント",
|
||||||
|
"wp2": "鋳造しない",
|
||||||
|
"wp3": "コア情報",
|
||||||
|
"wp4": "同期済み"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "はい",
|
"yes": "はい",
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "플러그인 유형:",
|
"tm24": "플러그인 유형:",
|
||||||
"tm25": "플러그인 유형을 선택하세요!",
|
"tm25": "플러그인 유형을 선택하세요!",
|
||||||
"tm26": "메뉴에 새 플러그인 추가",
|
"tm26": "메뉴에 새 플러그인 추가",
|
||||||
"tm27": "메뉴에서 플러그인 제거"
|
"tm27": "메뉴에서 플러그인 제거",
|
||||||
|
"tm28": "개요 페이지"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "로그인",
|
"login": "로그인",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "민터 레벨",
|
"minterlevel": "민터 레벨",
|
||||||
"blocksminted": "민트된 블록"
|
"blocksminted": "민트된 블록",
|
||||||
|
"wp1": "조폐",
|
||||||
|
"wp2": "조폐되지 않음",
|
||||||
|
"wp3": "핵심 정보",
|
||||||
|
"wp4": "동기화됨"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "예",
|
"yes": "예",
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "Plugin Type:",
|
"tm24": "Plugin Type:",
|
||||||
"tm25": "Vennligst velg en plugin-type !",
|
"tm25": "Vennligst velg en plugin-type !",
|
||||||
"tm26": "Legg til ny plugin til menyen",
|
"tm26": "Legg til ny plugin til menyen",
|
||||||
"tm27": "Fjern plugin fra menyen"
|
"tm27": "Fjern plugin fra menyen",
|
||||||
|
"tm28": "Oversiktsside"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "Logg på",
|
"login": "Logg på",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "Minternivå",
|
"minterlevel": "Minternivå",
|
||||||
"blocksminted": "Antall blokker mintet"
|
"blocksminted": "Antall blokker mintet",
|
||||||
|
"wp1": "Minting",
|
||||||
|
"wp2": "Ikke preging",
|
||||||
|
"wp3": "Kjerneinformasjon",
|
||||||
|
"wp4": "Synkronisert"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "Ja",
|
"yes": "Ja",
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "Typ wtyczki:",
|
"tm24": "Typ wtyczki:",
|
||||||
"tm25": "Proszę wybrać typ wtyczki!",
|
"tm25": "Proszę wybrać typ wtyczki!",
|
||||||
"tm26": "Dodaj nową wtyczkę do menu",
|
"tm26": "Dodaj nową wtyczkę do menu",
|
||||||
"tm27": "Usuń wtyczkę z menu"
|
"tm27": "Usuń wtyczkę z menu",
|
||||||
|
"tm28": "Strona przeglądu"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "Zaloguj się",
|
"login": "Zaloguj się",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "Poziom Mintera",
|
"minterlevel": "Poziom Mintera",
|
||||||
"blocksminted": "Bloki Zmintowane"
|
"blocksminted": "Bloki Zmintowane",
|
||||||
|
"wp1": "Bicie",
|
||||||
|
"wp2": "Nie bije",
|
||||||
|
"wp3": "Podstawowe informacje",
|
||||||
|
"wp4": "Zsynchronizowany"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "Tak",
|
"yes": "Tak",
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "Tipo de plug-in:",
|
"tm24": "Tipo de plug-in:",
|
||||||
"tm25": "Por favor, selecione um tipo de plugin!",
|
"tm25": "Por favor, selecione um tipo de plugin!",
|
||||||
"tm26": "Adicionar novo plug-in ao menu",
|
"tm26": "Adicionar novo plug-in ao menu",
|
||||||
"tm27": "Remover plug-in do menu"
|
"tm27": "Remover plug-in do menu",
|
||||||
|
"tm28": "Página de visão geral"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "Login",
|
"login": "Login",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "Nível do Minerador",
|
"minterlevel": "Nível do Minerador",
|
||||||
"blocksminted": "Blocos Minerados"
|
"blocksminted": "Blocos Minerados",
|
||||||
|
"wp1": "Criação",
|
||||||
|
"wp2": "Não está cunhando",
|
||||||
|
"wp3": "Informações essenciais",
|
||||||
|
"wp4": "Sincronizado"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "Sim",
|
"yes": "Sim",
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "Tip de plugin:",
|
"tm24": "Tip de plugin:",
|
||||||
"tm25": "Vă rugăm să selectați un tip de plugin !",
|
"tm25": "Vă rugăm să selectați un tip de plugin !",
|
||||||
"tm26": "Adăugați un nou plugin la meniu",
|
"tm26": "Adăugați un nou plugin la meniu",
|
||||||
"tm27": "Eliminați pluginul din meniu"
|
"tm27": "Eliminați pluginul din meniu",
|
||||||
|
"tm28": "Pagina de pornire"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "Login",
|
"login": "Login",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "Nivelul Minter-ului",
|
"minterlevel": "Nivelul Minter-ului",
|
||||||
"blocksminted": "Blocuri descoperite"
|
"blocksminted": "Blocuri descoperite",
|
||||||
|
"wp1": "Battering",
|
||||||
|
"wp2": "Nu se bate",
|
||||||
|
"wp3": "Informații de bază",
|
||||||
|
"wp4": "Sincronizat"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "Da",
|
"yes": "Da",
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "Tip dodatka:",
|
"tm24": "Tip dodatka:",
|
||||||
"tm25": "Molimo izaberite tip dodatka!",
|
"tm25": "Molimo izaberite tip dodatka!",
|
||||||
"tm26": "Dodaj novi dodatak u meni",
|
"tm26": "Dodaj novi dodatak u meni",
|
||||||
"tm27": "Ukloni dodatak iz menija"
|
"tm27": "Ukloni dodatak iz menija",
|
||||||
|
"tm28": "Stranica sa pregledom"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "Prijava",
|
"login": "Prijava",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "Novi Mintera",
|
"minterlevel": "Novi Mintera",
|
||||||
"blocksminted": "Izmintovano Blokova"
|
"blocksminted": "Izmintovano Blokova",
|
||||||
|
"wp1": "Kovanje",
|
||||||
|
"wp2": "Ne kuje",
|
||||||
|
"wp3": "Osnovne informacije",
|
||||||
|
"wp4": "Sinhronizovano"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "Da",
|
"yes": "Da",
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "Тип плагина:",
|
"tm24": "Тип плагина:",
|
||||||
"tm25": "Пожалуйста, выберите тип плагина!",
|
"tm25": "Пожалуйста, выберите тип плагина!",
|
||||||
"tm26": "Добавить новый плагин в меню",
|
"tm26": "Добавить новый плагин в меню",
|
||||||
"tm27": "Удалить плагин из меню"
|
"tm27": "Удалить плагин из меню",
|
||||||
|
"tm28": "Страница обзора"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "Войти",
|
"login": "Войти",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "Уровень Minter",
|
"minterlevel": "Уровень Minter",
|
||||||
"blocksminted": "Отчеканеные блоки"
|
"blocksminted": "Отчеканеные блоки",
|
||||||
|
"wp1": "Чеканка",
|
||||||
|
"wp2": "Не чеканить",
|
||||||
|
"wp3": "Основная информация",
|
||||||
|
"wp4": "Синхронизировано"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "Да",
|
"yes": "Да",
|
||||||
|
@ -69,7 +69,9 @@
|
|||||||
"tm24": "Plugin Type:",
|
"tm24": "Plugin Type:",
|
||||||
"tm25": "Please select a plugin type !",
|
"tm25": "Please select a plugin type !",
|
||||||
"tm26": "Add New Plugin To Menu",
|
"tm26": "Add New Plugin To Menu",
|
||||||
"tm27": "Remove Plugin From Menu"
|
"tm27": "Remove Plugin From Menu",
|
||||||
|
"tm28": "Overview Page"
|
||||||
|
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "Log In",
|
"login": "Log In",
|
||||||
@ -178,7 +180,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "Minter Level",
|
"minterlevel": "Minter Level",
|
||||||
"blocksminted": "Blocks Minted"
|
"blocksminted": "Blocks Minted",
|
||||||
|
"wp1": "Minting",
|
||||||
|
"wp2": "Not Minting",
|
||||||
|
"wp3": "Core Information",
|
||||||
|
"wp4": "Synchronized"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "Yes",
|
"yes": "Yes",
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "插件类型:",
|
"tm24": "插件类型:",
|
||||||
"tm25": "请选择插件类型!",
|
"tm25": "请选择插件类型!",
|
||||||
"tm26": "添加新插件到菜单",
|
"tm26": "添加新插件到菜单",
|
||||||
"tm27": "从菜单中删除插件"
|
"tm27": "从菜单中删除插件",
|
||||||
|
"tm28": "概览页面"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "登入",
|
"login": "登入",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "铸币等级",
|
"minterlevel": "铸币等级",
|
||||||
"blocksminted": "铸币区块数"
|
"blocksminted": "铸币区块数",
|
||||||
|
"wp1": "铸造",
|
||||||
|
"wp2": "不铸造",
|
||||||
|
"wp3": "核心信息",
|
||||||
|
"wp4": "已同步"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "是",
|
"yes": "是",
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
"tm24": "插件類型:",
|
"tm24": "插件類型:",
|
||||||
"tm25": "請選擇插件類型!",
|
"tm25": "請選擇插件類型!",
|
||||||
"tm26": "添加新插件到菜單",
|
"tm26": "添加新插件到菜單",
|
||||||
"tm27": "從菜單中刪除插件"
|
"tm27": "從菜單中刪除插件",
|
||||||
|
"tm28": "概覽頁面"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"login": "登入",
|
"login": "登入",
|
||||||
@ -178,7 +179,11 @@
|
|||||||
},
|
},
|
||||||
"walletprofile": {
|
"walletprofile": {
|
||||||
"minterlevel": "鑄幣等級",
|
"minterlevel": "鑄幣等級",
|
||||||
"blocksminted": "鑄幣區塊數"
|
"blocksminted": "鑄幣區塊數",
|
||||||
|
"wp1": "鑄造",
|
||||||
|
"wp2": "不鑄造",
|
||||||
|
"wp3": "核心信息",
|
||||||
|
"wp4": "已同步"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"yes": "是",
|
"yes": "是",
|
||||||
|
@ -105,8 +105,8 @@ class ShowPlugin extends connect(store)(LitElement) {
|
|||||||
transition: background 0.3s;
|
transition: background 0.3s;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: auto;
|
width: auto;
|
||||||
min-width: 50px;
|
min-width: 110px;
|
||||||
max-width: 200px;
|
max-width: 220px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
zIndex: 2;
|
zIndex: 2;
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ class ShowPlugin extends connect(store)(LitElement) {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: auto;
|
width: auto;
|
||||||
min-width: 25px;
|
min-width: 1px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
@ -217,6 +217,8 @@ class ShowPlugin extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.count {
|
.count {
|
||||||
|
position: relative;
|
||||||
|
top: -5px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background-color: #C6011F;
|
background-color: #C6011F;
|
||||||
color: white;
|
color: white;
|
||||||
@ -295,7 +297,9 @@ class ShowPlugin extends connect(store)(LitElement) {
|
|||||||
let icon = ''
|
let icon = ''
|
||||||
let count = 0
|
let count = 0
|
||||||
|
|
||||||
if (tab.myPlugObj && tab.myPlugObj.title === "Minting Details") {
|
if (tab.myPlugObj && tab.myPlugObj.title === "Overview Page") {
|
||||||
|
title = html`${translate('tabmenu.tm28')}`
|
||||||
|
} else if (tab.myPlugObj && tab.myPlugObj.title === "Minting Details") {
|
||||||
title = html`${translate('tabmenu.tm1')}`
|
title = html`${translate('tabmenu.tm1')}`
|
||||||
} else if (tab.myPlugObj && tab.myPlugObj.title === "Become a Minter") {
|
} else if (tab.myPlugObj && tab.myPlugObj.title === "Become a Minter") {
|
||||||
title = html`${translate('tabmenu.tm2')}`
|
title = html`${translate('tabmenu.tm2')}`
|
||||||
@ -380,10 +384,10 @@ class ShowPlugin extends connect(store)(LitElement) {
|
|||||||
${count ? html`
|
${count ? html`
|
||||||
<span class="tabTitle ml-30">${title}</span>
|
<span class="tabTitle ml-30">${title}</span>
|
||||||
<span class="count ml-5">${count}</span>
|
<span class="count ml-5">${count}</span>
|
||||||
<span class="ml-25 show"><mwc-icon class="close" @click=${() => {this.removeTab(index, tab.id)}}>close</mwc-icon></span>
|
<span class="show ml-25"><mwc-icon class="close" @click=${() => {this.removeTab(index, tab.id)}}>close</mwc-icon></span>
|
||||||
` : html`
|
` : html`
|
||||||
<span class="tabTitle ml-30">${title}</span>
|
<span class="tabTitle ml-30">${title}</span>
|
||||||
<span class="ml-25 show"><mwc-icon class="close" @click=${() => {this.removeTab(index, tab.id)}}>close</mwc-icon></span>
|
<span class="show ml-25"><mwc-icon class="close" @click=${() => {this.removeTab(index, tab.id)}}>close</mwc-icon></span>
|
||||||
`}
|
`}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -716,8 +720,14 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
changePage: { attribute: false },
|
changePage: { attribute: false },
|
||||||
pluginName: { type: String },
|
pluginName: { type: String },
|
||||||
pluginType: { type: String },
|
pluginType: { type: String },
|
||||||
|
pluginPage: { type: String },
|
||||||
mwcIcon: { type: String },
|
mwcIcon: { type: String },
|
||||||
pluginNameToDelete: { type: String }
|
pluginNameToDelete: { type: String },
|
||||||
|
pluginNumberToDelete: { type: String },
|
||||||
|
textFieldDisabled: { type: Boolean },
|
||||||
|
initialName: { type: String },
|
||||||
|
newId: { type: String },
|
||||||
|
removeTitle: { type: String }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -730,6 +740,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
--mdc-text-field-label-ink-color: var(--black);
|
--mdc-text-field-label-ink-color: var(--black);
|
||||||
--mdc-text-field-ink-color: var(--black);
|
--mdc-text-field-ink-color: var(--black);
|
||||||
--mdc-dialog-content-ink-color: var(--black);
|
--mdc-dialog-content-ink-color: var(--black);
|
||||||
|
--mdc-dialog-shape-radius: 25px;
|
||||||
--mdc-dialog-min-width: 300px;
|
--mdc-dialog-min-width: 300px;
|
||||||
--mdc-dialog-max-width: 700px;
|
--mdc-dialog-max-width: 700px;
|
||||||
}
|
}
|
||||||
@ -864,12 +875,33 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
padding: 10px 10px;
|
padding: 10px 10px 10px 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
background: var(--white);
|
background: var(--white);
|
||||||
color: var(--black);
|
color: var(--black);
|
||||||
|
-webkit-appearance: none;
|
||||||
|
-moz-appearance: none;
|
||||||
|
appearance: none;
|
||||||
|
background-image: url('/img/arrow.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right 10px center;
|
||||||
|
background-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.resetIcon {
|
||||||
|
position: absolute;
|
||||||
|
right: 16px;
|
||||||
|
top: 16px;
|
||||||
|
color: #666;
|
||||||
|
--mdc-icon-size: 32px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.resetIcon:hover {
|
||||||
|
color: #03a9f4;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
constructor() {
|
constructor() {
|
||||||
@ -881,34 +913,39 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
this.addressInfo = {}
|
this.addressInfo = {}
|
||||||
this.pluginName = ''
|
this.pluginName = ''
|
||||||
this.pluginType = ''
|
this.pluginType = ''
|
||||||
|
this.pluginPage = ''
|
||||||
this.myApps = ''
|
this.myApps = ''
|
||||||
this.mwcIcon = ''
|
this.mwcIcon = ''
|
||||||
this.pluginNameToDelete = ''
|
this.pluginNameToDelete = ''
|
||||||
|
this.pluginNumberToDelete = ''
|
||||||
|
this.textFieldDisabled = false
|
||||||
|
this.initialName = ''
|
||||||
|
this.newId = ''
|
||||||
|
this.removeTitle = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return html`
|
return html`
|
||||||
<div class="parent">
|
<div class="parent">
|
||||||
|
<mwc-icon class="resetIcon" @click="${() => this.resetMenu()}" title="Reset Tab Menu">reset_tv</mwc-icon>
|
||||||
<div class="navbar">
|
<div class="navbar">
|
||||||
<input @keydown=${this._handleKeyDown} id="linkInput" type="text" placeholder="qortal://">
|
<input @keydown=${this._handleKeyDown} id="linkInput" type="text" placeholder="qortal://">
|
||||||
<button @click="${this.handlePasteLink}">${translate('general.open')}</button>
|
<button @click="${this.handlePasteLink}">${translate('general.open')}</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="app-list">
|
||||||
<div class="app-list">
|
${repeat(this.myMenuList, (plugin) => plugin.url, (plugin, index) => html`
|
||||||
${repeat(this.myMenuList, (plugin) => plugin.url, (plugin, index) => html`
|
<div class="app-icon">
|
||||||
<div class="app-icon">
|
|
||||||
<div class="app-icon-box">
|
|
||||||
${this.renderRemoveIcon(plugin.url, plugin.mwcicon, plugin.title, plugin)}
|
|
||||||
</div>
|
|
||||||
${this.renderTitle(plugin.url, plugin.title)}
|
|
||||||
</div>
|
|
||||||
`)}
|
|
||||||
<div class="app-icon" @click="${() => this.openAddNewPlugin()}">
|
|
||||||
<div class="app-icon-box">
|
<div class="app-icon-box">
|
||||||
<mwc-icon class="menuIcon">add</mwc-icon>
|
${this.renderRemoveIcon(plugin.url, plugin.mwcicon, plugin.title, plugin.pluginNumber, plugin)}
|
||||||
</div>
|
</div>
|
||||||
<span class="text" title="${translate("tabmenu.tm19")}">${translate("tabmenu.tm19")}</span>
|
${this.renderTitle(plugin.url, plugin.title)}
|
||||||
</div>
|
</div>
|
||||||
|
`)}
|
||||||
|
<div class="app-icon" @click="${() => this.openAddNewPlugin()}">
|
||||||
|
<div class="app-icon-box">
|
||||||
|
<mwc-icon class="menuIcon">add</mwc-icon>
|
||||||
|
</div>
|
||||||
|
<span class="text" title="${translate("tabmenu.tm19")}">${translate("tabmenu.tm19")}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -919,20 +956,31 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
${translate("tabmenu.tm24")}
|
${translate("tabmenu.tm24")}
|
||||||
<select required validationMessage="${translate("grouppage.gchange14")}" id="pluginTypeInput" label="${translate("tabmenu.tm24")}">
|
<select
|
||||||
|
required
|
||||||
|
@change="${() => this.val()}"
|
||||||
|
validationMessage="${translate("grouppage.gchange14")}"
|
||||||
|
id="pluginTypeInput"
|
||||||
|
label="${translate("tabmenu.tm24")}"
|
||||||
|
>
|
||||||
<option value="reject" selected>${translate("grouppage.gchange15")}</option>
|
<option value="reject" selected>${translate("grouppage.gchange15")}</option>
|
||||||
<option value="0">${translate("tabmenu.tm20")}</option>
|
<option style="margin-top: 10px;" value="0">${translate("tabmenu.tm20")}</option>
|
||||||
<option value="1">${translate("tabmenu.tm21")}</option>
|
<option style="margin-top: 10px;" value="1">${translate("tabmenu.tm21")}</option>
|
||||||
|
<option disabled style="font-size: 0.25em;"></option>>
|
||||||
|
<option disabled style="background: #666; font-size: 0.1px;"></option>
|
||||||
|
<option disabled style="font-size: 0.50em;"></option>>
|
||||||
|
${this.filterSelectMenu()}
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<mwc-textfield
|
<mwc-textfield
|
||||||
|
?disabled="${this.textFieldDisabled}"
|
||||||
style="width: 100%; color: var(--black);"
|
style="width: 100%; color: var(--black);"
|
||||||
required
|
|
||||||
outlined
|
outlined
|
||||||
id="pluginNameInput"
|
id="pluginNameInput"
|
||||||
label="${translate("login.name")}"
|
label="${translate("login.name")}"
|
||||||
type="text"
|
type="text"
|
||||||
|
value="${this.initialName}"
|
||||||
>
|
>
|
||||||
</mwc-textfield>
|
</mwc-textfield>
|
||||||
</p>
|
</p>
|
||||||
@ -956,7 +1004,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
<hr><br>
|
<hr><br>
|
||||||
</div>
|
</div>
|
||||||
<p style="text-align:center">${translate("tabmenu.tm23")}</p>
|
<p style="text-align:center">${translate("tabmenu.tm23")}</p>
|
||||||
<h3 style="text-align:center">${this.pluginNameToDelete}</h3>
|
<h3 style="text-align:center">${this.removeTitle}</h3>
|
||||||
<mwc-button
|
<mwc-button
|
||||||
slot="primaryAction"
|
slot="primaryAction"
|
||||||
@click=${this.removeAppFromArray}
|
@click=${this.removeAppFromArray}
|
||||||
@ -1013,18 +1061,213 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
await appDelay(1000)
|
await appDelay(1000)
|
||||||
const myObj = JSON.stringify(this.menuList)
|
const myObj = JSON.stringify(this.menuList)
|
||||||
localStorage.setItem("myMenuPlugs", myObj)
|
localStorage.setItem("myMenuPlugs", myObj)
|
||||||
|
this.myMenuPlugins = JSON.parse(localStorage.getItem("myMenuPlugs") || "[]")
|
||||||
} else {
|
} else {
|
||||||
this.myMenuPlugins = JSON.parse(localStorage.getItem("myMenuPlugs") || "[]")
|
this.myMenuPlugins = JSON.parse(localStorage.getItem("myMenuPlugs") || "[]")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resetMenu() {
|
||||||
|
localStorage.removeItem("myMenuPlugs")
|
||||||
|
this.firstUpdated()
|
||||||
|
}
|
||||||
|
|
||||||
|
val() {
|
||||||
|
const theValue = this.shadowRoot.getElementById("pluginTypeInput").value
|
||||||
|
|
||||||
|
if (theValue === "reject") {
|
||||||
|
this.textFieldDisabled = false
|
||||||
|
this.initialName = ''
|
||||||
|
this.mwcIcon = ''
|
||||||
|
} else if (theValue === "0") {
|
||||||
|
this.textFieldDisabled = false
|
||||||
|
this.initialName = ''
|
||||||
|
this.mwcIcon = ''
|
||||||
|
} else if (theValue === "1") {
|
||||||
|
this.textFieldDisabled = false
|
||||||
|
this.initialName = ''
|
||||||
|
this.mwcIcon = ''
|
||||||
|
} else if (theValue === 'overview-page') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Overview Page'
|
||||||
|
this.mwcIcon = 'home'
|
||||||
|
} else if (theValue === 'minting') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Minting Details'
|
||||||
|
this.mwcIcon = 'info_outline'
|
||||||
|
} else if (theValue === 'become-minter') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Become a Minter'
|
||||||
|
this.mwcIcon = 'thumb_up'
|
||||||
|
} else if (theValue === 'sponsorship-list') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Sponsorship List'
|
||||||
|
this.mwcIcon = 'format_list_numbered'
|
||||||
|
} else if (theValue === 'wallet') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Wallets'
|
||||||
|
this.mwcIcon = 'account_balance_wallet'
|
||||||
|
} else if (theValue === 'trade-portal') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Trade Portal'
|
||||||
|
this.mwcIcon = 'format_list_bulleted'
|
||||||
|
} else if (theValue === 'trade-bot-portal') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Auto Buy'
|
||||||
|
this.mwcIcon = 'shop'
|
||||||
|
} else if (theValue === 'reward-share') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Reward Share'
|
||||||
|
this.mwcIcon = 'ios_share'
|
||||||
|
} else if (theValue === 'q-chat') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Q-Chat'
|
||||||
|
this.mwcIcon = 'forum'
|
||||||
|
} else if (theValue === 'name-registration') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Name Registration'
|
||||||
|
this.mwcIcon = 'manage_accounts'
|
||||||
|
} else if (theValue === 'names-market') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Names Market'
|
||||||
|
this.mwcIcon = 'store'
|
||||||
|
} else if (theValue === 'websites') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Websites'
|
||||||
|
this.mwcIcon = 'desktop_mac'
|
||||||
|
} else if (theValue === 'qapps') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Q-Apps'
|
||||||
|
this.mwcIcon = 'apps'
|
||||||
|
} else if (theValue === 'group-management') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Group Management'
|
||||||
|
this.mwcIcon = 'group'
|
||||||
|
} else if (theValue === 'data-management') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Data Management'
|
||||||
|
this.mwcIcon = 'storage'
|
||||||
|
} else if (theValue === 'puzzles') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Puzzles'
|
||||||
|
this.mwcIcon = 'extension'
|
||||||
|
} else if (theValue === 'node-management') {
|
||||||
|
this.mwcIcon = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = true
|
||||||
|
this.initialName = 'Node Management'
|
||||||
|
this.mwcIcon = 'cloud'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
filterSelectMenu() {
|
||||||
|
const addressInfoSelect = this.addressInfo
|
||||||
|
const isMinterSelect = addressInfoSelect?.error !== 124 && +addressInfoSelect?.level > 0
|
||||||
|
const isSponsorSelect = +addressInfoSelect?.level >= 5
|
||||||
|
|
||||||
|
if (!isMinterSelect) {
|
||||||
|
return html`
|
||||||
|
<option value="overview-page">${translate("tabmenu.tm28")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="become-minter">${translate("tabmenu.tm2")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="wallet">${translate("tabmenu.tm4")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="trade-portal">${translate("tabmenu.tm5")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="trade-bot-portal">${translate("tabmenu.tm6")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="reward-share">${translate("tabmenu.tm7")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="q-chat">${translate("tabmenu.tm8")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="name-registration">${translate("tabmenu.tm9")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="names-market">${translate("tabmenu.tm10")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="websites">${translate("tabmenu.tm11")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="qapps">${translate("tabmenu.tm12")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="group-management">${translate("tabmenu.tm13")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="data-management">${translate("tabmenu.tm14")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="puzzles">${translate("tabmenu.tm15")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="node-management">${translate("tabmenu.tm16")}</option>
|
||||||
|
`
|
||||||
|
} else if (isMinterSelect && isSponsorSelect) {
|
||||||
|
return html`
|
||||||
|
<option value="overview-page">${translate("tabmenu.tm28")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="minting">${translate("tabmenu.tm1")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="sponsorship-list">${translate("tabmenu.tm3")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="wallet">${translate("tabmenu.tm4")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="trade-portal">${translate("tabmenu.tm5")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="trade-bot-portal">${translate("tabmenu.tm6")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="reward-share">${translate("tabmenu.tm7")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="q-chat">${translate("tabmenu.tm8")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="name-registration">${translate("tabmenu.tm9")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="names-market">${translate("tabmenu.tm10")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="websites">${translate("tabmenu.tm11")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="qapps">${translate("tabmenu.tm12")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="group-management">${translate("tabmenu.tm13")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="data-management">${translate("tabmenu.tm14")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="puzzles">${translate("tabmenu.tm15")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="node-management">${translate("tabmenu.tm16")}</option>
|
||||||
|
`
|
||||||
|
} else {
|
||||||
|
return html`
|
||||||
|
<option value="overview-page">${translate("tabmenu.tm28")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="minting">${translate("tabmenu.tm1")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="wallet">${translate("tabmenu.tm4")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="trade-portal">${translate("tabmenu.tm5")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="trade-bot-portal">${translate("tabmenu.tm6")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="reward-share">${translate("tabmenu.tm7")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="q-chat">${translate("tabmenu.tm8")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="name-registration">${translate("tabmenu.tm9")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="names-market">${translate("tabmenu.tm10")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="websites">${translate("tabmenu.tm11")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="qapps">${translate("tabmenu.tm12")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="group-management">${translate("tabmenu.tm13")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="data-management">${translate("tabmenu.tm14")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="puzzles">${translate("tabmenu.tm15")}</option>
|
||||||
|
<option style="padding-top: 10px;" value="node-management">${translate("tabmenu.tm16")}</option>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
openAddNewPlugin() {
|
openAddNewPlugin() {
|
||||||
this.shadowRoot.getElementById("pluginTypeInput").value = 'reject'
|
this.shadowRoot.getElementById("pluginTypeInput").value = 'reject'
|
||||||
this.shadowRoot.getElementById("pluginNameInput").value = ''
|
this.shadowRoot.getElementById("pluginNameInput").value = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = false
|
||||||
this.shadowRoot.querySelector('#addNewPlugin').show()
|
this.shadowRoot.querySelector('#addNewPlugin').show()
|
||||||
}
|
}
|
||||||
|
|
||||||
async addToMyMenuPlugins() {
|
async addToMyMenuPlugins() {
|
||||||
|
this.newId = ''
|
||||||
|
const newUid = new ShortUniqueId({ length: 10 })
|
||||||
|
this.newId = 'plugin-' + newUid()
|
||||||
|
|
||||||
this.pluginType = this.shadowRoot.getElementById("pluginTypeInput").value
|
this.pluginType = this.shadowRoot.getElementById("pluginTypeInput").value
|
||||||
|
|
||||||
if (this.pluginType === "reject") {
|
if (this.pluginType === "reject") {
|
||||||
@ -1052,6 +1295,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
"title": this.pluginName,
|
"title": this.pluginName,
|
||||||
"icon": "vaadin:external-browser",
|
"icon": "vaadin:external-browser",
|
||||||
"mwcicon": this.mwcIcon,
|
"mwcicon": this.mwcIcon,
|
||||||
|
"pluginNumber": this.newId,
|
||||||
"menus": [],
|
"menus": [],
|
||||||
"parent": false
|
"parent": false
|
||||||
}
|
}
|
||||||
@ -1114,6 +1358,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
"title": this.pluginName,
|
"title": this.pluginName,
|
||||||
"icon": "vaadin:external-browser",
|
"icon": "vaadin:external-browser",
|
||||||
"mwcicon": this.mwcIcon,
|
"mwcicon": this.mwcIcon,
|
||||||
|
"pluginNumber": this.newId,
|
||||||
"menus": [],
|
"menus": [],
|
||||||
"parent": false
|
"parent": false
|
||||||
}
|
}
|
||||||
@ -1161,6 +1406,69 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
parentEpml.request('showSnackBar', `${myplugstring3}`)
|
parentEpml.request('showSnackBar', `${myplugstring3}`)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.pluginPage = ''
|
||||||
|
if (this.pluginType === 'overview-page') {
|
||||||
|
this.pluginPage = 'overview-page/index.html'
|
||||||
|
} else if (this.pluginType === 'minting') {
|
||||||
|
this.pluginPage = 'minting/index.html'
|
||||||
|
} else if (this.pluginType === 'become-minter') {
|
||||||
|
this.pluginPage = 'become-minter/index.html'
|
||||||
|
} else if (this.pluginType === 'sponsorship-list') {
|
||||||
|
this.pluginPage = 'sponsorship-list/index.html'
|
||||||
|
} else if (this.pluginType === 'wallet') {
|
||||||
|
this.pluginPage = 'wallet/index.html'
|
||||||
|
} else if (this.pluginType === 'trade-portal') {
|
||||||
|
this.pluginPage = 'trade-portal/index.html'
|
||||||
|
} else if (this.pluginType === 'trade-bot-portal') {
|
||||||
|
this.pluginPage = 'trade-bot/index.html'
|
||||||
|
} else if (this.pluginType === 'reward-share') {
|
||||||
|
this.pluginPage = 'reward-share/index.html'
|
||||||
|
} else if (this.pluginType === 'q-chat') {
|
||||||
|
this.pluginPage = 'messaging/q-chat/index.html'
|
||||||
|
} else if (this.pluginType === 'name-registration') {
|
||||||
|
this.pluginPage = 'name-registration/index.html'
|
||||||
|
} else if (this.pluginType === 'names-market') {
|
||||||
|
this.pluginPage = 'names-market/index.html'
|
||||||
|
} else if (this.pluginType === 'websites') {
|
||||||
|
this.pluginPage = 'qdn/index.html'
|
||||||
|
} else if (this.pluginType === 'qapps') {
|
||||||
|
this.pluginPage = 'q-app/index.html'
|
||||||
|
} else if (this.pluginType === 'group-management') {
|
||||||
|
this.pluginPage = 'group-management/index.html'
|
||||||
|
} else if (this.pluginType === 'data-management') {
|
||||||
|
this.pluginPage = 'qdn/data-management/index.html'
|
||||||
|
} else if (this.pluginType === 'puzzles') {
|
||||||
|
this.pluginPage = 'puzzles/index.html'
|
||||||
|
} else if (this.pluginType === 'node-management') {
|
||||||
|
this.pluginPage = 'node-management/index.html'
|
||||||
|
}
|
||||||
|
|
||||||
|
var oldMenuPlugs = JSON.parse(localStorage.getItem("myMenuPlugs") || "[]")
|
||||||
|
|
||||||
|
const newMenuPlugsItem = {
|
||||||
|
"url": this.pluginType,
|
||||||
|
"domain": "core",
|
||||||
|
"page": this.pluginPage,
|
||||||
|
"title": this.initialName,
|
||||||
|
"icon": "vaadin:external-browser",
|
||||||
|
"mwcicon": this.mwcIcon,
|
||||||
|
"pluginNumber": this.newId,
|
||||||
|
"menus": [],
|
||||||
|
"parent": false
|
||||||
|
}
|
||||||
|
|
||||||
|
oldMenuPlugs.push(newMenuPlugsItem)
|
||||||
|
|
||||||
|
localStorage.setItem("myMenuPlugs", JSON.stringify(oldMenuPlugs))
|
||||||
|
|
||||||
|
let myplugstring2 = get("walletpage.wchange52")
|
||||||
|
parentEpml.request('showSnackBar', `${myplugstring2}`)
|
||||||
|
|
||||||
|
this.closeAddNewPlugin()
|
||||||
|
|
||||||
|
this.myMenuPlugins = JSON.parse(localStorage.getItem("myMenuPlugs") || "[]")
|
||||||
|
this.firstUpdated()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1168,10 +1476,14 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
this.shadowRoot.querySelector('#addNewPlugin').close()
|
this.shadowRoot.querySelector('#addNewPlugin').close()
|
||||||
this.shadowRoot.getElementById("pluginTypeInput").value = 'reject'
|
this.shadowRoot.getElementById("pluginTypeInput").value = 'reject'
|
||||||
this.shadowRoot.getElementById("pluginNameInput").value = ''
|
this.shadowRoot.getElementById("pluginNameInput").value = ''
|
||||||
|
this.initialName = ''
|
||||||
|
this.textFieldDisabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
renderTitle(theUrl, theName) {
|
renderTitle(theUrl, theName) {
|
||||||
if (theUrl === 'minting') {
|
if (theUrl === 'overview-page') {
|
||||||
|
return html`<span>${translate('tabmenu.tm28')}</span>`
|
||||||
|
} else if (theUrl === 'minting') {
|
||||||
return html`<span>${translate('tabmenu.tm1')}</span>`
|
return html`<span>${translate('tabmenu.tm1')}</span>`
|
||||||
} else if (theUrl === 'become-minter') {
|
} else if (theUrl === 'become-minter') {
|
||||||
return html`<span>${translate('tabmenu.tm2')}</span>`
|
return html`<span>${translate('tabmenu.tm2')}</span>`
|
||||||
@ -1208,31 +1520,67 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
renderRemoveIcon(appurl, appicon, appname, appplugin) {
|
renderRemoveIcon(appurl, appicon, appname, appid, appplugin) {
|
||||||
if (appurl === 'myapp') {
|
return html`
|
||||||
return html`
|
<div class="removeIconPos" title="${translate('tabmenu.tm22')}" @click="${() => this.openRemoveApp(appname, appid, appurl)}">
|
||||||
<div class="removeIconPos" title="${translate('tabmenu.tm22')}" @click="${() => this.openRemoveApp(appname)}">
|
<mwc-icon class="removeIcon">backspace</mwc-icon>
|
||||||
<mwc-icon class="removeIcon">backspace</mwc-icon>
|
</div>
|
||||||
</div>
|
<div class="menuIconPos" @click="${() => this.changePage(appplugin)}">
|
||||||
<div class="menuIconPos" @click="${() => this.changePage(appplugin)}">
|
<mwc-icon class="menuIcon">${appicon}</mwc-icon>
|
||||||
<mwc-icon class="menuIcon">${appicon}</mwc-icon>
|
</div>
|
||||||
</div>
|
`
|
||||||
`
|
|
||||||
} else {
|
|
||||||
return html`<mwc-icon class="menuIcon" @click="${() => this.changePage(appplugin)}">${appicon}</mwc-icon>`
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
openRemoveApp(pluginNameTD) {
|
openRemoveApp(pluginNameTD, pluginNumberTD, pluginUrlTD) {
|
||||||
this.pluginNameToDelete = ''
|
this.pluginNameToDelete = ''
|
||||||
this.pluginNameToDelete = pluginNameTD
|
this.pluginNameToDelete = pluginNameTD
|
||||||
|
this.pluginNumberToDelete = ''
|
||||||
|
this.pluginNumberToDelete = pluginNumberTD
|
||||||
|
this.removeTitle = ''
|
||||||
|
if (pluginUrlTD === 'overview-page') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm28')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'minting') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm1')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'become-minter') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm2')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'sponsorship-list') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm3')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'wallet') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm4')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'trade-portal') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm5')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'trade-bot-portal') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm6')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'reward-share') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm7')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'q-chat') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm8')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'name-registration') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm9')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'names-market') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm10')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'websites') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm11')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'qapps') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm12')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'group-management') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm13')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'data-management') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm14')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'puzzles') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm15')}</span>`
|
||||||
|
} else if (pluginUrlTD === 'node-management') {
|
||||||
|
this.removeTitle = html`<span>${translate('tabmenu.tm16')}</span>`
|
||||||
|
} else {
|
||||||
|
this.removeTitle = html`<span>${pluginNameTD}</span>`
|
||||||
|
}
|
||||||
this.shadowRoot.querySelector('#removePlugin').show()
|
this.shadowRoot.querySelector('#removePlugin').show()
|
||||||
}
|
}
|
||||||
|
|
||||||
removeAppFromArray() {
|
removeAppFromArray() {
|
||||||
const pluginToRemove = this.pluginNameToDelete
|
const pluginToRemove = this.pluginNumberToDelete
|
||||||
this.newMenuFilter = []
|
this.newMenuFilter = []
|
||||||
this.newMenuFilter = this.myMenuList.filter((item) => item.title !== pluginToRemove)
|
this.newMenuFilter = this.myMenuList.filter((item) => item.pluginNumber !== pluginToRemove)
|
||||||
const myNewObj = JSON.stringify(this.newMenuFilter)
|
const myNewObj = JSON.stringify(this.newMenuFilter)
|
||||||
localStorage.removeItem("myMenuPlugs")
|
localStorage.removeItem("myMenuPlugs")
|
||||||
localStorage.setItem("myMenuPlugs", myNewObj)
|
localStorage.setItem("myMenuPlugs", myNewObj)
|
||||||
@ -1244,6 +1592,7 @@ class NavBar extends connect(store)(LitElement) {
|
|||||||
closeRemoveApp() {
|
closeRemoveApp() {
|
||||||
this.shadowRoot.querySelector('#removePlugin').close()
|
this.shadowRoot.querySelector('#removePlugin').close()
|
||||||
this.pluginNameToDelete = ''
|
this.pluginNameToDelete = ''
|
||||||
|
this.pluginNumberToDelete = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
async extractComponents(url) {
|
async extractComponents(url) {
|
||||||
|
@ -63,6 +63,7 @@ html {
|
|||||||
--app-background-1: #045de9;
|
--app-background-1: #045de9;
|
||||||
--app-background-2: #09c6f9;
|
--app-background-2: #09c6f9;
|
||||||
--app-icon: #ffffff;
|
--app-icon: #ffffff;
|
||||||
|
--app-hr: rgba(0, 0, 0, .3);
|
||||||
}
|
}
|
||||||
|
|
||||||
html[theme="dark"] {
|
html[theme="dark"] {
|
||||||
@ -130,4 +131,5 @@ html[theme="dark"] {
|
|||||||
--app-background-1: #7f5a83;
|
--app-background-1: #7f5a83;
|
||||||
--app-background-2: #0d324d;
|
--app-background-2: #0d324d;
|
||||||
--app-icon: #03a9f4;
|
--app-icon: #03a9f4;
|
||||||
|
--app-hr: rgba(255, 255, 255, .3);
|
||||||
}
|
}
|
57
package-lock.json
generated
57
package-lock.json
generated
@ -44,8 +44,8 @@
|
|||||||
"prosemirror-schema-list": "1.3.0",
|
"prosemirror-schema-list": "1.3.0",
|
||||||
"prosemirror-state": "1.4.3",
|
"prosemirror-state": "1.4.3",
|
||||||
"prosemirror-transform": "1.7.3",
|
"prosemirror-transform": "1.7.3",
|
||||||
"prosemirror-view": "1.31.4",
|
"prosemirror-view": "1.31.5",
|
||||||
"sass": "1.63.4",
|
"sass": "1.63.6",
|
||||||
"short-unique-id": "4.4.4"
|
"short-unique-id": "4.4.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -59,6 +59,7 @@
|
|||||||
"@material/mwc-icon": "0.27.0",
|
"@material/mwc-icon": "0.27.0",
|
||||||
"@material/mwc-icon-button": "0.27.0",
|
"@material/mwc-icon-button": "0.27.0",
|
||||||
"@material/mwc-list": "0.27.0",
|
"@material/mwc-list": "0.27.0",
|
||||||
|
"@material/mwc-menu": "0.27.0",
|
||||||
"@material/mwc-select": "0.27.0",
|
"@material/mwc-select": "0.27.0",
|
||||||
"@material/mwc-slider": "0.27.0",
|
"@material/mwc-slider": "0.27.0",
|
||||||
"@material/mwc-snackbar": "0.27.0",
|
"@material/mwc-snackbar": "0.27.0",
|
||||||
@ -87,7 +88,7 @@
|
|||||||
"@qortal/rollup-plugin-web-worker-loader": "1.6.4",
|
"@qortal/rollup-plugin-web-worker-loader": "1.6.4",
|
||||||
"@rollup/plugin-alias": "5.0.0",
|
"@rollup/plugin-alias": "5.0.0",
|
||||||
"@rollup/plugin-babel": "6.0.3",
|
"@rollup/plugin-babel": "6.0.3",
|
||||||
"@rollup/plugin-commonjs": "25.0.1",
|
"@rollup/plugin-commonjs": "25.0.2",
|
||||||
"@rollup/plugin-node-resolve": "15.1.0",
|
"@rollup/plugin-node-resolve": "15.1.0",
|
||||||
"@rollup/plugin-replace": "5.0.2",
|
"@rollup/plugin-replace": "5.0.2",
|
||||||
"@rollup/plugin-terser": "0.4.3",
|
"@rollup/plugin-terser": "0.4.3",
|
||||||
@ -99,7 +100,7 @@
|
|||||||
"@vaadin/tooltip": "24.1.1",
|
"@vaadin/tooltip": "24.1.1",
|
||||||
"@zip.js/zip.js": "2.7.16",
|
"@zip.js/zip.js": "2.7.16",
|
||||||
"axios": "1.4.0",
|
"axios": "1.4.0",
|
||||||
"electron": "25.1.1",
|
"electron": "25.2.0",
|
||||||
"electron-builder": "24.4.0",
|
"electron-builder": "24.4.0",
|
||||||
"electron-packager": "17.1.1",
|
"electron-packager": "17.1.1",
|
||||||
"epml": "0.3.3",
|
"epml": "0.3.3",
|
||||||
@ -3121,9 +3122,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/plugin-commonjs": {
|
"node_modules/@rollup/plugin-commonjs": {
|
||||||
"version": "25.0.1",
|
"version": "25.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.2.tgz",
|
||||||
"integrity": "sha512-2DJ4kv4b1xfTJopWhu61ANdNRHvzQZ2fpaIrlgaP2jOfUv1wDJ0Ucqy8AZlbFmn/iUjiwKoqki9j55Y6L8kyNQ==",
|
"integrity": "sha512-NGTwaJxIO0klMs+WSFFtBP7b9TdTJ3K76HZkewT8/+yHzMiUGVQgaPtLQxNVYIgT5F7lxkEyVID+yS3K7bhCow==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rollup/pluginutils": "^5.0.1",
|
"@rollup/pluginutils": "^5.0.1",
|
||||||
@ -4851,9 +4852,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/cacache/node_modules/glob": {
|
"node_modules/cacache/node_modules/glob": {
|
||||||
"version": "10.2.7",
|
"version": "10.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.2.7.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.0.tgz",
|
||||||
"integrity": "sha512-jTKehsravOJo8IJxUGfZILnkvVJM/MOfHRs8QcXolVef2zNI9Tqyy5+SeuOAZd3upViEZQLyFpQhYiHLrMUNmA==",
|
"integrity": "sha512-AQ1/SB9HH0yCx1jXAT4vmCbTOPe5RQ+kCurjbel5xSCGhebumUv+GJZfa1rEqor3XIViqwSEmlkZCQD43RWrBg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"foreground-child": "^3.1.0",
|
"foreground-child": "^3.1.0",
|
||||||
@ -4924,9 +4925,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001504",
|
"version": "1.0.30001506",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001504.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001506.tgz",
|
||||||
"integrity": "sha512-5uo7eoOp2mKbWyfMXnGO9rJWOGU8duvzEiYITW+wivukL7yHH4gX9yuRaobu6El4jPxo6jKZfG+N6fB621GD/Q==",
|
"integrity": "sha512-6XNEcpygZMCKaufIcgpQNZNf00GEqc7VQON+9Rd0K1bMYo8xhMZRAo5zpbnbMNizi4YNgIDAFrdykWsvY3H4Hw==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@ -5743,9 +5744,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/electron": {
|
"node_modules/electron": {
|
||||||
"version": "25.1.1",
|
"version": "25.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/electron/-/electron-25.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/electron/-/electron-25.2.0.tgz",
|
||||||
"integrity": "sha512-WvFUfVsJn6YiP35UxdibYVjU2LceastyMm4SVp2bmb4XvKEvItAIiwxgm7tPC5Syl1243aRCvQLqr84sZ71pyQ==",
|
"integrity": "sha512-I/rhcW2sV2fyiveVSBr2N7v5ZiCtdGY0UiNCDZgk2fpSC+irQjbeh7JT2b4vWmJ2ogOXBjqesrN9XszTIG6DHg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -6146,9 +6147,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.4.433",
|
"version": "1.4.437",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.433.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.437.tgz",
|
||||||
"integrity": "sha512-MGO1k0w1RgrfdbLVwmXcDhHHuxCn2qRgR7dYsJvWFKDttvYPx6FNzCGG0c/fBBvzK2LDh3UV7Tt9awnHnvAAUQ=="
|
"integrity": "sha512-ZFekRuBOHUXp21wrR5lshT6pZa/KmjkhKBAtmZz4NN5sCWlHOk3kdhiwFINrDBsRLX6FjyBAb1TRN+KBeNlyzQ=="
|
||||||
},
|
},
|
||||||
"node_modules/electron-updater": {
|
"node_modules/electron-updater": {
|
||||||
"version": "6.1.1",
|
"version": "6.1.1",
|
||||||
@ -9242,9 +9243,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prosemirror-tables": {
|
"node_modules/prosemirror-tables": {
|
||||||
"version": "1.3.3",
|
"version": "1.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.3.4.tgz",
|
||||||
"integrity": "sha512-t10hbu4sNDInic3AQYd8ouPN457zVJIhVDqSdqgsVXNoa1watYXBxqNSVrNQoGOFG4Ivreyp3hQE3KG1f9bSpw==",
|
"integrity": "sha512-z6uLSQ1BLC3rgbGwZmpfb+xkdvD7W/UOsURDfognZFYaTtc0gsk7u/t71Yijp2eLflVpffMk6X0u0+u+MMDvIw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"prosemirror-keymap": "^1.1.2",
|
"prosemirror-keymap": "^1.1.2",
|
||||||
"prosemirror-model": "^1.8.1",
|
"prosemirror-model": "^1.8.1",
|
||||||
@ -9289,9 +9290,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prosemirror-view": {
|
"node_modules/prosemirror-view": {
|
||||||
"version": "1.31.4",
|
"version": "1.31.5",
|
||||||
"resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.31.4.tgz",
|
"resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.31.5.tgz",
|
||||||
"integrity": "sha512-nJzH2LpYbonSTYFqQ1BUdEhbd1WPN/rp/K9T9qxBEYpgg3jK3BvEUCR45Ymc9IHpO0m3nBJwPm19RBxZdoBVuw==",
|
"integrity": "sha512-tobRCDeCp61elR1d97XE/JTL9FDIfswZpWeNs7GKJjAJvWyMGHWYFCq29850p6bbG2bckP+i9n1vT56RifosbA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"prosemirror-model": "^1.16.0",
|
"prosemirror-model": "^1.16.0",
|
||||||
"prosemirror-state": "^1.0.0",
|
"prosemirror-state": "^1.0.0",
|
||||||
@ -9810,9 +9811,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/sass": {
|
"node_modules/sass": {
|
||||||
"version": "1.63.4",
|
"version": "1.63.6",
|
||||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.63.4.tgz",
|
"resolved": "https://registry.npmjs.org/sass/-/sass-1.63.6.tgz",
|
||||||
"integrity": "sha512-Sx/+weUmK+oiIlI+9sdD0wZHsqpbgQg8wSwSnGBjwb5GwqFhYNwwnI+UWZtLjKvKyFlKkatRK235qQ3mokyPoQ==",
|
"integrity": "sha512-MJuxGMHzaOW7ipp+1KdELtqKbfAWbH7OLIdoSMnVe3EXPMTmxTmlaZDCTsgIpPCs3w99lLo9/zDKkOrJuT5byw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chokidar": ">=3.0.0 <4.0.0",
|
"chokidar": ">=3.0.0 <4.0.0",
|
||||||
"immutable": "^4.0.0",
|
"immutable": "^4.0.0",
|
||||||
|
@ -54,8 +54,8 @@
|
|||||||
"prosemirror-schema-list": "1.3.0",
|
"prosemirror-schema-list": "1.3.0",
|
||||||
"prosemirror-state": "1.4.3",
|
"prosemirror-state": "1.4.3",
|
||||||
"prosemirror-transform": "1.7.3",
|
"prosemirror-transform": "1.7.3",
|
||||||
"prosemirror-view": "1.31.4",
|
"prosemirror-view": "1.31.5",
|
||||||
"sass": "1.63.4",
|
"sass": "1.63.6",
|
||||||
"short-unique-id": "4.4.4",
|
"short-unique-id": "4.4.4",
|
||||||
"@hapi/hapi": "21.3.2",
|
"@hapi/hapi": "21.3.2",
|
||||||
"@hapi/inert": "7.1.0",
|
"@hapi/inert": "7.1.0",
|
||||||
@ -71,7 +71,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"axios": "1.4.0",
|
"axios": "1.4.0",
|
||||||
"electron": "25.1.1",
|
"electron": "25.2.0",
|
||||||
"electron-builder": "24.4.0",
|
"electron-builder": "24.4.0",
|
||||||
"electron-packager": "17.1.1",
|
"electron-packager": "17.1.1",
|
||||||
"epml": "0.3.3",
|
"epml": "0.3.3",
|
||||||
@ -100,6 +100,7 @@
|
|||||||
"@material/mwc-icon": "0.27.0",
|
"@material/mwc-icon": "0.27.0",
|
||||||
"@material/mwc-icon-button": "0.27.0",
|
"@material/mwc-icon-button": "0.27.0",
|
||||||
"@material/mwc-list": "0.27.0",
|
"@material/mwc-list": "0.27.0",
|
||||||
|
"@material/mwc-menu": "0.27.0",
|
||||||
"@material/mwc-select": "0.27.0",
|
"@material/mwc-select": "0.27.0",
|
||||||
"@material/mwc-slider": "0.27.0",
|
"@material/mwc-slider": "0.27.0",
|
||||||
"@material/mwc-snackbar": "0.27.0",
|
"@material/mwc-snackbar": "0.27.0",
|
||||||
@ -128,7 +129,7 @@
|
|||||||
"@qortal/rollup-plugin-web-worker-loader": "1.6.4",
|
"@qortal/rollup-plugin-web-worker-loader": "1.6.4",
|
||||||
"@rollup/plugin-alias": "5.0.0",
|
"@rollup/plugin-alias": "5.0.0",
|
||||||
"@rollup/plugin-babel": "6.0.3",
|
"@rollup/plugin-babel": "6.0.3",
|
||||||
"@rollup/plugin-commonjs": "25.0.1",
|
"@rollup/plugin-commonjs": "25.0.2",
|
||||||
"@rollup/plugin-node-resolve": "15.1.0",
|
"@rollup/plugin-node-resolve": "15.1.0",
|
||||||
"@rollup/plugin-replace": "5.0.2",
|
"@rollup/plugin-replace": "5.0.2",
|
||||||
"@rollup/plugin-terser": "0.4.3",
|
"@rollup/plugin-terser": "0.4.3",
|
||||||
|
@ -7,6 +7,17 @@ let haveRegisteredNodeManagement = false;
|
|||||||
parentEpml.ready().then(() => {
|
parentEpml.ready().then(() => {
|
||||||
// pluginUrlsConf
|
// pluginUrlsConf
|
||||||
let pluginUrlsConf = [
|
let pluginUrlsConf = [
|
||||||
|
{
|
||||||
|
url: 'overview-page',
|
||||||
|
domain: 'core',
|
||||||
|
page: 'overview-page/index.html',
|
||||||
|
title: 'Overview Page',
|
||||||
|
icon: 'vaadin:info-circle',
|
||||||
|
mwcicon: 'home',
|
||||||
|
pluginNumber: 'plugin-OgcWeXBWBt',
|
||||||
|
menus: [],
|
||||||
|
parent: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
url: 'minting',
|
url: 'minting',
|
||||||
domain: 'core',
|
domain: 'core',
|
||||||
@ -14,6 +25,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Minting Details',
|
title: 'Minting Details',
|
||||||
icon: 'vaadin:info-circle',
|
icon: 'vaadin:info-circle',
|
||||||
mwcicon: 'info_outline',
|
mwcicon: 'info_outline',
|
||||||
|
pluginNumber: 'plugin-iqKYTJzlcM',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -24,6 +36,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Become a Minter',
|
title: 'Become a Minter',
|
||||||
icon: 'vaadin:thumbs-up',
|
icon: 'vaadin:thumbs-up',
|
||||||
mwcicon: 'thumb_up',
|
mwcicon: 'thumb_up',
|
||||||
|
pluginNumber: 'plugin-dVbRYnJNTs',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -34,6 +47,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Sponsorship List',
|
title: 'Sponsorship List',
|
||||||
icon: 'vaadin:list-ol',
|
icon: 'vaadin:list-ol',
|
||||||
mwcicon: 'format_list_numbered',
|
mwcicon: 'format_list_numbered',
|
||||||
|
pluginNumber: 'plugin-YxcLlHkgBl',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -44,6 +58,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Wallets',
|
title: 'Wallets',
|
||||||
icon: 'vaadin:wallet',
|
icon: 'vaadin:wallet',
|
||||||
mwcicon: 'account_balance_wallet',
|
mwcicon: 'account_balance_wallet',
|
||||||
|
pluginNumber: 'plugin-kyhKaCIAZH',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -54,6 +69,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Trade Portal',
|
title: 'Trade Portal',
|
||||||
icon: 'vaadin:bullets',
|
icon: 'vaadin:bullets',
|
||||||
mwcicon: 'format_list_bulleted',
|
mwcicon: 'format_list_bulleted',
|
||||||
|
pluginNumber: 'plugin-zJoESuTpMG',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -64,6 +80,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Auto Buy',
|
title: 'Auto Buy',
|
||||||
icon: 'vaadin:calc-book',
|
icon: 'vaadin:calc-book',
|
||||||
mwcicon: 'shop',
|
mwcicon: 'shop',
|
||||||
|
pluginNumber: 'plugin-mwPkCdVHsb',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -74,6 +91,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Reward Share',
|
title: 'Reward Share',
|
||||||
icon: 'vaadin:share-square',
|
icon: 'vaadin:share-square',
|
||||||
mwcicon: 'ios_share',
|
mwcicon: 'ios_share',
|
||||||
|
pluginNumber: 'plugin-PWZGtSxbPX',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -84,6 +102,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Q-Chat',
|
title: 'Q-Chat',
|
||||||
icon: 'vaadin:chat',
|
icon: 'vaadin:chat',
|
||||||
mwcicon: 'forum',
|
mwcicon: 'forum',
|
||||||
|
pluginNumber: 'plugin-qhsyOnpRhT',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -94,6 +113,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Name Registration',
|
title: 'Name Registration',
|
||||||
icon: 'vaadin:user-check',
|
icon: 'vaadin:user-check',
|
||||||
mwcicon: 'manage_accounts',
|
mwcicon: 'manage_accounts',
|
||||||
|
pluginNumber: 'plugin-qCmtXAQmtu',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -104,6 +124,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Names Market',
|
title: 'Names Market',
|
||||||
icon: 'vaadin:shop',
|
icon: 'vaadin:shop',
|
||||||
mwcicon: 'store',
|
mwcicon: 'store',
|
||||||
|
pluginNumber: 'plugin-VVPhpHMnKM',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -114,6 +135,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Websites',
|
title: 'Websites',
|
||||||
icon: 'vaadin:desktop',
|
icon: 'vaadin:desktop',
|
||||||
mwcicon: 'desktop_mac',
|
mwcicon: 'desktop_mac',
|
||||||
|
pluginNumber: 'plugin-shITeUVkLG',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -123,7 +145,8 @@ parentEpml.ready().then(() => {
|
|||||||
page: 'q-app/index.html',
|
page: 'q-app/index.html',
|
||||||
title: 'Q-Apps',
|
title: 'Q-Apps',
|
||||||
icon: 'vaadin:external-browser',
|
icon: 'vaadin:external-browser',
|
||||||
mwcicon: 'open_in_browser',
|
mwcicon: 'apps',
|
||||||
|
pluginNumber: 'plugin-MpiMASnQsT',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -134,6 +157,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Group Management',
|
title: 'Group Management',
|
||||||
icon: 'vaadin:group',
|
icon: 'vaadin:group',
|
||||||
mwcicon: 'group',
|
mwcicon: 'group',
|
||||||
|
pluginNumber: 'plugin-fJZNpyLGTl',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -144,6 +168,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Data Management',
|
title: 'Data Management',
|
||||||
icon: 'vaadin:database',
|
icon: 'vaadin:database',
|
||||||
mwcicon: 'storage',
|
mwcicon: 'storage',
|
||||||
|
pluginNumber: 'plugin-QtaXNXHvRg',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -154,6 +179,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Puzzles',
|
title: 'Puzzles',
|
||||||
icon: 'vaadin:puzzle-piece',
|
icon: 'vaadin:puzzle-piece',
|
||||||
mwcicon: 'extension',
|
mwcicon: 'extension',
|
||||||
|
pluginNumber: 'plugin-wCGRmXRxht',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
},
|
},
|
||||||
@ -182,6 +208,7 @@ parentEpml.ready().then(() => {
|
|||||||
title: 'Node Management',
|
title: 'Node Management',
|
||||||
icon: 'vaadin:cloud',
|
icon: 'vaadin:cloud',
|
||||||
mwcicon: 'cloud',
|
mwcicon: 'cloud',
|
||||||
|
pluginNumber: 'plugin-TGAunWeWLU',
|
||||||
menus: [],
|
menus: [],
|
||||||
parent: false,
|
parent: false,
|
||||||
};
|
};
|
||||||
|
56
plugins/plugins/core/overview-page/index.html
Normal file
56
plugins/plugins/core/overview-page/index.html
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="/font/material-icons.css" />
|
||||||
|
<link rel="stylesheet" href="/font/switch-theme.css" />
|
||||||
|
<script>
|
||||||
|
const checkBack = localStorage.getItem('qortalTheme');
|
||||||
|
if (checkBack === 'dark') {
|
||||||
|
newtheme = 'dark';
|
||||||
|
} else {
|
||||||
|
newtheme = 'light';
|
||||||
|
}
|
||||||
|
document.querySelector('html').setAttribute('theme', newtheme);
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
html {
|
||||||
|
--scrollbarBG: #a1a1a1;
|
||||||
|
--thumbBG: #6a6c75;
|
||||||
|
}
|
||||||
|
|
||||||
|
*::-webkit-scrollbar {
|
||||||
|
width: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: var(--thumbBG) var(--scrollbarBG);
|
||||||
|
}
|
||||||
|
|
||||||
|
*::-webkit-scrollbar-track {
|
||||||
|
background: var(--scrollbarBG);
|
||||||
|
}
|
||||||
|
|
||||||
|
*::-webkit-scrollbar-thumb {
|
||||||
|
background-color: var(--thumbBG);
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 3px solid var(--scrollbarBG);
|
||||||
|
}
|
||||||
|
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: 'Roboto', sans-serif;
|
||||||
|
background: var(--plugback);
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<overview-page></overview-page>
|
||||||
|
<script src="overview-page.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
794
plugins/plugins/core/overview-page/overview-page.src.js
Normal file
794
plugins/plugins/core/overview-page/overview-page.src.js
Normal file
@ -0,0 +1,794 @@
|
|||||||
|
import { LitElement, html, css } from 'lit'
|
||||||
|
import { Epml } from '../../../epml.js'
|
||||||
|
import { use, get, translate, registerTranslateConfig } from 'lit-translate'
|
||||||
|
import isElectron from 'is-electron'
|
||||||
|
import { overviewStyle } from './overview-page-css.js'
|
||||||
|
import { asyncReplace } from 'lit/directives/async-replace.js'
|
||||||
|
import "@material/mwc-button"
|
||||||
|
import '@material/mwc-dialog'
|
||||||
|
import '@vaadin/button';
|
||||||
|
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||||
|
|
||||||
|
registerTranslateConfig({
|
||||||
|
loader: (lang) => fetch(`/language/${lang}.json`).then((res) => res.json()),
|
||||||
|
})
|
||||||
|
|
||||||
|
async function* countDown(count, callback) {
|
||||||
|
while (count > 0) {
|
||||||
|
yield count--;
|
||||||
|
await new Promise((r) => setTimeout(r, 1000));
|
||||||
|
if (count === 0) {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
|
||||||
|
|
||||||
|
class OverviewPage extends LitElement {
|
||||||
|
static get properties() {
|
||||||
|
return {
|
||||||
|
theme: { type: String, reflect: true },
|
||||||
|
nodeConfig: { type: Object },
|
||||||
|
accountInfo: { type: Object },
|
||||||
|
nodeInfo: { type: Array },
|
||||||
|
coreInfo: { type: Array },
|
||||||
|
imageUrl: { type: String },
|
||||||
|
myBalance: { type: Number }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static styles = [overviewStyle]
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super()
|
||||||
|
this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
|
||||||
|
this.nodeConfig = {}
|
||||||
|
this.accountInfo = {
|
||||||
|
names: [],
|
||||||
|
addressInfo: {}
|
||||||
|
}
|
||||||
|
this.nodeInfo = []
|
||||||
|
this.coreInfo = []
|
||||||
|
this.imageUrl = ''
|
||||||
|
this.myBalance = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return html`
|
||||||
|
<div class="main-content">
|
||||||
|
<div class="container mt-7">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-8 m-auto order-xl-2 mb-5 mb-xl-0">
|
||||||
|
<div class="card card-profile shadow">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-lg-3 order-lg-2">
|
||||||
|
<div class="card-profile-image">
|
||||||
|
${this.getAvatar()}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-header text-center border-0 pt-8 pt-md-4 pb-0 pb-md-4">
|
||||||
|
<div class="d-flex justify-content-between">
|
||||||
|
<span class="btn btn-sm btn-info mr-4">${translate("walletprofile.minterlevel")} ${this.accountInfo.addressInfo.level}</span>
|
||||||
|
${this.renderMintingStatus()}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body pt-0 pt-md-4">
|
||||||
|
<div class="text-center pt-0 mt-md-3">
|
||||||
|
<h2>${this.accountInfo.names.length !== 0 ? this.accountInfo.names[0].name : ''}</h2>
|
||||||
|
<div class="h3 font-weight-400">
|
||||||
|
${this.accountInfo.addressInfo.address}
|
||||||
|
</div>
|
||||||
|
<div class="h3 font-weight-400">
|
||||||
|
${translate("explorerpage.exp2")}: <span style="color: #03a9f4">${this.myBalance}</span> QORT
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<div class="card-profile-stats d-flex justify-content-center">
|
||||||
|
<div>
|
||||||
|
<span class="heading">${this.accountInfo.addressInfo.blocksMinted + this.accountInfo.addressInfo.blocksMintedAdjustment}</span>
|
||||||
|
<span class="description">${translate("walletprofile.blocksminted")}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="text-center">
|
||||||
|
<hr class="my-4" style="color: var(--black)">
|
||||||
|
<h2>${translate("walletprofile.wp3")}</h2>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<div class="card-profile-stats d-flex justify-content-center">
|
||||||
|
<div>
|
||||||
|
<span class="heading">${this.coreInfo.buildVersion ? this.coreInfo.buildVersion : ''}</span>
|
||||||
|
<span class="description">${translate("appinfo.coreversion")}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="heading">${this.nodeInfo.height ? this.nodeInfo.height : ''}</span>
|
||||||
|
<span class="description">${translate("appinfo.blockheight")}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="heading">${this.nodeInfo.numberOfConnections ? this.nodeInfo.numberOfConnections : ''}</span>
|
||||||
|
<span class="description">${translate("appinfo.peers")}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="heading"><span class="${this.cssStatus2}">${this.renderSyncStatus()}</span></span>
|
||||||
|
<span class="description">${translate("walletpage.wchange41")}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="h5 float-right opacity06">
|
||||||
|
${translate("appinfo.uiversion")}: <span style="color: #03a9f4">${this.nodeConfig.version ? this.nodeConfig.version : ''}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
|
||||||
|
firstUpdated() {
|
||||||
|
this.changeTheme()
|
||||||
|
this.changeLanguage()
|
||||||
|
|
||||||
|
this.nodeConfig = window.parent.reduxStore.getState().app.nodeConfig
|
||||||
|
this.accountInfo = window.parent.reduxStore.getState().app.accountInfo
|
||||||
|
|
||||||
|
this.getNodeInfo()
|
||||||
|
this.getCoreInfo()
|
||||||
|
this.getBalanceInfo()
|
||||||
|
|
||||||
|
window.addEventListener('storage', () => {
|
||||||
|
const checkLanguage = localStorage.getItem('qortalLanguage')
|
||||||
|
const checkTheme = localStorage.getItem('qortalTheme')
|
||||||
|
|
||||||
|
use(checkLanguage)
|
||||||
|
|
||||||
|
if (checkTheme === 'dark') {
|
||||||
|
this.theme = 'dark'
|
||||||
|
} else {
|
||||||
|
this.theme = 'light'
|
||||||
|
}
|
||||||
|
document.querySelector('html').setAttribute('theme', this.theme)
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!isElectron()) {
|
||||||
|
} else {
|
||||||
|
window.addEventListener('contextmenu', (event) => {
|
||||||
|
event.preventDefault()
|
||||||
|
window.parent.electronAPI.showMyMenu()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
setInterval(() => {
|
||||||
|
this.refreshItems()
|
||||||
|
}, 60000)
|
||||||
|
}
|
||||||
|
|
||||||
|
changeTheme() {
|
||||||
|
const checkTheme = localStorage.getItem('qortalTheme')
|
||||||
|
if (checkTheme === 'dark') {
|
||||||
|
this.theme = 'dark';
|
||||||
|
} else {
|
||||||
|
this.theme = 'light';
|
||||||
|
}
|
||||||
|
document.querySelector('html').setAttribute('theme', this.theme)
|
||||||
|
}
|
||||||
|
|
||||||
|
changeLanguage() {
|
||||||
|
const checkLanguage = localStorage.getItem('qortalLanguage')
|
||||||
|
|
||||||
|
if (checkLanguage === null || checkLanguage.length === 0) {
|
||||||
|
localStorage.setItem('qortalLanguage', 'us')
|
||||||
|
use('us')
|
||||||
|
} else {
|
||||||
|
use(checkLanguage)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
refreshItems() {
|
||||||
|
this.nodeConfig = window.parent.reduxStore.getState().app.nodeConfig
|
||||||
|
this.accountInfo = window.parent.reduxStore.getState().app.accountInfo
|
||||||
|
this.getNodeInfo()
|
||||||
|
this.getCoreInfo()
|
||||||
|
this.getBalanceInfo()
|
||||||
|
}
|
||||||
|
|
||||||
|
renderMintingStatus() {
|
||||||
|
if (this.nodeInfo.isMintingPossible === true && this.nodeInfo.isSynchronizing === true) {
|
||||||
|
this.cssStatus = ''
|
||||||
|
return html`<span class="btn btn-sm btn-info float-right">${translate("walletprofile.wp1")}</span>`
|
||||||
|
} else if (this.nodeInfo.isMintingPossible === true && this.nodeInfo.isSynchronizing === false) {
|
||||||
|
this.cssStatus = ''
|
||||||
|
return html`<span class="btn btn-sm btn-info float-right">${translate("walletprofile.wp1")}</span>`
|
||||||
|
} else if (this.nodeInfo.isMintingPossible === false) {
|
||||||
|
return html`<span class="float-right"><start-minting-now></start-minting-now></span>`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
renderSyncStatus() {
|
||||||
|
if (this.nodeInfo.isSynchronizing === true) {
|
||||||
|
this.cssStatus2 = 'red'
|
||||||
|
return html`${translate("appinfo.synchronizing")}... ${this.nodeInfo.syncPercent !== undefined ? this.nodeInfo.syncPercent + '%' : ''}`
|
||||||
|
} else if (this.nodeInfo.isSynchronizing === false) {
|
||||||
|
this.cssStatus2 = ''
|
||||||
|
return html`${translate("walletprofile.wp4")}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getAvatar() {
|
||||||
|
if (this.accountInfo.names.length === 0) {
|
||||||
|
return html`<img class="rounded-circle" src="/img/incognito.png">`
|
||||||
|
} else {
|
||||||
|
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
|
const avatarUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
|
const url = `${avatarUrl}/arbitrary/THUMBNAIL/${this.accountInfo.names[0].name}/qortal_avatar?async=true}`
|
||||||
|
return html`<img class="rounded-circle" src="${url}" onerror="this.src='/img/incognito.png';" />`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async getNodeInfo() {
|
||||||
|
const infoNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
|
const infoNodeUrl = infoNode.protocol + '://' + infoNode.domain + ':' + infoNode.port
|
||||||
|
const nodeUrl = `${infoNodeUrl}/admin/status`
|
||||||
|
await fetch(nodeUrl).then(response => {
|
||||||
|
return response.json()
|
||||||
|
})
|
||||||
|
.then(data => {
|
||||||
|
this.nodeInfo = data
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error('Request failed', err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async getCoreInfo() {
|
||||||
|
const infoCore = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
|
const infoCoreUrl = infoCore.protocol + '://' + infoCore.domain + ':' + infoCore.port
|
||||||
|
const coreUrl = `${infoCoreUrl}/admin/info`
|
||||||
|
await fetch(coreUrl).then(response => {
|
||||||
|
return response.json()
|
||||||
|
})
|
||||||
|
.then(data => {
|
||||||
|
this.coreInfo = data
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error('Request failed', err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async getBalanceInfo() {
|
||||||
|
const infoBalance = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
|
const infoBalanceUrl = infoBalance.protocol + '://' + infoBalance.domain + ':' + infoBalance.port
|
||||||
|
const balanceUrl = `${infoBalanceUrl}/addresses/balance/${this.accountInfo.addressInfo.address}`
|
||||||
|
await fetch(balanceUrl).then(response => {
|
||||||
|
return response.json()
|
||||||
|
})
|
||||||
|
.then(data => {
|
||||||
|
this.myBalance = data
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error('Request failed', err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.customElements.define('overview-page', OverviewPage)
|
||||||
|
|
||||||
|
class StartMintingNow extends LitElement {
|
||||||
|
static get properties() {
|
||||||
|
return {
|
||||||
|
mintingAccountData: { type: Array },
|
||||||
|
errorMsg: { type: String },
|
||||||
|
openDialogRewardShare: { type: Boolean },
|
||||||
|
status: { type: Number },
|
||||||
|
timer: { type: Number },
|
||||||
|
privateRewardShareKey: { type: String }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
static get styles() {
|
||||||
|
return [
|
||||||
|
css`
|
||||||
|
p, h1 {
|
||||||
|
color: var(--black)
|
||||||
|
}
|
||||||
|
.dialogCustom {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 10000;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
top: 0px;
|
||||||
|
bottom: 0px;
|
||||||
|
left: 0px;
|
||||||
|
width: 100vw;
|
||||||
|
}
|
||||||
|
.dialogCustomInner {
|
||||||
|
width: 300px;
|
||||||
|
min-height: 400px;
|
||||||
|
background-color: var(--white);
|
||||||
|
box-shadow: var(--mdc-dialog-box-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));
|
||||||
|
padding: 20px 24px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.dialogCustomInner ul {
|
||||||
|
padding-left: 0px
|
||||||
|
}
|
||||||
|
.dialogCustomInner li {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.start-minting-wrapper {
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
.dialog-header h1 {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
.row {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.modalFooter {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
.hide {
|
||||||
|
visibility: hidden
|
||||||
|
}
|
||||||
|
.inactiveText {
|
||||||
|
opacity: .60
|
||||||
|
}
|
||||||
|
.column {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.smallLoading,
|
||||||
|
.smallLoading:after {
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 2px;
|
||||||
|
height: 2px;
|
||||||
|
}
|
||||||
|
.smallLoading {
|
||||||
|
border-width: 0.6em;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: rgba(3, 169, 244, 0.2) rgba(3, 169, 244, 0.2)
|
||||||
|
rgba(3, 169, 244, 0.2) rgb(3, 169, 244);
|
||||||
|
font-size: 10px;
|
||||||
|
position: relative;
|
||||||
|
text-indent: -9999em;
|
||||||
|
transform: translateZ(0px);
|
||||||
|
animation: 1.1s linear 0s infinite normal none running loadingAnimation;
|
||||||
|
}
|
||||||
|
@-webkit-keyframes loadingAnimation {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
-webkit-transform: rotate(360deg);
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes loadingAnimation {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
-webkit-transform: rotate(360deg);
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.word-break {
|
||||||
|
word-break:break-all;
|
||||||
|
}
|
||||||
|
.dialog-container {
|
||||||
|
width: 300px;
|
||||||
|
min-height: 300px;
|
||||||
|
max-height: 75vh;
|
||||||
|
padding: 5px;
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.between {
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.no-width {
|
||||||
|
width: auto
|
||||||
|
}
|
||||||
|
.between p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
color: var(--black);
|
||||||
|
}
|
||||||
|
.marginLoader {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
.marginRight {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.warning{
|
||||||
|
display: flex;
|
||||||
|
flex-grow: 1
|
||||||
|
}
|
||||||
|
.message-error {
|
||||||
|
color: var(--error);
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
this.mintingAccountData = [];
|
||||||
|
this.errorMsg = '';
|
||||||
|
this.openDialogRewardShare = false;
|
||||||
|
this.status = 0;
|
||||||
|
this.privateRewardShareKey = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return html` ${this.renderStartMintingButton()} `;
|
||||||
|
}
|
||||||
|
|
||||||
|
firstUpdated() {
|
||||||
|
this.getMintingAcccounts();
|
||||||
|
}
|
||||||
|
|
||||||
|
renderErrorMsg1() {
|
||||||
|
return html`${translate("startminting.smchange1")}`
|
||||||
|
}
|
||||||
|
|
||||||
|
renderErrorMsg2() {
|
||||||
|
return html`${translate("startminting.smchange2")}`
|
||||||
|
}
|
||||||
|
|
||||||
|
renderErrorMsg3() {
|
||||||
|
return html`${translate("startminting.smchange3")}`
|
||||||
|
}
|
||||||
|
|
||||||
|
renderErrorMsg4() {
|
||||||
|
return html`${translate("startminting.smchange4")}`
|
||||||
|
}
|
||||||
|
|
||||||
|
async getMintingAcccounts() {
|
||||||
|
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
|
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
|
const url = `${nodeUrl}/admin/mintingaccounts`
|
||||||
|
try {
|
||||||
|
const res = await fetch(url);
|
||||||
|
const mintingAccountData = await res.json()
|
||||||
|
|
||||||
|
this.mintingAccountData = mintingAccountData
|
||||||
|
} catch (error) {
|
||||||
|
this.errorMsg = this.renderErrorMsg1()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async changeStatus(value){
|
||||||
|
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
|
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
|
this.status = value
|
||||||
|
const address = window.parent.reduxStore.getState().app?.selectedAddress?.address
|
||||||
|
|
||||||
|
const findMintingAccountFromOtherUser = this.mintingAccountData.find((ma) => ma.recipientAccount === address && ma.mintingAccount !== address)
|
||||||
|
|
||||||
|
const removeMintingAccount = async (publicKey) => {
|
||||||
|
const url = `${nodeUrl}/admin/mintingaccounts?apiKey=${myNode.apiKey}`
|
||||||
|
return await fetch(url, {
|
||||||
|
method: 'DELETE',
|
||||||
|
body: publicKey,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const addMintingAccount = async (sponsorshipKeyValue) => {
|
||||||
|
const url = `${nodeUrl}/admin/mintingaccounts?apiKey=${myNode.apiKey}`
|
||||||
|
return await fetch(url, {
|
||||||
|
method: 'POST',
|
||||||
|
body: sponsorshipKeyValue,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (
|
||||||
|
findMintingAccountFromOtherUser &&
|
||||||
|
findMintingAccountFromOtherUser?.publicKey[0]
|
||||||
|
) {
|
||||||
|
await removeMintingAccount(
|
||||||
|
findMintingAccountFromOtherUser?.publicKey[0]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
this.errorMsg = this.renderErrorMsg2()
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await addMintingAccount(this.privateRewardShareKey)
|
||||||
|
let snack1 = get('becomeMinterPage.bchange19')
|
||||||
|
parentEpml.request('showSnackBar', `${snack1}`)
|
||||||
|
this.status = 5
|
||||||
|
this.getMintingAcccounts()
|
||||||
|
} catch (error) {
|
||||||
|
this.errorMsg = this.renderErrorMsg3()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async confirmRelationship() {
|
||||||
|
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
|
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
|
|
||||||
|
let interval = null
|
||||||
|
let stop = false
|
||||||
|
this.status = 2
|
||||||
|
const getAnswer = async () => {
|
||||||
|
const rewardShares = async (minterAddr) => {
|
||||||
|
const url = `${nodeUrl}/addresses/rewardshares?minters=${minterAddr}&recipients=${minterAddr}`
|
||||||
|
const res = await fetch(url)
|
||||||
|
const data = await res.json()
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!stop) {
|
||||||
|
stop = true;
|
||||||
|
try {
|
||||||
|
const address = window.parent.reduxStore.getState().app?.selectedAddress?.address
|
||||||
|
const myRewardShareArray = await rewardShares(address)
|
||||||
|
if (myRewardShareArray.length > 0) {
|
||||||
|
clearInterval(interval)
|
||||||
|
this.status = 3
|
||||||
|
this.timer = countDown(180, () => this.changeStatus(4))
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
}
|
||||||
|
stop = false
|
||||||
|
}
|
||||||
|
};
|
||||||
|
interval = setInterval(getAnswer, 5000)
|
||||||
|
}
|
||||||
|
|
||||||
|
renderStartMintingButton() {
|
||||||
|
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||||
|
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port
|
||||||
|
const mintingAccountData = this.mintingAccountData
|
||||||
|
const addressInfo = window.parent.reduxStore.getState().app.accountInfo.addressInfo
|
||||||
|
const address = window.parent.reduxStore.getState().app?.selectedAddress?.address
|
||||||
|
const nonce = window.parent.reduxStore.getState().app?.selectedAddress?.nonce
|
||||||
|
const publicAddress = window.parent.reduxStore.getState().app?.selectedAddress ?.base58PublicKey
|
||||||
|
const findMintingAccount = mintingAccountData.find((ma) => ma.mintingAccount === address)
|
||||||
|
const isMinterButKeyMintingKeyNotAssigned = addressInfo?.error !== 124 && addressInfo?.level >= 1 && !findMintingAccount
|
||||||
|
|
||||||
|
const makeTransactionRequest = async (lastRef) => {
|
||||||
|
let mylastRef = lastRef;
|
||||||
|
let rewarddialog1 = get('transactions.rewarddialog1')
|
||||||
|
let rewarddialog2 = get('transactions.rewarddialog2')
|
||||||
|
let rewarddialog3 = get('transactions.rewarddialog3')
|
||||||
|
let rewarddialog4 = get('transactions.rewarddialog4')
|
||||||
|
|
||||||
|
let myTxnrequest = await parentEpml.request('transaction', {
|
||||||
|
type: 38,
|
||||||
|
nonce: nonce,
|
||||||
|
params: {
|
||||||
|
recipientPublicKey: publicAddress,
|
||||||
|
percentageShare: 0,
|
||||||
|
lastReference: mylastRef,
|
||||||
|
rewarddialog1: rewarddialog1,
|
||||||
|
rewarddialog2: rewarddialog2,
|
||||||
|
rewarddialog3: rewarddialog3,
|
||||||
|
rewarddialog4: rewarddialog4,
|
||||||
|
},
|
||||||
|
disableModal: true,
|
||||||
|
})
|
||||||
|
return myTxnrequest
|
||||||
|
}
|
||||||
|
|
||||||
|
const getTxnRequestResponse = (txnResponse) => {
|
||||||
|
let err6string = get('rewardsharepage.rchange21');
|
||||||
|
if (txnResponse?.extraData?.rewardSharePrivateKey && (txnResponse?.data?.message?.includes('multiple') || txnResponse?.data?.message?.includes('SELF_SHARE_EXISTS'))) {
|
||||||
|
return err6string
|
||||||
|
}
|
||||||
|
if (txnResponse.success === false && txnResponse.message) {
|
||||||
|
throw (txnResponse);
|
||||||
|
} else if (
|
||||||
|
txnResponse.success === true &&
|
||||||
|
!txnResponse.data.error
|
||||||
|
) {
|
||||||
|
|
||||||
|
return err6string;
|
||||||
|
} else {
|
||||||
|
throw (txnResponse)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const createSponsorshipKey = async () => {
|
||||||
|
this.status = 1
|
||||||
|
let lastRef = await getLastRef()
|
||||||
|
|
||||||
|
let myTransaction = await makeTransactionRequest(lastRef)
|
||||||
|
|
||||||
|
getTxnRequestResponse(myTransaction);
|
||||||
|
return myTransaction?.extraData?.rewardSharePrivateKey
|
||||||
|
}
|
||||||
|
|
||||||
|
const getLastRef = async () => {
|
||||||
|
const url = `${nodeUrl}/addresses/lastreference/${address}`
|
||||||
|
const res = await fetch(url)
|
||||||
|
const data = await res.text()
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
|
||||||
|
const startMinting = async () => {
|
||||||
|
this.openDialogRewardShare = true
|
||||||
|
this.errorMsg = ''
|
||||||
|
const address = window.parent.reduxStore.getState().app?.selectedAddress?.address
|
||||||
|
|
||||||
|
const findMintingAccountsFromUser = this.mintingAccountData.filter((ma) => ma.recipientAccount === address && ma.mintingAccount === address)
|
||||||
|
|
||||||
|
if(findMintingAccountsFromUser.length > 2){
|
||||||
|
this.errorMsg = translate("startminting.smchange10")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.privateRewardShareKey = await createSponsorshipKey()
|
||||||
|
this.confirmRelationship(publicAddress)
|
||||||
|
} catch (error) {
|
||||||
|
console.log({ error })
|
||||||
|
this.errorMsg = error?.data?.message || this.renderErrorMsg4()
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return html`
|
||||||
|
${isMinterButKeyMintingKeyNotAssigned ? html`
|
||||||
|
<div class="start-minting-wrapper">
|
||||||
|
<my-button label="${translate('becomeMinterPage.bchange18')}"
|
||||||
|
?isLoading=${false}
|
||||||
|
.onClick=${async () => {
|
||||||
|
await startMinting()
|
||||||
|
if (this.errorMsg) {
|
||||||
|
parentEpml.request('showSnackBar', `${this.errorMsg}`)
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
</my-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Dialog for tracking the progress of starting minting -->
|
||||||
|
|
||||||
|
${this.openDialogRewardShare ? html`
|
||||||
|
<div class="dialogCustom">
|
||||||
|
<div class="dialogCustomInner">
|
||||||
|
<div class="dialog-header" >
|
||||||
|
<div class="row">
|
||||||
|
<h1>In progress</h1>
|
||||||
|
<div class=${`smallLoading marginLoader ${this.status > 3 && 'hide'}`}></div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
</div>
|
||||||
|
<div class="dialog-container">
|
||||||
|
<ul>
|
||||||
|
<li class="row between">
|
||||||
|
<p>
|
||||||
|
1. ${translate("startminting.smchange5")}
|
||||||
|
</p>
|
||||||
|
<div class=${`smallLoading marginLoader ${this.status !== 1 && 'hide'}`}></div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=${`row between ${this.status < 2 && 'inactiveText'}`}>
|
||||||
|
<p>
|
||||||
|
2. ${translate("startminting.smchange6")}
|
||||||
|
</p>
|
||||||
|
<div class=${`smallLoading marginLoader ${this.status !== 2 && 'hide'}`}></div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=${`row between ${this.status < 3 && 'inactiveText'}`}>
|
||||||
|
<p>
|
||||||
|
3. ${translate("startminting.smchange7")}
|
||||||
|
</p>
|
||||||
|
<div class="row no-width">
|
||||||
|
<div class=${`smallLoading marginLoader marginRight ${this.status !== 3 && 'hide'}`} ></div> <p>${asyncReplace(this.timer)}</p>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=${`row between ${this.status < 4 && 'inactiveText'}`}>
|
||||||
|
<p>
|
||||||
|
4. ${translate("startminting.smchange8")}
|
||||||
|
</p>
|
||||||
|
<div class=${`smallLoading marginLoader ${this.status !== 4 && 'hide'}`}></div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=${`row between ${this.status < 5 && 'inactiveText'}`}>
|
||||||
|
<p>
|
||||||
|
5. ${translate("startminting.smchange9")}
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="warning column">
|
||||||
|
<p>
|
||||||
|
Warning: do not close the Qortal UI until completion!
|
||||||
|
</p>
|
||||||
|
<p class="message-error">${this.errorMsg}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modalFooter">
|
||||||
|
${this.errorMsg || this.status === 5 ? html`
|
||||||
|
<mwc-button
|
||||||
|
slot="primaryAction"
|
||||||
|
@click=${() => {
|
||||||
|
this.openDialogRewardShare = false
|
||||||
|
this.errorMsg = ''
|
||||||
|
}}
|
||||||
|
class="red"
|
||||||
|
>
|
||||||
|
${translate("general.close")}
|
||||||
|
</mwc-button>
|
||||||
|
` : '' }
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
` : ""}
|
||||||
|
` : ''}
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.customElements.define('start-minting-now', StartMintingNow)
|
||||||
|
|
||||||
|
class MyButton extends LitElement {
|
||||||
|
static properties = {
|
||||||
|
onClick: { type: Function },
|
||||||
|
isLoading: { type: Boolean },
|
||||||
|
label: { type: String },
|
||||||
|
};
|
||||||
|
|
||||||
|
static styles = css`
|
||||||
|
vaadin-button {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 600;
|
||||||
|
height: 35px;
|
||||||
|
margin: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
min-width: 80px;
|
||||||
|
min-height: 35px;
|
||||||
|
background-color: #03a9f4;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
vaadin-button:hover {
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
this.onClick = () => {};
|
||||||
|
this.isLoading = false;
|
||||||
|
this.label = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return html`
|
||||||
|
<vaadin-button
|
||||||
|
?disabled="${this.isLoading}"
|
||||||
|
@click="${this.onClick}"
|
||||||
|
>
|
||||||
|
${this.isLoading === false
|
||||||
|
? html`${this.label}`
|
||||||
|
: html`<paper-spinner-lite active></paper-spinner-lite>`}
|
||||||
|
</vaadin-button>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
customElements.define('my-button', MyButton)
|
Loading…
x
Reference in New Issue
Block a user