Timeline-refactor-fixes (#1438)

* fix type

* fix missing member from reaction

* stop context menu event propagation in msg modal

* prevent encode blur hash from freezing app

* replace roboto font with inter and fix weight

* add recent emoji when selecting emoji

* fix room latest evt hook

* add option to drop typing status
This commit is contained in:
Ajay Bura 2023-10-07 18:19:01 +11:00 committed by GitHub
parent f9b895b32c
commit 1bdb7f4e3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 138 additions and 64 deletions

View file

@ -4,6 +4,7 @@ import appDispatcher from '../dispatcher';
import cons from './cons';
import { darkTheme, butterTheme, silverTheme } from '../../colors.css';
import { onLightFontWeight, onDarkFontWeight } from '../../config.css';
function getSettings() {
const settings = localStorage.getItem('settings');
@ -23,6 +24,7 @@ class Settings extends EventEmitter {
super();
this.themeClasses = [lightTheme, silverTheme, darkTheme, butterTheme];
this.fontWeightClasses = [onLightFontWeight, onLightFontWeight, onDarkFontWeight, onDarkFontWeight]
this.themes = ['', 'silver-theme', 'dark-theme', 'butter-theme'];
this.themeIndex = this.getThemeIndex();
@ -59,6 +61,7 @@ class Settings extends EventEmitter {
this.themes.forEach((themeName, index) => {
if (themeName !== '') document.body.classList.remove(themeName);
document.body.classList.remove(this.themeClasses[index]);
document.body.classList.remove(this.fontWeightClasses[index]);
document.body.classList.remove('prism-light')
document.body.classList.remove('prism-dark')
});
@ -71,6 +74,7 @@ class Settings extends EventEmitter {
if (this.themes[themeIndex] === undefined) return
if (this.themes[themeIndex]) document.body.classList.add(this.themes[themeIndex]);
document.body.classList.add(this.themeClasses[themeIndex]);
document.body.classList.add(this.fontWeightClasses[themeIndex]);
document.body.classList.add(themeIndex < 2 ? 'prism-light' : 'prism-dark');
}