diff --git a/README.md b/README.md
index 6a41be31..3d9c3ddc 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ Easiest way to install the lastest required packages on Linux is via nvm.
``` source ~/.bashrc ``` (For Fedora / CentOS)
``` nvm ls-remote ``` (Fetch list of available versions)
``` nvm install v18.14.0 ``` (LTS: Hydrogen supported by Electron)
-``` npm --location=global install npm@9.7.1 ```
+``` npm --location=global install npm@9.7.2 ```
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.
diff --git a/core/font/switch-theme.css b/core/font/switch-theme.css
index a6d1c8bc..4d308e76 100644
--- a/core/font/switch-theme.css
+++ b/core/font/switch-theme.css
@@ -63,6 +63,7 @@ html {
--app-background-1: #045de9;
--app-background-2: #09c6f9;
--app-icon: #ffffff;
+ --app-hr: rgba(0, 0, 0, .3);
}
html[theme="dark"] {
@@ -130,4 +131,5 @@ html[theme="dark"] {
--app-background-1: #7f5a83;
--app-background-2: #0d324d;
--app-icon: #03a9f4;
+ --app-hr: rgba(255, 255, 255, .3);
}
\ No newline at end of file
diff --git a/core/language/de.json b/core/language/de.json
index 06a97cbd..42f2927f 100644
--- a/core/language/de.json
+++ b/core/language/de.json
@@ -69,7 +69,8 @@
"tm24": "Plugin-Typ:",
"tm25": "Bitte wählen Sie einen Plugin-Typ aus!",
"tm26": "Neues Plugin zum Menü hinzufügen",
- "tm27": "Plugin aus Menü entfernen"
+ "tm27": "Plugin aus Menü entfernen",
+ "tm28": "Übersichtsseite"
},
"login": {
"login": "Einloggen",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"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": {
"yes": "Ja",
diff --git a/core/language/es.json b/core/language/es.json
index d4b1c8dc..3e134273 100644
--- a/core/language/es.json
+++ b/core/language/es.json
@@ -69,7 +69,8 @@
"tm24": "Tipo de complemento:",
"tm25": "¡Seleccione un tipo de complemento!",
"tm26": "Agregar nuevo complemento al menú",
- "tm27": "Eliminar complemento del menú"
+ "tm27": "Eliminar complemento del menú",
+ "tm28": "Página de inicio"
},
"login": {
"login": "Iniciar sesión",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"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": {
"yes": "Sí",
diff --git a/core/language/fr.json b/core/language/fr.json
index 5e63f0e1..9305c484 100644
--- a/core/language/fr.json
+++ b/core/language/fr.json
@@ -69,7 +69,8 @@
"tm24": "Type de plug-in :",
"tm25": "Veuillez sélectionner un type de plugin !",
"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": "Connexion",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"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": {
"yes": "Oui",
diff --git a/core/language/hindi.json b/core/language/hindi.json
index 9aebf578..1b1e1e52 100644
--- a/core/language/hindi.json
+++ b/core/language/hindi.json
@@ -70,7 +70,8 @@
"tm24": "प्लगइन प्रकार:",
"tm25": "कृपया प्लगइन प्रकार चुनें!",
"tm26": "मेनू में नया प्लगइन जोड़ें",
- "tm27": "मेनू से प्लगइन हटाएं"
+ "tm27": "मेनू से प्लगइन हटाएं",
+ "tm28": "अवलोकन पृष्ठ"
},
"login": {
"login": "लॉग इन करें",
@@ -179,7 +180,11 @@
},
"walletprofile": {
"minterlevel": "मिन्टर लेवल",
- "blocksminted": "ब्लॉक मिंटेड"
+ "blocksminted": "ब्लॉक मिंटेड",
+ "wp1": "खनन",
+ "wp2": "नॉट मिंटिंग",
+ "wp3": "मुख्य जानकारी",
+ "wp4": "सिंक्रोनाइज़्ड"
},
"general": {
"yes": "हाँ",
diff --git a/core/language/hr.json b/core/language/hr.json
index 3bedfe6b..0baf070a 100644
--- a/core/language/hr.json
+++ b/core/language/hr.json
@@ -69,7 +69,8 @@
"tm24": "Vrsta dodatka:",
"tm25": "Molimo odaberite vrstu dodatka!",
"tm26": "Dodaj novi dodatak u izbornik",
- "tm27": "Ukloni dodatak iz izbornika"
+ "tm27": "Ukloni dodatak iz izbornika",
+ "tm28": "Stranica pregleda"
},
"login": {
"login": "Prijavi se",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"minterlevel": "Minter Level",
- "blocksminted": "Mintani blokovi"
+ "blocksminted": "Mintani blokovi",
+ "wp1": "Kovanje",
+ "wp2": "Nije kovano",
+ "wp3": "Osnovne informacije",
+ "wp4": "Sinkronizirano"
},
"general": {
"yes": "Da",
diff --git a/core/language/hu.json b/core/language/hu.json
index 531ba49e..ff712be9 100644
--- a/core/language/hu.json
+++ b/core/language/hu.json
@@ -69,7 +69,8 @@
"tm24": "Plugin Type:",
"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",
- "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": "Bejelentkezés",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"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": {
"yes": "Igen",
diff --git a/core/language/it.json b/core/language/it.json
index c38d025c..8b5dd9c0 100644
--- a/core/language/it.json
+++ b/core/language/it.json
@@ -69,7 +69,8 @@
"tm24": "Tipo di plug-in:",
"tm25": "Seleziona un tipo di plugin!",
"tm26": "Aggiungi nuovo plugin al menu",
- "tm27": "Rimuovi plugin dal menu"
+ "tm27": "Rimuovi plugin dal menu",
+ "tm28": "Pagina panoramica"
},
"login": {
"login": "Login",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"minterlevel": "Livello Minter",
- "blocksminted": "Blocchi Minati"
+ "blocksminted": "Blocchi Minati",
+ "wp1": "Conio",
+ "wp2": "Non conio",
+ "wp3": "Informazioni principali",
+ "wp4": "Sincronizzato"
},
"general": {
"yes": "Yes",
diff --git a/core/language/jp.json b/core/language/jp.json
index 872f54bb..06b9692d 100644
--- a/core/language/jp.json
+++ b/core/language/jp.json
@@ -71,7 +71,8 @@
"tm24": "プラグインの種類:",
"tm25": "プラグインの種類を選択してください!",
"tm26": "新しいプラグインをメニューに追加",
- "tm27": "メニューからプラグインを削除"
+ "tm27": "メニューからプラグインを削除",
+ "tm28": "概要ページ"
},
"login": {
"login": "ログイン",
@@ -180,7 +181,11 @@
},
"walletprofile": {
"minterlevel": "ミンターレベル",
- "blocksminted": "ミントしたブロック"
+ "blocksminted": "ミントしたブロック",
+ "wp1": "ミント",
+ "wp2": "鋳造しない",
+ "wp3": "コア情報",
+ "wp4": "同期済み"
},
"general": {
"yes": "はい",
diff --git a/core/language/ko.json b/core/language/ko.json
index 84e105dc..1dda116f 100644
--- a/core/language/ko.json
+++ b/core/language/ko.json
@@ -69,7 +69,8 @@
"tm24": "플러그인 유형:",
"tm25": "플러그인 유형을 선택하세요!",
"tm26": "메뉴에 새 플러그인 추가",
- "tm27": "메뉴에서 플러그인 제거"
+ "tm27": "메뉴에서 플러그인 제거",
+ "tm28": "개요 페이지"
},
"login": {
"login": "로그인",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"minterlevel": "민터 레벨",
- "blocksminted": "민트된 블록"
+ "blocksminted": "민트된 블록",
+ "wp1": "조폐",
+ "wp2": "조폐되지 않음",
+ "wp3": "핵심 정보",
+ "wp4": "동기화됨"
},
"general": {
"yes": "예",
diff --git a/core/language/no.json b/core/language/no.json
index 302aaf7a..5c4c4f38 100644
--- a/core/language/no.json
+++ b/core/language/no.json
@@ -69,7 +69,8 @@
"tm24": "Plugin Type:",
"tm25": "Vennligst velg en plugin-type !",
"tm26": "Legg til ny plugin til menyen",
- "tm27": "Fjern plugin fra menyen"
+ "tm27": "Fjern plugin fra menyen",
+ "tm28": "Oversiktsside"
},
"login": {
"login": "Logg på",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"minterlevel": "Minternivå",
- "blocksminted": "Antall blokker mintet"
+ "blocksminted": "Antall blokker mintet",
+ "wp1": "Minting",
+ "wp2": "Ikke preging",
+ "wp3": "Kjerneinformasjon",
+ "wp4": "Synkronisert"
},
"general": {
"yes": "Ja",
diff --git a/core/language/pl.json b/core/language/pl.json
index e75343b1..288bb745 100644
--- a/core/language/pl.json
+++ b/core/language/pl.json
@@ -69,7 +69,8 @@
"tm24": "Typ wtyczki:",
"tm25": "Proszę wybrać typ wtyczki!",
"tm26": "Dodaj nową wtyczkę do menu",
- "tm27": "Usuń wtyczkę z menu"
+ "tm27": "Usuń wtyczkę z menu",
+ "tm28": "Strona przeglądu"
},
"login": {
"login": "Zaloguj się",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"minterlevel": "Poziom Mintera",
- "blocksminted": "Bloki Zmintowane"
+ "blocksminted": "Bloki Zmintowane",
+ "wp1": "Bicie",
+ "wp2": "Nie bije",
+ "wp3": "Podstawowe informacje",
+ "wp4": "Zsynchronizowany"
},
"general": {
"yes": "Tak",
diff --git a/core/language/pt.json b/core/language/pt.json
index 25f67d9c..e803b2d2 100644
--- a/core/language/pt.json
+++ b/core/language/pt.json
@@ -69,7 +69,8 @@
"tm24": "Tipo de plug-in:",
"tm25": "Por favor, selecione um tipo de plugin!",
"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",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"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": {
"yes": "Sim",
diff --git a/core/language/ro.json b/core/language/ro.json
index 3247bd87..7633acf2 100644
--- a/core/language/ro.json
+++ b/core/language/ro.json
@@ -69,7 +69,8 @@
"tm24": "Tip de plugin:",
"tm25": "Vă rugăm să selectați un tip de plugin !",
"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",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"minterlevel": "Nivelul Minter-ului",
- "blocksminted": "Blocuri descoperite"
+ "blocksminted": "Blocuri descoperite",
+ "wp1": "Battering",
+ "wp2": "Nu se bate",
+ "wp3": "Informații de bază",
+ "wp4": "Sincronizat"
},
"general": {
"yes": "Da",
diff --git a/core/language/rs.json b/core/language/rs.json
index 537edd66..2cb237db 100644
--- a/core/language/rs.json
+++ b/core/language/rs.json
@@ -69,7 +69,8 @@
"tm24": "Tip dodatka:",
"tm25": "Molimo izaberite tip dodatka!",
"tm26": "Dodaj novi dodatak u meni",
- "tm27": "Ukloni dodatak iz menija"
+ "tm27": "Ukloni dodatak iz menija",
+ "tm28": "Stranica sa pregledom"
},
"login": {
"login": "Prijava",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"minterlevel": "Novi Mintera",
- "blocksminted": "Izmintovano Blokova"
+ "blocksminted": "Izmintovano Blokova",
+ "wp1": "Kovanje",
+ "wp2": "Ne kuje",
+ "wp3": "Osnovne informacije",
+ "wp4": "Sinhronizovano"
},
"general": {
"yes": "Da",
diff --git a/core/language/ru.json b/core/language/ru.json
index 9c8a42eb..c205731f 100644
--- a/core/language/ru.json
+++ b/core/language/ru.json
@@ -69,7 +69,8 @@
"tm24": "Тип плагина:",
"tm25": "Пожалуйста, выберите тип плагина!",
"tm26": "Добавить новый плагин в меню",
- "tm27": "Удалить плагин из меню"
+ "tm27": "Удалить плагин из меню",
+ "tm28": "Страница обзора"
},
"login": {
"login": "Войти",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"minterlevel": "Уровень Minter",
- "blocksminted": "Отчеканеные блоки"
+ "blocksminted": "Отчеканеные блоки",
+ "wp1": "Чеканка",
+ "wp2": "Не чеканить",
+ "wp3": "Основная информация",
+ "wp4": "Синхронизировано"
},
"general": {
"yes": "Да",
diff --git a/core/language/us.json b/core/language/us.json
index 6a8647b0..052137b0 100644
--- a/core/language/us.json
+++ b/core/language/us.json
@@ -69,7 +69,9 @@
"tm24": "Plugin Type:",
"tm25": "Please select a plugin type !",
"tm26": "Add New Plugin To Menu",
- "tm27": "Remove Plugin From Menu"
+ "tm27": "Remove Plugin From Menu",
+ "tm28": "Overview Page"
+
},
"login": {
"login": "Log In",
@@ -178,7 +180,11 @@
},
"walletprofile": {
"minterlevel": "Minter Level",
- "blocksminted": "Blocks Minted"
+ "blocksminted": "Blocks Minted",
+ "wp1": "Minting",
+ "wp2": "Not Minting",
+ "wp3": "Core Information",
+ "wp4": "Synchronized"
},
"general": {
"yes": "Yes",
diff --git a/core/language/zhc.json b/core/language/zhc.json
index 90e89cb6..23b8f33b 100644
--- a/core/language/zhc.json
+++ b/core/language/zhc.json
@@ -69,7 +69,8 @@
"tm24": "插件类型:",
"tm25": "请选择插件类型!",
"tm26": "添加新插件到菜单",
- "tm27": "从菜单中删除插件"
+ "tm27": "从菜单中删除插件",
+ "tm28": "概览页面"
},
"login": {
"login": "登入",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"minterlevel": "铸币等级",
- "blocksminted": "铸币区块数"
+ "blocksminted": "铸币区块数",
+ "wp1": "铸造",
+ "wp2": "不铸造",
+ "wp3": "核心信息",
+ "wp4": "已同步"
},
"general": {
"yes": "是",
diff --git a/core/language/zht.json b/core/language/zht.json
index 04ab107f..a30b08bf 100644
--- a/core/language/zht.json
+++ b/core/language/zht.json
@@ -69,7 +69,8 @@
"tm24": "插件類型:",
"tm25": "請選擇插件類型!",
"tm26": "添加新插件到菜單",
- "tm27": "從菜單中刪除插件"
+ "tm27": "從菜單中刪除插件",
+ "tm28": "概覽頁面"
},
"login": {
"login": "登入",
@@ -178,7 +179,11 @@
},
"walletprofile": {
"minterlevel": "鑄幣等級",
- "blocksminted": "鑄幣區塊數"
+ "blocksminted": "鑄幣區塊數",
+ "wp1": "鑄造",
+ "wp2": "不鑄造",
+ "wp3": "核心信息",
+ "wp4": "已同步"
},
"general": {
"yes": "是",
diff --git a/core/src/components/show-plugin.js b/core/src/components/show-plugin.js
index 0080dad1..abc3b345 100644
--- a/core/src/components/show-plugin.js
+++ b/core/src/components/show-plugin.js
@@ -105,8 +105,8 @@ class ShowPlugin extends connect(store)(LitElement) {
transition: background 0.3s;
position: relative;
width: auto;
- min-width: 50px;
- max-width: 200px;
+ min-width: 110px;
+ max-width: 220px;
overflow: hidden;
zIndex: 2;
}
@@ -119,7 +119,7 @@ class ShowPlugin extends connect(store)(LitElement) {
display: inline-block;
position: relative;
width: auto;
- min-width: 25px;
+ min-width: 1px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
@@ -217,6 +217,8 @@ class ShowPlugin extends connect(store)(LitElement) {
}
.count {
+ position: relative;
+ top: -5px;
font-weight: bold;
background-color: #C6011F;
color: white;
@@ -295,7 +297,9 @@ class ShowPlugin extends connect(store)(LitElement) {
let icon = ''
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')}`
} else if (tab.myPlugObj && tab.myPlugObj.title === "Become a Minter") {
title = html`${translate('tabmenu.tm2')}`
@@ -380,10 +384,10 @@ class ShowPlugin extends connect(store)(LitElement) {
${count ? html`
${title}
${count}
- {this.removeTab(index, tab.id)}}>close
+ {this.removeTab(index, tab.id)}}>close
` : html`
${title}
- {this.removeTab(index, tab.id)}}>close
+ {this.removeTab(index, tab.id)}}>close
`}
@@ -716,8 +720,14 @@ class NavBar extends connect(store)(LitElement) {
changePage: { attribute: false },
pluginName: { type: String },
pluginType: { type: String },
+ pluginPage: { 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-ink-color: var(--black);
--mdc-dialog-content-ink-color: var(--black);
+ --mdc-dialog-shape-radius: 25px;
--mdc-dialog-min-width: 300px;
--mdc-dialog-max-width: 700px;
}
@@ -864,12 +875,33 @@ class NavBar extends connect(store)(LitElement) {
}
select {
- padding: 10px 10px;
+ padding: 10px 10px 10px 10px;
width: 100%;
font-size: 16px;
font-weight: 500;
background: var(--white);
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() {
@@ -881,34 +913,39 @@ class NavBar extends connect(store)(LitElement) {
this.addressInfo = {}
this.pluginName = ''
this.pluginType = ''
+ this.pluginPage = ''
this.myApps = ''
this.mwcIcon = ''
this.pluginNameToDelete = ''
+ this.pluginNumberToDelete = ''
+ this.textFieldDisabled = false
+ this.initialName = ''
+ this.newId = ''
+ this.removeTitle = ''
}
render() {
return html`
+
this.resetMenu()}" title="Reset Tab Menu">reset_tv
-
-
- ${repeat(this.myMenuList, (plugin) => plugin.url, (plugin, index) => html`
-
-
- ${this.renderRemoveIcon(plugin.url, plugin.mwcicon, plugin.title, plugin)}
-
- ${this.renderTitle(plugin.url, plugin.title)}
-
- `)}
-
this.openAddNewPlugin()}">
+
+ ${repeat(this.myMenuList, (plugin) => plugin.url, (plugin, index) => html`
+
-
+ ${this.renderRemoveIcon(plugin.url, plugin.mwcicon, plugin.title, plugin.pluginNumber, plugin)}
-
${translate("tabmenu.tm19")}
+ ${this.renderTitle(plugin.url, plugin.title)}
+ `)}
+
this.openAddNewPlugin()}">
+
+
+
+
${translate("tabmenu.tm19")}
@@ -919,20 +956,31 @@ class NavBar extends connect(store)(LitElement) {
${translate("tabmenu.tm24")}
-
@@ -956,7 +1004,7 @@ class NavBar extends connect(store)(LitElement) {
${translate("tabmenu.tm23")}
-
${this.pluginNameToDelete}
+
${this.removeTitle}
0
+ const isSponsorSelect = +addressInfoSelect?.level >= 5
+
+ if (!isMinterSelect) {
+ return html`
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `
+ } else if (isMinterSelect && isSponsorSelect) {
+ return html`
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `
+ } else {
+ return html`
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `
+ }
+ }
+
openAddNewPlugin() {
this.shadowRoot.getElementById("pluginTypeInput").value = 'reject'
this.shadowRoot.getElementById("pluginNameInput").value = ''
+ this.initialName = ''
+ this.textFieldDisabled = false
this.shadowRoot.querySelector('#addNewPlugin').show()
}
async addToMyMenuPlugins() {
+ this.newId = ''
+ const newUid = new ShortUniqueId({ length: 10 })
+ this.newId = 'plugin-' + newUid()
+
this.pluginType = this.shadowRoot.getElementById("pluginTypeInput").value
if (this.pluginType === "reject") {
@@ -1052,6 +1295,7 @@ class NavBar extends connect(store)(LitElement) {
"title": this.pluginName,
"icon": "vaadin:external-browser",
"mwcicon": this.mwcIcon,
+ "pluginNumber": this.newId,
"menus": [],
"parent": false
}
@@ -1114,6 +1358,7 @@ class NavBar extends connect(store)(LitElement) {
"title": this.pluginName,
"icon": "vaadin:external-browser",
"mwcicon": this.mwcIcon,
+ "pluginNumber": this.newId,
"menus": [],
"parent": false
}
@@ -1161,6 +1406,69 @@ class NavBar extends connect(store)(LitElement) {
parentEpml.request('showSnackBar', `${myplugstring3}`)
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.getElementById("pluginTypeInput").value = 'reject'
this.shadowRoot.getElementById("pluginNameInput").value = ''
+ this.initialName = ''
+ this.textFieldDisabled = false
}
renderTitle(theUrl, theName) {
- if (theUrl === 'minting') {
+ if (theUrl === 'overview-page') {
+ return html`${translate('tabmenu.tm28')}`
+ } else if (theUrl === 'minting') {
return html`${translate('tabmenu.tm1')}`
} else if (theUrl === 'become-minter') {
return html`${translate('tabmenu.tm2')}`
@@ -1208,31 +1520,67 @@ class NavBar extends connect(store)(LitElement) {
}
}
- renderRemoveIcon(appurl, appicon, appname, appplugin) {
- if (appurl === 'myapp') {
- return html`
- this.openRemoveApp(appname)}">
- backspace
-
-
- `
- } else {
- return html``
- }
+ renderRemoveIcon(appurl, appicon, appname, appid, appplugin) {
+ return html`
+ this.openRemoveApp(appname, appid, appurl)}">
+ backspace
+
+
+ `
}
- openRemoveApp(pluginNameTD) {
+ openRemoveApp(pluginNameTD, pluginNumberTD, pluginUrlTD) {
this.pluginNameToDelete = ''
this.pluginNameToDelete = pluginNameTD
+ this.pluginNumberToDelete = ''
+ this.pluginNumberToDelete = pluginNumberTD
+ this.removeTitle = ''
+ if (pluginUrlTD === 'overview-page') {
+ this.removeTitle = html`${translate('tabmenu.tm28')}`
+ } else if (pluginUrlTD === 'minting') {
+ this.removeTitle = html`${translate('tabmenu.tm1')}`
+ } else if (pluginUrlTD === 'become-minter') {
+ this.removeTitle = html`${translate('tabmenu.tm2')}`
+ } else if (pluginUrlTD === 'sponsorship-list') {
+ this.removeTitle = html`${translate('tabmenu.tm3')}`
+ } else if (pluginUrlTD === 'wallet') {
+ this.removeTitle = html`${translate('tabmenu.tm4')}`
+ } else if (pluginUrlTD === 'trade-portal') {
+ this.removeTitle = html`${translate('tabmenu.tm5')}`
+ } else if (pluginUrlTD === 'trade-bot-portal') {
+ this.removeTitle = html`${translate('tabmenu.tm6')}`
+ } else if (pluginUrlTD === 'reward-share') {
+ this.removeTitle = html`${translate('tabmenu.tm7')}`
+ } else if (pluginUrlTD === 'q-chat') {
+ this.removeTitle = html`${translate('tabmenu.tm8')}`
+ } else if (pluginUrlTD === 'name-registration') {
+ this.removeTitle = html`${translate('tabmenu.tm9')}`
+ } else if (pluginUrlTD === 'names-market') {
+ this.removeTitle = html`${translate('tabmenu.tm10')}`
+ } else if (pluginUrlTD === 'websites') {
+ this.removeTitle = html`${translate('tabmenu.tm11')}`
+ } else if (pluginUrlTD === 'qapps') {
+ this.removeTitle = html`${translate('tabmenu.tm12')}`
+ } else if (pluginUrlTD === 'group-management') {
+ this.removeTitle = html`${translate('tabmenu.tm13')}`
+ } else if (pluginUrlTD === 'data-management') {
+ this.removeTitle = html`${translate('tabmenu.tm14')}`
+ } else if (pluginUrlTD === 'puzzles') {
+ this.removeTitle = html`${translate('tabmenu.tm15')}`
+ } else if (pluginUrlTD === 'node-management') {
+ this.removeTitle = html`${translate('tabmenu.tm16')}`
+ } else {
+ this.removeTitle = html`${pluginNameTD}`
+ }
this.shadowRoot.querySelector('#removePlugin').show()
}
removeAppFromArray() {
- const pluginToRemove = this.pluginNameToDelete
+ const pluginToRemove = this.pluginNumberToDelete
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)
localStorage.removeItem("myMenuPlugs")
localStorage.setItem("myMenuPlugs", myNewObj)
@@ -1244,6 +1592,7 @@ class NavBar extends connect(store)(LitElement) {
closeRemoveApp() {
this.shadowRoot.querySelector('#removePlugin').close()
this.pluginNameToDelete = ''
+ this.pluginNumberToDelete = ''
}
async extractComponents(url) {
diff --git a/core/src/styles/switch-theme.css b/core/src/styles/switch-theme.css
index a6d1c8bc..4d308e76 100644
--- a/core/src/styles/switch-theme.css
+++ b/core/src/styles/switch-theme.css
@@ -63,6 +63,7 @@ html {
--app-background-1: #045de9;
--app-background-2: #09c6f9;
--app-icon: #ffffff;
+ --app-hr: rgba(0, 0, 0, .3);
}
html[theme="dark"] {
@@ -130,4 +131,5 @@ html[theme="dark"] {
--app-background-1: #7f5a83;
--app-background-2: #0d324d;
--app-icon: #03a9f4;
+ --app-hr: rgba(255, 255, 255, .3);
}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index b18562b1..6222a48e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -44,8 +44,8 @@
"prosemirror-schema-list": "1.3.0",
"prosemirror-state": "1.4.3",
"prosemirror-transform": "1.7.3",
- "prosemirror-view": "1.31.4",
- "sass": "1.63.4",
+ "prosemirror-view": "1.31.5",
+ "sass": "1.63.6",
"short-unique-id": "4.4.4"
},
"devDependencies": {
@@ -59,6 +59,7 @@
"@material/mwc-icon": "0.27.0",
"@material/mwc-icon-button": "0.27.0",
"@material/mwc-list": "0.27.0",
+ "@material/mwc-menu": "0.27.0",
"@material/mwc-select": "0.27.0",
"@material/mwc-slider": "0.27.0",
"@material/mwc-snackbar": "0.27.0",
@@ -87,7 +88,7 @@
"@qortal/rollup-plugin-web-worker-loader": "1.6.4",
"@rollup/plugin-alias": "5.0.0",
"@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-replace": "5.0.2",
"@rollup/plugin-terser": "0.4.3",
@@ -99,7 +100,7 @@
"@vaadin/tooltip": "24.1.1",
"@zip.js/zip.js": "2.7.16",
"axios": "1.4.0",
- "electron": "25.1.1",
+ "electron": "25.2.0",
"electron-builder": "24.4.0",
"electron-packager": "17.1.1",
"epml": "0.3.3",
@@ -3121,9 +3122,9 @@
}
},
"node_modules/@rollup/plugin-commonjs": {
- "version": "25.0.1",
- "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.1.tgz",
- "integrity": "sha512-2DJ4kv4b1xfTJopWhu61ANdNRHvzQZ2fpaIrlgaP2jOfUv1wDJ0Ucqy8AZlbFmn/iUjiwKoqki9j55Y6L8kyNQ==",
+ "version": "25.0.2",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.2.tgz",
+ "integrity": "sha512-NGTwaJxIO0klMs+WSFFtBP7b9TdTJ3K76HZkewT8/+yHzMiUGVQgaPtLQxNVYIgT5F7lxkEyVID+yS3K7bhCow==",
"dev": true,
"dependencies": {
"@rollup/pluginutils": "^5.0.1",
@@ -4851,9 +4852,9 @@
}
},
"node_modules/cacache/node_modules/glob": {
- "version": "10.2.7",
- "resolved": "https://registry.npmjs.org/glob/-/glob-10.2.7.tgz",
- "integrity": "sha512-jTKehsravOJo8IJxUGfZILnkvVJM/MOfHRs8QcXolVef2zNI9Tqyy5+SeuOAZd3upViEZQLyFpQhYiHLrMUNmA==",
+ "version": "10.3.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.0.tgz",
+ "integrity": "sha512-AQ1/SB9HH0yCx1jXAT4vmCbTOPe5RQ+kCurjbel5xSCGhebumUv+GJZfa1rEqor3XIViqwSEmlkZCQD43RWrBg==",
"dev": true,
"dependencies": {
"foreground-child": "^3.1.0",
@@ -4924,9 +4925,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001504",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001504.tgz",
- "integrity": "sha512-5uo7eoOp2mKbWyfMXnGO9rJWOGU8duvzEiYITW+wivukL7yHH4gX9yuRaobu6El4jPxo6jKZfG+N6fB621GD/Q==",
+ "version": "1.0.30001506",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001506.tgz",
+ "integrity": "sha512-6XNEcpygZMCKaufIcgpQNZNf00GEqc7VQON+9Rd0K1bMYo8xhMZRAo5zpbnbMNizi4YNgIDAFrdykWsvY3H4Hw==",
"funding": [
{
"type": "opencollective",
@@ -5743,9 +5744,9 @@
}
},
"node_modules/electron": {
- "version": "25.1.1",
- "resolved": "https://registry.npmjs.org/electron/-/electron-25.1.1.tgz",
- "integrity": "sha512-WvFUfVsJn6YiP35UxdibYVjU2LceastyMm4SVp2bmb4XvKEvItAIiwxgm7tPC5Syl1243aRCvQLqr84sZ71pyQ==",
+ "version": "25.2.0",
+ "resolved": "https://registry.npmjs.org/electron/-/electron-25.2.0.tgz",
+ "integrity": "sha512-I/rhcW2sV2fyiveVSBr2N7v5ZiCtdGY0UiNCDZgk2fpSC+irQjbeh7JT2b4vWmJ2ogOXBjqesrN9XszTIG6DHg==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
@@ -6146,9 +6147,9 @@
}
},
"node_modules/electron-to-chromium": {
- "version": "1.4.433",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.433.tgz",
- "integrity": "sha512-MGO1k0w1RgrfdbLVwmXcDhHHuxCn2qRgR7dYsJvWFKDttvYPx6FNzCGG0c/fBBvzK2LDh3UV7Tt9awnHnvAAUQ=="
+ "version": "1.4.437",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.437.tgz",
+ "integrity": "sha512-ZFekRuBOHUXp21wrR5lshT6pZa/KmjkhKBAtmZz4NN5sCWlHOk3kdhiwFINrDBsRLX6FjyBAb1TRN+KBeNlyzQ=="
},
"node_modules/electron-updater": {
"version": "6.1.1",
@@ -9242,9 +9243,9 @@
}
},
"node_modules/prosemirror-tables": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.3.3.tgz",
- "integrity": "sha512-t10hbu4sNDInic3AQYd8ouPN457zVJIhVDqSdqgsVXNoa1watYXBxqNSVrNQoGOFG4Ivreyp3hQE3KG1f9bSpw==",
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.3.4.tgz",
+ "integrity": "sha512-z6uLSQ1BLC3rgbGwZmpfb+xkdvD7W/UOsURDfognZFYaTtc0gsk7u/t71Yijp2eLflVpffMk6X0u0+u+MMDvIw==",
"dependencies": {
"prosemirror-keymap": "^1.1.2",
"prosemirror-model": "^1.8.1",
@@ -9289,9 +9290,9 @@
}
},
"node_modules/prosemirror-view": {
- "version": "1.31.4",
- "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.31.4.tgz",
- "integrity": "sha512-nJzH2LpYbonSTYFqQ1BUdEhbd1WPN/rp/K9T9qxBEYpgg3jK3BvEUCR45Ymc9IHpO0m3nBJwPm19RBxZdoBVuw==",
+ "version": "1.31.5",
+ "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.31.5.tgz",
+ "integrity": "sha512-tobRCDeCp61elR1d97XE/JTL9FDIfswZpWeNs7GKJjAJvWyMGHWYFCq29850p6bbG2bckP+i9n1vT56RifosbA==",
"dependencies": {
"prosemirror-model": "^1.16.0",
"prosemirror-state": "^1.0.0",
@@ -9810,9 +9811,9 @@
}
},
"node_modules/sass": {
- "version": "1.63.4",
- "resolved": "https://registry.npmjs.org/sass/-/sass-1.63.4.tgz",
- "integrity": "sha512-Sx/+weUmK+oiIlI+9sdD0wZHsqpbgQg8wSwSnGBjwb5GwqFhYNwwnI+UWZtLjKvKyFlKkatRK235qQ3mokyPoQ==",
+ "version": "1.63.6",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.63.6.tgz",
+ "integrity": "sha512-MJuxGMHzaOW7ipp+1KdELtqKbfAWbH7OLIdoSMnVe3EXPMTmxTmlaZDCTsgIpPCs3w99lLo9/zDKkOrJuT5byw==",
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0",
diff --git a/package.json b/package.json
index 6c3ff088..e4084c0f 100644
--- a/package.json
+++ b/package.json
@@ -54,8 +54,8 @@
"prosemirror-schema-list": "1.3.0",
"prosemirror-state": "1.4.3",
"prosemirror-transform": "1.7.3",
- "prosemirror-view": "1.31.4",
- "sass": "1.63.4",
+ "prosemirror-view": "1.31.5",
+ "sass": "1.63.6",
"short-unique-id": "4.4.4",
"@hapi/hapi": "21.3.2",
"@hapi/inert": "7.1.0",
@@ -71,7 +71,7 @@
},
"devDependencies": {
"axios": "1.4.0",
- "electron": "25.1.1",
+ "electron": "25.2.0",
"electron-builder": "24.4.0",
"electron-packager": "17.1.1",
"epml": "0.3.3",
@@ -100,6 +100,7 @@
"@material/mwc-icon": "0.27.0",
"@material/mwc-icon-button": "0.27.0",
"@material/mwc-list": "0.27.0",
+ "@material/mwc-menu": "0.27.0",
"@material/mwc-select": "0.27.0",
"@material/mwc-slider": "0.27.0",
"@material/mwc-snackbar": "0.27.0",
@@ -128,7 +129,7 @@
"@qortal/rollup-plugin-web-worker-loader": "1.6.4",
"@rollup/plugin-alias": "5.0.0",
"@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-replace": "5.0.2",
"@rollup/plugin-terser": "0.4.3",
diff --git a/plugins/plugins/core/main.src.js b/plugins/plugins/core/main.src.js
index c631fbed..884b949c 100644
--- a/plugins/plugins/core/main.src.js
+++ b/plugins/plugins/core/main.src.js
@@ -7,6 +7,17 @@ let haveRegisteredNodeManagement = false;
parentEpml.ready().then(() => {
// 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',
domain: 'core',
@@ -14,6 +25,7 @@ parentEpml.ready().then(() => {
title: 'Minting Details',
icon: 'vaadin:info-circle',
mwcicon: 'info_outline',
+ pluginNumber: 'plugin-iqKYTJzlcM',
menus: [],
parent: false,
},
@@ -24,6 +36,7 @@ parentEpml.ready().then(() => {
title: 'Become a Minter',
icon: 'vaadin:thumbs-up',
mwcicon: 'thumb_up',
+ pluginNumber: 'plugin-dVbRYnJNTs',
menus: [],
parent: false,
},
@@ -34,6 +47,7 @@ parentEpml.ready().then(() => {
title: 'Sponsorship List',
icon: 'vaadin:list-ol',
mwcicon: 'format_list_numbered',
+ pluginNumber: 'plugin-YxcLlHkgBl',
menus: [],
parent: false,
},
@@ -44,6 +58,7 @@ parentEpml.ready().then(() => {
title: 'Wallets',
icon: 'vaadin:wallet',
mwcicon: 'account_balance_wallet',
+ pluginNumber: 'plugin-kyhKaCIAZH',
menus: [],
parent: false,
},
@@ -54,6 +69,7 @@ parentEpml.ready().then(() => {
title: 'Trade Portal',
icon: 'vaadin:bullets',
mwcicon: 'format_list_bulleted',
+ pluginNumber: 'plugin-zJoESuTpMG',
menus: [],
parent: false,
},
@@ -64,6 +80,7 @@ parentEpml.ready().then(() => {
title: 'Auto Buy',
icon: 'vaadin:calc-book',
mwcicon: 'shop',
+ pluginNumber: 'plugin-mwPkCdVHsb',
menus: [],
parent: false,
},
@@ -74,6 +91,7 @@ parentEpml.ready().then(() => {
title: 'Reward Share',
icon: 'vaadin:share-square',
mwcicon: 'ios_share',
+ pluginNumber: 'plugin-PWZGtSxbPX',
menus: [],
parent: false,
},
@@ -84,6 +102,7 @@ parentEpml.ready().then(() => {
title: 'Q-Chat',
icon: 'vaadin:chat',
mwcicon: 'forum',
+ pluginNumber: 'plugin-qhsyOnpRhT',
menus: [],
parent: false,
},
@@ -94,6 +113,7 @@ parentEpml.ready().then(() => {
title: 'Name Registration',
icon: 'vaadin:user-check',
mwcicon: 'manage_accounts',
+ pluginNumber: 'plugin-qCmtXAQmtu',
menus: [],
parent: false,
},
@@ -104,6 +124,7 @@ parentEpml.ready().then(() => {
title: 'Names Market',
icon: 'vaadin:shop',
mwcicon: 'store',
+ pluginNumber: 'plugin-VVPhpHMnKM',
menus: [],
parent: false,
},
@@ -114,6 +135,7 @@ parentEpml.ready().then(() => {
title: 'Websites',
icon: 'vaadin:desktop',
mwcicon: 'desktop_mac',
+ pluginNumber: 'plugin-shITeUVkLG',
menus: [],
parent: false,
},
@@ -123,7 +145,8 @@ parentEpml.ready().then(() => {
page: 'q-app/index.html',
title: 'Q-Apps',
icon: 'vaadin:external-browser',
- mwcicon: 'open_in_browser',
+ mwcicon: 'apps',
+ pluginNumber: 'plugin-MpiMASnQsT',
menus: [],
parent: false,
},
@@ -134,6 +157,7 @@ parentEpml.ready().then(() => {
title: 'Group Management',
icon: 'vaadin:group',
mwcicon: 'group',
+ pluginNumber: 'plugin-fJZNpyLGTl',
menus: [],
parent: false,
},
@@ -144,6 +168,7 @@ parentEpml.ready().then(() => {
title: 'Data Management',
icon: 'vaadin:database',
mwcicon: 'storage',
+ pluginNumber: 'plugin-QtaXNXHvRg',
menus: [],
parent: false,
},
@@ -154,6 +179,7 @@ parentEpml.ready().then(() => {
title: 'Puzzles',
icon: 'vaadin:puzzle-piece',
mwcicon: 'extension',
+ pluginNumber: 'plugin-wCGRmXRxht',
menus: [],
parent: false,
},
@@ -182,6 +208,7 @@ parentEpml.ready().then(() => {
title: 'Node Management',
icon: 'vaadin:cloud',
mwcicon: 'cloud',
+ pluginNumber: 'plugin-TGAunWeWLU',
menus: [],
parent: false,
};
diff --git a/plugins/plugins/core/overview-page/index.html b/plugins/plugins/core/overview-page/index.html
new file mode 100644
index 00000000..c9923b7e
--- /dev/null
+++ b/plugins/plugins/core/overview-page/index.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/plugins/core/overview-page/overview-page.src.js b/plugins/plugins/core/overview-page/overview-page.src.js
new file mode 100644
index 00000000..d0f95ecd
--- /dev/null
+++ b/plugins/plugins/core/overview-page/overview-page.src.js
@@ -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`
+
+
+
+
+
+
+
+
+ ${this.getAvatar()}
+
+
+
+
+
+
+
${this.accountInfo.names.length !== 0 ? this.accountInfo.names[0].name : ''}
+
+ ${this.accountInfo.addressInfo.address}
+
+
+ ${translate("explorerpage.exp2")}: ${this.myBalance} QORT
+
+
+
+
+
+
+ ${this.accountInfo.addressInfo.blocksMinted + this.accountInfo.addressInfo.blocksMintedAdjustment}
+ ${translate("walletprofile.blocksminted")}
+
+
+
+
+
+
+
${translate("walletprofile.wp3")}
+
+
+
+
+ ${this.coreInfo.buildVersion ? this.coreInfo.buildVersion : ''}
+ ${translate("appinfo.coreversion")}
+
+
+ ${this.nodeInfo.height ? this.nodeInfo.height : ''}
+ ${translate("appinfo.blockheight")}
+
+
+ ${this.nodeInfo.numberOfConnections ? this.nodeInfo.numberOfConnections : ''}
+ ${translate("appinfo.peers")}
+
+
+ ${this.renderSyncStatus()}
+ ${translate("walletpage.wchange41")}
+
+
+
+
+
+
+ ${translate("appinfo.uiversion")}: ${this.nodeConfig.version ? this.nodeConfig.version : ''}
+
+
+
+
+
+
+
+ `
+ }
+
+ 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`${translate("walletprofile.wp1")}`
+ } else if (this.nodeInfo.isMintingPossible === true && this.nodeInfo.isSynchronizing === false) {
+ this.cssStatus = ''
+ return html`${translate("walletprofile.wp1")}`
+ } else if (this.nodeInfo.isMintingPossible === false) {
+ return html``
+ }
+ }
+
+ 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`
`
+ } 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`
`
+ }
+ }
+
+ 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`
+
+ {
+ await startMinting()
+ if (this.errorMsg) {
+ parentEpml.request('showSnackBar', `${this.errorMsg}`)
+ }
+ }}
+ >
+
+
+
+
+
+ ${this.openDialogRewardShare ? html`
+
+
+
+
+
+ -
+
+ 1. ${translate("startminting.smchange5")}
+
+
+
+
+ -
+
+ 2. ${translate("startminting.smchange6")}
+
+
+
+
+ -
+
+ 3. ${translate("startminting.smchange7")}
+
+
+
${asyncReplace(this.timer)}
+
+
+
+ -
+
+ 4. ${translate("startminting.smchange8")}
+
+
+
+
+ -
+
+ 5. ${translate("startminting.smchange9")}
+
+
+
+
+
+ Warning: do not close the Qortal UI until completion!
+
+
${this.errorMsg}
+
+
+
+
+
+
+ ` : ""}
+ ` : ''}
+ `;
+ }
+}
+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`
+
+ ${this.isLoading === false
+ ? html`${this.label}`
+ : html``}
+
+ `;
+ }
+}
+customElements.define('my-button', MyButton)
\ No newline at end of file