fix: #11803, fix rtl in acp

isekai-main
Barış Soner Uşaklı 2 years ago
parent 91a432ade9
commit a0478c7049

@ -256,6 +256,7 @@ module.exports = function (middleware) {
latestVersion: getLatestVersion(), latestVersion: getLatestVersion(),
privileges: privileges.admin.get(req.uid), privileges: privileges.admin.get(req.uid),
tags: meta.tags.parse(req, {}, [], []), tags: meta.tags.parse(req, {}, [], []),
languageDirection: translator.translate('[[language:dir]]', res.locals.config.acpLang),
}); });
const { userData } = results; const { userData } = results;
@ -292,6 +293,9 @@ module.exports = function (middleware) {
latestVersion: results.latestVersion, latestVersion: results.latestVersion,
upgradeAvailable: results.latestVersion && semver.gt(results.latestVersion, version), upgradeAvailable: results.latestVersion && semver.gt(results.latestVersion, version),
showManageMenu: results.privileges.superadmin || ['categories', 'privileges', 'users', 'admins-mods', 'groups', 'tags', 'settings'].some(priv => results.privileges[`admin:${priv}`]), showManageMenu: results.privileges.superadmin || ['categories', 'privileges', 'users', 'admins-mods', 'groups', 'tags', 'settings'].some(priv => results.privileges[`admin:${priv}`]),
defaultLang: meta.config.defaultLang || 'en-GB',
acpLang: res.locals.config.acpLang,
languageDirection: results.languageDirection,
}; };
templateValues.template = { name: res.locals.template }; templateValues.template = { name: res.locals.template };

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="{function.localeToHTML, acpLang, defaultLang}" {{{if languageDirection}}}data-dir="{languageDirection}" style="direction: {languageDirection};"{{{end}}}>
<head> <head>
<title>{title}</title> <title>{title}</title>

Loading…
Cancel
Save