- ${translate("chatpage.cchange40")}
-
-
+
+ ${translate("chatpage.cchange40")}
+
` : html``}
${!this.isImageLoaded && image && this.viewImage ? html`
@@ -622,8 +645,53 @@ class MessageTemplate extends LitElement {
` : image && isImageDeleted ? html`
-
-
Are you sure you want to delete this image?
+
${translate("chatpage.cchange78")}
this.openDeleteImage = false}>
+
{
+ this.openDeleteAttachment = false;
+ }}>
+
+
${translate("chatpage.cchange79")}
+
+ this.openDeleteAttachment = false}>
+
+
+
+
`
}
}
diff --git a/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js b/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js
index e7879324..cb09cf94 100644
--- a/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js
+++ b/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js
@@ -15,6 +15,8 @@ class ChatTextEditor extends LitElement {
isLoadingMessages: { type: Boolean },
_sendMessage: { attribute: false },
placeholder: { type: String },
+ attachment: { type: Object },
+ insertFile: { attribute: false },
imageFile: { type: Object },
insertImage: { attribute: false },
iframeHeight: { type: Number },
@@ -481,16 +483,19 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
{
- this.insertImage(e.target.files[0]);
- const filePickerInput = this.shadowRoot.getElementById('file-picker')
- if(filePickerInput){
- filePickerInput.value = ""
- }
- }
- }"
- id="file-picker"
- class="file-picker-input" type="file" name="myImage" accept="image/*" />
+ @change="${e => {
+ this.insertFile(e.target.files[0]);
+ const filePickerInput = this.shadowRoot.getElementById('file-picker');
+ if (filePickerInput) {
+ filePickerInput.value = "";
+ }
+ }
+ }"
+ id="file-picker"
+ class="file-picker-input"
+ type="file"
+ name="myImage"
+ accept="image/*, .doc, .docx, .pdf, .zip, .pdf, .txt, .odt, .ods, .xls, .xlsx, .ppt, .pptx" />
${this.isLoading === false ? html`
@@ -692,7 +697,20 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
repliedTo: '',
version: 3
};
- } else {
+ } else if (this.attachment && this.iframeId === 'newAttachmentChat') {
+ messageObject = {
+ messageText: trimmedMessage,
+ attachments: [{
+ service: "QCHAT_ATTACHMENT",
+ name: '123456789123456789123456789',
+ identifier: '123456',
+ attachmentName: "123456789123456789123456789",
+ attachmentSize: "123456"
+ }],
+ repliedTo: '',
+ version: 2
+ };
+ } else {
messageObject = {
messageText: trimmedMessage,
images: [''],
@@ -713,4 +731,4 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b
}
-window.customElements.define("chat-text-editor", ChatTextEditor)
+window.customElements.define("chat-text-editor", ChatTextEditor)
\ No newline at end of file
diff --git a/qortal-ui-plugins/plugins/core/components/TimeAgo.js b/qortal-ui-plugins/plugins/core/components/TimeAgo.js
index ca3633b7..66164179 100644
--- a/qortal-ui-plugins/plugins/core/components/TimeAgo.js
+++ b/qortal-ui-plugins/plugins/core/components/TimeAgo.js
@@ -19,7 +19,7 @@ class TimeAgo extends LitElement {
updated(changedProps) {
changedProps.forEach((OldProp, name) => {
- if (name === 'timeIso') {
+ if (name === 'timeIso' || name === 'timestamp') {
this.renderTime(this.timestamp)
}
});
@@ -35,7 +35,6 @@ class TimeAgo extends LitElement {
}
render() {
-
return html`
`
diff --git a/qortal-ui-plugins/plugins/core/components/computePowWorkerImage.js b/qortal-ui-plugins/plugins/core/components/computePowWorkerFile.js
similarity index 100%
rename from qortal-ui-plugins/plugins/core/components/computePowWorkerImage.js
rename to qortal-ui-plugins/plugins/core/components/computePowWorkerFile.js
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 0148f33b..3338464c 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
@@ -22,6 +22,8 @@ import '@vaadin/icon'
import '@vaadin/icons'
import '@vaadin/grid'
import '@vaadin/grid/vaadin-grid-filter-column.js'
+import '@vaadin/grid/vaadin-grid-sort-column.js'
+import '@vaadin/text-field'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
@@ -33,6 +35,7 @@ class GroupManagement extends LitElement {
privateGroups: { type: Array },
joinedGroups: { type: Array },
groupInvites: { type: Array },
+ filteredItems: { type: Array },
privateGroupSearch: { type: Array },
newMembersList: { type: Array },
newAdminsList: { type: Array },
@@ -111,6 +114,9 @@ class GroupManagement extends LitElement {
--_lumo-grid-secondary-border-color: var(--border2);
}
+[part="input-field"] {
+ background-color: #fff;
+}
#group-management-page {
background: var(--white);
padding: 12px 24px;
@@ -437,6 +443,7 @@ class GroupManagement extends LitElement {
this.privateGroups = []
this.joinedGroups = []
this.groupInvites = []
+ this.filteredItems = []
this.privateGroupSearch = []
this.newMembersList = []
this.newAdminsList = []
@@ -1314,8 +1321,8 @@ class GroupManagement extends LitElement {
${translate("grouppage.gchange3")}
-
-
+
+
{
render(html`${this.renderRole(data.item)}`, root)
}}>
@@ -1359,11 +1366,25 @@ class GroupManagement extends LitElement {
${translate("grouppage.gchange9")}
-
-
-
-
-
+ {
+ this.filteredItems = []
+ const searchTerm = (e.target.value || '').trim()
+ const keys = ['groupName', 'description', 'owner']
+ const filtered = this.publicGroups.filter((search) => keys.some((key) => search[key].toLowerCase().includes(searchTerm.toLowerCase())))
+ this.filteredItems = filtered
+ }}"
+ >
+
+
+
+
+
+
+
{
render(html` this.joinGroup(data.item)}>queue ${translate("grouppage.gchange51")}`, root)
}}>
@@ -1773,7 +1794,8 @@ class GroupManagement extends LitElement {
this.publicGroups = results
this.privateGroups = _privateGroups
this.joinedGroups = _joinedGroups
- setTimeout(getOpen_JoinedGroups, 60000)
+ this.filteredItems = this.publicGroups
+ setTimeout(getOpen_JoinedGroups, 600000)
}
window.addEventListener("contextmenu", (event) => {
diff --git a/qortal-ui-plugins/plugins/core/messaging/q-chat/q-chat.src.js b/qortal-ui-plugins/plugins/core/messaging/q-chat/q-chat.src.js
index 4b62cbf5..7cc835a7 100644
--- a/qortal-ui-plugins/plugins/core/messaging/q-chat/q-chat.src.js
+++ b/qortal-ui-plugins/plugins/core/messaging/q-chat/q-chat.src.js
@@ -8,6 +8,7 @@ import { Epml } from '../../../../epml.js';
import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate';
import { qchatStyles } from './q-chat-css.src.js'
import WebWorker from 'web-worker:./computePowWorker.src.js';
+import {repeat} from 'lit/directives/repeat.js';
registerTranslateConfig({
loader: lang => fetch(`/language/${lang}.json`).then(res => res.json())
@@ -28,8 +29,9 @@ import '@vaadin/grid'
import StarterKit from '@tiptap/starter-kit'
import Underline from '@tiptap/extension-underline';
import Placeholder from '@tiptap/extension-placeholder'
-import { Editor, Extension } from '@tiptap/core'
+import Highlight from '@tiptap/extension-highlight'
+import { Editor, Extension } from '@tiptap/core'
const parentEpml = new Epml({ type: 'WINDOW', source: window.parent })
class Chat extends LitElement {
@@ -55,7 +57,7 @@ class Chat extends LitElement {
userFoundModalOpen: { type: Boolean },
userSelected: { type: Object },
editor: {type: Object},
- groupInvites: { type: Array }
+ groupInvites: { type: Array },
}
}
@@ -118,6 +120,7 @@ class Chat extends LitElement {
}
async connectedCallback() {
+
super.connectedCallback();
await this.getUpdateCompleteTextEditor();
@@ -147,15 +150,36 @@ class Chat extends LitElement {
}})
]
})
+
+ this.unsubscribeStore = window.parent.reduxStore.subscribe(() => {
+ try {
+
+ if(window.parent.location && window.parent.location.search){
+ const queryString = window.parent.location.search;
+ const params = new URLSearchParams(queryString);
+ const chat = params.get("chat")
+ if(chat && chat !== this.activeChatHeadUrl){
+ let url = window.parent.location.href;
+ let newUrl = url.split("?")[0];
+ window.parent.history.pushState({}, "", newUrl);
+ this.setActiveChatHeadUrl(chat)
+ }
+ }
+ } catch (error) {
+ console.error(error)
+ }
+
+ });
}
disconnectedCallback() {
super.disconnectedCallback();
- this.editor.destroy()
-
+ this.editor.destroy();
+ this.unsubscribeStore();
}
+
updatePlaceholder(editor, text){
editor.extensionManager.extensions.forEach((extension) => {
if (extension.name === "placeholder") {
@@ -215,7 +239,7 @@ class Chat extends LitElement {
- ${window.parent.location.pathname !== "/app/q-chat" || this.activeChatHeadUrl ? html`${this.renderChatPage(this.chatId)}` : html`${this.renderChatWelcomePage()}`}
+ ${this.activeChatHeadUrl ? html`${this.renderChatPage()}` : html`${this.renderChatWelcomePage()}`}
@@ -367,6 +391,8 @@ class Chat extends LitElement {
`
}
+
+
async firstUpdated() {
this.changeLanguage();
this.changeTheme();
@@ -482,8 +508,11 @@ class Chat extends LitElement {
})
})
parentEpml.imReady()
+
}
+
+
setOpenPrivateMessage(props) {
this.openPrivateMessage = props.open;
this.shadowRoot.getElementById("sendTo").value = props.name
@@ -829,17 +858,14 @@ class Chat extends LitElement {
}
renderChatHead(chatHeadArr) {
-
- let tempUrl = document.location.href
- let splitedUrl = decodeURI(tempUrl).split('?')
- // let activeChatHeadUrl = splitedUrl[1] === undefined ? '' : splitedUrl[1]
-
+
return chatHeadArr.map(eachChatHead => {
return html`
+ ${this.renderUnusedAddressButton()}
+