- ${(!this.isReceipient && +this._chatId !== 0) ? html`
+
+ ${(!this.isReceipient && +this._chatId !== 0) ?
+ html`
-
-
${this.groupInfo && this.groupInfo.groupName}
-
-
-
-
-
-
-
+
+
${this.groupInfo && this.groupInfo.groupName}
+
+
+
+
+
+
+
- ` : html`
`}
+ ` : null}
${this.isLoadingMessages ?
@@ -1145,7 +1141,17 @@ class ChatPage extends LitElement {
- this.getMoreMembers(val)} .toggle=${(val)=> this._toggle(val)} .selectedAddress=${this.selectedAddress} .groupMembers=${this.groupMembers} .groupAdmin=${this.groupAdmin} .leaveGroupObj=${this.groupInfo}>
+ this.getMoreMembers(val)}
+ .toggle=${(val)=> this._toggle(val)}
+ .selectedAddress=${this.selectedAddress}
+ .groupMembers=${this.groupMembers}
+ .groupAdmin=${this.groupAdmin}
+ .leaveGroupObj=${this.groupInfo}
+ .setOpenPrivateMessage=${(val) => this.setOpenPrivateMessage(val)}
+ .chatEditor=${this.chatEditor}
+ >
+
diff --git a/qortal-ui-plugins/plugins/core/components/ChatRightPanel.js b/qortal-ui-plugins/plugins/core/components/ChatRightPanel.js
index 2366400e..001bd0f3 100644
--- a/qortal-ui-plugins/plugins/core/components/ChatRightPanel.js
+++ b/qortal-ui-plugins/plugins/core/components/ChatRightPanel.js
@@ -2,6 +2,7 @@ import { LitElement, html, css } from "lit"
import { render } from "lit/html.js"
import { get, translate } from "lit-translate"
import { Epml } from "../../../epml"
+import { getUserNameFromAddress } from "../../utils/getUserNameFromAddress"
import snackbar from "./snackbar.js"
import "@material/mwc-button"
import "@material/mwc-dialog"
@@ -15,7 +16,7 @@ class ChatRightPanel extends LitElement {
static get properties() {
return {
isLoading: { type: Boolean },
- isOpenLeaveModal: { type: Boolean },
+ openUserInfo: { type: Boolean },
leaveGroupObj: { type: Object },
error: { type: Boolean },
message: { type: String },
@@ -24,14 +25,18 @@ class ChatRightPanel extends LitElement {
groupMembers: { attribute: false },
selectedHead: { type: Object },
toggle: { attribute: false },
- getMoreMembers:{ attribute: false }
+ getMoreMembers:{ attribute: false },
+ setOpenPrivateMessage: { attribute: false },
+ openTipUser: { type: Boolean },
+ userName: { type: String },
+ chatEditor: { type: Object }
}
}
constructor() {
super()
this.isLoading = false
- this.isOpenLeaveModal = false
+ this.openUserInfo = false
this.leaveGroupObj = {}
this.leaveFee = 0.001
this.error = false
@@ -42,144 +47,242 @@ class ChatRightPanel extends LitElement {
this.observerHandler = this.observerHandler.bind(this)
this.viewElement = ''
this.downObserverElement = ''
+ this.myAddress = window.parent.reduxStore.getState().app.selectedAddress.address
+ this.openTipUser = false
+ this.userName = {}
}
-static get styles() {
-return css`
- .top-bar-icon {
+ static get styles() {
+ return css`
+ .top-bar-icon {
+ cursor: pointer;
+ height: 18px;
+ width: 18px;
+ transition: 0.2s all;
+ }
+
+ .top-bar-icon:hover {
+ color: var(--black);
+ }
+
+ .modal-button {
+ font-family: Roboto, sans-serif;
+ font-size: 16px;
+ color: var(--mdc-theme-primary);
+ background-color: transparent;
+ padding: 8px 10px;
+ border-radius: 5px;
+ border: none;
+ transition: all 0.3s ease-in-out;
+ }
+
+ .close-row {
+ width: 100%;
+ display: flex;
+ justify-content: flex-end;
+ height: 50px;
+ flex:0
+
+ }
+
+ .container-body {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ flex-grow: 1;
+ overflow:auto;
+ margin-top: 5px;
+ padding: 0px 6px;
+ box-sizing: border-box;
+ }
+
+ .container-body::-webkit-scrollbar-track {
+ background-color: whitesmoke;
+ border-radius: 7px;
+ }
+
+ .container-body::-webkit-scrollbar {
+ width: 6px;
+ border-radius: 7px;
+ background-color: whitesmoke;
+ }
+
+ .container-body::-webkit-scrollbar-thumb {
+ background-color: rgb(180, 176, 176);
+ border-radius: 7px;
+ transition: all 0.3s ease-in-out;
+ }
+
+ .container-body::-webkit-scrollbar-thumb:hover {
+ background-color: rgb(148, 146, 146);
+ cursor: pointer;
+ }
+
+ p {
+ color: var(--black);
+ margin: 0px;
+ padding: 0px;
+ word-break: break-all;
+ }
+
+ .container {
+ display: flex;
+ width: 100%;
+ flex-direction: column;
+ height: 100%;
+ }
+
+ .chat-right-panel-label {
+ font-family: Montserrat, sans-serif;
+ color: var(--group-header);
+ padding: 5px;
+ font-size: 13px;
+ user-select: none;
+ }
+
+ .group-info {
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ gap: 10px;
+ }
+
+ .group-name {
+ font-family: Raleway, sans-serif;
+ font-size: 20px;
+ color: var(--chat-bubble-msg-color);
+ text-align: center;
+ user-select: none;
+ }
+
+ .group-description {
+ font-family: Roboto, sans-serif;
+ color: var(--chat-bubble-msg-color);
+ letter-spacing: 0.3px;
+ font-weight: 300;
+ font-size: 14px;
+ margin-top: 15px;
+ word-break: break-word;
+ user-select: none;
+ }
+
+ .group-subheader {
+ font-family: Montserrat, sans-serif;
+ font-size: 14px;
+ color: var(--chat-bubble-msg-color);
+ }
+
+ .group-data {
+ font-family: Roboto, sans-serif;
+ letter-spacing: 0.3px;
+ font-weight: 300;
+ font-size: 14px;
+ color: var(--chat-bubble-msg-color);
+ }
+
+ .user-info-header {
+ font-family: Montserrat, sans-serif;
+ text-align: center;
+ font-size: 25px;
+ color: var(--chat-bubble-msg-color);
+ margin-bottom: 10px;
+ padding: 10px 0;
+ user-select: none;
+ }
+
+ .send-message-button {
+ font-family: Roboto, sans-serif;
+ letter-spacing: 0.3px;
+ font-weight: 300;
+ padding: 8px 5px;
+ border-radius: 3px;
+ text-align: center;
+ color: var(--mdc-theme-primary);
+ transition: all 0.3s ease-in-out;
+ }
+
+ .send-message-button:hover {
cursor: pointer;
- height: 18px;
- width: 18px;
- transition: 0.2s all;
- }
+ background-color: #03a8f485;
+ }
- .top-bar-icon:hover {
- color: var(--black);
- }
+ .close-icon {
+ position: absolute;
+ top: 3px;
+ right: 5px;
+ color: #676b71;
+ width: 14px;
+ transition: all 0.1s ease-in-out;
+ }
- .modal-button {
- font-family: Roboto, sans-serif;
- font-size: 16px;
- color: var(--mdc-theme-primary);
- background-color: transparent;
- padding: 8px 10px;
- border-radius: 5px;
- border: none;
- transition: all 0.3s ease-in-out;
- }
+ .close-icon:hover {
+ cursor: pointer;
+ color: #494c50;
+ }
- .close-row {
- width: 100%;
- display: flex;
- justify-content: flex-end;
- height: 50px;
- flex:0
+ .tip-user-header {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ padding: 12px;
+ border-bottom: 1px solid whitesmoke;
+ gap: 25px;
+ }
- }
+ .tip-user-header-font {
+ font-family: Montserrat, sans-serif;
+ font-size: 20px;
+ color: var(--chat-bubble-msg-color);
+ }
- .container-body {
- width: 100%;
- display: flex;
- flex-direction: column;
- flex-grow: 1;
- overflow:auto;
- margin-top: 5px;
- padding: 0px 6px;
- box-sizing: border-box;
- }
+ .tip-user-body {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ padding: 15px 10px;
+ }
- .container-body::-webkit-scrollbar-track {
- background-color: whitesmoke;
- border-radius: 7px;
- }
-
- .container-body::-webkit-scrollbar {
- width: 6px;
- border-radius: 7px;
- background-color: whitesmoke;
- }
-
- .container-body::-webkit-scrollbar-thumb {
- background-color: rgb(180, 176, 176);
- border-radius: 7px;
- transition: all 0.3s ease-in-out;
- }
+ .tip-input {
+ width: 300px;
+ margin-bottom: 15px;
+ outline: 0;
+ border-width: 0 0 2px;
+ border-color: var(--mdc-theme-primary);
+ background-color: transparent;
+ padding: 10px;
+ font-family: Roboto, sans-serif;
+ font-size: 15px;
+ color: var(--chat-bubble-msg-color);
+ }
- .container-body::-webkit-scrollbar-thumb:hover {
- background-color: rgb(148, 146, 146);
- cursor: pointer;
- }
+ .tip-input::selection {
+ background-color: var(--mdc-theme-primary);
+ color: white;
+ }
- p {
- color: var(--black);
- margin: 0px;
- padding: 0px;
- word-break: break-all;
- }
+ .tip-input::placeholder {
+ opacity: 0.9;
+ color: var(--black);
+ }
- .container {
- display: flex;
- width: 100%;
- flex-direction: column;
- height: 100%;
+ `
}
- .chat-right-panel-label {
- font-family: Montserrat, sans-serif;
- color: var(--group-header);
- padding: 5px;
- font-size: 13px;
- user-select: none;
- }
-
- .group-info {
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
- gap: 10px;
- }
-
- .group-name {
- font-family: Raleway, sans-serif;
- font-size: 20px;
- color: var(--chat-bubble-msg-color);
- text-align: center;
- user-select: none;
- }
-
- .group-description {
- font-family: Roboto, sans-serif;
- color: var(--chat-bubble-msg-color);
- letter-spacing: 0.3px;
- font-weight: 300;
- font-size: 14px;
- margin-top: 15px;
- word-break: break-word;
- user-select: none;
- }
-
- .group-subheader {
- font-family: Montserrat, sans-serif;
- font-size: 14px;
- color: var(--chat-bubble-msg-color);
- }
-
- .group-data {
- font-family: Roboto, sans-serif;
- letter-spacing: 0.3px;
- font-weight: 300;
- font-size: 14px;
- color: var(--chat-bubble-msg-color);
- }
-`
-}
-
firstUpdated() {
this.viewElement = this.shadowRoot.getElementById('viewElement');
this.downObserverElement = this.shadowRoot.getElementById('downObserver');
this.elementObserver();
}
+ async updated(changedProperties) {
+ if (changedProperties && changedProperties.has('selectedHead')) {
+ if (this.selectedHead !== {}) {
+ const userName = await getUserNameFromAddress(this.selectedHead.address);
+ this.userName = userName;
+ }
+ }
+ }
+
timeIsoString(timestamp) {
let myTimestamp = timestamp === undefined ? 1587560082346 : timestamp
let time = new Date(myTimestamp)
@@ -212,7 +315,7 @@ return css`
if (myRef && myRef.type) {
clearInterval(interval)
this.isLoading = false
- this.isOpenLeaveModal = false
+ this.openUserInfo = false
}
} catch (error) {}
stop = false
@@ -437,106 +540,143 @@ return css`
}
render() {
console.log('this.groupMembers', this.groupMembers);
- console.log(5, "Chat Right Panel Here");
+ console.log(18, "Chat Right Panel Here");
const owner = this.groupAdmin.filter((admin)=> admin.address === this.leaveGroupObj.owner)
return html`
-
- this.toggle(false)} style="margin: 0px 10px" icon="vaadin:close" slot="icon">
-
-
-
${this.leaveGroupObj && this.leaveGroupObj.groupName}
-
-
${this.leaveGroupObj && this.leaveGroupObj.description}
-
-
-
+
+ this.toggle(false)} style="margin: 0px 10px" icon="vaadin:close" slot="icon">
+
+
+
${this.leaveGroupObj && this.leaveGroupObj.groupName}
+
+
${this.leaveGroupObj && this.leaveGroupObj.description}
+
+
+
+
+
+
GROUP OWNER
+ ${owner.map((item) => {
+ return html`
{
+ if (val.address === this.myAddress) return;
+ console.log({ val });
+ this.selectedHead = val;
+ this.openUserInfo = true;
+ }}
+ chatInfo=${JSON.stringify(item)}
+ > `
+ })}
+
ADMINS
+ ${this.groupAdmin.map((item) => {
+ return html`
{
+ if (val.address === this.myAddress) return;
+ console.log({ val });
+ this.selectedHead = val;
+ this.openUserInfo = true;
+ }}
+ chatInfo=${JSON.stringify(item)}
+ > `
+ })}
+
MEMBERS
+ ${this.groupMembers.map((item) => {
+ return html`
{
+ if (val.address === this.myAddress) return;
+ console.log({ val });
+ this.selectedHead = val;
+ this.openUserInfo = true;
+ }}
+ chatInfo=${JSON.stringify(item)}
+ > `
+ })}
+
-
-
GROUP OWNER
- ${owner.map((item) => {
- return html`
{}}
- chatInfo=${JSON.stringify(item)}
- > `
- })}
-
ADMINS
- ${this.groupAdmin.map((item) => {
- return html`
{}}
- chatInfo=${JSON.stringify(item)}
- > `
- })}
-
MEMBERS
- ${this.groupMembers.map((item) => {
- return html`
{
- console.log({ val })
- this.selectedHead = val
- this.isOpenLeaveModal = true
- }}
- chatInfo=${JSON.stringify(item)}
- > `
- })}
-
-
{
- if (this.isLoading) return
- this.isOpenLeaveModal = false
- }}
- style=${
- this.isOpenLeaveModal ? "display: block" : "display: none"
- }>
-
-
${translate("grouppage.gchange35")}
-
-
-
-
- this._addAdmin(
- this.leaveGroupObj.groupId
- )}>Promote to Admin
-
- this._removeAdmin(
- this.leaveGroupObj.groupId
- )}>Remove as Admin
-
-
-
- ${translate("grouppage.gchange36")}
-
-
-
-
- ${this.message}
-
-
-
-
- {
+ if (this.isLoading) return
+ this.openUserInfo = false
+ }}
+ style=${
+ this.openUserInfo ? "display: block" : "display: none"
+ }>
+
+
{
+ this.openUserInfo = false
+ }}
+ ?disabled="${this.isLoading}">
+
+
+
{
+ this.setOpenPrivateMessage({
+ name: this.userName,
+ open: true
+ })
+ this.openUserInfo = false
+ }
+ }">
+ ${translate("grouppage.gchange56")}
+
+
{
- this.isOpenLeaveModal = false
- }}
- class="modal-button"
- ?disabled="${this.isLoading}"
-
- >
- ${translate("general.close")}
-
-
+ this.openTipUser = true
+ this.openUserInfo = false
+ this.chatEditor.disable();
+ }}>
+ ${translate("grouppage.gchange57")}
+
+
+
+
+ ${translate("grouppage.gchange36")}
+
+
+
+
+ ${this.message}
+
+
+
+
{
+ this.openTipUser = false;
+ this.chatEditor.enable();
+ }}
+ style=${this.openTipUser ? "display: block" : "display: none"}>
+
+
+
${translate("grouppage.gchange59")}
+
+
+
+
+
`
}
}
diff --git a/qortal-ui-plugins/plugins/utils/getUserNameFromAddress.js b/qortal-ui-plugins/plugins/utils/getUserNameFromAddress.js
new file mode 100644
index 00000000..ded1de96
--- /dev/null
+++ b/qortal-ui-plugins/plugins/utils/getUserNameFromAddress.js
@@ -0,0 +1,20 @@
+import { Epml } from '../../epml.js';
+
+const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
+
+export const getUserNameFromAddress = async (address) => {
+ try {
+ const getNames = await parentEpml.request("apiCall", {
+ type: "api",
+ url: `/names/address/${address}`,
+ });
+
+ if (Array.isArray(getNames) && getNames.length > 0 ) {
+ return getNames[0].name;
+ } else {
+ return address;
+ }
+ } catch (error) {
+ console.error(error);
+ }
+}
\ No newline at end of file
From b58d3f90a91500889b60d5853a4375ca2366cec7 Mon Sep 17 00:00:00 2001
From: Justin Ferrari <‘justinwesleyferrari@gmail.com’>
Date: Wed, 4 Jan 2023 13:46:19 -0500
Subject: [PATCH 02/19] Continued styling of the tip user
---
qortal-ui-core/language/us.json | 3 +-
.../plugins/core/components/ChatRightPanel.js | 37 ++++++++++++++++---
.../plugins/utils/getUserNameFromAddress.js | 3 +-
3 files changed, 35 insertions(+), 8 deletions(-)
diff --git a/qortal-ui-core/language/us.json b/qortal-ui-core/language/us.json
index c8fa70b4..607af4d0 100644
--- a/qortal-ui-core/language/us.json
+++ b/qortal-ui-core/language/us.json
@@ -589,7 +589,8 @@
"gchange56": "SEND MESSAGE",
"gchange57": "TIP USER",
"gchange58": "Tip Amount",
- "gchange59": "Available Balance"
+ "gchange59": "Available Balance",
+ "gchange60": "Failed to Fetch QORT Balance. Try again!"
},
"puzzlepage": {
"pchange1": "Puzzles",
diff --git a/qortal-ui-plugins/plugins/core/components/ChatRightPanel.js b/qortal-ui-plugins/plugins/core/components/ChatRightPanel.js
index 001bd0f3..4ba79ba6 100644
--- a/qortal-ui-plugins/plugins/core/components/ChatRightPanel.js
+++ b/qortal-ui-plugins/plugins/core/components/ChatRightPanel.js
@@ -29,7 +29,8 @@ class ChatRightPanel extends LitElement {
setOpenPrivateMessage: { attribute: false },
openTipUser: { type: Boolean },
userName: { type: String },
- chatEditor: { type: Object }
+ chatEditor: { type: Object },
+ walletBalance: { type: Number }
}
}
@@ -237,9 +238,11 @@ class ChatRightPanel extends LitElement {
.tip-user-body {
display: flex;
- justify-content: flex-start;
- align-items: center;
- padding: 15px 10px;
+ justify-content: center;
+ align-items: flex-start;
+ padding: 20px 10px;
+ flex-direction: column;
+ gap: 15px;
}
.tip-input {
@@ -272,6 +275,7 @@ class ChatRightPanel extends LitElement {
this.viewElement = this.shadowRoot.getElementById('viewElement');
this.downObserverElement = this.shadowRoot.getElementById('downObserver');
this.elementObserver();
+ this.fetchWalletDetails();
}
async updated(changedProperties) {
@@ -538,9 +542,30 @@ class ChatRightPanel extends LitElement {
this.getMoreMembers(this.leaveGroupObj.groupId)
}
}
+
+ getApiKey() {
+ const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node];
+ let apiKey = myNode.apiKey;
+ return apiKey;
+ }
+
+ async fetchWalletDetails() {
+ parentEpml.request('apiCall', {
+ url: `/addresses/balance/${this.myAddress}?apiKey=${this.getApiKey()}`,
+ })
+ .then((res) => {
+ if (isNaN(Number(res))) {
+ let snack4string = get("grouppage.gchange60")
+ parentEpml.request('showSnackBar', `${snack4string}`)
+ } else {
+ this.walletBalance = Number(res).toFixed(8);
+ }
+ })
+ }
+
render() {
console.log('this.groupMembers', this.groupMembers);
- console.log(18, "Chat Right Panel Here");
+ console.log(20, "Chat Right Panel Here");
const owner = this.groupAdmin.filter((admin)=> admin.address === this.leaveGroupObj.owner)
return html`
@@ -671,7 +696,7 @@ class ChatRightPanel extends LitElement {
-
${translate("grouppage.gchange59")}
+
${translate("grouppage.gchange59")}: ${this.walletBalance} QORT
diff --git a/qortal-ui-plugins/plugins/utils/getUserNameFromAddress.js b/qortal-ui-plugins/plugins/utils/getUserNameFromAddress.js
index ded1de96..f8f02a53 100644
--- a/qortal-ui-plugins/plugins/utils/getUserNameFromAddress.js
+++ b/qortal-ui-plugins/plugins/utils/getUserNameFromAddress.js
@@ -1,4 +1,5 @@
import { Epml } from '../../epml.js';
+import { cropAddress } from './cropAddress.js';
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@@ -12,7 +13,7 @@ export const getUserNameFromAddress = async (address) => {
if (Array.isArray(getNames) && getNames.length > 0 ) {
return getNames[0].name;
} else {
- return address;
+ return cropAddress(address);
}
} catch (error) {
console.error(error);
From 811957d900684f13853c766b216a398745c47a28 Mon Sep 17 00:00:00 2001
From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com>
Date: Thu, 5 Jan 2023 16:06:57 +0100
Subject: [PATCH 03/19] Add join requests actions
---
qortal-ui-core/language/de.json | 11 +-
qortal-ui-core/language/es.json | 11 +-
qortal-ui-core/language/fr.json | 11 +-
qortal-ui-core/language/hindi.json | 13 +-
qortal-ui-core/language/hr.json | 13 +-
qortal-ui-core/language/hu.json | 11 +-
qortal-ui-core/language/it.json | 11 +-
qortal-ui-core/language/ko.json | 11 +-
qortal-ui-core/language/no.json | 11 +-
qortal-ui-core/language/pl.json | 13 +-
qortal-ui-core/language/pt.json | 11 +-
qortal-ui-core/language/ro.json | 11 +-
qortal-ui-core/language/rs.json | 11 +-
qortal-ui-core/language/ru.json | 11 +-
qortal-ui-core/language/us.json | 11 +-
qortal-ui-core/language/zhc.json | 11 +-
qortal-ui-core/language/zht.json | 11 +-
.../group-management/group-management.src.js | 348 ++++++++++++++++++
18 files changed, 521 insertions(+), 20 deletions(-)
diff --git a/qortal-ui-core/language/de.json b/qortal-ui-core/language/de.json
index e197a97e..f10ddfe7 100644
--- a/qortal-ui-core/language/de.json
+++ b/qortal-ui-core/language/de.json
@@ -799,6 +799,15 @@
"mg49":"Beim Drücken auf Bestätigen wird die Anfrage zum Abbrechen der Einladung gesendet!",
"mg50":"Kommt bald...",
"mg51":"Minimum 3 Zeichen / Maximum 32 Zeichen",
- "mg52":"Maximal 128 Zeichen"
+ "mg52":"Maximal 128 Zeichen",
+ "mg53":"Ihre offenen Beitrittsanfragen",
+ "mg54":"Keine offenen Beitrittsanfragen",
+ "mg55":"Sind Sie sicher, dass Sie die Beitrittsanfrage von diesem Mitglied annehmen werden?",
+ "mg56":"Beim Drücken von Bestätigen wird die Beitrittsanfrage gesendet!",
+ "mg57":"Beitrittsanfrage erfolgreich angenommen",
+ "mg58":"ETWAS GING FALSCH",
+ "mg59":"Beitrittsanfrage abbrechen erfolgreich akzeptiert",
+ "mg60":"Sind Sie sicher, dass Sie die Beitrittsanfrage dieses Mitglieds abbrechen möchten?",
+ "mg61":"Beim Drücken auf Bestätigen wird die Anfrage zum Abbrechen des Beitritts gesendet!"
}
}
diff --git a/qortal-ui-core/language/es.json b/qortal-ui-core/language/es.json
index 0312fa3f..4ae55367 100644
--- a/qortal-ui-core/language/es.json
+++ b/qortal-ui-core/language/es.json
@@ -799,6 +799,15 @@
"mg49":"¡Al presionar confirmar, se enviará la solicitud de cancelación de invitación!",
"mg50":"Próximamente...",
"mg51":"Mínimo 3 Caracteres / Máximo 32 Caracteres",
- "mg52":"Máximo de 128 caracteres"
+ "mg52":"Máximo de 128 caracteres",
+ "mg53":"Tus solicitudes abiertas de unión",
+ "mg54":"Sin solicitudes de unión abiertas",
+ "mg55":"¿Está seguro de aceptar la solicitud de ingreso de este miembro?",
+ "mg56":"¡Al presionar confirmar, se enviará la solicitud de aceptación de ingreso!",
+ "mg57":"Solicitud de ingreso aceptada con éxito",
+ "mg58":"ALGO SALIO MAL",
+ "mg59":"Solicitud de cancelación de unión aceptada con éxito",
+ "mg60":"¿Está seguro de cancelar la solicitud de ingreso de este miembro?",
+ "mg61":"¡Al presionar confirmar, se enviará la solicitud de cancelación de unión!"
}
}
diff --git a/qortal-ui-core/language/fr.json b/qortal-ui-core/language/fr.json
index d677edd0..03b21617 100644
--- a/qortal-ui-core/language/fr.json
+++ b/qortal-ui-core/language/fr.json
@@ -799,6 +799,15 @@
"mg49":"En appuyant sur confirmer, la demande d'annulation d'invitation sera envoyée !",
"mg50":"Bientôt disponible...",
"mg51":"Minimum 3 caractères / Maximum 32 caractères",
- "mg52":"Maximum 128 caractères"
+ "mg52":"Maximum 128 caractères",
+ "mg53":"Vos demandes d'ouverture de jointure",
+ "mg54":"Aucune demande de jointure ouverte",
+ "mg55":"Êtes-vous sûr d'accepter la demande d'adhésion de ce membre ?",
+ "mg56":"En appuyant sur confirmer, la demande d'adhésion acceptée sera envoyée !",
+ "mg57":"Demande d'adhésion acceptée avec succès",
+ "mg58":"QUELQUE CHOSE S'EST TROMPÉ",
+ "mg59":"Annuler la demande d'adhésion acceptée avec succès",
+ "mg60":"Êtes-vous sûr d'annuler la demande d'adhésion de ce membre ?",
+ "mg61":"En appuyant sur confirmer, la demande d'annulation de l'adhésion sera envoyée !"
}
}
diff --git a/qortal-ui-core/language/hindi.json b/qortal-ui-core/language/hindi.json
index a35856f4..02479e0f 100644
--- a/qortal-ui-core/language/hindi.json
+++ b/qortal-ui-core/language/hindi.json
@@ -799,7 +799,16 @@
"mg48":"क्या आप वाकई इस सदस्य के लिए आमंत्रण रद्द करना चाहते हैं?",
"mg49":"पुष्टि करें दबाने पर, रद्द आमंत्रण अनुरोध भेजा जाएगा!",
"mg50":"जल्द ही आ रहा है ...",
- "mg51": "न्यूनतम 3 वर्ण / अधिकतम 32 वर्ण",
- "mg52": "अधिकतम 128 वर्ण"
+ "mg51":"न्यूनतम 3 वर्ण / अधिकतम 32 वर्ण",
+ "mg52":"अधिकतम 128 वर्ण",
+ "mg53":"आपका खुला शामिल होने का अनुरोध",
+ "mg54":"नो ओपन जॉइन रिक्वेस्ट",
+ "mg55":"क्या आप निश्चित रूप से इस सदस्य के शामिल होने के अनुरोध को स्वीकार करना चाहते हैं?",
+ "mg56":"पुष्टि करें दबाने पर, स्वीकार करने का अनुरोध भेजा जाएगा!",
+ "mg57":"जुड़ने का अनुरोध सफलतापूर्वक स्वीकार किया गया",
+ "mg58":"कुछ गलत हो गया",
+ "mg59":"रद्द करें शामिल होने का अनुरोध सफलतापूर्वक स्वीकार किया गया",
+ "mg60":"क्या आप निश्चित रूप से इस सदस्य के शामिल होने के अनुरोध को रद्द करना चाहते हैं?",
+ "mg61":"पुष्टि करें दबाने पर, रद्द करने का अनुरोध भेजा जाएगा!"
}
}
diff --git a/qortal-ui-core/language/hr.json b/qortal-ui-core/language/hr.json
index 8478c342..dc066af8 100644
--- a/qortal-ui-core/language/hr.json
+++ b/qortal-ui-core/language/hr.json
@@ -798,7 +798,16 @@
"mg48":"Jeste li sigurni da želite otkazati poziv za ovog člana?",
"mg49":"Pritiskom na potvrdu, zahtjev za pozivnicu za otkazivanje bit će poslan!",
"mg50":"Uskoro...",
- "mg51": "Minimalno 3 znaka / Maksimalno 32 znaka",
- "mg52": "Maksimalno 128 znakova"
+ "mg51":"Minimalno 3 znaka / Maksimalno 32 znaka",
+ "mg52":"Maksimalno 128 znakova",
+ "mg53":"Vaši otvoreni zahtjevi za pridruživanje",
+ "mg54":"Nema otvorenih zahtjeva za pridruživanje",
+ "mg55":"Jeste li sigurni da prihvaćate zahtjev za pridruživanje ovog člana?",
+ "mg56":"Pritiskom na potvrdu, zahtjev za prihvaćanje pridruživanja bit će poslan!",
+ "mg57":"Zahtjev za pridruživanje uspješno prihvaćen",
+ "mg58":"NEŠTO JE POŠLO PO ZLOU",
+ "mg59":"Poništi zahtjev za pridruživanje uspješno prihvaćen",
+ "mg60":"Jeste li sigurni da želite otkazati zahtjev za pridruživanje ovog člana?",
+ "mg61":"Pritiskom na potvrdu, bit će poslan zahtjev za otkazivanje pridruživanja!"
}
}
diff --git a/qortal-ui-core/language/hu.json b/qortal-ui-core/language/hu.json
index 6fdc4f54..76f9fed4 100644
--- a/qortal-ui-core/language/hu.json
+++ b/qortal-ui-core/language/hu.json
@@ -799,6 +799,15 @@
"mg49":"A megerősítés megnyomására a rendszer elküldi a meghívó visszavonási kérelmét!",
"mg50":"Hamarosan...",
"mg51":"Minimum 3 karakter / legfeljebb 32 karakter",
- "mg52":"Legfeljebb 128 karakter"
+ "mg52":"Legfeljebb 128 karakter",
+ "mg53":"Az Ön nyitott csatlakozási kérelmei",
+ "mg54":"Nincsenek nyitott csatlakozási kérelmek",
+ "mg55":"Biztosan elfogadja ennek a tagnak a csatlakozási kérelmét?",
+ "mg56":"A megerősítés megnyomására a rendszer elküldi az elfogadási csatlakozási kérelmet!",
+ "mg57":"Csatlakozási kérelem sikeresen elfogadva",
+ "mg58":"VALAMI RÁMADT",
+ "mg59":"Csatlakozási kérelem visszavonása sikeresen elfogadva",
+ "mg60":"Biztosan visszavonja ennek a tagnak a csatlakozási kérelmét?",
+ "mg61":"A megerősítés megnyomására a csatlakozás megszakítási kérelme elküldésre kerül!"
}
}
diff --git a/qortal-ui-core/language/it.json b/qortal-ui-core/language/it.json
index 7cea8646..42e55e2e 100644
--- a/qortal-ui-core/language/it.json
+++ b/qortal-ui-core/language/it.json
@@ -799,6 +799,15 @@
"mg49":"Premendo conferma, verrà inviata la richiesta di annullamento dell'invito!",
"mg50":"Prossimamente...",
"mg51":"Minimo 3 caratteri / Massimo 32 caratteri",
- "mg52":"Massimo 128 caratteri"
+ "mg52":"Massimo 128 caratteri",
+ "mg53":"Le tue richieste di partecipazione aperte",
+ "mg54":"Nessuna richiesta di partecipazione aperta",
+ "mg55":"Sei sicuro di accettare la richiesta di adesione di questo membro ?",
+ "mg56":"Premendo conferma, verrà inviata la richiesta di partecipazione accettata!",
+ "mg57":"Richiesta di partecipazione accettata con successo",
+ "mg58":"QUALCOSA È ANDATO storto",
+ "mg59":"Annulla richiesta di partecipazione accettata con successo",
+ "mg60":"Sei sicuro di voler annullare la richiesta di adesione di questo membro ?",
+ "mg61":"Premendo conferma, verrà inviata la richiesta di annullamento partecipazione!"
}
}
diff --git a/qortal-ui-core/language/ko.json b/qortal-ui-core/language/ko.json
index edd76c68..2124eec4 100644
--- a/qortal-ui-core/language/ko.json
+++ b/qortal-ui-core/language/ko.json
@@ -799,6 +799,15 @@
"mg49":"확인을 누르면 초대 취소 요청이 전송됩니다!",
"mg50":"출시 예정...",
"mg51":"최소 3자 / 최대 32자",
- "mg52":"최대 128자"
+ "mg52":"최대 128자",
+ "mg53":"귀하의 오픈 조인 요청",
+ "mg54":"오픈 조인 요청 없음",
+ "mg55":"이 회원의 가입 요청을 수락하시겠습니까?",
+ "mg56":"확인을 누르면 가입 수락 요청이 전송됩니다!",
+ "mg57":"가입 요청이 성공적으로 수락됨",
+ "mg58":"뭔가 잘못되었습니다",
+ "mg59":"가입 요청 취소 성공",
+ "mg60":"이 회원의 가입 요청을 취소하시겠습니까?",
+ "mg61":"확인을 누르면 가입 취소 요청이 전송됩니다!"
}
}
diff --git a/qortal-ui-core/language/no.json b/qortal-ui-core/language/no.json
index 24e94b7d..a38abbe8 100644
--- a/qortal-ui-core/language/no.json
+++ b/qortal-ui-core/language/no.json
@@ -799,6 +799,15 @@
"mg49":"Når du trykker på bekreftelse, vil forespørselen om kansellering av invitasjon bli sendt!",
"mg50":"Kommer snart...",
"mg51":"Minimum 3 tegn / maksimum 32 tegn",
- "mg52": "Maksimalt 128 tegn"
+ "mg52":"Maksimalt 128 tegn",
+ "mg53":"Dine åpne forespørsler om bli med",
+ "mg54":"Ingen åpne forespørsler om medlemskap",
+ "mg55":"Er du sikker på å godta forespørselen fra dette medlemmet?",
+ "mg56":"Når du trykker på bekreft, vil forespørselen om å godta bli sendt bli sendt!",
+ "mg57":"Bli med forespørsel ble godtatt",
+ "mg58":"NOE GIKK FEIL",
+ "mg59":"Avbryt deltakelsesforespørsel ble godtatt",
+ "mg60":"Er du sikker på å avbryte forespørselen om å bli medlem fra dette medlemmet?",
+ "mg61":"Når du trykker på bekreft, vil forespørselen om kansellering bli sendt!"
}
}
diff --git a/qortal-ui-core/language/pl.json b/qortal-ui-core/language/pl.json
index cd4f76c3..aff8fbd4 100644
--- a/qortal-ui-core/language/pl.json
+++ b/qortal-ui-core/language/pl.json
@@ -798,7 +798,16 @@
"mg48":"Czy na pewno chcesz anulować zaproszenie dla tego członka?",
"mg49":"Po naciśnięciu potwierdzenia zostanie wysłana prośba o anulowanie zaproszenia!",
"mg50":"Już wkrótce...",
- "mg51": "Minimum 3 znaki / Maksymalnie 32 znaki",
- "mg52": "Maksymalnie 128 znaków"
+ "mg51":"Minimum 3 znaki / Maksymalnie 32 znaki",
+ "mg52":"Maksymalnie 128 znaków",
+ "mg53":"Twoje otwarte prośby o dołączenie",
+ "mg54":"Brak otwartych próśb o dołączenie",
+ "mg55":"Czy na pewno akceptujesz prośbę o dołączenie od tego członka?",
+ "mg56":"Po naciśnięciu potwierdzenia zostanie wysłana prośba o zaakceptowanie dołączenia!",
+ "mg57":"Prośba o dołączenie pomyślnie zaakceptowana",
+ "mg58":"COŚ POszło nie tak",
+ "mg59":"Anuluj prośbę o dołączenie pomyślnie zaakceptowaną",
+ "mg60":"Czy na pewno chcesz anulować prośbę o dołączenie od tego członka?",
+ "mg61":"Po naciśnięciu potwierdzenia, zostanie wysłana prośba o anulowanie dołączenia!"
}
}
diff --git a/qortal-ui-core/language/pt.json b/qortal-ui-core/language/pt.json
index bce9759d..035986c0 100644
--- a/qortal-ui-core/language/pt.json
+++ b/qortal-ui-core/language/pt.json
@@ -799,6 +799,15 @@
"mg49":"Ao pressionar confirmar, a solicitação de cancelamento do convite será enviada!",
"mg50":"Em Breve...",
"mg51":"Mínimo de 3 caracteres / Máximo de 32 caracteres",
- "mg52":"Máximo de 128 caracteres"
+ "mg52":"Máximo de 128 caracteres",
+ "mg53":"Suas solicitações de entrada abertas",
+ "mg54":"Nenhuma solicitação de entrada aberta",
+ "mg55":"Tem certeza que aceita a solicitação de entrada deste membro?",
+ "mg56":"Ao pressionar confirmar, o pedido de aceitação de entrada será enviado!",
+ "mg57":"Solicitação de entrada aceita com sucesso",
+ "mg58":"ALGO DEU ERRADO",
+ "mg59":"Cancelar pedido de entrada aceito com sucesso",
+ "mg60":"Tem certeza que deseja cancelar a solicitação de ingresso deste membro ?",
+ "mg61":"Ao pressionar confirmar, o pedido de cancelamento de adesão será enviado!"
}
}
diff --git a/qortal-ui-core/language/ro.json b/qortal-ui-core/language/ro.json
index 97861bf6..891a0be4 100644
--- a/qortal-ui-core/language/ro.json
+++ b/qortal-ui-core/language/ro.json
@@ -799,6 +799,15 @@
"mg49":"La apăsarea confirmării, cererea de anulare a invitației va fi trimisă!",
"mg50":"În curând...",
"mg51":"Minim 3 caractere / Maxim 32 de caractere",
- "mg52":"Maximum 128 de caractere"
+ "mg52":"Maximum 128 de caractere",
+ "mg53":"Solicitările dvs. de înscriere deschise",
+ "mg54":"Fără solicitări de aderare deschise",
+ "mg55":"Sunteți sigur că acceptați solicitarea de alăturare de la acest membru?",
+ "mg56":"La apăsarea confirmării, va fi trimisă cererea de acceptare a înscrierii!",
+ "mg57":"Solicitarea de înscriere a fost acceptată cu succes",
+ "mg58":"CEVA A MERAT GREUT",
+ "mg59":"Anularea cererii de aderare a fost acceptată cu succes",
+ "mg60":"Sigur anulați solicitarea de alăturare de la acest membru?",
+ "mg61":"La apăsarea confirmării, cererea de anulare a aderării va fi trimisă!"
}
}
diff --git a/qortal-ui-core/language/rs.json b/qortal-ui-core/language/rs.json
index 0670c642..432280f7 100644
--- a/qortal-ui-core/language/rs.json
+++ b/qortal-ui-core/language/rs.json
@@ -799,6 +799,15 @@
"mg49":"Pritiskom na potvrdi, zahtev za otkazivanje pozivnice će biti poslat!",
"mg50":"Uskoro...",
"mg51":"Najmanje 3 znaka / maksimalno 32 znaka",
- "mg52":"Maksimalno 128 znakova"
+ "mg52":"Maksimalno 128 znakova",
+ "mg53":"Vaši zahtevi za otvoreno pridruživanje",
+ "mg54":"Nema otvorenih zahteva za pridruživanje",
+ "mg55":"Da li ste sigurni da prihvatate zahtev za pridruživanje ovog člana?",
+ "mg56":"Pritiskom na potvrdi, biće poslat zahtev za prihvatanje pridruživanja!",
+ "mg57":"Zahtev za pridruživanje je uspešno prihvaćen",
+ "mg58":"NEŠTO JE POŠLO NA ZLO",
+ "mg59":"Zahtev za otkazivanje pridruživanja je uspešno prihvaćen",
+ "mg60":"Da li ste sigurni da otkažete zahtev za pridruživanje ovog člana?",
+ "mg61":"Pritiskom na potvrdu, zahtev za otkazivanje pridruživanja će biti poslat!"
}
}
diff --git a/qortal-ui-core/language/ru.json b/qortal-ui-core/language/ru.json
index 1828a4af..e40c5ae3 100644
--- a/qortal-ui-core/language/ru.json
+++ b/qortal-ui-core/language/ru.json
@@ -799,6 +799,15 @@
"mg49":"При нажатии подтверждения будет отправлен запрос на отмену приглашения!",
"mg50":"Скоро...",
"mg51":"Минимум 3 символа / максимум 32 символа",
- "mg52":"Максимум 128 символов"
+ "mg52":"Максимум 128 символов",
+ "mg53":"Ваши открытые запросы на вступление",
+ "mg54":"Открытых запросов на присоединение нет",
+ "mg55":"Вы уверены, что принимаете запрос на вступление от этого участника?",
+ "mg56":"При нажатии подтверждения будет отправлен запрос на присоединение!",
+ "mg57":"Запрос на присоединение успешно принят",
+ "mg58":"ЧТО-ТО ПОШЛО НЕ ТАК",
+ "mg59":"Запрос на отмену присоединения успешно принят",
+ "mg60":"Вы уверены, что отмените запрос на вступление от этого участника?",
+ "mg61":"При нажатии кнопки подтверждения будет отправлен запрос на отмену присоединения!"
}
}
diff --git a/qortal-ui-core/language/us.json b/qortal-ui-core/language/us.json
index c50aa9ec..7da41ef0 100644
--- a/qortal-ui-core/language/us.json
+++ b/qortal-ui-core/language/us.json
@@ -799,6 +799,15 @@
"mg49":"On pressing confirm, the cancel invite request will be sent!",
"mg50":"Coming Soon...",
"mg51":"Minimum 3 Characters / Maximum 32 Characters",
- "mg52":"Maximum 128 Characters"
+ "mg52":"Maximum 128 Characters",
+ "mg53":"Your Open Join Requests",
+ "mg54":"No Open Join Requests",
+ "mg55":"Are you sure to accept the join request from this member ?",
+ "mg56":"On pressing confirm, the accept join request will be sent!",
+ "mg57":"Join Request Successfully Accepted",
+ "mg58":"SOMETHING WENT WRONG",
+ "mg59":"Cancel Join Request Successfully Accepted",
+ "mg60":"Are you sure to cancel the join request from this member ?",
+ "mg61":"On pressing confirm, the cancel join request will be sent!"
}
}
diff --git a/qortal-ui-core/language/zhc.json b/qortal-ui-core/language/zhc.json
index c034caf0..dfd1d98d 100644
--- a/qortal-ui-core/language/zhc.json
+++ b/qortal-ui-core/language/zhc.json
@@ -799,6 +799,15 @@
"mg49":"按下确认后,将发送取消邀请请求!",
"mg50":"即将推出……",
"mg51":"最少 3 个字符 / 最多 32 个字符",
- "mg52":"最多 128 个字符"
+ "mg52":"最多 128 个字符",
+ "mg53":"您的公开加入请求",
+ "mg54":"没有开放的加入请求",
+ "mg55":"您确定接受该会员的加入请求吗?",
+ "mg56":"按下确认后,将发送接受加入请求!",
+ "mg57":"成功接受加入请求",
+ "mg58":"出了点问题",
+ "mg59":"取消加入请求已成功接受",
+ "mg60":"您确定要取消该会员的加入请求吗?",
+ "mg61":"按下确认后,将发送取消加入请求!"
}
}
diff --git a/qortal-ui-core/language/zht.json b/qortal-ui-core/language/zht.json
index 94e0c663..7572a9df 100644
--- a/qortal-ui-core/language/zht.json
+++ b/qortal-ui-core/language/zht.json
@@ -799,6 +799,15 @@
"mg49":"按下確認後,將發送取消邀請請求!",
"mg50":"即將推出……",
"mg51":"最少 3 個字符 / 最多 32 個字符",
- "mg52":"最多 128 個字符"
+ "mg52":"最多 128 個字符",
+ "mg53":"您的公開加入請求",
+ "mg54":"沒有開放的加入請求",
+ "mg55":"您確定接受該會員的加入請求嗎?",
+ "mg56":"按下確認後,將發送接受加入請求!",
+ "mg57":"成功接受加入請求",
+ "mg58":"出了點問題",
+ "mg59":"取消加入請求已成功接受",
+ "mg60":"您確定要取消該會員的加入請求嗎?",
+ "mg61":"按下確認後,將發送取消加入請求!"
}
}
diff --git a/qortal-ui-plugins/plugins/core/group-management/group-management.src.js b/qortal-ui-plugins/plugins/core/group-management/group-management.src.js
index db52b313..14a0388b 100644
--- a/qortal-ui-plugins/plugins/core/group-management/group-management.src.js
+++ b/qortal-ui-plugins/plugins/core/group-management/group-management.src.js
@@ -38,6 +38,7 @@ class GroupManagement extends LitElement {
newAdminsList: { type: Array },
newBannedList: { type: Array },
newGroupInvitesList: { type: Array },
+ newGroupJoinsList: { type: Array },
recipientPublicKey: { type: String },
selectedAddress: { type: Object },
manageGroupObj: { type: Object },
@@ -155,6 +156,11 @@ class GroupManagement extends LitElement {
color: red;
}
+ .success-icon {
+ font-size: 48px;
+ color: #198754;
+ }
+
.close-icon {
font-size: 36px;
}
@@ -436,6 +442,7 @@ class GroupManagement extends LitElement {
this.newAdminsList = []
this.newBannedList = []
this.newGroupInvitesList = []
+ this.newGroupJoinsList = []
this.manageGroupObj = {}
this.joinGroupObj = {}
this.leaveGroupObj = {}
@@ -836,6 +843,7 @@ class GroupManagement extends LitElement {
groupInviteTemplate() {
return html`
+
${translate("managegroup.mg36")}
${translate("managegroup.mg35")}
` : html``}
+
+ ${translate("managegroup.mg53")}
+
+ {
+ render(html`${this.renderAvatar(data.item)}`, root)
+ }}
+ >
+ {
+ render(html`${data.item.name}`, root)
+ }}
+ >
+ {
+ render(html`${data.item.owner}`, root)
+ }}
+ >
+ {
+ render(html`${this.renderConfirmRequestButton(data.item)}`, root)
+ }}
+ >
+ {
+ render(html`${this.renderDeclineRequestButton(data.item)}`, root)
+ }}
+ >
+
+ ${this.isEmptyArray(this.newGroupJoinsList) ? html`
+ ${translate("managegroup.mg54")}
+ ` : html``}
+
+
this.openInviteMemberToGroupDialog()}>
${translate("managegroup.mg2")}
@@ -1033,6 +1089,72 @@ class GroupManagement extends LitElement {
${translate("general.close")}
+
+
+
+ group_add
+
${translate("managegroup.mg57")}
+ ${translate("walletpage.wchange43")}
+
+
+ this.closeSuccessJoinDialog()}
+ class="red"
+ >
+ ${translate("general.close")}
+
+
+
+
+
+ warning
+
${translate("managegroup.mg58")}
+ ${this.errorMessage}
+ ${translate("walletpage.wchange44")}
+
+
+ this.closeErrorJoinDialog()}
+ class="red"
+ >
+ ${translate("general.close")}
+
+
+
+
+
+ person_remove
+
${translate("managegroup.mg59")}
+ ${translate("walletpage.wchange43")}
+
+
+ this.closeCancelSuccessJoinDialog()}
+ class="red"
+ >
+ ${translate("general.close")}
+
+
+
+
+
+ warning
+
${translate("managegroup.mg58")}
+ ${this.errorMessage}
+ ${translate("walletpage.wchange44")}
+
+
+ this.closeCancelErrorJoinDialog()}
+ class="red"
+ >
+ ${translate("general.close")}
+
+
`
}
@@ -1986,6 +2108,38 @@ class GroupManagement extends LitElement {
this.errorMessage = ''
}
+ renderConfirmRequestButton(joinObj) {
+ return html` this.createAcceptJoinGroupMember(joinObj)}>add_task ${translate("transpage.tchange3")} `
+ }
+
+ renderDeclineRequestButton(joinObj) {
+ return html` this.kickJoinGroupMember(joinObj)}>cancel ${translate("transpage.tchange2")} `
+ }
+
+ closeSuccessJoinDialog() {
+ this.shadowRoot.querySelector('#successJoinDialog').close()
+ this.successMessage = ''
+ this.errorMessage = ''
+ }
+
+ closeErrorJoinDialog() {
+ this.shadowRoot.querySelector('#errorJoinDialog').close()
+ this.successMessage = ''
+ this.errorMessage = ''
+ }
+
+ closeCancelSuccessJoinDialog() {
+ this.shadowRoot.querySelector('#cancelSuccessJoinDialog').close()
+ this.successMessage = ''
+ this.errorMessage = ''
+ }
+
+ closeCancelErrorJoinDialog() {
+ this.shadowRoot.querySelector('#cancelErrorJoinDialog').close()
+ this.successMessage = ''
+ this.errorMessage = ''
+ }
+
openMemberInfo(inviteGroupId) {
const _inviteMemberInfo = this.shadowRoot.getElementById('toInviteMemberToGroup').value
const _nviteMemberTime = this.shadowRoot.getElementById("inviteMemberTime").value
@@ -2361,6 +2515,57 @@ class GroupManagement extends LitElement {
}
}
+ async getNewGroupJoinList(theGroup) {
+ let callGroupID = theGroup
+ 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 joinObj = []
+ this.groupJoinMembers = []
+
+ await parentEpml.request('apiCall', {
+ url: `/groups/joinrequests/${callGroupID}`
+ }).then(res => {
+ this.groupJoinMembers = res
+ })
+
+ if (this.groupJoinMembers.length === 0) {
+ return
+ } else {
+ this.groupJoinMembers.map(a => {
+ let callTheJoinMember = a.joiner
+ let callSingleJoinMemberUrl = `${nodeUrl}/names/address/${callTheJoinMember}`
+ fetch(callSingleJoinMemberUrl).then(res => {
+ return res.json()
+ }).then(jsonRes => {
+ if (jsonRes.length) {
+ jsonRes.map(b => {
+ const joinObjToAdd = {
+ groupId: a.groupId,
+ name: b.name,
+ owner: b.owner,
+ time: '86400',
+ reason: 'NotAllowed'
+ }
+ joinObj.push(joinObjToAdd)
+ })
+ } else {
+ const noName = 'No registered name'
+ const noNameObj = {
+ groupId: a.groupId,
+ name: noName,
+ owner: a.joiner,
+ time: '86400',
+ reason: 'NotAllowed'
+ }
+ joinObj.push(noNameObj)
+ }
+ this.newGroupJoinsList = joinObj
+ })
+ })
+ }
+ }
+
closeManageGroupOwnerDialog() {
this.resetDefaultSettings()
this.shadowRoot.getElementById('manageGroupOwnerDialog').close()
@@ -2389,6 +2594,7 @@ class GroupManagement extends LitElement {
await this.getNewMemberList(groupObj.groupId)
await this.getNewBannedList(groupObj.groupId)
await this.getNewGroupInvitesList(groupObj.groupId)
+ await this.getNewGroupJoinList(groupObj.groupId)
await manageGroupDelay(1000)
this.shadowRoot.getElementById('manageGroupOwnerDialog').open()
}
@@ -3057,6 +3263,148 @@ class GroupManagement extends LitElement {
validateReceiver()
}
+ async createAcceptJoinGroupMember(joinObj) {
+ const member = joinObj.owner
+ const inviteTime = joinObj.time
+ const inviteGroupMemberFeeInput = this.inviteGroupMemberFee
+ const theGroupId = joinObj.groupId
+ this.isLoading = true
+ this.btnDisable = true
+
+ const getLastRef = async () => {
+ let myRef = await parentEpml.request('apiCall', {
+ type: 'api',
+ url: `/addresses/lastreference/${this.selectedAddress.address}`
+ })
+ return myRef
+ }
+
+ const validateReceiver = async () => {
+ let lastRef = await getLastRef()
+ let myTransaction = await makeTransactionRequest(lastRef)
+ getTxnRequestResponse(myTransaction)
+ }
+
+ const makeTransactionRequest = async (lastRef) => {
+ const myMember = member
+ const myLastRef = lastRef
+ const myGroupId = theGroupId
+ const myFee = inviteGroupMemberFeeInput
+ const myInviteTime = inviteTime
+ const myInviteMemberDialog1 = get("managegroup.mg55")
+ const myInviteMemberDialog2 = get("managegroup.mg56")
+
+ let myTxnrequest = await parentEpml.request('transaction', {
+ type: 29,
+ nonce: this.selectedAddress.nonce,
+ params: {
+ fee: myFee,
+ recipient: myMember,
+ rGroupId: myGroupId,
+ rInviteTime: myInviteTime,
+ lastReference: myLastRef,
+ inviteMemberDialog1: myInviteMemberDialog1,
+ inviteMemberDialog2: myInviteMemberDialog2
+ }
+ })
+ return myTxnrequest
+ }
+
+ const getTxnRequestResponse = (txnResponse) => {
+ if (txnResponse.success === false && txnResponse.message) {
+ this.errorMessage = txnResponse.message
+ this.shadowRoot.querySelector('#errorJoinDialog').show()
+ this.isLoading = false
+ this.btnDisable = false
+ throw new Error(txnResponse)
+ } else if (txnResponse.success === true && !txnResponse.data.error) {
+ this.shadowRoot.querySelector('#successJoinDialog').show()
+ this.errorMessage = ''
+ this.successMessage = this.renderSuccessText()
+ this.isLoading = false
+ this.btnDisable = false
+ } else {
+ this.errorMessage = txnResponse.data.message
+ this.shadowRoot.querySelector('#errorJoinDialog').show()
+ this.isLoading = false
+ this.btnDisable = false
+ throw new Error(txnResponse)
+ }
+ }
+ validateReceiver()
+ }
+
+ async kickJoinGroupMember(joinObj) {
+ const member = joinObj.owner
+ const reason = joinObj.reason
+ const kickGroupMemberFeeInput = this.kickGroupMemberFee
+ const theGroupId = joinObj.groupId
+ this.isLoading = true
+ this.btnDisable = true
+
+ const getLastRef = async () => {
+ let myRef = await parentEpml.request('apiCall', {
+ type: 'api',
+ url: `/addresses/lastreference/${this.selectedAddress.address}`
+ })
+ return myRef
+ }
+
+ const validateReceiver = async () => {
+ let lastRef = await getLastRef()
+ let myTransaction = await makeTransactionRequest(lastRef)
+ getTxnRequestResponse(myTransaction)
+ }
+
+ const makeTransactionRequest = async (lastRef) => {
+ const myMember = member
+ const myLastRef = lastRef
+ const myGroupId = theGroupId
+ const myFee = kickGroupMemberFeeInput
+ const myReason = reason
+ const myKickMemberDialog1 = get("managegroup.mg60")
+ const myKickMemberDialog2 = get("managegroup.mg61")
+
+ let myTxnrequest = await parentEpml.request('transaction', {
+ type: 28,
+ nonce: this.selectedAddress.nonce,
+ params: {
+ fee: myFee,
+ recipient: myMember,
+ rGroupId: myGroupId,
+ rBanReason: myReason,
+ lastReference: myLastRef,
+ kickMemberDialog1: myKickMemberDialog1,
+ kickMemberDialog2: myKickMemberDialog2
+ }
+ })
+ return myTxnrequest
+ }
+
+ const getTxnRequestResponse = (txnResponse) => {
+ if (txnResponse.success === false && txnResponse.message) {
+ this.errorMessage = txnResponse.message
+ this.shadowRoot.querySelector('#cancelErrorJoinDialog').show()
+ this.isLoading = false
+ this.btnDisable = false
+ throw new Error(txnResponse)
+ } else if (txnResponse.success === true && !txnResponse.data.error) {
+ this.shadowRoot.querySelector('#cancelSuccessJoinDialog').show()
+ this.errorMessage = ''
+ this.successMessage = this.renderSuccessText()
+ this.isLoading = false
+ this.btnDisable = false
+ } else {
+ this.errorMessage = txnResponse.data.message
+ this.shadowRoot.querySelector('#cancelErrorJoinDialog').show()
+ this.isLoading = false
+ this.btnDisable = false
+ throw new Error(txnResponse)
+ }
+ }
+ validateReceiver()
+ }
+
async addGroupAdmin(groupId) {
const member = this.shadowRoot.getElementById('memberToAdmin').value
const addGroupAdminFeeInput = this.addGroupAdminFee
From abf736c6400b1ed5dd7f989d54ce4cef4ab8c3c7 Mon Sep 17 00:00:00 2001
From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com>
Date: Thu, 5 Jan 2023 16:55:34 +0100
Subject: [PATCH 04/19] Add time elements
---
qortal-ui-plugins/plugins/core/components/TimeAgo.js | 2 +-
.../plugins/core/group-management/group-management.src.js | 2 +-
qortal-ui-plugins/plugins/core/wallet/wallet-app.src.js | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/qortal-ui-plugins/plugins/core/components/TimeAgo.js b/qortal-ui-plugins/plugins/core/components/TimeAgo.js
index c212a736..ca3633b7 100644
--- a/qortal-ui-plugins/plugins/core/components/TimeAgo.js
+++ b/qortal-ui-plugins/plugins/core/components/TimeAgo.js
@@ -1,6 +1,6 @@
import { LitElement, html, css } from 'lit'
-import '@github/time-elements'
+import './time-elements/index.js'
class TimeAgo extends LitElement {
static get properties() {
diff --git a/qortal-ui-plugins/plugins/core/group-management/group-management.src.js b/qortal-ui-plugins/plugins/core/group-management/group-management.src.js
index 14a0388b..edcfd254 100644
--- a/qortal-ui-plugins/plugins/core/group-management/group-management.src.js
+++ b/qortal-ui-plugins/plugins/core/group-management/group-management.src.js
@@ -7,6 +7,7 @@ registerTranslateConfig({
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
})
+import '../components/time-elements/index.js'
import '@material/mwc-button'
import '@material/mwc-dialog'
import '@material/mwc-formfield'
@@ -21,7 +22,6 @@ import '@vaadin/icon'
import '@vaadin/icons'
import '@vaadin/grid'
import '@vaadin/grid/vaadin-grid-filter-column.js'
-import '@github/time-elements'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
diff --git a/qortal-ui-plugins/plugins/core/wallet/wallet-app.src.js b/qortal-ui-plugins/plugins/core/wallet/wallet-app.src.js
index de4e77ed..197248f4 100644
--- a/qortal-ui-plugins/plugins/core/wallet/wallet-app.src.js
+++ b/qortal-ui-plugins/plugins/core/wallet/wallet-app.src.js
@@ -10,8 +10,8 @@ registerTranslateConfig({
import '../components/ButtonIconCopy.js'
import '../components/QortalQrcodeGenerator.js'
import '../components/frag-file-input.js'
+import '../components/time-elements/index.js'
import FileSaver from 'file-saver'
-import '@github/time-elements'
import '@material/mwc-button'
import '@material/mwc-checkbox'
import '@material/mwc-dialog'
From 1a2a877a9dfc06ad1a194f0a6c06767667d36649 Mon Sep 17 00:00:00 2001
From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com>
Date: Thu, 5 Jan 2023 16:57:26 +0100
Subject: [PATCH 05/19] JS files
---
.../time-elements/extended-time-element.js | 87 +++
.../core/components/time-elements/index.js | 705 ++++++++++++++++++
.../time-elements/local-time-element.js | 81 ++
.../time-elements/relative-time-element.js | 44 ++
.../components/time-elements/relative-time.js | 290 +++++++
.../time-elements/time-ago-element.js | 21 +
.../time-elements/time-until-element.js | 21 +
.../core/components/time-elements/utils.js | 166 +++++
8 files changed, 1415 insertions(+)
create mode 100644 qortal-ui-plugins/plugins/core/components/time-elements/extended-time-element.js
create mode 100644 qortal-ui-plugins/plugins/core/components/time-elements/index.js
create mode 100644 qortal-ui-plugins/plugins/core/components/time-elements/local-time-element.js
create mode 100644 qortal-ui-plugins/plugins/core/components/time-elements/relative-time-element.js
create mode 100644 qortal-ui-plugins/plugins/core/components/time-elements/relative-time.js
create mode 100644 qortal-ui-plugins/plugins/core/components/time-elements/time-ago-element.js
create mode 100644 qortal-ui-plugins/plugins/core/components/time-elements/time-until-element.js
create mode 100644 qortal-ui-plugins/plugins/core/components/time-elements/utils.js
diff --git a/qortal-ui-plugins/plugins/core/components/time-elements/extended-time-element.js b/qortal-ui-plugins/plugins/core/components/time-elements/extended-time-element.js
new file mode 100644
index 00000000..583dee79
--- /dev/null
+++ b/qortal-ui-plugins/plugins/core/components/time-elements/extended-time-element.js
@@ -0,0 +1,87 @@
+import { makeFormatter } from './utils';
+const datetimes = new WeakMap();
+export default class ExtendedTimeElement extends HTMLElement {
+ static get observedAttributes() {
+ return [
+ 'datetime',
+ 'day',
+ 'format',
+ 'lang',
+ 'hour',
+ 'minute',
+ 'month',
+ 'second',
+ 'title',
+ 'weekday',
+ 'year',
+ 'time-zone-name'
+ ];
+ }
+ connectedCallback() {
+ const title = this.getFormattedTitle();
+ if (title && !this.hasAttribute('title')) {
+ this.setAttribute('title', title);
+ }
+ const text = this.getFormattedDate();
+ if (text) {
+ this.textContent = text;
+ }
+ }
+ attributeChangedCallback(attrName, oldValue, newValue) {
+ const oldTitle = this.getFormattedTitle();
+ if (attrName === 'datetime') {
+ const millis = Date.parse(newValue);
+ if (isNaN(millis)) {
+ datetimes.delete(this);
+ }
+ else {
+ datetimes.set(this, new Date(millis));
+ }
+ }
+ const title = this.getFormattedTitle();
+ const currentTitle = this.getAttribute('title');
+ if (attrName !== 'title' && title && (!currentTitle || currentTitle === oldTitle)) {
+ this.setAttribute('title', title);
+ }
+ const text = this.getFormattedDate();
+ if (text) {
+ this.textContent = text;
+ }
+ }
+ get date() {
+ return datetimes.get(this);
+ }
+ getFormattedTitle() {
+ const date = this.date;
+ if (!date)
+ return;
+ const formatter = titleFormatter();
+ if (formatter) {
+ return formatter.format(date);
+ }
+ else {
+ try {
+ return date.toLocaleString();
+ }
+ catch (e) {
+ if (e instanceof RangeError) {
+ return date.toString();
+ }
+ else {
+ throw e;
+ }
+ }
+ }
+ }
+ getFormattedDate() {
+ return;
+ }
+}
+const titleFormatter = makeFormatter({
+ day: 'numeric',
+ month: 'short',
+ year: 'numeric',
+ hour: 'numeric',
+ minute: '2-digit',
+ timeZoneName: 'short'
+});
diff --git a/qortal-ui-plugins/plugins/core/components/time-elements/index.js b/qortal-ui-plugins/plugins/core/components/time-elements/index.js
new file mode 100644
index 00000000..8b3dbe4c
--- /dev/null
+++ b/qortal-ui-plugins/plugins/core/components/time-elements/index.js
@@ -0,0 +1,705 @@
+const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
+const months = [
+ 'January',
+ 'February',
+ 'March',
+ 'April',
+ 'May',
+ 'June',
+ 'July',
+ 'August',
+ 'September',
+ 'October',
+ 'November',
+ 'December'
+];
+function pad(num) {
+ return `0${num}`.slice(-2);
+}
+function strftime(time, formatString) {
+ const day = time.getDay();
+ const date = time.getDate();
+ const month = time.getMonth();
+ const year = time.getFullYear();
+ const hour = time.getHours();
+ const minute = time.getMinutes();
+ const second = time.getSeconds();
+ return formatString.replace(/%([%aAbBcdeHIlmMpPSwyYZz])/g, function (_arg) {
+ let match;
+ const modifier = _arg[1];
+ switch (modifier) {
+ case '%':
+ return '%';
+ case 'a':
+ return weekdays[day].slice(0, 3);
+ case 'A':
+ return weekdays[day];
+ case 'b':
+ return months[month].slice(0, 3);
+ case 'B':
+ return months[month];
+ case 'c':
+ return time.toString();
+ case 'd':
+ return pad(date);
+ case 'e':
+ return String(date);
+ case 'H':
+ return pad(hour);
+ case 'I':
+ return pad(strftime(time, '%l'));
+ case 'l':
+ if (hour === 0 || hour === 12) {
+ return String(12);
+ }
+ else {
+ return String((hour + 12) % 12);
+ }
+ case 'm':
+ return pad(month + 1);
+ case 'M':
+ return pad(minute);
+ case 'p':
+ if (hour > 11) {
+ return 'PM';
+ }
+ else {
+ return 'AM';
+ }
+ case 'P':
+ if (hour > 11) {
+ return 'pm';
+ }
+ else {
+ return 'am';
+ }
+ case 'S':
+ return pad(second);
+ case 'w':
+ return String(day);
+ case 'y':
+ return pad(year % 100);
+ case 'Y':
+ return String(year);
+ case 'Z':
+ match = time.toString().match(/\((\w+)\)$/);
+ return match ? match[1] : '';
+ case 'z':
+ match = time.toString().match(/\w([+-]\d\d\d\d) /);
+ return match ? match[1] : '';
+ }
+ return '';
+ });
+}
+function makeFormatter(options) {
+ let format;
+ return function () {
+ if (format)
+ return format;
+ if ('Intl' in window) {
+ try {
+ format = new Intl.DateTimeFormat(undefined, options);
+ return format;
+ }
+ catch (e) {
+ if (!(e instanceof RangeError)) {
+ throw e;
+ }
+ }
+ }
+ };
+}
+let dayFirst = null;
+const dayFirstFormatter = makeFormatter({ day: 'numeric', month: 'short' });
+function isDayFirst() {
+ if (dayFirst !== null) {
+ return dayFirst;
+ }
+ const formatter = dayFirstFormatter();
+ if (formatter) {
+ const output = formatter.format(new Date(0));
+ dayFirst = !!output.match(/^\d/);
+ return dayFirst;
+ }
+ else {
+ return false;
+ }
+}
+let yearSeparator = null;
+const yearFormatter = makeFormatter({ day: 'numeric', month: 'short', year: 'numeric' });
+function isYearSeparator() {
+ if (yearSeparator !== null) {
+ return yearSeparator;
+ }
+ const formatter = yearFormatter();
+ if (formatter) {
+ const output = formatter.format(new Date(0));
+ yearSeparator = !!output.match(/\d,/);
+ return yearSeparator;
+ }
+ else {
+ return true;
+ }
+}
+function isThisYear(date) {
+ const now = new Date();
+ return now.getUTCFullYear() === date.getUTCFullYear();
+}
+function makeRelativeFormat(locale, options) {
+ if ('Intl' in window && 'RelativeTimeFormat' in window.Intl) {
+ try {
+ return new Intl.RelativeTimeFormat(locale, options);
+ }
+ catch (e) {
+ if (!(e instanceof RangeError)) {
+ throw e;
+ }
+ }
+ }
+}
+function localeFromElement(el) {
+ const container = el.closest('[lang]');
+ if (container instanceof HTMLElement && container.lang) {
+ return container.lang;
+ }
+ return 'default';
+}
+
+const datetimes = new WeakMap();
+class ExtendedTimeElement extends HTMLElement {
+ static get observedAttributes() {
+ return [
+ 'datetime',
+ 'day',
+ 'format',
+ 'lang',
+ 'hour',
+ 'minute',
+ 'month',
+ 'second',
+ 'title',
+ 'weekday',
+ 'year',
+ 'time-zone-name'
+ ];
+ }
+ connectedCallback() {
+ const title = this.getFormattedTitle();
+ if (title && !this.hasAttribute('title')) {
+ this.setAttribute('title', title);
+ }
+ const text = this.getFormattedDate();
+ if (text) {
+ this.textContent = text;
+ }
+ }
+ attributeChangedCallback(attrName, oldValue, newValue) {
+ const oldTitle = this.getFormattedTitle();
+ if (attrName === 'datetime') {
+ const millis = Date.parse(newValue);
+ if (isNaN(millis)) {
+ datetimes.delete(this);
+ }
+ else {
+ datetimes.set(this, new Date(millis));
+ }
+ }
+ const title = this.getFormattedTitle();
+ const currentTitle = this.getAttribute('title');
+ if (attrName !== 'title' && title && (!currentTitle || currentTitle === oldTitle)) {
+ this.setAttribute('title', title);
+ }
+ const text = this.getFormattedDate();
+ if (text) {
+ this.textContent = text;
+ }
+ }
+ get date() {
+ return datetimes.get(this);
+ }
+ getFormattedTitle() {
+ const date = this.date;
+ if (!date)
+ return;
+ const formatter = titleFormatter();
+ if (formatter) {
+ return formatter.format(date);
+ }
+ else {
+ try {
+ return date.toLocaleString();
+ }
+ catch (e) {
+ if (e instanceof RangeError) {
+ return date.toString();
+ }
+ else {
+ throw e;
+ }
+ }
+ }
+ }
+ getFormattedDate() {
+ return;
+ }
+}
+const titleFormatter = makeFormatter({
+ day: 'numeric',
+ month: 'short',
+ year: 'numeric',
+ hour: 'numeric',
+ minute: '2-digit',
+ timeZoneName: 'short'
+});
+
+const formatters = new WeakMap();
+class LocalTimeElement extends ExtendedTimeElement {
+ attributeChangedCallback(attrName, oldValue, newValue) {
+ if (attrName === 'hour' || attrName === 'minute' || attrName === 'second' || attrName === 'time-zone-name') {
+ formatters.delete(this);
+ }
+ super.attributeChangedCallback(attrName, oldValue, newValue);
+ }
+ getFormattedDate() {
+ const d = this.date;
+ if (!d)
+ return;
+ const date = formatDate(this, d) || '';
+ const time = formatTime(this, d) || '';
+ return `${date} ${time}`.trim();
+ }
+}
+function formatDate(el, date) {
+ const props = {
+ weekday: {
+ short: '%a',
+ long: '%A'
+ },
+ day: {
+ numeric: '%e',
+ '2-digit': '%d'
+ },
+ month: {
+ short: '%b',
+ long: '%B'
+ },
+ year: {
+ numeric: '%Y',
+ '2-digit': '%y'
+ }
+ };
+ let format = isDayFirst() ? 'weekday day month year' : 'weekday month day, year';
+ for (const prop in props) {
+ const value = props[prop][el.getAttribute(prop) || ''];
+ format = format.replace(prop, value || '');
+ }
+ format = format.replace(/(\s,)|(,\s$)/, '');
+ return strftime(date, format).replace(/\s+/, ' ').trim();
+}
+function formatTime(el, date) {
+ const options = {};
+ const hour = el.getAttribute('hour');
+ if (hour === 'numeric' || hour === '2-digit')
+ options.hour = hour;
+ const minute = el.getAttribute('minute');
+ if (minute === 'numeric' || minute === '2-digit')
+ options.minute = minute;
+ const second = el.getAttribute('second');
+ if (second === 'numeric' || second === '2-digit')
+ options.second = second;
+ const tz = el.getAttribute('time-zone-name');
+ if (tz === 'short' || tz === 'long')
+ options.timeZoneName = tz;
+ if (Object.keys(options).length === 0) {
+ return;
+ }
+ let factory = formatters.get(el);
+ if (!factory) {
+ factory = makeFormatter(options);
+ formatters.set(el, factory);
+ }
+ const formatter = factory();
+ if (formatter) {
+ return formatter.format(date);
+ }
+ else {
+ const timef = options.second ? '%H:%M:%S' : '%H:%M';
+ return strftime(date, timef);
+ }
+}
+if (!window.customElements.get('local-time')) {
+ window.LocalTimeElement = LocalTimeElement;
+ window.customElements.define('local-time', LocalTimeElement);
+}
+
+class RelativeTime {
+ constructor(date, locale) {
+ this.date = date;
+ this.locale = locale;
+ }
+ toString() {
+ const ago = this.timeElapsed();
+ if (ago) {
+ return ago;
+ }
+ else {
+ const ahead = this.timeAhead();
+ if (ahead) {
+ return ahead;
+ }
+ else {
+ return `on ${this.formatDate()}`;
+ }
+ }
+ }
+ timeElapsed() {
+ const ms = new Date().getTime() - this.date.getTime();
+ const sec = Math.round(ms / 1000);
+ const min = Math.round(sec / 60);
+ const hr = Math.round(min / 60);
+ const day = Math.round(hr / 24);
+ if (ms >= 0 && day < 30) {
+ return this.timeAgoFromMs(ms);
+ }
+ else {
+ return null;
+ }
+ }
+ timeAhead() {
+ const ms = this.date.getTime() - new Date().getTime();
+ const sec = Math.round(ms / 1000);
+ const min = Math.round(sec / 60);
+ const hr = Math.round(min / 60);
+ const day = Math.round(hr / 24);
+ if (ms >= 0 && day < 30) {
+ return this.timeUntil();
+ }
+ else {
+ return null;
+ }
+ }
+ timeAgo() {
+ const ms = new Date().getTime() - this.date.getTime();
+ return this.timeAgoFromMs(ms);
+ }
+ timeAgoFromMs(ms) {
+ const sec = Math.round(ms / 1000);
+ const min = Math.round(sec / 60);
+ const hr = Math.round(min / 60);
+ const day = Math.round(hr / 24);
+ const month = Math.round(day / 30);
+ const year = Math.round(month / 12);
+ if (ms < 0) {
+ return formatRelativeTime(this.locale, 0, 'second');
+ }
+ else if (sec < 10) {
+ return formatRelativeTime(this.locale, 0, 'second');
+ }
+ else if (sec < 45) {
+ return formatRelativeTime(this.locale, -sec, 'second');
+ }
+ else if (sec < 90) {
+ return formatRelativeTime(this.locale, -min, 'minute');
+ }
+ else if (min < 45) {
+ return formatRelativeTime(this.locale, -min, 'minute');
+ }
+ else if (min < 90) {
+ return formatRelativeTime(this.locale, -hr, 'hour');
+ }
+ else if (hr < 24) {
+ return formatRelativeTime(this.locale, -hr, 'hour');
+ }
+ else if (hr < 36) {
+ return formatRelativeTime(this.locale, -day, 'day');
+ }
+ else if (day < 30) {
+ return formatRelativeTime(this.locale, -day, 'day');
+ }
+ else if (month < 18) {
+ return formatRelativeTime(this.locale, -month, 'month');
+ }
+ else {
+ return formatRelativeTime(this.locale, -year, 'year');
+ }
+ }
+ microTimeAgo() {
+ const ms = new Date().getTime() - this.date.getTime();
+ const sec = Math.round(ms / 1000);
+ const min = Math.round(sec / 60);
+ const hr = Math.round(min / 60);
+ const day = Math.round(hr / 24);
+ const month = Math.round(day / 30);
+ const year = Math.round(month / 12);
+ if (min < 1) {
+ return '1m';
+ }
+ else if (min < 60) {
+ return `${min}m`;
+ }
+ else if (hr < 24) {
+ return `${hr}h`;
+ }
+ else if (day < 365) {
+ return `${day}d`;
+ }
+ else {
+ return `${year}y`;
+ }
+ }
+ timeUntil() {
+ const ms = this.date.getTime() - new Date().getTime();
+ return this.timeUntilFromMs(ms);
+ }
+ timeUntilFromMs(ms) {
+ const sec = Math.round(ms / 1000);
+ const min = Math.round(sec / 60);
+ const hr = Math.round(min / 60);
+ const day = Math.round(hr / 24);
+ const month = Math.round(day / 30);
+ const year = Math.round(month / 12);
+ if (month >= 18) {
+ return formatRelativeTime(this.locale, year, 'year');
+ }
+ else if (month >= 12) {
+ return formatRelativeTime(this.locale, year, 'year');
+ }
+ else if (day >= 45) {
+ return formatRelativeTime(this.locale, month, 'month');
+ }
+ else if (day >= 30) {
+ return formatRelativeTime(this.locale, month, 'month');
+ }
+ else if (hr >= 36) {
+ return formatRelativeTime(this.locale, day, 'day');
+ }
+ else if (hr >= 24) {
+ return formatRelativeTime(this.locale, day, 'day');
+ }
+ else if (min >= 90) {
+ return formatRelativeTime(this.locale, hr, 'hour');
+ }
+ else if (min >= 45) {
+ return formatRelativeTime(this.locale, hr, 'hour');
+ }
+ else if (sec >= 90) {
+ return formatRelativeTime(this.locale, min, 'minute');
+ }
+ else if (sec >= 45) {
+ return formatRelativeTime(this.locale, min, 'minute');
+ }
+ else if (sec >= 10) {
+ return formatRelativeTime(this.locale, sec, 'second');
+ }
+ else {
+ return formatRelativeTime(this.locale, 0, 'second');
+ }
+ }
+ microTimeUntil() {
+ const ms = this.date.getTime() - new Date().getTime();
+ const sec = Math.round(ms / 1000);
+ const min = Math.round(sec / 60);
+ const hr = Math.round(min / 60);
+ const day = Math.round(hr / 24);
+ const month = Math.round(day / 30);
+ const year = Math.round(month / 12);
+ if (day >= 365) {
+ return `${year}y`;
+ }
+ else if (hr >= 24) {
+ return `${day}d`;
+ }
+ else if (min >= 60) {
+ return `${hr}h`;
+ }
+ else if (min > 1) {
+ return `${min}m`;
+ }
+ else {
+ return '1m';
+ }
+ }
+ formatDate() {
+ let format = isDayFirst() ? '%e %b' : '%b %e';
+ if (!isThisYear(this.date)) {
+ format += isYearSeparator() ? ', %Y' : ' %Y';
+ }
+ return strftime(this.date, format);
+ }
+ formatTime() {
+ const formatter = timeFormatter();
+ if (formatter) {
+ return formatter.format(this.date);
+ }
+ else {
+ return strftime(this.date, '%l:%M%P');
+ }
+ }
+}
+function formatRelativeTime(locale, value, unit) {
+ const formatter = makeRelativeFormat(locale, { numeric: 'auto' });
+ if (formatter) {
+ return formatter.format(value, unit);
+ }
+ else {
+ return formatEnRelativeTime(value, unit);
+ }
+}
+function formatEnRelativeTime(value, unit) {
+ if (value === 0) {
+ switch (unit) {
+ case 'year':
+ case 'quarter':
+ case 'month':
+ case 'week':
+ return `this ${unit}`;
+ case 'day':
+ return 'today';
+ case 'hour':
+ case 'minute':
+ return `in 0 ${unit}s`;
+ case 'second':
+ return 'now';
+ }
+ }
+ else if (value === 1) {
+ switch (unit) {
+ case 'year':
+ case 'quarter':
+ case 'month':
+ case 'week':
+ return `next ${unit}`;
+ case 'day':
+ return 'tomorrow';
+ case 'hour':
+ case 'minute':
+ case 'second':
+ return `in 1 ${unit}`;
+ }
+ }
+ else if (value === -1) {
+ switch (unit) {
+ case 'year':
+ case 'quarter':
+ case 'month':
+ case 'week':
+ return `last ${unit}`;
+ case 'day':
+ return 'yesterday';
+ case 'hour':
+ case 'minute':
+ case 'second':
+ return `1 ${unit} ago`;
+ }
+ }
+ else if (value > 1) {
+ switch (unit) {
+ case 'year':
+ case 'quarter':
+ case 'month':
+ case 'week':
+ case 'day':
+ case 'hour':
+ case 'minute':
+ case 'second':
+ return `in ${value} ${unit}s`;
+ }
+ }
+ else if (value < -1) {
+ switch (unit) {
+ case 'year':
+ case 'quarter':
+ case 'month':
+ case 'week':
+ case 'day':
+ case 'hour':
+ case 'minute':
+ case 'second':
+ return `${-value} ${unit}s ago`;
+ }
+ }
+ throw new RangeError(`Invalid unit argument for format() '${unit}'`);
+}
+const timeFormatter = makeFormatter({ hour: 'numeric', minute: '2-digit' });
+
+class RelativeTimeElement extends ExtendedTimeElement {
+ getFormattedDate() {
+ const date = this.date;
+ if (!date)
+ return;
+ return new RelativeTime(date, localeFromElement(this)).toString();
+ }
+ connectedCallback() {
+ nowElements.push(this);
+ if (!updateNowElementsId) {
+ updateNowElements();
+ updateNowElementsId = window.setInterval(updateNowElements, 60 * 1000);
+ }
+ super.connectedCallback();
+ }
+ disconnectedCallback() {
+ const ix = nowElements.indexOf(this);
+ if (ix !== -1) {
+ nowElements.splice(ix, 1);
+ }
+ if (!nowElements.length) {
+ if (updateNowElementsId) {
+ clearInterval(updateNowElementsId);
+ updateNowElementsId = null;
+ }
+ }
+ }
+}
+const nowElements = [];
+let updateNowElementsId;
+function updateNowElements() {
+ let time, i, len;
+ for (i = 0, len = nowElements.length; i < len; i++) {
+ time = nowElements[i];
+ time.textContent = time.getFormattedDate() || '';
+ }
+}
+if (!window.customElements.get('relative-time')) {
+ window.RelativeTimeElement = RelativeTimeElement;
+ window.customElements.define('relative-time', RelativeTimeElement);
+}
+
+class TimeAgoElement extends RelativeTimeElement {
+ getFormattedDate() {
+ const format = this.getAttribute('format');
+ const date = this.date;
+ if (!date)
+ return;
+ if (format === 'micro') {
+ return new RelativeTime(date, localeFromElement(this)).microTimeAgo();
+ }
+ else {
+ return new RelativeTime(date, localeFromElement(this)).timeAgo();
+ }
+ }
+}
+if (!window.customElements.get('time-ago')) {
+ window.TimeAgoElement = TimeAgoElement;
+ window.customElements.define('time-ago', TimeAgoElement);
+}
+
+class TimeUntilElement extends RelativeTimeElement {
+ getFormattedDate() {
+ const format = this.getAttribute('format');
+ const date = this.date;
+ if (!date)
+ return;
+ if (format === 'micro') {
+ return new RelativeTime(date, localeFromElement(this)).microTimeUntil();
+ }
+ else {
+ return new RelativeTime(date, localeFromElement(this)).timeUntil();
+ }
+ }
+}
+if (!window.customElements.get('time-until')) {
+ window.TimeUntilElement = TimeUntilElement;
+ window.customElements.define('time-until', TimeUntilElement);
+}
+
+export { LocalTimeElement, RelativeTimeElement, TimeAgoElement, TimeUntilElement };
diff --git a/qortal-ui-plugins/plugins/core/components/time-elements/local-time-element.js b/qortal-ui-plugins/plugins/core/components/time-elements/local-time-element.js
new file mode 100644
index 00000000..3494d218
--- /dev/null
+++ b/qortal-ui-plugins/plugins/core/components/time-elements/local-time-element.js
@@ -0,0 +1,81 @@
+import { strftime, makeFormatter, isDayFirst } from './utils';
+import ExtendedTimeElement from './extended-time-element';
+const formatters = new WeakMap();
+export default class LocalTimeElement extends ExtendedTimeElement {
+ attributeChangedCallback(attrName, oldValue, newValue) {
+ if (attrName === 'hour' || attrName === 'minute' || attrName === 'second' || attrName === 'time-zone-name') {
+ formatters.delete(this);
+ }
+ super.attributeChangedCallback(attrName, oldValue, newValue);
+ }
+ getFormattedDate() {
+ const d = this.date;
+ if (!d)
+ return;
+ const date = formatDate(this, d) || '';
+ const time = formatTime(this, d) || '';
+ return `${date} ${time}`.trim();
+ }
+}
+function formatDate(el, date) {
+ const props = {
+ weekday: {
+ short: '%a',
+ long: '%A'
+ },
+ day: {
+ numeric: '%e',
+ '2-digit': '%d'
+ },
+ month: {
+ short: '%b',
+ long: '%B'
+ },
+ year: {
+ numeric: '%Y',
+ '2-digit': '%y'
+ }
+ };
+ let format = isDayFirst() ? 'weekday day month year' : 'weekday month day, year';
+ for (const prop in props) {
+ const value = props[prop][el.getAttribute(prop) || ''];
+ format = format.replace(prop, value || '');
+ }
+ format = format.replace(/(\s,)|(,\s$)/, '');
+ return strftime(date, format).replace(/\s+/, ' ').trim();
+}
+function formatTime(el, date) {
+ const options = {};
+ const hour = el.getAttribute('hour');
+ if (hour === 'numeric' || hour === '2-digit')
+ options.hour = hour;
+ const minute = el.getAttribute('minute');
+ if (minute === 'numeric' || minute === '2-digit')
+ options.minute = minute;
+ const second = el.getAttribute('second');
+ if (second === 'numeric' || second === '2-digit')
+ options.second = second;
+ const tz = el.getAttribute('time-zone-name');
+ if (tz === 'short' || tz === 'long')
+ options.timeZoneName = tz;
+ if (Object.keys(options).length === 0) {
+ return;
+ }
+ let factory = formatters.get(el);
+ if (!factory) {
+ factory = makeFormatter(options);
+ formatters.set(el, factory);
+ }
+ const formatter = factory();
+ if (formatter) {
+ return formatter.format(date);
+ }
+ else {
+ const timef = options.second ? '%H:%M:%S' : '%H:%M';
+ return strftime(date, timef);
+ }
+}
+if (!window.customElements.get('local-time')) {
+ window.LocalTimeElement = LocalTimeElement;
+ window.customElements.define('local-time', LocalTimeElement);
+}
diff --git a/qortal-ui-plugins/plugins/core/components/time-elements/relative-time-element.js b/qortal-ui-plugins/plugins/core/components/time-elements/relative-time-element.js
new file mode 100644
index 00000000..5654e08d
--- /dev/null
+++ b/qortal-ui-plugins/plugins/core/components/time-elements/relative-time-element.js
@@ -0,0 +1,44 @@
+import RelativeTime from './relative-time';
+import ExtendedTimeElement from './extended-time-element';
+import { localeFromElement } from './utils';
+export default class RelativeTimeElement extends ExtendedTimeElement {
+ getFormattedDate() {
+ const date = this.date;
+ if (!date)
+ return;
+ return new RelativeTime(date, localeFromElement(this)).toString();
+ }
+ connectedCallback() {
+ nowElements.push(this);
+ if (!updateNowElementsId) {
+ updateNowElements();
+ updateNowElementsId = window.setInterval(updateNowElements, 60 * 1000);
+ }
+ super.connectedCallback();
+ }
+ disconnectedCallback() {
+ const ix = nowElements.indexOf(this);
+ if (ix !== -1) {
+ nowElements.splice(ix, 1);
+ }
+ if (!nowElements.length) {
+ if (updateNowElementsId) {
+ clearInterval(updateNowElementsId);
+ updateNowElementsId = null;
+ }
+ }
+ }
+}
+const nowElements = [];
+let updateNowElementsId;
+function updateNowElements() {
+ let time, i, len;
+ for (i = 0, len = nowElements.length; i < len; i++) {
+ time = nowElements[i];
+ time.textContent = time.getFormattedDate() || '';
+ }
+}
+if (!window.customElements.get('relative-time')) {
+ window.RelativeTimeElement = RelativeTimeElement;
+ window.customElements.define('relative-time', RelativeTimeElement);
+}
diff --git a/qortal-ui-plugins/plugins/core/components/time-elements/relative-time.js b/qortal-ui-plugins/plugins/core/components/time-elements/relative-time.js
new file mode 100644
index 00000000..a2b4a6e5
--- /dev/null
+++ b/qortal-ui-plugins/plugins/core/components/time-elements/relative-time.js
@@ -0,0 +1,290 @@
+import { strftime, makeFormatter, makeRelativeFormat, isDayFirst, isThisYear, isYearSeparator } from './utils';
+export default class RelativeTime {
+ constructor(date, locale) {
+ this.date = date;
+ this.locale = locale;
+ }
+ toString() {
+ const ago = this.timeElapsed();
+ if (ago) {
+ return ago;
+ }
+ else {
+ const ahead = this.timeAhead();
+ if (ahead) {
+ return ahead;
+ }
+ else {
+ return `on ${this.formatDate()}`;
+ }
+ }
+ }
+ timeElapsed() {
+ const ms = new Date().getTime() - this.date.getTime();
+ const sec = Math.round(ms / 1000);
+ const min = Math.round(sec / 60);
+ const hr = Math.round(min / 60);
+ const day = Math.round(hr / 24);
+ if (ms >= 0 && day < 30) {
+ return this.timeAgoFromMs(ms);
+ }
+ else {
+ return null;
+ }
+ }
+ timeAhead() {
+ const ms = this.date.getTime() - new Date().getTime();
+ const sec = Math.round(ms / 1000);
+ const min = Math.round(sec / 60);
+ const hr = Math.round(min / 60);
+ const day = Math.round(hr / 24);
+ if (ms >= 0 && day < 30) {
+ return this.timeUntil();
+ }
+ else {
+ return null;
+ }
+ }
+ timeAgo() {
+ const ms = new Date().getTime() - this.date.getTime();
+ return this.timeAgoFromMs(ms);
+ }
+ timeAgoFromMs(ms) {
+ const sec = Math.round(ms / 1000);
+ const min = Math.round(sec / 60);
+ const hr = Math.round(min / 60);
+ const day = Math.round(hr / 24);
+ const month = Math.round(day / 30);
+ const year = Math.round(month / 12);
+ if (ms < 0) {
+ return formatRelativeTime(this.locale, 0, 'second');
+ }
+ else if (sec < 10) {
+ return formatRelativeTime(this.locale, 0, 'second');
+ }
+ else if (sec < 45) {
+ return formatRelativeTime(this.locale, -sec, 'second');
+ }
+ else if (sec < 90) {
+ return formatRelativeTime(this.locale, -min, 'minute');
+ }
+ else if (min < 45) {
+ return formatRelativeTime(this.locale, -min, 'minute');
+ }
+ else if (min < 90) {
+ return formatRelativeTime(this.locale, -hr, 'hour');
+ }
+ else if (hr < 24) {
+ return formatRelativeTime(this.locale, -hr, 'hour');
+ }
+ else if (hr < 36) {
+ return formatRelativeTime(this.locale, -day, 'day');
+ }
+ else if (day < 30) {
+ return formatRelativeTime(this.locale, -day, 'day');
+ }
+ else if (month < 18) {
+ return formatRelativeTime(this.locale, -month, 'month');
+ }
+ else {
+ return formatRelativeTime(this.locale, -year, 'year');
+ }
+ }
+ microTimeAgo() {
+ const ms = new Date().getTime() - this.date.getTime();
+ const sec = Math.round(ms / 1000);
+ const min = Math.round(sec / 60);
+ const hr = Math.round(min / 60);
+ const day = Math.round(hr / 24);
+ const month = Math.round(day / 30);
+ const year = Math.round(month / 12);
+ if (min < 1) {
+ return '1m';
+ }
+ else if (min < 60) {
+ return `${min}m`;
+ }
+ else if (hr < 24) {
+ return `${hr}h`;
+ }
+ else if (day < 365) {
+ return `${day}d`;
+ }
+ else {
+ return `${year}y`;
+ }
+ }
+ timeUntil() {
+ const ms = this.date.getTime() - new Date().getTime();
+ return this.timeUntilFromMs(ms);
+ }
+ timeUntilFromMs(ms) {
+ const sec = Math.round(ms / 1000);
+ const min = Math.round(sec / 60);
+ const hr = Math.round(min / 60);
+ const day = Math.round(hr / 24);
+ const month = Math.round(day / 30);
+ const year = Math.round(month / 12);
+ if (month >= 18) {
+ return formatRelativeTime(this.locale, year, 'year');
+ }
+ else if (month >= 12) {
+ return formatRelativeTime(this.locale, year, 'year');
+ }
+ else if (day >= 45) {
+ return formatRelativeTime(this.locale, month, 'month');
+ }
+ else if (day >= 30) {
+ return formatRelativeTime(this.locale, month, 'month');
+ }
+ else if (hr >= 36) {
+ return formatRelativeTime(this.locale, day, 'day');
+ }
+ else if (hr >= 24) {
+ return formatRelativeTime(this.locale, day, 'day');
+ }
+ else if (min >= 90) {
+ return formatRelativeTime(this.locale, hr, 'hour');
+ }
+ else if (min >= 45) {
+ return formatRelativeTime(this.locale, hr, 'hour');
+ }
+ else if (sec >= 90) {
+ return formatRelativeTime(this.locale, min, 'minute');
+ }
+ else if (sec >= 45) {
+ return formatRelativeTime(this.locale, min, 'minute');
+ }
+ else if (sec >= 10) {
+ return formatRelativeTime(this.locale, sec, 'second');
+ }
+ else {
+ return formatRelativeTime(this.locale, 0, 'second');
+ }
+ }
+ microTimeUntil() {
+ const ms = this.date.getTime() - new Date().getTime();
+ const sec = Math.round(ms / 1000);
+ const min = Math.round(sec / 60);
+ const hr = Math.round(min / 60);
+ const day = Math.round(hr / 24);
+ const month = Math.round(day / 30);
+ const year = Math.round(month / 12);
+ if (day >= 365) {
+ return `${year}y`;
+ }
+ else if (hr >= 24) {
+ return `${day}d`;
+ }
+ else if (min >= 60) {
+ return `${hr}h`;
+ }
+ else if (min > 1) {
+ return `${min}m`;
+ }
+ else {
+ return '1m';
+ }
+ }
+ formatDate() {
+ let format = isDayFirst() ? '%e %b' : '%b %e';
+ if (!isThisYear(this.date)) {
+ format += isYearSeparator() ? ', %Y' : ' %Y';
+ }
+ return strftime(this.date, format);
+ }
+ formatTime() {
+ const formatter = timeFormatter();
+ if (formatter) {
+ return formatter.format(this.date);
+ }
+ else {
+ return strftime(this.date, '%l:%M%P');
+ }
+ }
+}
+function formatRelativeTime(locale, value, unit) {
+ const formatter = makeRelativeFormat(locale, { numeric: 'auto' });
+ if (formatter) {
+ return formatter.format(value, unit);
+ }
+ else {
+ return formatEnRelativeTime(value, unit);
+ }
+}
+function formatEnRelativeTime(value, unit) {
+ if (value === 0) {
+ switch (unit) {
+ case 'year':
+ case 'quarter':
+ case 'month':
+ case 'week':
+ return `this ${unit}`;
+ case 'day':
+ return 'today';
+ case 'hour':
+ case 'minute':
+ return `in 0 ${unit}s`;
+ case 'second':
+ return 'now';
+ }
+ }
+ else if (value === 1) {
+ switch (unit) {
+ case 'year':
+ case 'quarter':
+ case 'month':
+ case 'week':
+ return `next ${unit}`;
+ case 'day':
+ return 'tomorrow';
+ case 'hour':
+ case 'minute':
+ case 'second':
+ return `in 1 ${unit}`;
+ }
+ }
+ else if (value === -1) {
+ switch (unit) {
+ case 'year':
+ case 'quarter':
+ case 'month':
+ case 'week':
+ return `last ${unit}`;
+ case 'day':
+ return 'yesterday';
+ case 'hour':
+ case 'minute':
+ case 'second':
+ return `1 ${unit} ago`;
+ }
+ }
+ else if (value > 1) {
+ switch (unit) {
+ case 'year':
+ case 'quarter':
+ case 'month':
+ case 'week':
+ case 'day':
+ case 'hour':
+ case 'minute':
+ case 'second':
+ return `in ${value} ${unit}s`;
+ }
+ }
+ else if (value < -1) {
+ switch (unit) {
+ case 'year':
+ case 'quarter':
+ case 'month':
+ case 'week':
+ case 'day':
+ case 'hour':
+ case 'minute':
+ case 'second':
+ return `${-value} ${unit}s ago`;
+ }
+ }
+ throw new RangeError(`Invalid unit argument for format() '${unit}'`);
+}
+const timeFormatter = makeFormatter({ hour: 'numeric', minute: '2-digit' });
diff --git a/qortal-ui-plugins/plugins/core/components/time-elements/time-ago-element.js b/qortal-ui-plugins/plugins/core/components/time-elements/time-ago-element.js
new file mode 100644
index 00000000..6ac6b25a
--- /dev/null
+++ b/qortal-ui-plugins/plugins/core/components/time-elements/time-ago-element.js
@@ -0,0 +1,21 @@
+import RelativeTime from './relative-time';
+import RelativeTimeElement from './relative-time-element';
+import { localeFromElement } from './utils';
+export default class TimeAgoElement extends RelativeTimeElement {
+ getFormattedDate() {
+ const format = this.getAttribute('format');
+ const date = this.date;
+ if (!date)
+ return;
+ if (format === 'micro') {
+ return new RelativeTime(date, localeFromElement(this)).microTimeAgo();
+ }
+ else {
+ return new RelativeTime(date, localeFromElement(this)).timeAgo();
+ }
+ }
+}
+if (!window.customElements.get('time-ago')) {
+ window.TimeAgoElement = TimeAgoElement;
+ window.customElements.define('time-ago', TimeAgoElement);
+}
diff --git a/qortal-ui-plugins/plugins/core/components/time-elements/time-until-element.js b/qortal-ui-plugins/plugins/core/components/time-elements/time-until-element.js
new file mode 100644
index 00000000..2b57a845
--- /dev/null
+++ b/qortal-ui-plugins/plugins/core/components/time-elements/time-until-element.js
@@ -0,0 +1,21 @@
+import RelativeTime from './relative-time';
+import RelativeTimeElement from './relative-time-element';
+import { localeFromElement } from './utils';
+export default class TimeUntilElement extends RelativeTimeElement {
+ getFormattedDate() {
+ const format = this.getAttribute('format');
+ const date = this.date;
+ if (!date)
+ return;
+ if (format === 'micro') {
+ return new RelativeTime(date, localeFromElement(this)).microTimeUntil();
+ }
+ else {
+ return new RelativeTime(date, localeFromElement(this)).timeUntil();
+ }
+ }
+}
+if (!window.customElements.get('time-until')) {
+ window.TimeUntilElement = TimeUntilElement;
+ window.customElements.define('time-until', TimeUntilElement);
+}
diff --git a/qortal-ui-plugins/plugins/core/components/time-elements/utils.js b/qortal-ui-plugins/plugins/core/components/time-elements/utils.js
new file mode 100644
index 00000000..7bf4b1e7
--- /dev/null
+++ b/qortal-ui-plugins/plugins/core/components/time-elements/utils.js
@@ -0,0 +1,166 @@
+const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
+const months = [
+ 'January',
+ 'February',
+ 'March',
+ 'April',
+ 'May',
+ 'June',
+ 'July',
+ 'August',
+ 'September',
+ 'October',
+ 'November',
+ 'December'
+];
+function pad(num) {
+ return `0${num}`.slice(-2);
+}
+export function strftime(time, formatString) {
+ const day = time.getDay();
+ const date = time.getDate();
+ const month = time.getMonth();
+ const year = time.getFullYear();
+ const hour = time.getHours();
+ const minute = time.getMinutes();
+ const second = time.getSeconds();
+ return formatString.replace(/%([%aAbBcdeHIlmMpPSwyYZz])/g, function (_arg) {
+ let match;
+ const modifier = _arg[1];
+ switch (modifier) {
+ case '%':
+ return '%';
+ case 'a':
+ return weekdays[day].slice(0, 3);
+ case 'A':
+ return weekdays[day];
+ case 'b':
+ return months[month].slice(0, 3);
+ case 'B':
+ return months[month];
+ case 'c':
+ return time.toString();
+ case 'd':
+ return pad(date);
+ case 'e':
+ return String(date);
+ case 'H':
+ return pad(hour);
+ case 'I':
+ return pad(strftime(time, '%l'));
+ case 'l':
+ if (hour === 0 || hour === 12) {
+ return String(12);
+ }
+ else {
+ return String((hour + 12) % 12);
+ }
+ case 'm':
+ return pad(month + 1);
+ case 'M':
+ return pad(minute);
+ case 'p':
+ if (hour > 11) {
+ return 'PM';
+ }
+ else {
+ return 'AM';
+ }
+ case 'P':
+ if (hour > 11) {
+ return 'pm';
+ }
+ else {
+ return 'am';
+ }
+ case 'S':
+ return pad(second);
+ case 'w':
+ return String(day);
+ case 'y':
+ return pad(year % 100);
+ case 'Y':
+ return String(year);
+ case 'Z':
+ match = time.toString().match(/\((\w+)\)$/);
+ return match ? match[1] : '';
+ case 'z':
+ match = time.toString().match(/\w([+-]\d\d\d\d) /);
+ return match ? match[1] : '';
+ }
+ return '';
+ });
+}
+export function makeFormatter(options) {
+ let format;
+ return function () {
+ if (format)
+ return format;
+ if ('Intl' in window) {
+ try {
+ format = new Intl.DateTimeFormat(undefined, options);
+ return format;
+ }
+ catch (e) {
+ if (!(e instanceof RangeError)) {
+ throw e;
+ }
+ }
+ }
+ };
+}
+let dayFirst = null;
+const dayFirstFormatter = makeFormatter({ day: 'numeric', month: 'short' });
+export function isDayFirst() {
+ if (dayFirst !== null) {
+ return dayFirst;
+ }
+ const formatter = dayFirstFormatter();
+ if (formatter) {
+ const output = formatter.format(new Date(0));
+ dayFirst = !!output.match(/^\d/);
+ return dayFirst;
+ }
+ else {
+ return false;
+ }
+}
+let yearSeparator = null;
+const yearFormatter = makeFormatter({ day: 'numeric', month: 'short', year: 'numeric' });
+export function isYearSeparator() {
+ if (yearSeparator !== null) {
+ return yearSeparator;
+ }
+ const formatter = yearFormatter();
+ if (formatter) {
+ const output = formatter.format(new Date(0));
+ yearSeparator = !!output.match(/\d,/);
+ return yearSeparator;
+ }
+ else {
+ return true;
+ }
+}
+export function isThisYear(date) {
+ const now = new Date();
+ return now.getUTCFullYear() === date.getUTCFullYear();
+}
+export function makeRelativeFormat(locale, options) {
+ if ('Intl' in window && 'RelativeTimeFormat' in window.Intl) {
+ try {
+ return new Intl.RelativeTimeFormat(locale, options);
+ }
+ catch (e) {
+ if (!(e instanceof RangeError)) {
+ throw e;
+ }
+ }
+ }
+}
+export function localeFromElement(el) {
+ const container = el.closest('[lang]');
+ if (container instanceof HTMLElement && container.lang) {
+ return container.lang;
+ }
+ return 'default';
+}
From ec22beb513754066bb57ed2c094180a760ee6b35 Mon Sep 17 00:00:00 2001
From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com>
Date: Thu, 5 Jan 2023 17:01:36 +0100
Subject: [PATCH 06/19] Update deps
---
qortal-ui-core/package.json | 4 ++--
qortal-ui-plugins/package.json | 7 +++----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/qortal-ui-core/package.json b/qortal-ui-core/package.json
index 7cdec4ba..d5b00b64 100644
--- a/qortal-ui-core/package.json
+++ b/qortal-ui-core/package.json
@@ -22,7 +22,7 @@
"sass": "1.57.1"
},
"devDependencies": {
- "@babel/core": "7.20.7",
+ "@babel/core": "7.20.12",
"@material/mwc-button": "0.27.0",
"@material/mwc-checkbox": "0.27.0",
"@material/mwc-dialog": "0.27.0",
@@ -74,7 +74,7 @@
"random-sentence-generator": "0.0.8",
"redux": "4.2.0",
"redux-thunk": "2.4.2",
- "rollup": "3.9.0",
+ "rollup": "3.9.1",
"rollup-plugin-node-globals": "1.4.0",
"rollup-plugin-progress": "1.1.2",
"rollup-plugin-scss": "3.0.0"
diff --git a/qortal-ui-plugins/package.json b/qortal-ui-plugins/package.json
index 88dfd7af..ad9f149a 100644
--- a/qortal-ui-plugins/package.json
+++ b/qortal-ui-plugins/package.json
@@ -22,8 +22,7 @@
"emoji-picker-js": "https://github.com/Qortal/emoji-picker-js"
},
"devDependencies": {
- "@babel/core": "7.20.7",
- "@github/time-elements": "3.1.2",
+ "@babel/core": "7.20.12",
"@material/mwc-button": "0.27.0",
"@material/mwc-checkbox": "0.27.0",
"@material/mwc-dialog": "0.27.0",
@@ -59,11 +58,11 @@
"html-escaper": "3.0.3",
"lit": "2.5.0",
"lit-translate": "2.0.1",
- "rollup": "3.9.0",
+ "rollup": "3.9.1",
"rollup-plugin-node-globals": "1.4.0",
"rollup-plugin-progress": "1.1.2"
},
"engines": {
"node": ">=16.17.1"
}
-}
+}
\ No newline at end of file
From 631cffeb217bacae062b592d8680aaf9087456b0 Mon Sep 17 00:00:00 2001
From: Justin Ferrari <‘justinwesleyferrari@gmail.com’>
Date: Fri, 6 Jan 2023 14:13:13 -0500
Subject: [PATCH 07/19] Tip user completed
---
qortal-ui-core/language/us.json | 463 +++++++++---------
qortal-ui-plugins/package.json | 6 +-
.../plugins/core/components/ChatPage.js | 28 +-
.../plugins/core/components/ChatRightPanel.js | 385 ++-------------
.../plugins/core/components/TipUser-css.js | 85 ++++
.../plugins/core/components/TipUser.js | 282 +++++++++++
.../plugins/utils/getUserNameFromAddress.js | 2 +-
7 files changed, 670 insertions(+), 581 deletions(-)
create mode 100644 qortal-ui-plugins/plugins/core/components/TipUser-css.js
create mode 100644 qortal-ui-plugins/plugins/core/components/TipUser.js
diff --git a/qortal-ui-core/language/us.json b/qortal-ui-core/language/us.json
index 7958a057..66517cf1 100644
--- a/qortal-ui-core/language/us.json
+++ b/qortal-ui-core/language/us.json
@@ -21,22 +21,22 @@
"korean": "Korean"
},
"sidemenu": {
- "minting":"MINTING",
- "mintingdetails":"MINTING DETAILS",
- "becomeAMinter":"BECOME A MINTER",
- "wallets":"WALLETS",
- "tradeportal":"TRADE PORTAL",
- "rewardshare":"REWARD SHARE",
- "nameregistration":"NAME REGISTRATION",
- "websites":"WEBSITES",
- "management":"MANAGEMENT",
- "datamanagement":"DATA MANAGEMENT",
- "qchat":"Q-CHAT",
- "groupmanagement":"GROUP MANAGEMENT",
- "puzzles":"PUZZLES",
- "nodemanagement":"NODE MANAGEMENT",
- "trading":"TRADING",
- "groups":"GROUPS"
+ "minting": "MINTING",
+ "mintingdetails": "MINTING DETAILS",
+ "becomeAMinter": "BECOME A MINTER",
+ "wallets": "WALLETS",
+ "tradeportal": "TRADE PORTAL",
+ "rewardshare": "REWARD SHARE",
+ "nameregistration": "NAME REGISTRATION",
+ "websites": "WEBSITES",
+ "management": "MANAGEMENT",
+ "datamanagement": "DATA MANAGEMENT",
+ "qchat": "Q-CHAT",
+ "groupmanagement": "GROUP MANAGEMENT",
+ "puzzles": "PUZZLES",
+ "nodemanagement": "NODE MANAGEMENT",
+ "trading": "TRADING",
+ "groups": "GROUPS"
},
"login": {
"login": "Login",
@@ -130,32 +130,32 @@
"snack4": "Nodes successfully saved as",
"snack5": "Nodes successfully imported"
},
- "appinfo":{
- "blockheight":"Block Height",
- "uiversion":"UI Version",
- "coreversion":"Core Version",
- "minting":"(Minting)",
- "synchronizing":"Synchronizing",
- "peers":"Connected Peers"
+ "appinfo": {
+ "blockheight": "Block Height",
+ "uiversion": "UI Version",
+ "coreversion": "Core Version",
+ "minting": "(Minting)",
+ "synchronizing": "Synchronizing",
+ "peers": "Connected Peers"
},
"walletprofile": {
"minterlevel": "Minter Level",
"blocksminted": "Blocks Minted"
},
- "general":{
- "yes":"Yes",
- "no":"No",
- "confirm":"Confirm",
- "decline":"Decline",
- "open":"Open",
- "close":"Close",
- "back":"Back",
- "next":"Next",
- "create":"Create",
- "continue":"Continue",
- "save":"Save",
- "balance":"Balance",
- "balances":"YOUR WALLET BALANCES"
+ "general": {
+ "yes": "Yes",
+ "no": "No",
+ "confirm": "Confirm",
+ "decline": "Decline",
+ "open": "Open",
+ "close": "Close",
+ "back": "Back",
+ "next": "Next",
+ "create": "Create",
+ "continue": "Continue",
+ "save": "Save",
+ "balance": "Balance",
+ "balances": "YOUR WALLET BALANCES"
},
"startminting": {
"smchange1": "Cannot fetch minting accounts",
@@ -280,55 +280,55 @@
"wchange56": "WARNING!",
"wchange57": "Memo"
},
- "tradepage":{
- "tchange1":"Trade Portal",
- "tchange2":"Select Trading Pair",
- "tchange3":"HISTORIC MARKET TRADES",
- "tchange4":"MY TRADE HISTORY",
- "tchange5":"OPEN MARKET SELL ORDERS",
- "tchange6":"MY ORDERS",
- "tchange7":"Stuck Offers",
- "tchange8":"Amount",
- "tchange9":"Price",
- "tchange10":"Total",
- "tchange11":"Date",
- "tchange12":"Status",
- "tchange13":"Seller",
- "tchange14":"Price Each",
- "tchange15":"Clear Form",
- "tchange16":"You have",
- "tchange17":"Action",
- "tchange18":"BUY",
- "tchange19":"SELL",
- "tchange20":"Failed to Create Trade. Try again!",
- "tchange21":"Failed to Create Trade. Error Code",
- "tchange22":"Insufficient Funds!",
- "tchange23":"Buy Request Successful!",
- "tchange24":"Buy Request Existing!",
- "tchange25":"Failed to Create Trade. Error Code",
- "tchange26":"Trade Cancelling In Progress!",
- "tchange27":"Failed to Cancel Trade. Try again!",
- "tchange28":"Failed to Cancel Trade. Error Code",
- "tchange29":"CANCEL",
- "tchange30":"Failed to Fetch Balance. Try again!",
- "tchange31":"SOLD",
- "tchange32":"BOUGHT",
- "tchange33":"Average",
- "tchange34":"Amount can not be 0",
- "tchange35":"Price can not be 0",
- "tchange36":"PENDING AUTO BUY",
- "tchange37":"No auto buy order found !",
- "tchange38":"ADD",
- "tchange39":"AUTO BUY ORDER",
- "tchange40":"Price",
- "tchange41":"Successfully removed auto buy order!",
- "tchange42":"MARKET OPEN SELL ORDERS",
- "tchange43":"MY BUY HISTORY",
- "tchange44":"Successfully added auto buy order!",
- "tchange45":"AUTO BUY WITH",
- "tchange46":"AUTO BUY",
- "tchange47":"Sell for this price",
- "tchange48":"NOT ENOUGH"
+ "tradepage": {
+ "tchange1": "Trade Portal",
+ "tchange2": "Select Trading Pair",
+ "tchange3": "HISTORIC MARKET TRADES",
+ "tchange4": "MY TRADE HISTORY",
+ "tchange5": "OPEN MARKET SELL ORDERS",
+ "tchange6": "MY ORDERS",
+ "tchange7": "Stuck Offers",
+ "tchange8": "Amount",
+ "tchange9": "Price",
+ "tchange10": "Total",
+ "tchange11": "Date",
+ "tchange12": "Status",
+ "tchange13": "Seller",
+ "tchange14": "Price Each",
+ "tchange15": "Clear Form",
+ "tchange16": "You have",
+ "tchange17": "Action",
+ "tchange18": "BUY",
+ "tchange19": "SELL",
+ "tchange20": "Failed to Create Trade. Try again!",
+ "tchange21": "Failed to Create Trade. Error Code",
+ "tchange22": "Insufficient Funds!",
+ "tchange23": "Buy Request Successful!",
+ "tchange24": "Buy Request Existing!",
+ "tchange25": "Failed to Create Trade. Error Code",
+ "tchange26": "Trade Cancelling In Progress!",
+ "tchange27": "Failed to Cancel Trade. Try again!",
+ "tchange28": "Failed to Cancel Trade. Error Code",
+ "tchange29": "CANCEL",
+ "tchange30": "Failed to Fetch Balance. Try again!",
+ "tchange31": "SOLD",
+ "tchange32": "BOUGHT",
+ "tchange33": "Average",
+ "tchange34": "Amount can not be 0",
+ "tchange35": "Price can not be 0",
+ "tchange36": "PENDING AUTO BUY",
+ "tchange37": "No auto buy order found !",
+ "tchange38": "ADD",
+ "tchange39": "AUTO BUY ORDER",
+ "tchange40": "Price",
+ "tchange41": "Successfully removed auto buy order!",
+ "tchange42": "MARKET OPEN SELL ORDERS",
+ "tchange43": "MY BUY HISTORY",
+ "tchange44": "Successfully added auto buy order!",
+ "tchange45": "AUTO BUY WITH",
+ "tchange46": "AUTO BUY",
+ "tchange47": "Sell for this price",
+ "tchange48": "NOT ENOUGH"
},
"rewardsharepage": {
"rchange1": "Rewardshares",
@@ -354,47 +354,47 @@
"rchange21": "Reward Share Successful!",
"rchange22": "Reward Share Removed Successfully!"
},
- "registernamepage":{
- "nchange1":"Name Registration",
- "nchange2":"Register Name",
- "nchange3":"Registered Names",
- "nchange4":"Avatar",
- "nchange5":"Name",
- "nchange6":"Owner",
- "nchange7":"Action",
- "nchange8":"No names registered by this account!",
- "nchange9":"Register a Name!",
- "nchange10":"Description (optional)",
- "nchange11":"Doing something delicious",
- "nchange12":"Registering Name",
- "nchange13":"The current name registration fee is",
- "nchange14":"Register",
- "nchange15":"Set Avatar",
- "nchange16":"Need Core Update",
- "nchange17":"Name Already Exists!",
- "nchange18":"Name Registration Successful!",
- "nchange19":"Sell Name",
- "nchange20":"Cancel Sell",
- "nchange21":"Buy Name",
- "nchange22":"Open Market Names To Sell",
- "nchange23":"Sell Price",
- "nchange24":"No Names To Sell",
- "nchange25":"Name To Sell",
- "nchange26":"Are you sure to sell this name ?",
- "nchange27":"For this price in QORT",
- "nchange28":"On pressing confirm, the sell name request will be sent!",
- "nchange29":"Name To Cancel",
- "nchange30":"Are you sure to cancel the sell for this name ?",
- "nchange31":"On pressing confirm, the cancel sell name request will be sent!",
- "nchange32":"Sell Name Request Successful!",
- "nchange33":"Cancel Sell Name Request Successful!",
- "nchange34":"Buy Name Request Successful!",
- "nchange35":"YOU HAVE A NAME!",
- "nchange36":"Only accounts with no registered name can buy a name.",
- "nchange37":"ATTENTION!",
- "nchange38":"You not have enough qort to buy this name.",
- "nchange39":"Are you sure to buy this name ?",
- "nchange40":"On pressing confirm, the buy name request will be sent!"
+ "registernamepage": {
+ "nchange1": "Name Registration",
+ "nchange2": "Register Name",
+ "nchange3": "Registered Names",
+ "nchange4": "Avatar",
+ "nchange5": "Name",
+ "nchange6": "Owner",
+ "nchange7": "Action",
+ "nchange8": "No names registered by this account!",
+ "nchange9": "Register a Name!",
+ "nchange10": "Description (optional)",
+ "nchange11": "Doing something delicious",
+ "nchange12": "Registering Name",
+ "nchange13": "The current name registration fee is",
+ "nchange14": "Register",
+ "nchange15": "Set Avatar",
+ "nchange16": "Need Core Update",
+ "nchange17": "Name Already Exists!",
+ "nchange18": "Name Registration Successful!",
+ "nchange19": "Sell Name",
+ "nchange20": "Cancel Sell",
+ "nchange21": "Buy Name",
+ "nchange22": "Open Market Names To Sell",
+ "nchange23": "Sell Price",
+ "nchange24": "No Names To Sell",
+ "nchange25": "Name To Sell",
+ "nchange26": "Are you sure to sell this name ?",
+ "nchange27": "For this price in QORT",
+ "nchange28": "On pressing confirm, the sell name request will be sent!",
+ "nchange29": "Name To Cancel",
+ "nchange30": "Are you sure to cancel the sell for this name ?",
+ "nchange31": "On pressing confirm, the cancel sell name request will be sent!",
+ "nchange32": "Sell Name Request Successful!",
+ "nchange33": "Cancel Sell Name Request Successful!",
+ "nchange34": "Buy Name Request Successful!",
+ "nchange35": "YOU HAVE A NAME!",
+ "nchange36": "Only accounts with no registered name can buy a name.",
+ "nchange37": "ATTENTION!",
+ "nchange38": "You not have enough qort to buy this name.",
+ "nchange39": "Are you sure to buy this name ?",
+ "nchange40": "On pressing confirm, the buy name request will be sent!"
},
"websitespage": {
"schange1": "Browse Websites",
@@ -541,9 +541,8 @@
"cchange38": "User Verified",
"cchange39": "Cannot send an encrypted message to this user since they do not have their publickey on chain.",
"cchange40": "IMAGE (click to view)",
- "cchange41":"Your Balance Is Under 4.20 QORT",
- "cchange42":"Out of the need to combat spam, accounts with under 4.20 Qort balance will take a long time to SEND messages in Q-Chat. If you wish to immediately increase the send speed for Q-Chat messages, obtain over 4.20 QORT to your address. This can be done with trades in the Trade Portal, or by way of another Qortian giving you the QORT. Once you have over 4.20 QORT in your account, Q-Chat messages will be instant and this dialog will no more show. Thank you for your understanding of this necessary spam prevention method, and we hope you enjoy Qortal!"
-
+ "cchange41": "Your Balance Is Under 4.20 QORT",
+ "cchange42": "Out of the need to combat spam, accounts with under 4.20 Qort balance will take a long time to SEND messages in Q-Chat. If you wish to immediately increase the send speed for Q-Chat messages, obtain over 4.20 QORT to your address. This can be done with trades in the Trade Portal, or by way of another Qortian giving you the QORT. Once you have over 4.20 QORT in your account, Q-Chat messages will be instant and this dialog will no more show. Thank you for your understanding of this necessary spam prevention method, and we hope you enjoy Qortal!"
},
"welcomepage": {
"wcchange1": "Welcome to Q-Chat",
@@ -635,7 +634,15 @@
"gchange57": "TIP USER",
"gchange58": "Tip Amount",
"gchange59": "Available Balance",
- "gchange60": "Failed to Fetch QORT Balance. Try again!"
+ "gchange60": "Failed to Fetch QORT Balance. Try again!",
+ "gchange61": "Current static fee",
+ "gchange62": "Send",
+ "gchange63": "Insufficient Funds!",
+ "gchange64": "Invalid Amount!",
+ "gchange65": "Receiver cannot be empty!",
+ "gchange66": "Invalid Receiver!",
+ "gchange67": "Transaction Successful!",
+ "gchange68": "Transaction Failed!"
},
"puzzlepage": {
"pchange1": "Puzzles",
@@ -725,104 +732,104 @@
"rewarddialog5": "You are removing a reward share transaction associated with account:",
"rewarddialog6": "On pressing confirm, the rewardshare will be removed and the minting key will become invalid."
},
- "sponsorshipspage":{
- "schange1":"Active Sponsorships",
- "schange2":"Account Address",
- "schange3":"Total Sponsorships active",
- "schange4":"Next sponsorship ending in",
- "schange5":"Sponsor New Minter",
- "schange6":"Finished Sponsorships",
- "schange7":"Completed",
- "schange8":"Addresses",
- "schange9":"You currently have no active sponsorships",
- "schange10":"Public Key Lookup",
- "schange11":"Copy",
- "schange12":"Address to Public Key Converter",
- "schange13":"Enter address",
- "schange14":"In progress",
- "schange15":"Finishing up",
- "schange16":"Copy the key below and share it with your sponsored person.",
- "schange17":"Copied to clipboard",
- "schange18":"Warning: do not leave this plugin or close the Qortal UI until completion!",
- "schange19":"Copy Sponsorship Key",
- "schange20":"Creating relationship",
- "schange21":"Remove Sponsorship Key"
+ "sponsorshipspage": {
+ "schange1": "Active Sponsorships",
+ "schange2": "Account Address",
+ "schange3": "Total Sponsorships active",
+ "schange4": "Next sponsorship ending in",
+ "schange5": "Sponsor New Minter",
+ "schange6": "Finished Sponsorships",
+ "schange7": "Completed",
+ "schange8": "Addresses",
+ "schange9": "You currently have no active sponsorships",
+ "schange10": "Public Key Lookup",
+ "schange11": "Copy",
+ "schange12": "Address to Public Key Converter",
+ "schange13": "Enter address",
+ "schange14": "In progress",
+ "schange15": "Finishing up",
+ "schange16": "Copy the key below and share it with your sponsored person.",
+ "schange17": "Copied to clipboard",
+ "schange18": "Warning: do not leave this plugin or close the Qortal UI until completion!",
+ "schange19": "Copy Sponsorship Key",
+ "schange20": "Creating relationship",
+ "schange21": "Remove Sponsorship Key"
},
- "explorerpage":{
- "exp1":"Address or name to search",
- "exp2":"Account Balance",
- "exp3":"More Info",
- "exp4":"Address or Name not found !",
- "exp5":"Note that registered names are case-sensitive.",
- "exp6":"Founder",
- "exp7":"Info",
- "exp8":"Show all buy trades",
- "exp9":"Show all sell trades",
- "exp10":"BUY HISTORY",
- "exp11":"SELL HISTORY",
- "exp12":"No buy trades made yet.",
- "exp13":"No sell trades made yet.",
- "exp14":"Show complete info",
- "exp15":"Minting Since",
- "exp16":"Not Minting",
- "exp17":"ALL PAYMENTS",
- "exp18":"Payments",
- "exp19":"Sent",
- "exp20":"Received",
- "exp21":"Trades"
+ "explorerpage": {
+ "exp1": "Address or name to search",
+ "exp2": "Account Balance",
+ "exp3": "More Info",
+ "exp4": "Address or Name not found !",
+ "exp5": "Note that registered names are case-sensitive.",
+ "exp6": "Founder",
+ "exp7": "Info",
+ "exp8": "Show all buy trades",
+ "exp9": "Show all sell trades",
+ "exp10": "BUY HISTORY",
+ "exp11": "SELL HISTORY",
+ "exp12": "No buy trades made yet.",
+ "exp13": "No sell trades made yet.",
+ "exp14": "Show complete info",
+ "exp15": "Minting Since",
+ "exp16": "Not Minting",
+ "exp17": "ALL PAYMENTS",
+ "exp18": "Payments",
+ "exp19": "Sent",
+ "exp20": "Received",
+ "exp21": "Trades"
},
- "managegroup":{
- "mg1":"Group Members",
- "mg2":"Invite To Group",
- "mg3":"Group Admins",
- "mg4":"Update Group",
- "mg5":"Close Manage Group",
- "mg6":"BAN",
- "mg7":"KICK",
- "mg8":"Group ID",
- "mg9":"Joined",
- "mg10":"Add Group Admin",
- "mg11":"Are you sure to add this member to admins ?",
- "mg12":"On pressing confirm, add admin request will be sent!",
- "mg13":"Remove Group Admin",
- "mg14":"Remove Admin Address",
- "mg15":"Are you sure to remove this member from admins ?",
- "mg16":"On pressing confirm, remove admin request will be sent!",
- "mg17":"Ban Member From Group",
- "mg18":"Member Name",
- "mg19":"Member Address",
- "mg20":"How Long To Ban",
- "mg21":"Reason For Ban",
- "mg22":"Are you sure to ban this member from the group ?",
- "mg23":"On pressing confirm, the ban request will be sent!",
- "mg24":"FOREVER",
- "mg25":"Banned Members",
- "mg26":"CANCEL BAN",
- "mg27":"Ban Expiry",
- "mg28":"Cancel Ban Member From Group",
- "mg29":"Are you sure to cancel the ban for this member from the group ?",
- "mg30":"On pressing confirm, the cancel ban request will be sent!",
- "mg31":"Kick Member From Group",
- "mg32":"Reason For Kick",
- "mg33":"Are you sure to kick this member from the group ?",
- "mg34":"On pressing confirm, the kick request will be sent!",
- "mg35":"No Open Group Invites",
- "mg36":"Your Open Group Invites",
- "mg37":"Address or name to invite",
- "mg38":"Invite Expiry Time",
- "mg39":"All Fields Are Required",
- "mg40":"Are you sure to invite this member to the group ?",
- "mg41":"On pressing confirm, the invite request will be sent!",
- "mg42":"Group Type",
- "mg43":"Invite Expiry",
- "mg44":"Public Group",
- "mg45":"Private Group",
- "mg46":"Cancel Invite",
- "mg47":"Cancel Invite To Group",
- "mg48":"Are you sure to cancel the invite for this member ?",
- "mg49":"On pressing confirm, the cancel invite request will be sent!",
- "mg50":"Coming Soon...",
- "mg51":"Minimum 3 Characters / Maximum 32 Characters",
- "mg52":"Maximum 128 Characters"
+ "managegroup": {
+ "mg1": "Group Members",
+ "mg2": "Invite To Group",
+ "mg3": "Group Admins",
+ "mg4": "Update Group",
+ "mg5": "Close Manage Group",
+ "mg6": "BAN",
+ "mg7": "KICK",
+ "mg8": "Group ID",
+ "mg9": "Joined",
+ "mg10": "Add Group Admin",
+ "mg11": "Are you sure to add this member to admins ?",
+ "mg12": "On pressing confirm, add admin request will be sent!",
+ "mg13": "Remove Group Admin",
+ "mg14": "Remove Admin Address",
+ "mg15": "Are you sure to remove this member from admins ?",
+ "mg16": "On pressing confirm, remove admin request will be sent!",
+ "mg17": "Ban Member From Group",
+ "mg18": "Member Name",
+ "mg19": "Member Address",
+ "mg20": "How Long To Ban",
+ "mg21": "Reason For Ban",
+ "mg22": "Are you sure to ban this member from the group ?",
+ "mg23": "On pressing confirm, the ban request will be sent!",
+ "mg24": "FOREVER",
+ "mg25": "Banned Members",
+ "mg26": "CANCEL BAN",
+ "mg27": "Ban Expiry",
+ "mg28": "Cancel Ban Member From Group",
+ "mg29": "Are you sure to cancel the ban for this member from the group ?",
+ "mg30": "On pressing confirm, the cancel ban request will be sent!",
+ "mg31": "Kick Member From Group",
+ "mg32": "Reason For Kick",
+ "mg33": "Are you sure to kick this member from the group ?",
+ "mg34": "On pressing confirm, the kick request will be sent!",
+ "mg35": "No Open Group Invites",
+ "mg36": "Your Open Group Invites",
+ "mg37": "Address or name to invite",
+ "mg38": "Invite Expiry Time",
+ "mg39": "All Fields Are Required",
+ "mg40": "Are you sure to invite this member to the group ?",
+ "mg41": "On pressing confirm, the invite request will be sent!",
+ "mg42": "Group Type",
+ "mg43": "Invite Expiry",
+ "mg44": "Public Group",
+ "mg45": "Private Group",
+ "mg46": "Cancel Invite",
+ "mg47": "Cancel Invite To Group",
+ "mg48": "Are you sure to cancel the invite for this member ?",
+ "mg49": "On pressing confirm, the cancel invite request will be sent!",
+ "mg50": "Coming Soon...",
+ "mg51": "Minimum 3 Characters / Maximum 32 Characters",
+ "mg52": "Maximum 128 Characters"
}
}
\ No newline at end of file
diff --git a/qortal-ui-plugins/package.json b/qortal-ui-plugins/package.json
index 4301c32a..4e813ff4 100644
--- a/qortal-ui-plugins/package.json
+++ b/qortal-ui-plugins/package.json
@@ -47,8 +47,8 @@
"@polymer/paper-slider": "3.0.1",
"@polymer/paper-spinner": "3.0.2",
"@polymer/paper-tooltip": "3.0.1",
- "@vaadin/horizontal-layout": "23.2.5",
- "@vaadin/tabs": "23.2.5",
+ "@vaadin/horizontal-layout": "23.3.2",
+ "@vaadin/tabs": "23.3.2",
"@rollup/plugin-alias": "4.0.2",
"@rollup/plugin-babel": "6.0.3",
"@rollup/plugin-commonjs": "24.0.0",
@@ -75,4 +75,4 @@
"engines": {
"node": ">=16.17.1"
}
-}
+}
\ No newline at end of file
diff --git a/qortal-ui-plugins/plugins/core/components/ChatPage.js b/qortal-ui-plugins/plugins/core/components/ChatPage.js
index 544db34f..a50cd34c 100644
--- a/qortal-ui-plugins/plugins/core/components/ChatPage.js
+++ b/qortal-ui-plugins/plugins/core/components/ChatPage.js
@@ -1171,22 +1171,20 @@ class ChatPage extends LitElement {