Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Share slash menu visibility logic across desktop and mobile https://github.com/siyuan-note/siyuan/issues/19842

Daniel54a46cc67564
diff --git a/app/appearance/langs/ar.json b/app/appearance/langs/ar.json
index 681769d950..2b2c4586a3 100644
--- a/app/appearance/langs/ar.json
+++ b/app/appearance/langs/ar.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "نسخة احتياطية للمفتاح (اختياري)",
"archiveHistoryOnly": "السجل واللقطات فقط",
"openContextMenu": "فتح قائمة السياق",
- "mobileSlashMenu": "قائمة الشرطة المائلة على الهاتف",
- "mobileSlashMenuTip": "عند التفعيل، اكتب / في محرر الهاتف للبحث عن كتل المحتوى وإدراجها",
"mindmapAddSibling": "إضافة عقدة خريطة ذهنية شقيقة",
"mindmapAddChild": "إضافة عقدة خريطة ذهنية فرعية",
"layoutSelectedCount": "تم تحديد ${x}",
diff --git a/app/appearance/langs/de.json b/app/appearance/langs/de.json
index 05cea98f45..ca90c06988 100644
--- a/app/appearance/langs/de.json
+++ b/app/appearance/langs/de.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "Schlüsselsicherung (optional)",
"archiveHistoryOnly": "Nur Verlauf und Schnappschüsse",
"openContextMenu": "Kontextmenü öffnen",
- "mobileSlashMenu": "Slash-Menü auf Mobilgeräten",
- "mobileSlashMenuTip": "Nach dem Aktivieren / im mobilen Editor eingeben, um Inhaltsblöcke zu suchen und einzufügen",
"mindmapAddSibling": "Gleichrangigen Mindmap-Knoten hinzufügen",
"mindmapAddChild": "Untergeordneten Mindmap-Knoten hinzufügen",
"layoutSelectedCount": "${x} ausgewählt",
diff --git a/app/appearance/langs/en.json b/app/appearance/langs/en.json
index 7e796a7671..403319b608 100644
--- a/app/appearance/langs/en.json
+++ b/app/appearance/langs/en.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "Key backup (optional)",
"archiveHistoryOnly": "History and snapshots only",
"openContextMenu": "Open context menu",
- "mobileSlashMenu": "Mobile slash menu",
- "mobileSlashMenuTip": "When enabled, type / in the mobile editor to search for and insert content blocks",
"mindmapAddSibling": "Add a sibling mind map node",
"mindmapAddChild": "Add a child mind map node",
"layoutSelectedCount": "${x} selected",
diff --git a/app/appearance/langs/es.json b/app/appearance/langs/es.json
index 667bd3648b..533abe7e01 100644
--- a/app/appearance/langs/es.json
+++ b/app/appearance/langs/es.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "Copia de la clave (opcional)",
"archiveHistoryOnly": "Solo historial e instantáneas",
"openContextMenu": "Abrir menú contextual",
- "mobileSlashMenu": "Menú de barra diagonal en móvil",
- "mobileSlashMenuTip": "Al activarlo, escribe / en el editor móvil para buscar e insertar bloques de contenido",
"mindmapAddSibling": "Añadir un nodo hermano al mapa mental",
"mindmapAddChild": "Añadir un nodo hijo al mapa mental",
"layoutSelectedCount": "${x} seleccionados",
diff --git a/app/appearance/langs/fr.json b/app/appearance/langs/fr.json
index 01ce384f36..0c5abb1795 100644
--- a/app/appearance/langs/fr.json
+++ b/app/appearance/langs/fr.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "Sauvegarde de clé (facultatif)",
"archiveHistoryOnly": "Historique et instantanés uniquement",
"openContextMenu": "Ouvrir le menu contextuel",
- "mobileSlashMenu": "Menu barre oblique sur mobile",
- "mobileSlashMenuTip": "Une fois activé, saisissez / dans l’éditeur mobile pour rechercher et insérer des blocs de contenu",
"mindmapAddSibling": "Ajouter un nœud frère à la carte mentale",
"mindmapAddChild": "Ajouter un nœud enfant à la carte mentale",
"layoutSelectedCount": "${x} sélectionné(s)",
diff --git a/app/appearance/langs/he.json b/app/appearance/langs/he.json
index 98c02a7ed5..6db722d504 100644
--- a/app/appearance/langs/he.json
+++ b/app/appearance/langs/he.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "גיבוי מפתח (לא חובה)",
"archiveHistoryOnly": "היסטוריה ותמונות מצב בלבד",
"openContextMenu": "פתיחת תפריט ההקשר",
- "mobileSlashMenu": "תפריט לוכסן בנייד",
- "mobileSlashMenuTip": "לאחר ההפעלה, הקלידו / בעורך לנייד כדי לחפש ולהוסיף בלוקי תוכן",
"mindmapAddSibling": "הוספת צומת אח במפת החשיבה",
"mindmapAddChild": "הוספת צומת ילד במפת החשיבה",
"layoutSelectedCount": "${x} נבחרו",
diff --git a/app/appearance/langs/hi.json b/app/appearance/langs/hi.json
index 41ab6718c9..8c888fcba7 100644
--- a/app/appearance/langs/hi.json
+++ b/app/appearance/langs/hi.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "कुंजी का बैकअप (वैकल्पिक)",
"archiveHistoryOnly": "केवल इतिहास और स्नैपशॉट",
"openContextMenu": "संदर्भ मेनू खोलें",
- "mobileSlashMenu": "मोबाइल स्लैश मेनू",
- "mobileSlashMenuTip": "चालू होने पर, सामग्री ब्लॉक खोजने और डालने के लिए मोबाइल संपादक में / टाइप करें",
"mindmapAddSibling": "माइंड मैप में समान स्तर का नोड जोड़ें",
"mindmapAddChild": "माइंड मैप में उप नोड जोड़ें",
"layoutSelectedCount": "${x} चुने गए",
diff --git a/app/appearance/langs/id.json b/app/appearance/langs/id.json
index 863765c054..aa2112a8a8 100644
--- a/app/appearance/langs/id.json
+++ b/app/appearance/langs/id.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "Cadangan kunci (opsional)",
"archiveHistoryOnly": "Hanya riwayat dan snapshot",
"openContextMenu": "Buka menu konteks",
- "mobileSlashMenu": "Menu garis miring di ponsel",
- "mobileSlashMenuTip": "Jika diaktifkan, ketik / di editor ponsel untuk mencari dan menyisipkan blok konten",
"mindmapAddSibling": "Tambah simpul setingkat pada peta pikiran",
"mindmapAddChild": "Tambah simpul anak pada peta pikiran",
"layoutSelectedCount": "${x} dipilih",
diff --git a/app/appearance/langs/it.json b/app/appearance/langs/it.json
index 6a5120dfec..e9ca9b20d0 100644
--- a/app/appearance/langs/it.json
+++ b/app/appearance/langs/it.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "Backup della chiave (facoltativo)",
"archiveHistoryOnly": "Solo cronologia e istantanee",
"openContextMenu": "Apri menu contestuale",
- "mobileSlashMenu": "Menu barra nell'editor mobile",
- "mobileSlashMenuTip": "Quando è attivo, digita / nell'editor mobile per cercare e inserire blocchi di contenuto",
"mindmapAddSibling": "Aggiungi un nodo allo stesso livello nella mappa mentale",
"mindmapAddChild": "Aggiungi un nodo figlio nella mappa mentale",
"layoutSelectedCount": "${x} selezionati",
diff --git a/app/appearance/langs/ja.json b/app/appearance/langs/ja.json
index 8cf5c16b6c..4d6ef9849a 100644
--- a/app/appearance/langs/ja.json
+++ b/app/appearance/langs/ja.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "鍵のバックアップ(任意)",
"archiveHistoryOnly": "履歴とスナップショットのみ",
"openContextMenu": "コンテキストメニューを開く",
- "mobileSlashMenu": "モバイルのスラッシュメニュー",
- "mobileSlashMenuTip": "有効にすると、モバイルエディターで / を入力してコンテンツブロックを検索、挿入できます",
"mindmapAddSibling": "同階層のマインドマップノードを追加",
"mindmapAddChild": "子マインドマップノードを追加",
"layoutSelectedCount": "${x} 件選択済み",
diff --git a/app/appearance/langs/ko.json b/app/appearance/langs/ko.json
index 7cd2742013..4c36818441 100644
--- a/app/appearance/langs/ko.json
+++ b/app/appearance/langs/ko.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "키 백업(선택 사항)",
"archiveHistoryOnly": "기록과 스냅샷만",
"openContextMenu": "컨텍스트 메뉴 열기",
- "mobileSlashMenu": "모바일 슬래시 메뉴",
- "mobileSlashMenuTip": "활성화하면 모바일 편집기에서 /를 입력해 콘텐츠 블록을 검색하고 삽입할 수 있습니다",
"mindmapAddSibling": "같은 수준의 마인드맵 노드 추가",
"mindmapAddChild": "하위 마인드맵 노드 추가",
"layoutSelectedCount": "${x}개 선택됨",
diff --git a/app/appearance/langs/nl.json b/app/appearance/langs/nl.json
index a9408b1ab9..14e7ab068f 100644
--- a/app/appearance/langs/nl.json
+++ b/app/appearance/langs/nl.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "Sleutelback-up (optioneel)",
"archiveHistoryOnly": "Alleen geschiedenis en momentopnamen",
"openContextMenu": "Contextmenu openen",
- "mobileSlashMenu": "Slashmenu op mobiel",
- "mobileSlashMenuTip": "Typ na inschakelen / in de mobiele editor om inhoudsblokken te zoeken en in te voegen",
"mindmapAddSibling": "Een knooppunt op hetzelfde niveau toevoegen aan de mindmap",
"mindmapAddChild": "Een onderliggend knooppunt toevoegen aan de mindmap",
"layoutSelectedCount": "${x} geselecteerd",
diff --git a/app/appearance/langs/pl.json b/app/appearance/langs/pl.json
index 4d2d5a37fc..735531785f 100644
--- a/app/appearance/langs/pl.json
+++ b/app/appearance/langs/pl.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "Kopia klucza (opcjonalnie)",
"archiveHistoryOnly": "Tylko historia i migawki",
"openContextMenu": "Otwórz menu kontekstowe",
- "mobileSlashMenu": "Menu ukośnika na urządzeniu mobilnym",
- "mobileSlashMenuTip": "Po włączeniu wpisz / w edytorze mobilnym, aby wyszukać i wstawić bloki treści",
"mindmapAddSibling": "Dodaj węzeł równorzędny mapy myśli",
"mindmapAddChild": "Dodaj węzeł podrzędny mapy myśli",
"layoutSelectedCount": "Wybrano: ${x}",
diff --git a/app/appearance/langs/pt-BR.json b/app/appearance/langs/pt-BR.json
index 8f2cfc5bcf..728c4bcdbd 100644
--- a/app/appearance/langs/pt-BR.json
+++ b/app/appearance/langs/pt-BR.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "Backup da chave (opcional)",
"archiveHistoryOnly": "Somente histórico e instantâneos",
"openContextMenu": "Abrir menu de contexto",
- "mobileSlashMenu": "Menu de barra no celular",
- "mobileSlashMenuTip": "Quando ativado, digite / no editor móvel para pesquisar e inserir blocos de conteúdo",
"mindmapAddSibling": "Adicionar nó irmão ao mapa mental",
"mindmapAddChild": "Adicionar nó filho ao mapa mental",
"layoutSelectedCount": "${x} selecionados",
diff --git a/app/appearance/langs/ru.json b/app/appearance/langs/ru.json
index 178d2a676b..28e1134c9c 100644
--- a/app/appearance/langs/ru.json
+++ b/app/appearance/langs/ru.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "Резервная копия ключа (необязательно)",
"archiveHistoryOnly": "Только история и снимки",
"openContextMenu": "Открыть контекстное меню",
- "mobileSlashMenu": "Меню косой черты на мобильном устройстве",
- "mobileSlashMenuTip": "После включения введите / в мобильном редакторе, чтобы найти и вставить блоки содержимого",
"mindmapAddSibling": "Добавить соседний узел интеллект-карты",
"mindmapAddChild": "Добавить дочерний узел интеллект-карты",
"layoutSelectedCount": "Выбрано: ${x}",
diff --git a/app/appearance/langs/sk.json b/app/appearance/langs/sk.json
index 1181675224..7d808ca2fc 100644
--- a/app/appearance/langs/sk.json
+++ b/app/appearance/langs/sk.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "Záloha kľúča (voliteľné)",
"archiveHistoryOnly": "Iba história a snímky",
"openContextMenu": "Otvoriť kontextové menu",
- "mobileSlashMenu": "Ponuka lomky v mobile",
- "mobileSlashMenuTip": "Po zapnutí zadajte / v mobilnom editore na vyhľadanie a vloženie blokov obsahu",
"mindmapAddSibling": "Pridať súrodenecký uzol myšlienkovej mapy",
"mindmapAddChild": "Pridať podradený uzol myšlienkovej mapy",
"layoutSelectedCount": "Vybrané: ${x}",
diff --git a/app/appearance/langs/sr.json b/app/appearance/langs/sr.json
index 9a832a4ac8..3786a0640e 100644
--- a/app/appearance/langs/sr.json
+++ b/app/appearance/langs/sr.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "Резервна копија кључа (опционо)",
"archiveHistoryOnly": "Само историја и снимци",
"openContextMenu": "Отвори контекстни мени",
- "mobileSlashMenu": "Мени косе црте на мобилном уређају",
- "mobileSlashMenuTip": "Када је укључен, унесите / у мобилном уређивачу да бисте претражили и уметнули блокове садржаја",
"mindmapAddSibling": "Додај чвор истог нивоа у мапу ума",
"mindmapAddChild": "Додај подређени чвор у мапу ума",
"layoutSelectedCount": "Изабрано: ${x}",
diff --git a/app/appearance/langs/th.json b/app/appearance/langs/th.json
index ebe2455a1c..72f009072a 100644
--- a/app/appearance/langs/th.json
+++ b/app/appearance/langs/th.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "ไฟล์สำรองคีย์ (ไม่บังคับ)",
"archiveHistoryOnly": "เฉพาะประวัติและสแนปช็อต",
"openContextMenu": "เปิดเมนูบริบท",
- "mobileSlashMenu": "เมนูเครื่องหมายทับบนมือถือ",
- "mobileSlashMenuTip": "เมื่อเปิดใช้งาน ให้พิมพ์ / ในตัวแก้ไขบนมือถือเพื่อค้นหาและแทรกบล็อกเนื้อหา",
"mindmapAddSibling": "เพิ่มโหนดระดับเดียวกันในแผนผังความคิด",
"mindmapAddChild": "เพิ่มโหนดลูกในแผนผังความคิด",
"layoutSelectedCount": "เลือกแล้ว ${x} รายการ",
diff --git a/app/appearance/langs/tr.json b/app/appearance/langs/tr.json
index a0ba05cbcf..6416cc5fb1 100644
--- a/app/appearance/langs/tr.json
+++ b/app/appearance/langs/tr.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "Anahtar yedeği (isteğe bağlı)",
"archiveHistoryOnly": "Yalnızca geçmiş ve anlık görüntüler",
"openContextMenu": "Bağlam menüsünü aç",
- "mobileSlashMenu": "Mobil eğik çizgi menüsü",
- "mobileSlashMenuTip": "Etkinleştirildiğinde içerik bloklarını aramak ve eklemek için mobil düzenleyicide / yazın",
"mindmapAddSibling": "Zihin haritasına aynı düzeyde düğüm ekle",
"mindmapAddChild": "Zihin haritasına alt düğüm ekle",
"layoutSelectedCount": "${x} seçildi",
diff --git a/app/appearance/langs/uk.json b/app/appearance/langs/uk.json
index adbbcadcf1..3afbbb6a1d 100644
--- a/app/appearance/langs/uk.json
+++ b/app/appearance/langs/uk.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "Резервна копія ключа (необов’язково)",
"archiveHistoryOnly": "Лише історія та знімки",
"openContextMenu": "Відкрити контекстне меню",
- "mobileSlashMenu": "Меню косої риски на мобільному пристрої",
- "mobileSlashMenuTip": "Після ввімкнення введіть / у мобільному редакторі, щоб знайти та вставити блоки вмісту",
"mindmapAddSibling": "Додати вузол того самого рівня мапи думок",
"mindmapAddChild": "Додати дочірній вузол мапи думок",
"layoutSelectedCount": "Вибрано: ${x}",
diff --git a/app/appearance/langs/zh-CN.json b/app/appearance/langs/zh-CN.json
index cf8bfe1f2f..3d05ed0b27 100644
--- a/app/appearance/langs/zh-CN.json
+++ b/app/appearance/langs/zh-CN.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "密钥备份(可选)",
"archiveHistoryOnly": "仅历史和快照",
"openContextMenu": "打开上下文菜单",
- "mobileSlashMenu": "移动端斜杠菜单",
- "mobileSlashMenuTip": "开启后,在移动端编辑器输入 / 可搜索并插入内容块",
"mindmapAddSibling": "添加同级思维导图节点",
"mindmapAddChild": "添加子思维导图节点",
"layoutSelectedCount": "已选 ${x} 个",
diff --git a/app/appearance/langs/zh-TW.json b/app/appearance/langs/zh-TW.json
index 732d27d896..84f643457d 100644
--- a/app/appearance/langs/zh-TW.json
+++ b/app/appearance/langs/zh-TW.json
@@ -47,8 +47,6 @@
"archiveKeyFile": "金鑰備份(選填)",
"archiveHistoryOnly": "僅歷史和快照",
"openContextMenu": "開啟快顯功能表",
- "mobileSlashMenu": "行動端斜線選單",
- "mobileSlashMenuTip": "啟用後,在行動端編輯器輸入 / 可搜尋並插入內容區塊",
"mindmapAddSibling": "新增同級心智圖節點",
"mindmapAddChild": "新增子心智圖節點",
"layoutSelectedCount": "已選 ${x} 個",
diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy
index 8924f51729..6d6d198149 100644
--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy
+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy
@@ -7,7 +7,7 @@
"id": "20200924100950-9op5xi1",
"title": "Shortcuts",
"type": "doc",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
@@ -16,7 +16,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20260928091747-wub2unw",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
@@ -10007,7 +10007,7 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20260927164841-n9zgr7r",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
@@ -10039,7 +10039,7 @@
},
{
"Type": "NodeText",
- "Data": " and view or edit a profile, then select the slash menu category. The slash menu has one total switch on mobile. It is off by default, takes effect immediately, and preserves your existing mobile preference. When enabled, type / to search for content blocks and select a result to insert at the original cursor position. This switch applies to this device; candidate visibility and order are configured separately in each profile."
+ "Data": " and select the slash menu category while editing a custom profile. Mobile and desktop use the same profile settings for the total switch, candidate visibility, and order. The default is on for desktop and off for mobile. Enable the switch, confirm to save, and activate the profile; then type / to search for content blocks and select a result to insert at the original cursor position."
}
]
},
@@ -10048,12 +10048,12 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20260927164841-clwu05c",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
"Type": "NodeText",
- "Data": "In custom profiles, use the category selector to switch between the toolbar and slash menu. Drag the six-dot handle on the left of an item to change its order, or use its switch to change visibility. Drag near the list edge to scroll. Clear the search before sorting, and confirm to save the profile. Candidate settings in built-in profiles are read-only; duplicate one to customize it, then activate the saved profile. Profiles are stored on this device and are not synced across devices."
+ "Data": "In custom profiles, use the category selector to switch between the toolbar and slash menu. Drag the six-dot handle on the left of an item to change its order, or use its switch to change visibility. Drag near the list edge to scroll. Clear the search before sorting, and confirm to save the profile. Built-in profiles are read-only; duplicate one to customize it, then activate the saved profile. Profiles are stored on this device and are not synced across devices."
}
]
},
diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
index 56dcc49b01..f489463315 100644
--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
@@ -7,7 +7,7 @@
"id": "20200813004551-gm0pbn1",
"title": "快捷键",
"type": "doc",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
@@ -16,7 +16,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20260928091747-w9nonqj",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
@@ -10007,7 +10007,7 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20260927164841-yjk81pw",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
@@ -10039,7 +10039,7 @@
},
{
"Type": "NodeText",
- "Data": ",查看或编辑方案后选择斜杠菜单分类。移动端斜杠菜单只有一个总开关,默认关闭,修改后立即生效,并保留已有移动端设置。开启后输入 / 可搜索内容块,选择候选后在原光标处插入。总开关作用于本设备,候选项的显隐与排序分别保存在各方案中。"
+ "Data": ",编辑自定义方案并选择斜杠菜单分类。移动端与桌面端共用方案中的总开关、候选显隐和排序配置,默认值为桌面端开启、移动端关闭。开启总开关,确认保存并启用该方案后,输入 / 可搜索内容块,选择候选后在原光标处插入。"
}
]
},
@@ -10048,12 +10048,12 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20260927164841-y6wu08m",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
"Type": "NodeText",
- "Data": "编辑自定义方案时,可通过分类选择框切换工具栏与斜杠菜单。拖动项目左侧的六点手柄调整顺序,使用项目开关调整显隐;拖至列表边缘可滚动。排序前需清空搜索,修改后确认保存方案。内置方案中的候选配置只读,可复制后自定义,再启用保存的方案。方案保存在本设备,不跨设备同步。"
+ "Data": "编辑自定义方案时,可通过分类选择框切换工具栏与斜杠菜单。拖动项目左侧的六点手柄调整顺序,使用项目开关调整显隐;拖至列表边缘可滚动。排序前需清空搜索,修改后确认保存方案。内置方案只读,可复制后自定义,再启用保存的方案。方案保存在本设备,不跨设备同步。"
}
]
},
diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy
index 34c5535c23..b67f7a05f8 100644
--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy
+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy
@@ -7,7 +7,7 @@
"id": "20211226122549-jktxego",
"title": "快捷鍵",
"type": "doc",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
@@ -16,7 +16,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20260928091747-a3qlogr",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
@@ -9996,7 +9996,7 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20260927164841-m2ossua",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
@@ -10028,7 +10028,7 @@
},
{
"Type": "NodeText",
- "Data": ",檢視或編輯方案後選擇斜線選單分類。行動端斜線選單只有一個總開關,預設關閉,修改後立即生效,並保留既有行動端設定。開啟後輸入 / 可搜尋內容區塊,選擇候選項目後在原游標處插入。總開關作用於本裝置,候選項目的顯隱與排序分別儲存在各方案中。"
+ "Data": ",編輯自訂方案並選擇斜線選單分類。行動端與桌面端共用方案中的總開關、候選顯隱和排序設定,預設值為桌面端開啟、行動端關閉。開啟總開關,確認儲存並啟用該方案後,輸入 / 可搜尋內容區塊,選擇候選項目後在原游標處插入。"
}
]
},
@@ -10037,12 +10037,12 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20260927164841-7yj0cwc",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
"Type": "NodeText",
- "Data": "編輯自訂方案時,可透過分類選擇框切換工具列與斜線選單。拖曳項目左側的六點把手調整順序,使用項目開關調整顯隱;拖至清單邊緣可捲動。排序前需清空搜尋,修改後確認儲存方案。內建方案中的候選設定唯讀,可複製後自訂,再啟用儲存的方案。方案儲存在本裝置,不跨裝置同步。"
+ "Data": "編輯自訂方案時,可透過分類選擇框切換工具列與斜線選單。拖曳項目左側的六點把手調整順序,使用項目開關調整顯隱;拖至清單邊緣可捲動。排序前需清空搜尋,修改後確認儲存方案。內建方案唯讀,可複製後自訂,再啟用儲存的方案。方案儲存在本裝置,不跨裝置同步。"
}
]
},
diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy
index 16ae7aaf6c..df049ed361 100644
--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy
+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy
@@ -9,7 +9,7 @@
"id": "20240530101000-xsbxokr",
"title": "ショートカット",
"type": "doc",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
@@ -18,7 +18,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20260928091747-t67pljp",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
@@ -9932,7 +9932,7 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20260927164841-exxixvw",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
@@ -9964,7 +9964,7 @@
},
{
"Type": "NodeText",
- "Data": " を開き、プロファイルを表示または編集して、スラッシュメニューの分類を選択します。モバイルのスラッシュメニューには有効・無効を切り替えるスイッチが1つあり、初期設定では無効です。変更は即座に反映され、既存のモバイル設定は保持されます。有効にすると、/ を入力してコンテンツブロックを検索でき、候補を選択すると元のカーソル位置に挿入されます。このスイッチは端末全体に適用され、候補の表示・非表示と順序はプロファイルごとに保存されます。"
+ "Data": " を開き、カスタムプロファイルを編集してスラッシュメニューの分類を選択します。モバイルとデスクトップは、有効・無効、候補の表示・非表示、順序を同じプロファイル設定で管理します。初期値はデスクトップでは有効、モバイルでは無効です。スイッチを有効にして確認・保存し、そのプロファイルを有効にすると、/ を入力してコンテンツブロックを検索でき、候補を選択すると元のカーソル位置に挿入されます。"
}
]
},
@@ -9973,12 +9973,12 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20260927164841-2wtv9yz",
- "updated": "20260928164213"
+ "updated": "20260928175046"
},
"Children": [
{
"Type": "NodeText",
- "Data": "カスタムプロファイルでは、分類の選択欄でツールバーとスラッシュメニューを切り替えます。項目の左側にある6つの点のハンドルをドラッグして順序を変更し、スイッチで表示・非表示を設定します。リストの端までドラッグするとスクロールします。並べ替える前に検索欄を空にし、変更後は確認してプロファイルを保存します。組み込みプロファイルの候補設定は読み取り専用です。複製してカスタマイズし、保存したプロファイルを有効にしてください。プロファイルはこの端末に保存され、端末間では同期されません。"
+ "Data": "カスタムプロファイルでは、分類の選択欄でツールバーとスラッシュメニューを切り替えます。項目の左側にある6つの点のハンドルをドラッグして順序を変更し、スイッチで表示・非表示を設定します。リストの端までドラッグするとスクロールします。並べ替える前に検索欄を空にし、変更後は確認してプロファイルを保存します。組み込みプロファイルは読み取り専用です。複製してカスタマイズし、保存したプロファイルを有効にしてください。プロファイルはこの端末に保存され、端末間では同期されません。"
}
]
},
diff --git a/app/src/config/entryVisibility/catalog.ts b/app/src/config/entryVisibility/catalog.ts
index 0bbe1f66cf..9414f7865d 100644
--- a/app/src/config/entryVisibility/catalog.ts
+++ b/app/src/config/entryVisibility/catalog.ts
@@ -584,6 +584,7 @@ const slashMenuBuiltinChildren = [
const slashMenuRoot = {
...node("menu", lang("entrySlashMenu"), true, [...slashMenuBuiltinChildren], true),
+ defaultVisible: () => typeof window === "undefined" || !window.siyuan.mobile,
displayChildrenDirectly: true,
};
diff --git a/app/src/config/entryVisibility/mobileSlash.test.ts b/app/src/config/entryVisibility/mobileSlash.test.ts
index 4a83316f91..9b54de2e3b 100644
--- a/app/src/config/entryVisibility/mobileSlash.test.ts
+++ b/app/src/config/entryVisibility/mobileSlash.test.ts
@@ -6,49 +6,64 @@ import {ModuleKind, transpileModule} from "typescript";
import * as catalog from "./catalog";
import * as profile from "./profile";
-test("mobile slash total switch reuses existing preferences and respects candidate visibility", () => {
+test("slash visibility shares profile settings and only platform defaults differ", () => {
const root = catalog.SLASH_MENU_ROOT_PATH;
- const storageKey = "local-mobile-slash-menu";
- const custom = {id: "custom", entries: {[root]: false, [`${root}.heading1`]: false}, orders: {}};
+ const custom = {id: "custom", entries: {} as Record<string, boolean>, orders: {}};
const config = {active: "custom", profiles: [custom]};
- const storage: Record<string, {enabled: boolean}> = {};
- let mobile = true;
- const api = {} as typeof import("./runtime");
- runInNewContext(transpileModule(readFileSync("src/config/entryVisibility/runtime.ts", "utf8"), {
- compilerOptions: {module: ModuleKind.CommonJS},
- }).outputText, {
- exports: api,
- window: {siyuan: {config: {appearance: {entryVisibility: config}}, storage}},
- require: () => ({
- ...catalog, ...profile,
- Constants: {LOCAL_MOBILE_SLASH_MENU: storageKey},
- isMobile: () => mobile,
- TOOLBAR_ENTRY_ROOT_PATH: "editor.toolbar",
- }),
- });
- assert.equal(api.isEntryVisible(root), false);
- for (const active of ["simple", "full", "custom"]) {
- config.active = active;
- for (const enabled of [false, true]) {
- storage[storageKey] = {enabled};
- assert.equal(api.isEntryVisible(root), enabled);
- assert.equal(api.getConfiguredEntryVisibility(root), enabled);
- assert.equal(api.getConfiguredEntryVisibility(root, true), true);
+ const runtimeWindow = {siyuan: {mobile: undefined as object | undefined,
+ config: {appearance: {entryVisibility: config}}, storage: {"local-mobile-slash-menu": {enabled: true}}}};
+ const descriptor = Object.getOwnPropertyDescriptor(globalThis, "window");
+ Object.defineProperty(globalThis, "window", {configurable: true, value: runtimeWindow});
+ try {
+ const api = {} as typeof import("./runtime");
+ runInNewContext(transpileModule(readFileSync("src/config/entryVisibility/runtime.ts", "utf8"), {
+ compilerOptions: {module: ModuleKind.CommonJS},
+ }).outputText, {
+ exports: api,
+ window: runtimeWindow,
+ require: () => ({...catalog, ...profile, TOOLBAR_ENTRY_ROOT_PATH: "editor.toolbar"}),
+ });
+ for (const mobile of [false, true]) {
+ runtimeWindow.siyuan.mobile = mobile ? {} : undefined;
+ assert.equal(catalog.getEntryCatalogDefaultVisibility(root), !mobile);
+ assert.equal(catalog.getEntryCatalogCustomDefaultVisibility(root), !mobile);
+ for (const active of ["simple", "full", "custom"]) {
+ config.active = active;
+ for (const legacy of [false, true]) {
+ runtimeWindow.siyuan.storage["local-mobile-slash-menu"].enabled = legacy;
+ assert.equal(api.isEntryVisible(root), !mobile);
+ assert.equal(api.getConfiguredEntryVisibility(`${root}.heading1`), !mobile);
+ }
+ }
+ for (const template of ["simple", "full"] as const) {
+ assert.equal(api.createEntryProfileSnapshot(template)[root], !mobile);
+ }
+ config.active = "custom";
+ for (const enabled of [true, false]) {
+ custom.entries[root] = enabled;
+ assert.equal(api.isEntryVisible(root), enabled);
+ assert.equal(api.getConfiguredEntryVisibility(`${root}.heading2`), enabled);
+ }
+ custom.entries[root] = true;
+ custom.entries[`${root}.heading1`] = false;
+ assert.equal(api.isEntryVisible(`${root}.heading1`), false);
+ assert.equal(api.isEntryVisible(`${root}.heading2`), true);
+ custom.entries = {};
+ }
+ config.active = "custom";
+ custom.entries[root] = true;
+ runtimeWindow.siyuan.mobile = undefined;
+ assert.equal(api.getConfiguredEntryVisibility(root), true);
+ runtimeWindow.siyuan.mobile = {};
+ assert.equal(api.getConfiguredEntryVisibility(root), true);
+ custom.entries[root] = false;
+ runtimeWindow.siyuan.mobile = undefined;
+ assert.equal(api.getConfiguredEntryVisibility(root), false);
+ } finally {
+ if (descriptor) {
+ Object.defineProperty(globalThis, "window", descriptor);
+ } else {
+ Reflect.deleteProperty(globalThis, "window");
}
}
- config.active = "custom";
- assert.equal(api.isEntryVisible(`${root}.heading1`), false);
- assert.equal(api.isEntryVisible(`${root}.heading2`), true);
- storage[storageKey].enabled = false;
- assert.equal(api.isEntryVisible(`${root}.heading2`), false);
- assert.equal(api.getConfiguredEntryVisibility(`${root}.heading2`, true), true);
- assert.equal(api.getConfiguredEntryVisibility(`${root}.heading1`, true), false);
- mobile = false;
- storage[storageKey].enabled = true;
- assert.equal(api.getConfiguredEntryVisibility(root), false);
- assert.equal(api.getConfiguredEntryVisibility(root, true), false);
- config.active = "full";
- storage[storageKey].enabled = false;
- assert.equal(api.getConfiguredEntryVisibility(root), true);
- assert.equal(custom.entries[root], false);
});
diff --git a/app/src/config/entryVisibility/mobileUi.test.ts b/app/src/config/entryVisibility/mobileUi.test.ts
index 6ee1d9e31e..228eed5d94 100644
--- a/app/src/config/entryVisibility/mobileUi.test.ts
+++ b/app/src/config/entryVisibility/mobileUi.test.ts
@@ -14,11 +14,9 @@ const browserCases = async (sources: Record<string, string>, languages: Record<s
}
};
let mobile = true;
- const writes: unknown[] = [];
const cache: Record<string, Record<string, any>> = {};
const noop = () => {};
- const storageKey = "local-mobile-slash-menu";
- window.siyuan = {languages, storage: {}, config: {editor: {codeTabSpaces: 4}, appearance: {
+ window.siyuan = {languages, mobile: {}, storage: {}, config: {editor: {codeTabSpaces: 4}, appearance: {
entryVisibility: {active: "custom", profiles: [{id: "custom", name: "Custom", entries: {}, orders: {}}]},
}}, layout: {}} as unknown as typeof window.siyuan;
const load = (id: string): Record<string, any> => {
@@ -28,9 +26,8 @@ const browserCases = async (sources: Record<string, string>, languages: Record<s
if (id === "config/entryVisibility/runtime") {
return {
ENTRY_PROFILE_FULL: "full", ENTRY_PROFILE_SIMPLE: "simple", ENTRY_VISIBILITY_VERSION: 1,
- createEntryProfileSnapshot: () => ({}), createEntryOrderSnapshot: () => ({}),
- getConfiguredEntryVisibility: (entryPath: string) => entryPath !== "editor.slash.menu" || !mobile ||
- window.siyuan.storage[storageKey]?.enabled === true,
+ createEntryProfileSnapshot: () => ({"editor.slash.menu": !mobile}), createEntryOrderSnapshot: () => ({}),
+ getConfiguredEntryVisibility: () => true,
saveEntryVisibility: (config: Config.IEntryVisibility) => {
window.siyuan.config.appearance.entryVisibility = config;
},
@@ -41,10 +38,9 @@ const browserCases = async (sources: Record<string, string>, languages: Record<s
"util/functions": {isMobile: () => mobile},
"util/hostCapabilities": {getHostCapabilities: () => ({importExport: false})},
"util/genID": {genUUID: () => "new"},
- "constants": {Constants: {LOCAL_MOBILE_SLASH_MENU: storageKey}},
"dialog/confirmDialog": {confirmDialog: (_title: string, _text: string, callback: () => void) => callback()},
"dialog/message": {showMessage: noop},
- "protyle/util/compatibility": {isInMobileApp: () => true, setStorageVal: (...args: unknown[]) => writes.push(args)},
+ "protyle/util/compatibility": {isInMobileApp: () => true},
};
check(id in mocks, `Missing module ${id}`);
return mocks[id];
@@ -84,12 +80,12 @@ const browserCases = async (sources: Record<string, string>, languages: Record<s
select.dispatchEvent(new Event("change", {bubbles: true}));
};
if (narrow) {
- window.siyuan.storage[storageKey] = {enabled: true};
for (const id of ["", "custom"]) {
view = open(id);
check(Boolean(view.querySelector("[data-profile-field='template']")) === !id,
"New profiles must include the template selector");
selectSlash();
+ view.querySelector<HTMLInputElement>("[data-entry-path='editor.slash.menu']").click();
const list = view.querySelector<HTMLElement>(".config-entry-visibility__column-list");
const bounds = list.getBoundingClientRect();
check(bounds.height >= 132, `${id || "new"} profile list is too short: ${bounds.height}px`);
@@ -97,7 +93,7 @@ const browserCases = async (sources: Record<string, string>, languages: Record<s
check(action.bottom <= innerHeight && bounds.bottom <= action.top,
"List and actions must remain inside the viewport");
const header = view.querySelector<HTMLElement>(".config-entry-visibility__mobile-header");
- for (const selector of ["[data-profile-field='name']", "[data-type='mobile-slash-menu']"]) {
+ for (const selector of ["[data-profile-field='name']", "[data-entry-path='editor.slash.menu']"]) {
const control = view.querySelector<HTMLElement>(selector);
control.scrollIntoView({block: "nearest"});
const rect = control.getBoundingClientRect();
@@ -122,11 +118,10 @@ const browserCases = async (sources: Record<string, string>, languages: Record<s
return "Narrow new and existing profiles passed";
}
selectSlash();
- let enabled = view.querySelector<HTMLInputElement>("[data-type='mobile-slash-menu']");
+ let enabled = view.querySelector<HTMLInputElement>("[data-entry-path='editor.slash.menu']");
check(!enabled.checked, "Mobile slash defaults to off");
enabled.click();
- check(window.siyuan.storage[storageKey].enabled && writes.length === 1, "Device switch must persist immediately");
- check(!view.querySelector("[data-entry-path='editor.slash.menu']"), "Mobile must not show a second profile root switch");
+ check(config().profiles[0].entries["editor.slash.menu"] !== true, "Total switch must remain a draft until confirmed");
check(view.querySelectorAll("[data-type='entry-mobile-options'] input").length === 1, "Only one total switch is shown");
check(!view.querySelector("[data-entry-move]"), "No arrow sort controls");
const browser = view.querySelector<HTMLElement>("[data-type='entry-browser']");
@@ -178,34 +173,35 @@ const browserCases = async (sources: Record<string, string>, languages: Record<s
check(!browser.querySelector(".config-entry-visibility__row--drop-after"), "Outside release clears drop target");
view.querySelector<HTMLElement>("[data-action='confirm']").click();
const order = config().profiles[0].orders["editor.slash.menu"];
+ check(config().profiles[0].entries["editor.slash.menu"] === true, "Confirm saves total switch in the profile");
check(order.includes("plugin:missing:item"), "Unavailable plugin slots must survive sorting");
check(order.indexOf("heading3") < order.indexOf("heading1"), "Confirmed order must persist");
view = open();
selectSlash();
- enabled = view.querySelector<HTMLInputElement>("[data-type='mobile-slash-menu']");
- check(enabled.checked, "Reopening must preserve device setting");
+ enabled = view.querySelector<HTMLInputElement>("[data-entry-path='editor.slash.menu']");
+ check(enabled.checked, "Reopening must preserve profile setting");
const search = view.querySelector<HTMLInputElement>("[data-type='entry-search']");
search.value = "heading1";
search.dispatchEvent(new Event("input", {bubbles: true}));
check(!view.querySelector(".config-entry-visibility__drag"), "Search results must not permit partial-list sorting");
search.value = "";
search.dispatchEvent(new Event("input", {bubbles: true}));
- const rootSwitch = view.querySelector<HTMLInputElement>("[data-type='mobile-slash-menu']");
+ const rootSwitch = view.querySelector<HTMLInputElement>("[data-entry-path='editor.slash.menu']");
rootSwitch.click();
check(!view.querySelector(".config-entry-visibility__drag"), "Disabled menu must not be draggable");
check(view.querySelector<HTMLInputElement>("[data-entry-path='editor.slash.menu.heading1']").disabled,
"Disabled menu must disable candidate controls");
view.querySelector<HTMLElement>("[data-action='cancel']").click();
- check(config().profiles[0].entries["editor.slash.menu"] !== false, "Device switch must not overwrite profile data");
- check(window.siyuan.storage[storageKey].enabled === false, "Device switch remains effective after closing");
+ check(config().profiles[0].entries["editor.slash.menu"] === true, "Cancel must discard the total switch change");
view = open("full");
selectSlash();
check(!view.querySelector(".config-entry-visibility__drag"), "Built-in profiles must remain read-only");
- enabled = view.querySelector<HTMLInputElement>("[data-type='mobile-slash-menu']");
+ enabled = view.querySelector<HTMLInputElement>("[data-entry-path='editor.slash.menu']");
enabled.click();
- check(window.siyuan.storage[storageKey].enabled === true, "Total switch is editable while viewing built-in profiles");
+ check(!enabled.checked, "Built-in total switch follows mobile default and remains read-only");
view.querySelector<HTMLElement>("[data-action='cancel']").click();
mobile = false;
+ delete window.siyuan.mobile;
view = open();
check(!view.querySelector("[data-type='entry-section']"), "Desktop retains its location column");
check(view.querySelector(".config-entry-visibility__column--locations"), "Desktop locations remain reachable");
@@ -222,6 +218,7 @@ const browserCases = async (sources: Record<string, string>, languages: Record<s
check(desktopOrder.indexOf("heading1") < desktopOrder.indexOf("heading3"), "Desktop drag still updates order");
check(catalog.getEntryCatalogChildren("editor.slash.menu").length > 20, "Exercise the actual slash catalog");
mobile = true;
+ window.siyuan.mobile = {} as typeof window.siyuan.mobile;
view = open();
const toolbarBrowser = view.querySelector<HTMLElement>("[data-type='entry-browser']");
toolbarBrowser.setPointerCapture = () => { captured = true; };
diff --git a/app/src/config/entryVisibility/runtime.ts b/app/src/config/entryVisibility/runtime.ts
index 81d5334adb..5921e884df 100644
--- a/app/src/config/entryVisibility/runtime.ts
+++ b/app/src/config/entryVisibility/runtime.ts
@@ -29,7 +29,6 @@ import {TOOLBAR_ENTRY_ROOT_PATH} from "../../protyle/toolbar/defaults";
import {resolveToolbarItems} from "../../protyle/toolbar/entryVisibility";
import {syncDockBarVisibility} from "../../layout/dock/barVisibility";
import {genUUID} from "../../util/genID";
-import {isMobile} from "../../util/functions";
import {
applyDockEntryOrderSnapshot,
getCurrentDockEntryOrderSnapshot,
@@ -72,11 +71,7 @@ export const isEntryVisible = (path: string): boolean => {
return getConfiguredEntryVisibility(path);
};
-export const getConfiguredEntryVisibility = (path: string, ignoreMobileSlashSwitch = false): boolean => {
- // 移动端总开关沿用本机偏好,方案中的候选显隐与排序仍独立保存。
- if (path === SLASH_MENU_ROOT_PATH && isMobile()) {
- return ignoreMobileSlashSwitch || window.siyuan.storage[Constants.LOCAL_MOBILE_SLASH_MENU]?.enabled === true;
- }
+export const getConfiguredEntryVisibility = (path: string): boolean => {
const config = getConfig();
const active = config.active;
let visible: boolean;
@@ -92,7 +87,7 @@ export const getConfiguredEntryVisibility = (path: string, ignoreMobileSlashSwit
}
const parentPath = getEntryParentPath(path);
if (parentPath && getEntryCatalogNode(parentPath)) {
- return getConfiguredEntryVisibility(parentPath, ignoreMobileSlashSwitch);
+ return getConfiguredEntryVisibility(parentPath);
}
return true;
};
diff --git a/app/src/config/entryVisibility/ui.ts b/app/src/config/entryVisibility/ui.ts
index 1c816b71a1..77e20f751c 100644
--- a/app/src/config/entryVisibility/ui.ts
+++ b/app/src/config/entryVisibility/ui.ts
@@ -17,7 +17,6 @@ import {
refreshTopBarCatalog,
TOP_BAR_ROOT_PATH,
STATUS_BAR_ROOT_PATH,
- SLASH_MENU_ROOT_PATH,
} from "./catalog";
import {
createEntryProfileSnapshot,
@@ -43,8 +42,7 @@ import {
} from "./profile";
import {getHostCapabilities} from "../../util/hostCapabilities";
import {isMobile} from "../../util/functions";
-import {isInMobileApp, setStorageVal} from "../../protyle/util/compatibility";
-import {Constants} from "../../constants";
+import {isInMobileApp} from "../../protyle/util/compatibility";
import {bindTouchOrder} from "./touchOrder";
import {MOBILE_TOOLBAR_NAMES, TOOLBAR_ENTRY_ROOT_PATH} from "../../protyle/toolbar/defaults";
import {
@@ -457,9 +455,7 @@ const renderEntryColumns = (profile: Config.IEntryVisibilityProfile, sectionKey:
let nodes = directDisplayRoot?.children || section.children;
let prefix = directDisplayRoot ? directDisplayRootPath : section.key;
let title = directDisplayRoot?.label() || section.label();
- let parentEnabled = isMobile() && directDisplayRootPath === SLASH_MENU_ROOT_PATH
- ? isEntryVisible(SLASH_MENU_ROOT_PATH)
- : directDisplayRoot
+ let parentEnabled = directDisplayRoot
? getProfileEntryVisibility(profile, directDisplayRootPath,
getEntryCatalogCustomDefaultVisibility(directDisplayRootPath))
: true;
@@ -645,9 +641,7 @@ const openProfileEditor = (root: HTMLElement, profileID?: string) => {
view.querySelector("[data-type='entry-mobile-options']").innerHTML = directRoot ? `
<label class="fn__flex b3-label config-item">
<div class="fn__flex-1"><div class="config-name">${escapeHtml(directRoot.label())}</div></div>
- <span class="fn__space"></span>
- <input class="b3-switch" type="checkbox" data-type="mobile-slash-menu"
- ${window.siyuan.storage[Constants.LOCAL_MOBILE_SLASH_MENU]?.enabled === true ? " checked" : ""}>
+ ${renderEntrySwitch(draft, `${section.key}.${directRoot.key}`, directRoot, true, builtin)}
</label>` : "";
}
browser.innerHTML = renderEntryColumns(draft, selectedSectionKey, selectedPaths, builtin,
@@ -846,13 +840,6 @@ const openProfileEditor = (root: HTMLElement, profileID?: string) => {
renderBrowser(false, true);
return;
}
- if (control.dataset.type === "mobile-slash-menu") {
- const config = {enabled: (control as HTMLInputElement).checked};
- window.siyuan.storage[Constants.LOCAL_MOBILE_SLASH_MENU] = config;
- setStorageVal(Constants.LOCAL_MOBILE_SLASH_MENU, config);
- renderBrowser();
- return;
- }
if (builtin) {
return;
}
diff --git a/app/src/config/tabs/appearanceTab.ts b/app/src/config/tabs/appearanceTab.ts
index d3fe131eb7..a97cbb80db 100644
--- a/app/src/config/tabs/appearanceTab.ts
+++ b/app/src/config/tabs/appearanceTab.ts
@@ -950,7 +950,7 @@ const registerAppearanceControlsGroup = (tab: SettingTabBuilder) => {
key: "entryVisibility",
keywords: [window.siyuan.languages.entryVisibility, window.siyuan.languages.entryVisibilityTip,
window.siyuan.languages.entryToolbar, window.siyuan.languages.entrySlashMenu,
- ...(isMobile() ? [window.siyuan.languages.mobileSlashMenu, window.siyuan.languages.mobileToolbarEntryTip] : [])],
+ ...(isMobile() ? [window.siyuan.languages.mobileToolbarEntryTip] : [])],
html: genEntryVisibilityHtml,
afterMount: mountEntryVisibility,
});
diff --git a/app/src/constants.ts b/app/src/constants.ts
index 8508a7edc9..cfd11f9175 100644
--- a/app/src/constants.ts
+++ b/app/src/constants.ts
@@ -181,7 +181,6 @@ export abstract class Constants {
public static readonly LOCAL_SEARCHUNREF = "local-searchunref";
public static readonly LOCAL_DOCINFO = "local-docinfo"; // only mobile
public static readonly LOCAL_MOBILE_TABS = "local-mobile-tabs"; // only mobile
- public static readonly LOCAL_MOBILE_SLASH_MENU = "local-mobile-slash-menu"; // only mobile
public static readonly LOCAL_MOBILE_BOTTOM_BAR = "local-mobile-bottom-bar"; // only mobile
public static readonly LOCAL_MOBILE_SIDE_PANEL = "local-mobile-side-panel"; // only mobile
public static readonly LOCAL_DAILYNOTEID = "local-dailynoteid"; // string
diff --git a/app/src/protyle/hint/extend.ts b/app/src/protyle/hint/extend.ts
index b24a424e50..c8d5c6d871 100644
--- a/app/src/protyle/hint/extend.ts
+++ b/app/src/protyle/hint/extend.ts
@@ -441,7 +441,7 @@ export const getBuiltinSlashMenuItems = (protyle: IProtyle): IHintData[] => {
};
export const hintSlash = registerBuiltinSlashHint((key: string, protyle: IProtyle, sourceOrHideConfiguredCreate: THintSource | boolean = false) => {
- const enabled = getConfiguredEntryVisibility(SLASH_MENU_ROOT_PATH, protyle.lite);
+ const enabled = getConfiguredEntryVisibility(SLASH_MENU_ROOT_PATH);
if (!enabled) {
return [];
}
@@ -489,7 +489,7 @@ export const hintSlash = registerBuiltinSlashHint((key: string, protyle: IProtyl
canUpload: !!(protyle.options.upload.handler || (protyle.options.upload.url && protyle.upload)),
key,
order: getEntryOrder(SLASH_MENU_ROOT_PATH),
- visible: (entryKey) => getConfiguredEntryVisibility(getSlashMenuEntryPath(entryKey), protyle.lite),
+ visible: (entryKey) => getConfiguredEntryVisibility(getSlashMenuEntryPath(entryKey)),
});
});
diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts
index 1e50609bd4..1311a65f23 100644
--- a/app/src/protyle/hint/index.ts
+++ b/app/src/protyle/hint/index.ts
@@ -336,10 +336,6 @@ export class Hint {
if (!this.enableSlash || !blockElement || isInEmbedBlock(blockElement)) {
return;
}
- if (!protyle.lite && isMobile() && this.splitChar !== "/") {
- this.element.classList.add("fn__none");
- return;
- }
if (protyle.lite) {
protyle.options.hint.extend.find((item) => {
if (item.key === "/" && item.hint) {
diff --git a/app/src/protyle/util/compatibility.ts b/app/src/protyle/util/compatibility.ts
index 5711607dbc..e9665e77c1 100644
--- a/app/src/protyle/util/compatibility.ts
+++ b/app/src/protyle/util/compatibility.ts
@@ -767,7 +767,6 @@ export const getLocalStorage = (cb: () => void) => {
version: 1,
tabs: [],
};
- defaultStorage[Constants.LOCAL_MOBILE_SLASH_MENU] = {enabled: false};
defaultStorage["local-mobile-bars"] = {autoHide: true};
defaultStorage[Constants.LOCAL_MOBILE_BOTTOM_BAR] = {
version: 1,
@@ -811,7 +810,6 @@ export const getLocalStorage = (cb: () => void) => {
[Constants.LOCAL_EXPORTIMG, Constants.LOCAL_EXPORTPATH, Constants.LOCAL_SEARCHKEYS, Constants.LOCAL_PDFTHEME, Constants.LOCAL_BAZAAR,
Constants.LOCAL_EXPORTWORD, Constants.LOCAL_EXPORTPDF, Constants.LOCAL_DOCINFO, Constants.LOCAL_MOBILE_TABS,
- Constants.LOCAL_MOBILE_SLASH_MENU,
Constants.LOCAL_MOBILE_BOTTOM_BAR, Constants.LOCAL_MOBILE_SIDE_PANEL, "local-mobile-bars",
Constants.LOCAL_FONTSTYLES,
Constants.LOCAL_SEARCHDATA, Constants.LOCAL_ZOOM, Constants.LOCAL_LAYOUTS,