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:
Patrick Moriarty
2021-03-18 15:09:08 -05:00
committed by GitHub
parent 6edc6e2825
commit eb437ff642
5 changed files with 36 additions and 9 deletions

View File

@@ -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);