Преглед на файлове

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

Vanessa преди 2 години
родител
ревизия
e6658073eb

+ 3 - 0
app/appearance/langs/en_US.json

@@ -1,4 +1,7 @@
 {
+  "createDeck": "Create Deck",
+  "addDeck": "Add to deck",
+  "removeDeck": "Remove from deck",
   "riffCard": "Flashcard",
   "compare": "Compare",
   "switchTab": "Switcher",

+ 3 - 0
app/appearance/langs/es_ES.json

@@ -1,4 +1,7 @@
 {
+  "createDeck": "Crear mazo",
+  "addDeck": "Añadir al mazo",
+  "removeDeck": "Eliminar del mazo",
   "riffCard": "Tarjeta Flash",
   "comparar": "Comparar",
   "switchTab": "Conmutador",

+ 3 - 0
app/appearance/langs/fr_FR.json

@@ -1,4 +1,7 @@
 {
+  "createDeck": "Créer un deck",
+  "addDeck": "Ajouter au deck",
+  "removeDeck": "Retirer du deck",
   "riffCard": "Carte flash",
   "comparer": "Comparer",
   "switchTab": "Commutateur",

+ 3 - 0
app/appearance/langs/zh_CHT.json

@@ -1,4 +1,7 @@
 {
+  "createDeck": "創建卡包",
+  "addDeck": "加入卡包",
+  "removeDeck": "從卡包中移除",
   "riffCard": "閃卡",
   "compare": "比較",
   "switchTab": "頁籤切換",

+ 3 - 0
app/appearance/langs/zh_CN.json

@@ -1,4 +1,7 @@
 {
+  "createDeck": "创建卡包",
+  "addDeck": "加入卡包",
+  "removeDeck": "从卡包中移除",
   "riffCard": "闪卡",
   "compare": "比较",
   "switchTab": "页签切换",

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

@@ -39,12 +39,12 @@ const bindAttrInput = (inputElement: HTMLInputElement, confirmElement: Element)
 };
 
 const genCardItem = (item: { id: string, name: string }) => {
-    return `<li data-id="${item.id}" class="b3-list-item b3-list-item--hide-action">
+    return `<li style="margin: 0 !important;" data-id="${item.id}" class="b3-list-item b3-list-item--hide-action">
 <span class="b3-list-item__text">${item.name}</span>
-<span data-type="add" class="b3-list-item__action b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.addAttr}">
+<span data-type="add" class="b3-list-item__action b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.addDeck}">
     <svg><use xlink:href="#iconAdd"></use></svg>
 </span>
-<span data-type="remove" class="b3-list-item__action b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.remove}">
+<span data-type="remove" class="b3-list-item__action b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.removeDeck}">
     <svg><use xlink:href="#iconMin"></use></svg>
 </span>
 </li>`
@@ -64,13 +64,13 @@ export const openDiffCard = (nodeElement: Element[]) => {
             width: isMobile() ? "80vw" : "50vw",
             height: "70vh",
             title: window.siyuan.languages.riffCard,
-            content: `<div class="b3-dialog__content fn__flex-column" style="box-sizing: border-box">
+            content: `<div class="b3-dialog__content fn__flex-column" style="box-sizing: border-box;height: 100%">
     <div class="fn__flex">
         <input class="b3-text-field fn__flex-1">
         <span class="fn__space"></span>
         <button data-type="create" class="b3-button b3-button--outline" style="width: 100px">
             <svg><use xlink:href="#iconAdd"></use></svg>
-            ${window.siyuan.languages.addAttr}
+            ${window.siyuan.languages.createDeck}
         </button>
     </div>
     <div class="fn__hr"></div>
@@ -92,7 +92,7 @@ export const openDiffCard = (nodeElement: Element[]) => {
                             hideMessage(msgId);
                         }
                         fetchPost("/api/riff/createRiffDeck", {name: inputElement.value}, (response) => {
-                            dialog.element.querySelector(".b3-list").insertAdjacentHTML("beforeend", genCardItem(response.data))
+                            dialog.element.querySelector(".b3-list").insertAdjacentHTML("afterbegin", genCardItem(response.data))
                             inputElement.value = '';
                         })
                     } else {