From 2b5a9f9f1a422f4cd89260896949a37bc55822b4 Mon Sep 17 00:00:00 2001 From: Alexander Pape <300609+Macavity@users.noreply.github.com> Date: Wed, 11 Dec 2024 03:22:25 +0100 Subject: [PATCH] feat: allow stickTab icon in Panels to be used in a browser environment (#13421) --- app/src/block/Panel.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/block/Panel.ts b/app/src/block/Panel.ts index 4468d7d3c..05bd50f39 100644 --- a/app/src/block/Panel.ts +++ b/app/src/block/Panel.ts @@ -121,13 +121,11 @@ export class BlockPanel { openNewWindowById(this.nodeIds[0]); /// #endif } else if (type === "stickTab") { - /// #if !BROWSER openFileById({ app: options.app, id: this.nodeIds[0], action: this.editors[0].protyle.block.rootID !== this.nodeIds[0] ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_CONTEXT], }); - /// #endif } event.preventDefault(); event.stopPropagation(); @@ -233,14 +231,14 @@ export class BlockPanel { return; } let openHTML = ""; - /// #if !BROWSER if (this.nodeIds.length === 1) { openHTML = ` - - `; + /// #if !BROWSER + openHTML += ` +`; + /// #endif } - /// #endif let html = `