open searcher on drawer for mobile mode

This commit is contained in:
SrGooglo 2023-06-26 23:34:47 +00:00
parent 17850b8b40
commit 0a3db3db68

View File

@ -185,9 +185,17 @@ class ComtyApp extends React.Component {
openSearcher: (options) => { openSearcher: (options) => {
app.cores.sound.useUIAudio("navigation.search") app.cores.sound.useUIAudio("navigation.search")
window.app.ModalController.open((props) => <Searcher renderResults {...props} />) if (app.isMobile) {
return app.DrawerController.open("searcher", Searcher, {
...options,
componentProps: {
renderResults: true
}
})
}
return window.app.ModalController.open((props) => <Searcher renderResults {...props} />)
}, },
openNavigationMenu: () => window.app.DrawerController.open("navigation", Navigation),
openFullImageViewer: (src) => { openFullImageViewer: (src) => {
const win = new DOMWindow({ const win = new DOMWindow({
id: "fullImageViewer", id: "fullImageViewer",