Skip to content

Commit

Permalink
添加占位符
Browse files Browse the repository at this point in the history
  • Loading branch information
TCOTC committed Nov 24, 2024
1 parent 292be83 commit 03e079e
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/appearance/langs/de_DE.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"empty": "Leer",
"keyContent": "Schlüsselinhalt",
"addDesc": "Beschreibung hinzufügen",
"dataRepoAutoPurgeIndexRetentionDays": "Daten-Snapshot-Aufbewahrungstage",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/en_US.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"empty": "Empty",
"keyContent": "Key content",
"addDesc": "Add description",
"dataRepoAutoPurgeIndexRetentionDays": "Data snapshot retention days",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/es_ES.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/he_IL.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"empty": "ריק",
"keyContent": "תוכן המפתח",
"addDesc": "הוסף תיאור",
"dataRepoAutoPurgeIndexRetentionDays": "ימי שמירת תמונות נתונים",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/it_IT.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"empty": "Vuoto",
"keyContent": "Contenuto della chiave",
"addDesc": "Aggiungi descrizione",
"dataRepoAutoPurgeIndexRetentionDays": "Giorni di conservazione degli snapshot dei dati",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/ja_JP.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"empty": "空白",
"keyContent": "キーコンテンツ",
"addDesc": "説明を追加",
"dataRepoAutoPurgeIndexRetentionDays": "データスナップショットの保持日数",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/pl_PL.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"empty": "Pusty",
"keyContent": "Zawartość klucza",
"addDesc": "Dodaj opis",
"dataRepoAutoPurgeIndexRetentionDays": "Dni przechowywania migawek danych",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/ru_RU.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"empty": "Пусто",
"keyContent": "Содержимое ключа",
"addDesc": "Добавить описание",
"dataRepoAutoPurgeIndexRetentionDays": "Срок хранения снимков данных",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/zh_CHT.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"empty": "空白",
"keyContent": "主鍵內容",
"addDesc": "添加描述",
"dataRepoAutoPurgeIndexRetentionDays": "數據快照保留天數",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/zh_CN.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"empty": "空白",
"keyContent": "主键内容",
"addDesc": "添加描述",
"dataRepoAutoPurgeIndexRetentionDays": "数据快照保留天数",
Expand Down
7 changes: 7 additions & 0 deletions app/src/assets/scss/business/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion app/src/protyle/render/av/blockAttr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down

0 comments on commit 03e079e

Please sign in to comment.