diff --git a/app/appearance/langs/ar_SA.json b/app/appearance/langs/ar_SA.json index 0c1cc2e6d..28984b169 100644 --- a/app/appearance/langs/ar_SA.json +++ b/app/appearance/langs/ar_SA.json @@ -17,7 +17,7 @@ "showIcon": "عرض الأيقونة", "showAllFieldsIcon": "عرض أيقونات الحقول", "wrapAllFields": "التفاف الحقول تلقائيًا", - "gallery": "معرض", + "gallery": "بطاقة", "newTag": "علامة جديدة", "pleaseWait": "يرجى الانتظار...", "reconnectPrompt": "بعد تبديل التطبيقات، سيستغرق الأمر بعض الوقت لاستعادة تشغيل نواة SiYuan. يرجى الانتظار بضع ثوانٍ أو النقر فوق الزر \"إعادة المحاولة\"", @@ -1353,7 +1353,7 @@ }, "_attrView": { "table": "جدول", - "gallery": "معرض", + "gallery": "بطاقة", "key": "المفتاح الرئيسي", "select": "تحديد" }, diff --git a/app/appearance/langs/de_DE.json b/app/appearance/langs/de_DE.json index d0c1e6454..28e07b2d2 100644 --- a/app/appearance/langs/de_DE.json +++ b/app/appearance/langs/de_DE.json @@ -17,7 +17,7 @@ "showIcon": "Symbol anzeigen", "showAllFieldsIcon": "Feldsymbole anzeigen", "wrapAllFields": "Felder automatisch umbrechen", - "gallery": "Galerie", + "gallery": "Karte", "newTag": "Neuer Tag", "pleaseWait": "Bitte warten...", "reconnectPrompt": "Nach dem Wechseln der Anwendungen dauert es einige Zeit, bis der Betrieb des SiYuan-Kernels wiederhergestellt ist. Bitte warten Sie einige Sekunden oder klicken Sie auf die Schaltfläche „Erneut versuchen“", @@ -1353,7 +1353,7 @@ }, "_attrView": { "table": "Tabelle", - "gallery": "Galerie", + "gallery": "Karte", "key": "Primärschlüssel", "select": "Auswählen" }, diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json index 88cd55c12..588b942c0 100644 --- a/app/appearance/langs/en_US.json +++ b/app/appearance/langs/en_US.json @@ -17,7 +17,7 @@ "showIcon": "Show icon", "showAllFieldsIcon": "Show field icons", "wrapAllFields": "Auto-wrap fields", - "gallery": "Gallery", + "gallery": "Card", "newTag": "New tag", "pleaseWait": "Please wait...", "reconnectPrompt": "After switching applications, it will take some time to restore the SiYuan kernel operation. Please wait a few seconds or click the \"Retry\" button", @@ -1353,7 +1353,7 @@ }, "_attrView": { "table": "Table", - "gallery": "Gallery", + "gallery": "Card", "key": "Primary Key", "select": "Select" }, diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json index 3f6b7a8a9..a8410d9f5 100644 --- a/app/appearance/langs/es_ES.json +++ b/app/appearance/langs/es_ES.json @@ -17,7 +17,7 @@ "showIcon": "Mostrar ícono", "showAllFieldsIcon": "Mostrar íconos de campos", "wrapAllFields": "Ajuste automático de campos", - "gallery": "Galería", + "gallery": "Tarjeta", "newTag": "Nueva etiqueta", "pleaseWait": "Por favor, espere...", "reconnectPrompt": "Después de cambiar de aplicación, tomará algún tiempo restaurar el funcionamiento del núcleo de SiYuan. Espere unos segundos o haga clic en el botón \"Reintentar\"", @@ -1353,7 +1353,7 @@ }, "_attrView": { "table": "Tabla", - "gallery": "Galería", + "gallery": "Tarjeta", "key": "Clave principal", "select": "Selección" }, diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json index 25d9aa2ca..31754e4e6 100644 --- a/app/appearance/langs/fr_FR.json +++ b/app/appearance/langs/fr_FR.json @@ -17,7 +17,7 @@ "showIcon": "Afficher l'icône", "showAllFieldsIcon": "Afficher les icônes des champs", "wrapAllFields": "Retour automatique des champs", - "gallery": "Galerie", + "gallery": "Carte", "newTag": "Nouvelle étiquette", "pleaseWait": "Veuillez patienter...", "reconnectPrompt": "Après avoir changé d'application, il faudra un certain temps pour rétablir le fonctionnement du noyau SiYuan. Veuillez patienter quelques secondes ou cliquer sur le bouton « Réessayer »", @@ -1353,7 +1353,7 @@ }, "_attrView": { "table": "Tableau", - "gallery": "Galerie", + "gallery": "Carte", "key": "Clé primaire", "select": "Sélectionner" }, diff --git a/app/appearance/langs/he_IL.json b/app/appearance/langs/he_IL.json index 144ac54a7..258084658 100644 --- a/app/appearance/langs/he_IL.json +++ b/app/appearance/langs/he_IL.json @@ -17,7 +17,7 @@ "showIcon": "הצג סמל", "showAllFieldsIcon": "הצג סמלי שדות", "wrapAllFields": "עטיפת שדות אוטומטית", - "gallery": "גלריה", + "gallery": "כרטיס", "newTag": "תג חדש", "pleaseWait": "אנא המתן...", "reconnectPrompt": "לאחר מעבר בין יישומים, יידרש זמן מה כדי לשחזר את פעולת ליבת SiYuan. אנא המתן מספר שניות או לחץ על כפתור \"נסה שוב\"", @@ -1353,7 +1353,7 @@ }, "_attrView": { "table": "טבלה", - "gallery": "גלריה", + "gallery": "כרטיס", "key": "מפתח ראשי", "select": "בחר" }, diff --git a/app/appearance/langs/it_IT.json b/app/appearance/langs/it_IT.json index 2f97ff01a..f87e62f27 100644 --- a/app/appearance/langs/it_IT.json +++ b/app/appearance/langs/it_IT.json @@ -17,7 +17,7 @@ "showIcon": "Mostra icona", "showAllFieldsIcon": "Mostra icone dei campi", "wrapAllFields": "Avvolgi automaticamente i campi", - "gallery": "Galleria", + "gallery": "Scheda", "newTag": "Nuova etichetta", "pleaseWait": "Attendere prego...", "reconnectPrompt": "Dopo aver cambiato applicazione, ci vorrà un po' di tempo per ripristinare il funzionamento del kernel SiYuan. Attendere qualche secondo o fare clic sul pulsante \"Riprova\"", @@ -1353,7 +1353,7 @@ }, "_attrView": { "table": "Tabella", - "gallery": "Galleria", + "gallery": "Scheda", "key": "Chiave primaria", "select": "Seleziona" }, diff --git a/app/appearance/langs/ja_JP.json b/app/appearance/langs/ja_JP.json index eaecc868b..f396ce61b 100644 --- a/app/appearance/langs/ja_JP.json +++ b/app/appearance/langs/ja_JP.json @@ -17,7 +17,7 @@ "showIcon": "アイコンを表示", "showAllFieldsIcon": "フィールドアイコンを表示", "wrapAllFields": "フィールドを自動折り返し", - "gallery": "ギャラリー", + "gallery": "カード", "newTag": "新しいタグ", "pleaseWait": "しばらくお待ちください...", "reconnectPrompt": "アプリを切り替えた後、思源カーネルの実行を再開するには少し時間がかかります。数秒待つか、「再試行」ボタンをクリックしてください", @@ -1353,7 +1353,7 @@ }, "_attrView": { "table": "テーブル", - "gallery": "ギャラリー", + "gallery": "カード", "key": "プライマリキー", "select": "選択" }, diff --git a/app/appearance/langs/pl_PL.json b/app/appearance/langs/pl_PL.json index 9dd6b6e28..05e58c74f 100644 --- a/app/appearance/langs/pl_PL.json +++ b/app/appearance/langs/pl_PL.json @@ -17,7 +17,7 @@ "showIcon": "Pokaż ikonę", "showAllFieldsIcon": "Pokaż ikony pól", "wrapAllFields": "Automatyczne zawijanie pól", - "gallery": "Galeria", + "gallery": "Karta", "newTag": "Nowy tag", "pleaseWait": "Proszę czekać...", "reconnectPrompt": "Po przełączeniu aplikacji ponowne uruchomienie jądra SiYuan może zająć trochę czasu. Proszę poczekać kilka sekund lub kliknąć przycisk „Ponów próbę”", @@ -1353,7 +1353,7 @@ }, "_attrView": { "table": "Tabela", - "gallery": "Galeria", + "gallery": "Karta", "key": "Klucz główny", "select": "Wybierz" }, diff --git a/app/appearance/langs/pt_BR.json b/app/appearance/langs/pt_BR.json index a900204f5..1204d7840 100644 --- a/app/appearance/langs/pt_BR.json +++ b/app/appearance/langs/pt_BR.json @@ -17,7 +17,7 @@ "showIcon": "Mostrar ícone", "showAllFieldsIcon": "Mostrar ícones de campos", "wrapAllFields": "Quebrar automaticamente os campos", - "gallery": "Galeria", + "gallery": "Cartão", "newTag": "Nova tag", "pleaseWait": "Por favor, aguarde...", "reconnectPrompt": "Após alternar aplicativos, levará algum tempo para restaurar a operação do kernel SiYuan. Por favor, aguarde alguns segundos ou clique no botão \"Tentar novamente\"", @@ -1353,7 +1353,7 @@ }, "_attrView": { "table": "Tabela", - "gallery": "Galeria", + "gallery": "Cartão", "key": "Chave Primária", "select": "Selecionar" }, diff --git a/app/appearance/langs/ru_RU.json b/app/appearance/langs/ru_RU.json index 613d83dea..0a062024b 100644 --- a/app/appearance/langs/ru_RU.json +++ b/app/appearance/langs/ru_RU.json @@ -17,7 +17,7 @@ "showIcon": "Показать значок", "showAllFieldsIcon": "Показать значки полей", "wrapAllFields": "Автоматический перенос полей", - "gallery": "Галерея", + "gallery": "Карточка", "newTag": "Новый тег", "pleaseWait": "Пожалуйста, подождите...", "reconnectPrompt": "После переключения приложений потребуется некоторое время, чтобы восстановить работу ядра SiYuan. Пожалуйста, подождите несколько секунд или нажмите кнопку «Повторить»", @@ -1353,7 +1353,7 @@ }, "_attrView": { "table": "Таблица", - "gallery": "Галерея", + "gallery": "Карточка", "key": "Первичный ключ", "select": "Выбрать" }, diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json index 5f2fdfcec..e735c1092 100644 --- a/app/appearance/langs/zh_CHT.json +++ b/app/appearance/langs/zh_CHT.json @@ -17,7 +17,7 @@ "showIcon": "顯示圖標", "showAllFieldsIcon": "顯示字段圖標", "wrapAllFields": "字段自動換行", - "gallery": "圖庫", + "gallery": "卡片", "newTag": "新建標籤", "pleaseWait": "請稍等片刻...", "reconnectPrompt": "切換應用後再次進入需要一些時間恢復思源內核運行,請稍等幾秒或者點擊“重試”按鈕", @@ -1353,7 +1353,7 @@ }, "_attrView": { "table": "表格", - "gallery": "圖庫", + "gallery": "卡片", "key": "主鍵", "select": "單選" }, diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json index e3fc4ff40..a89e6664d 100644 --- a/app/appearance/langs/zh_CN.json +++ b/app/appearance/langs/zh_CN.json @@ -17,7 +17,7 @@ "showIcon": "显示图标", "showAllFieldsIcon": "显示字段图标", "wrapAllFields": "字段自动换行", - "gallery": "画廊", + "gallery": "卡片", "newTag": "新建标签", "pleaseWait": "请稍等片刻...", "reconnectPrompt": "切换应用后再次进入需要一些时间恢复思源内核运行,请稍等几秒或者点击“重试”按钮", @@ -1353,7 +1353,7 @@ }, "_attrView": { "table": "表格", - "gallery": "画廊", + "gallery": "卡片", "key": "主键", "select": "单选" }, diff --git a/app/guide/20210808180117-6v0mkxr/storage/av/20240208172742-57vwxqw.json b/app/guide/20210808180117-6v0mkxr/storage/av/20240208172742-57vwxqw.json index a10ef4059..e020129a3 100644 --- a/app/guide/20210808180117-6v0mkxr/storage/av/20240208172742-57vwxqw.json +++ b/app/guide/20210808180117-6v0mkxr/storage/av/20240208172742-57vwxqw.json @@ -1,5 +1,5 @@ { - "spec": 1, + "spec": 3, "id": "20240208172742-57vwxqw", "name": "Books", "keyValues": [ @@ -254,12 +254,13 @@ "name": "Table", "hideAttrViewName": false, "desc": "", + "pageSize": 50, "type": "table", "table": { "spec": 0, "id": "20240208172742-mhhmma3", - "filters": [], - "sorts": [], + "showIcon": true, + "wrapField": false, "pageSize": 50, "columns": [ { @@ -296,43 +297,51 @@ "20240208173041-9utmfv2", "20240208173054-6k25xnw" ] - } + }, + "itemIds": [ + "20240208172930-3n32s4x", + "20240208173041-9utmfv2", + "20240208173054-6k25xnw" + ] }, { "id": "20250615171046-3ucugf9", "icon": "", - "name": "Gallery", + "name": "Card", "hideAttrViewName": false, "desc": "", + "pageSize": 50, "type": "gallery", "gallery": { "spec": 0, "id": "20250615171047-4emh3qi", - "filters": [], - "sorts": [], + "showIcon": true, + "wrapField": false, "pageSize": 50, "coverFrom": 2, "coverFromAssetKeyID": "20250615171115-3g32dmi", "cardAspectRatio": 3, "cardSize": 0, "fitImage": false, - "showIcon": true, - "wrapField": false, "fields": [ { "id": "20240208172742-dwysfvj", + "wrap": false, "hidden": false }, { "id": "20240208172937-fxi3h2s", + "wrap": false, "hidden": false }, { "id": "20240208173226-6666dv2", + "wrap": false, "hidden": false }, { "id": "20250615171115-3g32dmi", + "wrap": false, "hidden": true } ], @@ -341,7 +350,12 @@ "20240208173041-9utmfv2", "20240208173054-6k25xnw" ] - } + }, + "itemIds": [ + "20240208172930-3n32s4x", + "20240208173041-9utmfv2", + "20240208173054-6k25xnw" + ] } ] } \ No newline at end of file diff --git a/app/guide/20210808180117-czj9bvb/storage/av/20240208155918-uylgwbj.json b/app/guide/20210808180117-czj9bvb/storage/av/20240208155918-uylgwbj.json index a1fb8a747..f6da740ef 100644 --- a/app/guide/20210808180117-czj9bvb/storage/av/20240208155918-uylgwbj.json +++ b/app/guide/20210808180117-czj9bvb/storage/av/20240208155918-uylgwbj.json @@ -1,5 +1,5 @@ { - "spec": 1, + "spec": 3, "id": "20240208155918-uylgwbj", "name": "书籍", "keyValues": [ @@ -254,12 +254,13 @@ "name": "表格", "hideAttrViewName": false, "desc": "", + "pageSize": 50, "type": "table", "table": { "spec": 0, "id": "20240208155918-j5lys77", - "filters": [], - "sorts": [], + "showIcon": true, + "wrapField": false, "pageSize": 50, "columns": [ { @@ -296,43 +297,51 @@ "20240208155931-cr0e00b", "20240208161625-9lg8l80" ] - } + }, + "itemIds": [ + "20240208160855-iv1fsnu", + "20240208155931-cr0e00b", + "20240208161625-9lg8l80" + ] }, { "id": "20250615173530-5yn6s87", "icon": "", - "name": "画廊", + "name": "卡片", "hideAttrViewName": false, "desc": "", + "pageSize": 50, "type": "gallery", "gallery": { "spec": 0, "id": "20250615173532-wtdqm1z", - "filters": [], - "sorts": [], + "showIcon": true, + "wrapField": false, "pageSize": 50, "coverFrom": 2, "coverFromAssetKeyID": "20250615173428-ju0itho", "cardAspectRatio": 3, "cardSize": 0, "fitImage": false, - "showIcon": true, - "wrapField": false, "fields": [ { "id": "20240208155918-gex3vhc", + "wrap": false, "hidden": false }, { "id": "20240208160021-bpcl3hm", + "wrap": false, "hidden": false }, { "id": "20240208160313-c1j9gn3", + "wrap": false, "hidden": false }, { "id": "20250615173428-ju0itho", + "wrap": false, "hidden": true } ], @@ -341,7 +350,12 @@ "20240208155931-cr0e00b", "20240208161625-9lg8l80" ] - } + }, + "itemIds": [ + "20240208160855-iv1fsnu", + "20240208155931-cr0e00b", + "20240208161625-9lg8l80" + ] } ] } \ No newline at end of file diff --git a/app/guide/20211226090932-5lcq56f/storage/av/20240208171724-zfkzgwi.json b/app/guide/20211226090932-5lcq56f/storage/av/20240208171724-zfkzgwi.json index 3b79d93b0..ca2de5d8d 100644 --- a/app/guide/20211226090932-5lcq56f/storage/av/20240208171724-zfkzgwi.json +++ b/app/guide/20211226090932-5lcq56f/storage/av/20240208171724-zfkzgwi.json @@ -1,5 +1,5 @@ { - "spec": 1, + "spec": 3, "id": "20240208171724-zfkzgwi", "name": "書籍", "keyValues": [ @@ -254,12 +254,13 @@ "name": "表格", "hideAttrViewName": false, "desc": "", + "pageSize": 50, "type": "table", "table": { "spec": 0, "id": "20240208171724-dpfg89v", - "filters": [], - "sorts": [], + "showIcon": true, + "wrapField": false, "pageSize": 50, "columns": [ { @@ -296,43 +297,51 @@ "20240208171759-zc76r72", "20240208171807-wbmr1ps" ] - } + }, + "itemIds": [ + "20240208171751-wmphpet", + "20240208171759-zc76r72", + "20240208171807-wbmr1ps" + ] }, { "id": "20250615173733-4es9lsl", "icon": "", - "name": "畫廊", + "name": "卡片", "hideAttrViewName": false, "desc": "", + "pageSize": 50, "type": "gallery", "gallery": { "spec": 0, "id": "20250615173734-3131lvi", - "filters": [], - "sorts": [], + "showIcon": true, + "wrapField": false, "pageSize": 50, "coverFrom": 2, "coverFromAssetKeyID": "20250615173651-a3u5o6l", "cardAspectRatio": 3, "cardSize": 0, "fitImage": false, - "showIcon": true, - "wrapField": false, "fields": [ { "id": "20240208171724-j0vptez", + "wrap": false, "hidden": false }, { "id": "20240208171815-ntngplo", + "wrap": false, "hidden": false }, { "id": "20240208171913-wcpom5u", + "wrap": false, "hidden": false }, { "id": "20250615173651-a3u5o6l", + "wrap": false, "hidden": true } ], @@ -341,7 +350,12 @@ "20240208171759-zc76r72", "20240208171807-wbmr1ps" ] - } + }, + "itemIds": [ + "20240208171751-wmphpet", + "20240208171759-zc76r72", + "20240208171807-wbmr1ps" + ] } ] } \ No newline at end of file diff --git a/app/guide/20240530133126-axarxgx/storage/av/20240530133134-c2251lc.json b/app/guide/20240530133126-axarxgx/storage/av/20240530133134-c2251lc.json index b2e875eb0..8242724d2 100644 --- a/app/guide/20240530133126-axarxgx/storage/av/20240530133134-c2251lc.json +++ b/app/guide/20240530133126-axarxgx/storage/av/20240530133134-c2251lc.json @@ -1,5 +1,5 @@ { - "spec": 1, + "spec": 3, "id": "20240530133134-c2251lc", "name": "書名", "keyValues": [ @@ -254,12 +254,13 @@ "name": "テーブル", "hideAttrViewName": false, "desc": "", + "pageSize": 50, "type": "table", "table": { "spec": 0, "id": "20240530101000-mhhmma3", - "filters": [], - "sorts": [], + "showIcon": true, + "wrapField": false, "pageSize": 50, "columns": [ { @@ -296,43 +297,51 @@ "20240530101000-9utmfv2", "20240530101000-6k25xnw" ] - } + }, + "itemIds": [ + "20240530101000-3n32s4x", + "20240530101000-9utmfv2", + "20240530101000-6k25xnw" + ] }, { "id": "20250615173942-0xk5p5h", "icon": "", - "name": "ギャラリー", + "name": "カード", "hideAttrViewName": false, "desc": "", + "pageSize": 50, "type": "gallery", "gallery": { "spec": 0, "id": "20250615173947-oj97e6l", - "filters": [], - "sorts": [], + "showIcon": true, + "wrapField": false, "pageSize": 50, "coverFrom": 2, "coverFromAssetKeyID": "20250615173851-vmlovdh", "cardAspectRatio": 3, "cardSize": 0, "fitImage": false, - "showIcon": true, - "wrapField": false, "fields": [ { "id": "20240530101000-dwysfvj", + "wrap": false, "hidden": false }, { "id": "20240530101000-fxi3h2s", + "wrap": false, "hidden": false }, { "id": "20240530101000-6666dv2", + "wrap": false, "hidden": false }, { "id": "20250615173851-vmlovdh", + "wrap": false, "hidden": true } ], @@ -341,7 +350,12 @@ "20240530101000-9utmfv2", "20240530101000-6k25xnw" ] - } + }, + "itemIds": [ + "20240530101000-3n32s4x", + "20240530101000-9utmfv2", + "20240530101000-6k25xnw" + ] } ] } \ No newline at end of file diff --git a/kernel/av/av.go b/kernel/av/av.go index e7a33db14..50d992688 100644 --- a/kernel/av/av.go +++ b/kernel/av/av.go @@ -189,7 +189,7 @@ type View struct { PageSize int `json:"pageSize"` // 每页条目数 LayoutType LayoutType `json:"type"` // 当前布局类型 Table *LayoutTable `json:"table,omitempty"` // 表格布局 - Gallery *LayoutGallery `json:"gallery,omitempty"` // 画廊布局 + Gallery *LayoutGallery `json:"gallery,omitempty"` // 卡片布局 ItemIDs []string `json:"itemIds,omitempty"` // 项目 ID 列表,用于维护所有项目 Groups []*View `json:"groups,omitempty"` // 分组视图列表 @@ -206,7 +206,7 @@ type LayoutType string const ( LayoutTypeTable LayoutType = "table" // 属性视图类型 - 表格 - LayoutTypeGallery LayoutType = "gallery" // 属性视图类型 - 画廊 + LayoutTypeGallery LayoutType = "gallery" // 属性视图类型 - 卡片 ) const ( diff --git a/kernel/av/layout.go b/kernel/av/layout.go index b719f9e7f..717482539 100644 --- a/kernel/av/layout.go +++ b/kernel/av/layout.go @@ -111,7 +111,7 @@ func (baseInstanceField *BaseInstanceField) GetID() string { } // Collection 描述了一个集合的接口。 -// 集合可以是表格、画廊等,包含多个项目。 +// 集合可以是表格、卡片等,包含多个项目。 type Collection interface { // GetItems 返回集合中的所有项目。 @@ -138,7 +138,7 @@ type Field interface { } // Item 描述了一个项目的接口。 -// 项目可以是表格行、画廊卡片等。 +// 项目可以是表格行、卡片等。 type Item interface { // GetBlockValue 返回主键的值。 diff --git a/kernel/av/layout_gallery.go b/kernel/av/layout_gallery.go index 885ddb585..c30fbe42f 100644 --- a/kernel/av/layout_gallery.go +++ b/kernel/av/layout_gallery.go @@ -20,7 +20,7 @@ import ( "github.com/88250/lute/ast" ) -// LayoutGallery 描述了画廊布局的结构。 +// LayoutGallery 描述了卡片布局的结构。 type LayoutGallery struct { *BaseLayout @@ -30,7 +30,7 @@ type LayoutGallery struct { CardSize CardSize `json:"cardSize"` // 卡片大小,0:小卡片,1:中卡片,2:大卡片 FitImage bool `json:"fitImage"` // 是否适应封面图片大小 - CardFields []*ViewGalleryCardField `json:"fields"` // 画廊卡片字段 + CardFields []*ViewGalleryCardField `json:"fields"` // 卡片字段 // TODO CardIDs 字段已经废弃,计划于 2026 年 6 月 30 日后删除 https://github.com/siyuan-note/siyuan/issues/15194 //Deprecated @@ -70,7 +70,7 @@ const ( CardSizeLarge // 大卡片 ) -// CoverFrom 描述了画廊中的卡片封面来源的枚举类型。 +// CoverFrom 描述了卡片封面来源的枚举类型。 type CoverFrom int const ( @@ -80,12 +80,12 @@ const ( CoverFromContentBlock // 内容块 ) -// ViewGalleryCardField 描述了画廊卡片字段的结构。 +// ViewGalleryCardField 描述了卡片字段的结构。 type ViewGalleryCardField struct { *BaseField } -// Gallery 描述了画廊实例的结构。 +// Gallery 描述了卡片视图实例的结构。 type Gallery struct { *BaseInstance @@ -94,12 +94,12 @@ type Gallery struct { CardAspectRatio CardAspectRatio `json:"cardAspectRatio"` // 卡片宽高比 CardSize CardSize `json:"cardSize"` // 卡片大小 FitImage bool `json:"fitImage"` // 是否适应封面图片大小 - Fields []*GalleryField `json:"fields"` // 画廊字段 - Cards []*GalleryCard `json:"cards"` // 画廊卡片 - CardCount int `json:"cardCount"` // 画廊总卡片数 + Fields []*GalleryField `json:"fields"` // 卡片字段 + Cards []*GalleryCard `json:"cards"` // 卡片 + CardCount int `json:"cardCount"` // 总卡片数 } -// GalleryCard 描述了画廊实例卡片的结构。 +// GalleryCard 描述了卡片实例的结构。 type GalleryCard struct { ID string `json:"id"` // 卡片 ID Values []*GalleryFieldValue `json:"values"` // 卡片字段值 @@ -108,12 +108,12 @@ type GalleryCard struct { CoverContent string `json:"coverContent"` // 卡片封面文本内容 } -// GalleryField 描述了画廊实例卡片字段的结构。 +// GalleryField 描述了卡片实例字段的结构。 type GalleryField struct { *BaseInstanceField } -// GalleryFieldValue 描述了画廊实例字段值的结构。 +// GalleryFieldValue 描述了卡片字段实例值的结构。 type GalleryFieldValue struct { *BaseValue } diff --git a/kernel/av/layout_gallery_calc.go b/kernel/av/layout_gallery_calc.go index 96383ea7b..cb83abca4 100644 --- a/kernel/av/layout_gallery_calc.go +++ b/kernel/av/layout_gallery_calc.go @@ -17,5 +17,5 @@ package av func (gallery *Gallery) Calc() { - // 画廊视图不支持计算 + // 卡片视图不支持计算 } diff --git a/kernel/av/layout_table.go b/kernel/av/layout_table.go index e46e10b69..4be212cad 100644 --- a/kernel/av/layout_table.go +++ b/kernel/av/layout_table.go @@ -50,7 +50,7 @@ type ViewTableColumn struct { Calc *ColumnCalc `json:"calc,omitempty"` // 计算 } -// Table 描述了表格实例的结构。 +// Table 描述了表格视图实例的结构。 type Table struct { *BaseInstance diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index 7a9694526..99710488d 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -3234,7 +3234,7 @@ func AddAttributeViewKey(avID, keyID, keyName, keyType, keyIcon, previousKeyID s if nil != view.Table { if "" == previousKeyID { if av.LayoutTypeGallery == currentView.LayoutType { - // 如果当前视图是画廊视图则添加到最后 + // 如果当前视图是卡片视图则添加到最后 view.Table.Columns = append(view.Table.Columns, &av.ViewTableColumn{BaseField: &av.BaseField{ID: key.ID}}) } else { view.Table.Columns = append([]*av.ViewTableColumn{{BaseField: &av.BaseField{ID: key.ID}}}, view.Table.Columns...) diff --git a/kernel/model/attribute_view_fix.go b/kernel/model/attribute_view_fix.go index 45b7060e0..fe637f41c 100644 --- a/kernel/model/attribute_view_fix.go +++ b/kernel/model/attribute_view_fix.go @@ -48,7 +48,7 @@ func checkAttrView(attrView *av.AttributeView, view *av.View) { // 视图类型不匹配时需要订正 for i, v := range attrView.Views { if av.LayoutTypeGallery == v.LayoutType && nil == v.Gallery { - // 切换为画廊视图时可能没有初始化画廊实例 https://github.com/siyuan-note/siyuan/issues/15122 + // 切换为卡片视图时可能没有初始化卡片实例 https://github.com/siyuan-note/siyuan/issues/15122 if nil != v.Table { v.LayoutType = av.LayoutTypeTable changed = true