added "switch to mobile version" button to web edition, closes #1889

This commit is contained in:
zadam
2021-10-31 16:56:23 +01:00
parent e4dca4750f
commit e378435fbe
3 changed files with 16 additions and 3 deletions

View File

@@ -172,6 +172,12 @@ export default class Entrypoints extends Component {
utils.reloadFrontendApp("Switching to desktop version");
}
async switchToMobileVersionCommand() {
utils.setCookie('trilium-device', 'mobile');
utils.reloadFrontendApp("Switching to mobile version");
}
async openInWindowCommand({notePath, hoistedNoteId}) {
if (!hoistedNoteId) {
hoistedNoteId = 'root';