mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-06 23:30:28 +03:00
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:
parent
f9b895b32c
commit
1bdb7f4e3a
18 changed files with 138 additions and 64 deletions
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue