fix: #11804, fix direction of dropdown on rtl

isekai-main
Barış Soner Uşaklı 2 years ago
parent f6b1f36b7f
commit a4dba8d3fa

@ -273,6 +273,7 @@ module.exports = function (middleware) {
const version = nconf.get('version');
res.locals.config.userLang = res.locals.config.acpLang || res.locals.config.userLang;
res.locals.config.isRTL = results.languageDirection === 'rtl';
const templateValues = {
config: res.locals.config,
configJSON: jsesc(JSON.stringify(res.locals.config), { isScriptContext: true }),

@ -13,7 +13,7 @@
<button class="btn btn-light btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<span class="selected-template">{templates.0.template}</span> <span class="caret"></span>
</button>
<ul class="dropdown-menu p-1">
<ul class="dropdown-menu {{{ if config.isRTL }}}dropdown-menu-end{{{ end }}} p-1">
{{{ each templates }}}
<li><a class="dropdown-item rounded-1" href="#" data-template="{./template}" data-toggle="pill">{./template}</a></li>
{{{ end }}}

Loading…
Cancel
Save