fix: namespace crypto storage per account, add chat polling, fix notification flow and dark theme issues

This commit is contained in:
2026-02-11 11:21:39 +01:00
parent 53673b4650
commit 227791e8f9
11 changed files with 188 additions and 51 deletions

View File

@@ -40,6 +40,19 @@ class ChatWidget extends HTMLElement {
disconnectedCallback() {
if (this.unsubscribe) this.unsubscribe()
if (this.i18nUnsubscribe) this.i18nUnsubscribe()
this._stopPolling()
}
_startPolling() {
this._stopPolling()
this._pollTimer = setInterval(() => this.refreshMessages(), 5000)
}
_stopPolling() {
if (this._pollTimer) {
clearInterval(this._pollTimer)
this._pollTimer = null
}
}
async activate() {
@@ -66,6 +79,8 @@ class ChatWidget extends HTMLElement {
this.unsubscribe = conversationsService.subscribe(() => this.refreshMessages())
this.i18nUnsubscribe = i18n.subscribe(() => this.render())
if (this.conversation) this._startPolling()
}
async initConversation() {
@@ -130,9 +145,12 @@ class ChatWidget extends HTMLElement {
}
async refreshMessages() {
const prevCount = this.messages.length
await this.loadMessages()
this.renderMessages()
this.scrollToBottom()
if (this.messages.length !== prevCount) {
this.renderMessages()
this.scrollToBottom()
}
}
async loadDealState() {

View File

@@ -255,8 +255,8 @@ style.textContent = /* css */`
}
listing-card .payment-published {
background: var(--color-accent);
color: var(--color-accent-text, #fff);
background: var(--color-success);
color: var(--color-success-text, #fff);
}
listing-card .payment-expired {

View File

@@ -1299,11 +1299,13 @@ style.textContent = /* css */`
font-size: var(--font-size-xs);
word-break: break-all;
line-height: 1.4;
color: var(--color-text);
}
page-listing .btn-copy {
padding: var(--space-sm);
flex-shrink: 0;
color: var(--color-text);
}
page-listing .btn-copy.copied {