diff --git a/package-lock.json b/package-lock.json
index 6f2117bcc..3e737316c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "trilium",
- "version": "0.48.3",
+ "version": "0.48.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/src/public/app/services/entrypoints.js b/src/public/app/services/entrypoints.js
index dff5497cf..2daa21b25 100644
--- a/src/public/app/services/entrypoints.js
+++ b/src/public/app/services/entrypoints.js
@@ -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';
diff --git a/src/public/app/widgets/buttons/global_menu.js b/src/public/app/widgets/buttons/global_menu.js
index f1d6c4d76..671783fab 100644
--- a/src/public/app/widgets/buttons/global_menu.js
+++ b/src/public/app/widgets/buttons/global_menu.js
@@ -60,6 +60,11 @@ const TPL = `
+
+
+ Switch to mobile version
+
+
@@ -103,9 +108,11 @@ export default class GlobalMenuWidget extends BasicWidget {
this.$widget.find(".show-about-dialog-button").on('click',
() => import("../../dialogs/about.js").then(d => d.showDialog()));
- this.$widget.find(".logout-button").toggle(!utils.isElectron());
+ const isElectron = utils.isElectron();
- this.$widget.find(".open-dev-tools-button").toggle(utils.isElectron());
+ this.$widget.find(".logout-button").toggle(!isElectron);
+ this.$widget.find(".open-dev-tools-button").toggle(isElectron);
+ this.$widget.find(".switch-to-mobile-version-button").toggle(!isElectron);
this.$widget.on('click', '.dropdown-item',
() => this.$widget.find("[data-toggle='dropdown']").dropdown('toggle'));