Просмотр исходного кода

:art: https://github.com/siyuan-note/siyuan/issues/6710

Vanessa 2 лет назад
Родитель
Сommit
b1568db827

+ 1 - 1
app/src/assets/scss/_menu.scss

@@ -51,7 +51,7 @@
         padding: 8px;
         position: absolute;
         left: calc(100% + 8px);
-        top: -5px;
+        top: -8px;
         box-shadow: var(--b3-dialog-shadow);
         mix-blend-mode: difference;
 

+ 2 - 2
app/src/menus/commonMenuItem.ts

@@ -106,7 +106,7 @@ export const openDiffCard = (nodeElement: Element[]) => {
                         deckID: target.parentElement.getAttribute("data-id"),
                         blockIDs: ids
                     }, () => {
-
+                        showMessage(window.siyuan.languages.addDeck)
                     })
                     event.stopPropagation();
                     event.preventDefault();
@@ -116,7 +116,7 @@ export const openDiffCard = (nodeElement: Element[]) => {
                         deckID: target.parentElement.getAttribute("data-id"),
                         blockIDs: ids
                     }, () => {
-
+                        showMessage(window.siyuan.languages.removeDeck)
                     })
                     event.stopPropagation();
                     event.preventDefault();

+ 7 - 0
app/src/protyle/gutter/index.ts

@@ -672,6 +672,13 @@ export class Gutter {
         appearanceElement.lastElementChild.classList.add("b3-menu__submenu--row");
         this.genAlign(selectsElement, protyle);
         this.genWidths(selectsElement, protyle);
+        window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
+        window.siyuan.menus.menu.append(new MenuItem({
+            label: window.siyuan.languages.riffCard,
+            click() {
+                openDiffCard(selectsElement);
+            }
+        }).element);
         return window.siyuan.menus.menu;
     }