mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 10:15:52 +01:00
Add mobile dropdown for plugin buttons (#1762)
* Add mobile toolbar buttons * cleanup * more cleanup * Mobile plugin buttons: Add else block & change icon
This commit is contained in:
@@ -2,6 +2,7 @@ import ScriptContext from "./script_context.js";
|
||||
import server from "./server.js";
|
||||
import toastService from "./toast.js";
|
||||
import treeCache from "./tree_cache.js";
|
||||
import utils from "./utils.js";
|
||||
|
||||
async function getAndExecuteBundle(noteId, originEntity = null) {
|
||||
const bundle = await server.get('script/bundle/' + noteId);
|
||||
@@ -25,7 +26,8 @@ async function executeBundle(bundle, originEntity, $container) {
|
||||
}
|
||||
|
||||
async function executeStartupBundles() {
|
||||
const scriptBundles = await server.get("script/startup");
|
||||
const isMobile = utils.isMobile();
|
||||
const scriptBundles = await server.get("script/startup" + (isMobile ? "?mobile=true" : ""));
|
||||
|
||||
for (const bundle of scriptBundles) {
|
||||
await executeBundle(bundle);
|
||||
|
||||
Reference in New Issue
Block a user