mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 16:52:20 +00:00
Keep edge mode to the desktop shell and mirror it in right-to-left
Phones and Cockpit keep their own layouts and do not show the switch. The rails' name panels and edge mode run toward the middle in a right-to-left language, and the switch reads its side again after the layout moves it. Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
9374e0228b
commit
d0b614d88e
4 files changed
+88
-15
No files matched your search
@@ -15,10 +15,19 @@ function toggle() {
|
||||
function sync() {
|
||||
side.value = panelSide(button.value);
|
||||
}
|
||||
onMounted(sync);
|
||||
const icon = computed(() => (side.value === 'right' ? 'align_horizontal_right' : 'align_horizontal_left'));
|
||||
// The layout moves some panels to the right column after they mount, so the
|
||||
// side is read again once that has happened.
|
||||
onMounted(() => {
|
||||
sync();
|
||||
globalThis.requestAnimationFrame?.(sync);
|
||||
});
|
||||
const icon = computed(() =>
|
||||
side.value === 'right' ? 'align_horizontal_right' : 'align_horizontal_left',
|
||||
);
|
||||
const label = computed(() =>
|
||||
on.value ? t('Move panels back beside the rail') : t('Move panels over the rail, to the edge'),
|
||||
on.value
|
||||
? t('Move panels back beside the rail')
|
||||
: t('Move panels over the rail, to the edge'),
|
||||
);
|
||||
</script>
|
||||
|
||||
@@ -26,7 +35,7 @@ const label = computed(() =>
|
||||
<button
|
||||
ref="button"
|
||||
type="button"
|
||||
class="ui-panel-edge"
|
||||
class="ui-panel-edge panel-edge-btn"
|
||||
:aria-pressed="String(on)"
|
||||
:aria-label="label"
|
||||
:title="label"
|
||||
|
||||
Reference in new issue
Block a user