An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: rm mobile custom tab
Vanessa72764ddb6edd
diff --git a/app/src/menus/bookmark.ts b/app/src/menus/bookmark.tsindex 19aeeb67a7..14a35abae3 100644--- a/app/src/menus/bookmark.ts+++ b/app/src/menus/bookmark.ts@@ -86,5 +86,5 @@ export const openBookmarkMenu = (element: HTMLElement, event: MouseEvent, bookma}window.siyuan.menus.menu.element.setAttribute("data-name", "bookmarkMenu");window.siyuan.menus.menu.element.style.zIndex = "221"; // 移动端被右侧栏遮挡- window.siyuan.menus.menu.popup({x: event.clientX - 11, y: event.clientY + 11, h: 22});+ window.siyuan.menus.menu.popup({x: event.clientX - 11, y: event.clientY + 11, h: 22, w: 12});};diff --git a/app/src/plugin/API.ts b/app/src/plugin/API.tsindex e797c6eacf..0ab397fc47 100644--- a/app/src/plugin/API.ts+++ b/app/src/plugin/API.ts@@ -6,8 +6,9 @@ import {MenuItem} from "../menus/Menu";import {Menu as SiyuanMenu} from "../menus/Menu";import {fetchGet, fetchPost, fetchSyncPost} from "../util/fetch";import {isMobile} from "../util/functions";-import {Custom} from "../layout/dock/Custom";+/// #if !MOBILEimport {openFile} from "../editor/util";+/// #endifexport class Menu {private menu: SiyuanMenu;@@ -69,6 +70,15 @@ export class Menu {}}+let openTab;+/// #if MOBILE+openTab = () => {+ // TODO: Mobile+}+/// #else+openTab = openFile;+/// #endif+export const API = {confirm: confirmDialog,showMessage,@@ -76,7 +86,7 @@ export const API = {fetchSyncPost,fetchGet,isMobile,- openTab: openFile,+ openTab,Plugin,Dialog,Menu,diff --git a/app/src/plugin/index.ts b/app/src/plugin/index.tsindex e8e2a5454a..935d4b778c 100644--- a/app/src/plugin/index.ts+++ b/app/src/plugin/index.ts@@ -2,7 +2,9 @@ import {App} from "../index";import {EventBus} from "./EventBus";import {fetchPost} from "../util/fetch";import {isMobile, isWindow} from "../util/functions";+/// #if !MOBILEimport {Custom} from "../layout/dock/Custom";+/// #endifimport {Tab} from "../layout/Tab";export class Plugin {@@ -10,7 +12,11 @@ export class Plugin {public eventBus: EventBus;public data: any;public name: string;- public models: { [key: string]: (options: { tab: Tab, data: any }) => Custom } = {};+ public models: {+ /// #if !MOBILE+ [key: string]: (options: { tab: Tab, data: any }) => Custom+ /// #endif+ } = {};constructor(options: {app: App,@@ -100,6 +106,7 @@ export class Plugin {update?: () => void,init: () => void}) {+ /// #if !MOBILEconst type2 = this.name + options.type;this.models[type2] = (arg: { data: any, tab: Tab }) => new Custom({tab: arg.tab,@@ -111,5 +118,6 @@ export class Plugin {update: options.update,});return this.models[type2];+ /// #endif}}