feat: rtl display + dark theme improvements

This commit is contained in:
Nick
2019-06-07 20:04:35 -04:00
parent 1d4d379e03
commit 17f9f0baa9
13 changed files with 138 additions and 42 deletions

View File

@@ -31,6 +31,7 @@ defaults:
autoUpdate: true
namespaces: []
namespacing: false
rtl: false
telemetry:
clientId: ''
isEnabled: false

View File

@@ -57,6 +57,10 @@ module.exports = {
WIKI.config.lang.autoUpdate = args.autoUpdate
WIKI.config.lang.namespacing = args.namespacing
WIKI.config.lang.namespaces = args.namespaces
const newLocale = await WIKI.models.locales.query().select('isRTL').where('code', args.locale).first()
WIKI.config.lang.rtl = newLocale.isRTL
await WIKI.configSvc.saveToDb(['lang'])
await WIKI.lang.setCurrentLocale(args.locale)

View File

@@ -29,7 +29,7 @@ html
//- Site Properties
script.
var siteConfig = !{JSON.stringify({ title: config.title, theme: config.theming.theme, darkMode: config.theming.darkMode, lang: config.lang.code, company: config.company })}
var siteConfig = !{JSON.stringify({ title: config.title, theme: config.theming.theme, darkMode: config.theming.darkMode, lang: config.lang.code, rtl: config.lang.rtl, company: config.company })}
//- CSS