Files
wekan/models/lib/sidebarBackAction.js
T
Lauri Ojansivu 7d67f80df5 Return mobile Search directly to the board
Close the full-screen Search sidebar when its Back control is used on a mini screen, while preserving desktop and other sidebar transitions. Add positive, negative, wiring, and mobile browser regressions.

Thanks to 1ubuntuuser and xet7 !

Fixes #3576,
2026-08-25 17:52:23 +03:00

21 lines
585 B
JavaScript

'use strict';
const SIDEBAR_BACK_CLOSE = 'close';
const SIDEBAR_BACK_HOME = 'home';
// Search occupies the full board area on a mini screen. Its back button should
// therefore reveal the board, not replace Search with the sidebar Home/settings
// view. Desktop keeps the sidebar open, and every other view keeps its existing
// back-to-Home behavior.
function sidebarBackAction(view, isMiniScreen) {
return view === 'search' && isMiniScreen
? SIDEBAR_BACK_CLOSE
: SIDEBAR_BACK_HOME;
}
module.exports = {
SIDEBAR_BACK_CLOSE,
SIDEBAR_BACK_HOME,
sidebarBackAction,
};