diff --git a/less/mobile.less b/less/mobile.less index 34e538f..d0abd0f 100644 --- a/less/mobile.less +++ b/less/mobile.less @@ -56,6 +56,10 @@ line-height: 30px; border: none; + html[data-dir="rtl"] button& { + margin-left: 0; + } + .header & .notification-icon { left: auto; right: 7px; diff --git a/lib/persona.js b/lib/persona.js index 3e9dd2c..aa4a5bb 100644 --- a/lib/persona.js +++ b/lib/persona.js @@ -118,20 +118,24 @@ $(document).ready(function() { // initialization var guest = !app.user || !parseInt(app.user.uid, 10); - var legacy = !!Storage.getItem('persona:menus:legacy-layout'); + var swapped = !!Storage.getItem('persona:menus:legacy-layout'); var margin = window.innerWidth; - if (legacy) { + if (swapped) { $('#mobile-menu').removeClass('pull-left'); $('#mobile-chats').addClass('pull-left'); } + if (document.documentElement.getAttribute('data-dir') === 'rtl') { + swapped = !swapped; + } + var navSlideout = Pulling.create({ panel: document.getElementById('panel'), menu: document.getElementById('menu'), width: 256, margin: margin, - side: legacy ? 'right' : 'left', + side: swapped ? 'right' : 'left', }); $('#menu').removeClass('hidden'); @@ -142,7 +146,7 @@ $(document).ready(function() { menu: document.getElementById('chats-menu'), width: 256, margin: margin, - side: legacy ? 'left' : 'right', + side: swapped ? 'left' : 'right', }); $('#chats-menu').removeClass('hidden'); }