From bf1b057e8b5aeef48535ba2d83e33d0c11131e5b Mon Sep 17 00:00:00 2001 From: morethanwords Date: Mon, 19 Apr 2021 19:30:51 +0400 Subject: [PATCH] Theme changes --- src/components/chat/chat.ts | 6 ++++ src/index.hbs | 2 ++ src/lib/appManagers/appDialogsManager.ts | 24 ++++++++++++-- src/lib/appManagers/appImManager.ts | 29 +++++++++-------- src/lib/appManagers/appStateManager.ts | 9 +++--- src/scss/partials/_chat.scss | 4 +-- src/scss/partials/_chatlist.scss | 40 ++++++++++++++++++++++-- src/scss/style.scss | 11 ++++++- 8 files changed, 99 insertions(+), 26 deletions(-) diff --git a/src/components/chat/chat.ts b/src/components/chat/chat.ts index 2c45d164..77a97961 100644 --- a/src/components/chat/chat.ts +++ b/src/components/chat/chat.ts @@ -86,6 +86,12 @@ export default class Chat extends EventListenerBase<{ const item = document.createElement('div'); item.classList.add('chat-background-item'); + const theme = rootScope.settings.themes.find(t => t.name === rootScope.settings.theme); + if(theme.background.type === 'color') { + item.style.backgroundColor = theme.background.color; + item.style.backgroundImage = 'none'; + } + return new Promise((resolve) => { const cb = () => { const prev = this.backgroundEl.children[this.backgroundEl.childElementCount - 1] as HTMLElement; diff --git a/src/index.hbs b/src/index.hbs index 52140c85..2e33005f 100644 --- a/src/index.hbs +++ b/src/index.hbs @@ -74,6 +74,8 @@