mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
remove font setting and default to Open Sans (#6643)
This commit is contained in:
@@ -707,20 +707,6 @@ export const Constants = {
|
||||
}
|
||||
],
|
||||
DEFAULT_CODE_THEME: 'github',
|
||||
FONTS: {
|
||||
'Droid Serif': 'font--droid_serif',
|
||||
'Roboto Slab': 'font--roboto_slab',
|
||||
Lora: 'font--lora',
|
||||
Arvo: 'font--arvo',
|
||||
'Open Sans': 'font--open_sans',
|
||||
Roboto: 'font--roboto',
|
||||
'PT Sans': 'font--pt_sans',
|
||||
Lato: 'font--lato',
|
||||
'Source Sans Pro': 'font--source_sans_pro',
|
||||
'Exo 2': 'font--exo_2',
|
||||
Ubuntu: 'font--ubuntu'
|
||||
},
|
||||
DEFAULT_FONT: 'Open Sans',
|
||||
KeyCodes: {
|
||||
BACKSPACE: 8,
|
||||
TAB: 9,
|
||||
|
||||
@@ -732,22 +732,6 @@ export function resetTheme() {
|
||||
applyTheme(Constants.THEMES.default);
|
||||
}
|
||||
|
||||
export function applyFont(fontName) {
|
||||
const body = $('body');
|
||||
|
||||
for (const key of Reflect.ownKeys(Constants.FONTS)) {
|
||||
const className = Constants.FONTS[key];
|
||||
|
||||
if (fontName === key) {
|
||||
if (!body.hasClass(className)) {
|
||||
body.addClass(className);
|
||||
}
|
||||
} else {
|
||||
body.removeClass(className);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function changeCss(className, classValue) {
|
||||
let styleEl = document.querySelector('style[data-class="' + className + '"]');
|
||||
if (!styleEl) {
|
||||
|
||||
Reference in New Issue
Block a user