Jeffrey Chen пре 7 месеци
родитељ
комит
03e079e187

+ 1 - 0
app/appearance/langs/de_DE.json

@@ -1,4 +1,5 @@
 {
+  "empty": "Leer",
   "keyContent": "Schlüsselinhalt",
   "addDesc": "Beschreibung hinzufügen",
   "dataRepoAutoPurgeIndexRetentionDays": "Daten-Snapshot-Aufbewahrungstage",

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

@@ -1,4 +1,5 @@
 {
+  "empty": "Empty",
   "keyContent": "Key content",
   "addDesc": "Add description",
   "dataRepoAutoPurgeIndexRetentionDays": "Data snapshot retention days",

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

@@ -1,4 +1,5 @@
 {
+  "empty": "Vacío",
   "keyContent": "Contenido de la clave",
   "addDesc": "Agregar descripción",
   "dataRepoAutoPurgeIndexRetentionDays": "Días de retención de instantáneas de datos",

+ 1 - 0
app/appearance/langs/he_IL.json

@@ -1,4 +1,5 @@
 {
+  "empty": "ריק",
   "keyContent": "תוכן המפתח",
   "addDesc": "הוסף תיאור",
   "dataRepoAutoPurgeIndexRetentionDays": "ימי שמירת תמונות נתונים",

+ 1 - 0
app/appearance/langs/it_IT.json

@@ -1,4 +1,5 @@
 {
+  "empty": "Vuoto",
   "keyContent": "Contenuto della chiave",
   "addDesc": "Aggiungi descrizione",
   "dataRepoAutoPurgeIndexRetentionDays": "Giorni di conservazione degli snapshot dei dati",

+ 1 - 0
app/appearance/langs/ja_JP.json

@@ -1,4 +1,5 @@
 {
+  "empty": "空白",
   "keyContent": "キーコンテンツ",
   "addDesc": "説明を追加",
   "dataRepoAutoPurgeIndexRetentionDays": "データスナップショットの保持日数",

+ 1 - 0
app/appearance/langs/pl_PL.json

@@ -1,4 +1,5 @@
 {
+  "empty": "Pusty",
   "keyContent": "Zawartość klucza",
   "addDesc": "Dodaj opis",
   "dataRepoAutoPurgeIndexRetentionDays": "Dni przechowywania migawek danych",

+ 1 - 0
app/appearance/langs/ru_RU.json

@@ -1,4 +1,5 @@
 {
+  "empty": "Пусто",
   "keyContent": "Содержимое ключа",
   "addDesc": "Добавить описание",
   "dataRepoAutoPurgeIndexRetentionDays": "Срок хранения снимков данных",

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

@@ -1,4 +1,5 @@
 {
+  "empty": "空白",
   "keyContent": "主鍵內容",
   "addDesc": "添加描述",
   "dataRepoAutoPurgeIndexRetentionDays": "數據快照保留天數",

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

@@ -1,4 +1,5 @@
 {
+  "empty": "空白",
   "keyContent": "主键内容",
   "addDesc": "添加描述",
   "dataRepoAutoPurgeIndexRetentionDays": "数据快照保留天数",

+ 7 - 0
app/src/assets/scss/business/_custom.scss

@@ -78,6 +78,13 @@
     min-height: 34px;
     background-color: transparent;
     padding: 7px 8px;
+    
+    &:empty {
+      &:before {
+        color: var(--b3-empty-color);
+        content: attr(placeholder);
+      }
+    }  
 
     &:hover {
       background-color: var(--b3-theme-background);

+ 1 - 1
app/src/protyle/render/av/blockAttr.ts

@@ -59,7 +59,7 @@ export const genAVValueHTML = (value: IAVCellValue) => {
             html = `<div class="fn__flex-1">${value.block.content}</div>`;
             break;
         case "text":
-            html = `<textarea style="resize: vertical" rows="${value.text.content.split("\n").length}" class="b3-text-field b3-text-field--text fn__flex-1">${value.text.content}</textarea>`;
+            html = `<textarea style="resize: vertical" rows="${value.text.content.split("\n").length}" class="b3-text-field b3-text-field--text fn__flex-1" placeholder="${window.siyuan.languages.empty}">${value.text.content}</textarea>`;
             break;
         case "number":
             html = `<input value="${value.number.isNotEmpty ? value.number.content : ""}" type="number" class="b3-text-field b3-text-field--text fn__flex-1">