An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Refine database automation template editing https://github.com/siyuan-note/siyuan/issues/20611
Daniel5d2253211ceb
diff --git a/app/appearance/langs/ar.json b/app/appearance/langs/ar.jsonindex c980b7766d..14adccb1d9 100644--- a/app/appearance/langs/ar.json+++ b/app/appearance/langs/ar.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "تعذر التأكد من نجاح الحفظ الأخير. أبقِ هذا المحرر مفتوحًا وانسخ تغييراتك قبل إعادة التحميل للتحقق مما تم حفظه.",- "automationInsertVariable": "إدراج متغير","automationTemplateTip": "يُحسب وفق المنطقة الزمنية للقاعدة؛ النتيجة الفارغة تمسح الحقل والأخطاء تتراجع عن التغيير",- "automationTemplateExample": "مثال","automationTemplatePreview": "نتيجة المعاينة","automationPreviewData": "بيانات المعاينة","automationPreviewItem": "إدخال نموذجي","automationPreviewTime": "تاريخ المعاينة","automationPreviewOnly": "للمعاينة فقط؛ لن تُعدَّل الإدخالات",- "automationTimeZone": "المنطقة الزمنية للقاعدة","startupFailed": "تعذر بدء SiYuan","startupStage": "مرحلة الفشل: ${stage}","startupReload": "إعادة التحميل",diff --git a/app/appearance/langs/de.json b/app/appearance/langs/de.jsonindex 49f909595c..16b0430e90 100644--- a/app/appearance/langs/de.json+++ b/app/appearance/langs/de.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "Der letzte Speichervorgang konnte nicht bestätigt werden. Lassen Sie diesen Editor geöffnet und kopieren Sie Ihre Änderungen, bevor Sie die Seite neu laden, um den gespeicherten Stand zu prüfen.",- "automationInsertVariable": "Variable einfügen","automationTemplateTip": "Berechnung in der Zeitzone der Regel; leere Ergebnisse löschen das Feld, Fehler machen die Änderung rückgängig",- "automationTemplateExample": "Beispiel","automationTemplatePreview": "Vorschauergebnis","automationPreviewData": "Daten für die Vorschau","automationPreviewItem": "Beispieleintrag","automationPreviewTime": "Datum für die Vorschau","automationPreviewOnly": "Nur Vorschau; Einträge werden nicht geändert",- "automationTimeZone": "Zeitzone der Regel","startupFailed": "SiYuan konnte nicht gestartet werden","startupStage": "Fehlgeschlagener Schritt: ${stage}","startupReload": "Neu laden",diff --git a/app/appearance/langs/en.json b/app/appearance/langs/en.jsonindex 20fc42e4b9..2d2e071d0d 100644--- a/app/appearance/langs/en.json+++ b/app/appearance/langs/en.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "Unable to confirm the latest save. Keep this editor open and copy your changes before reloading to check the saved result.",- "automationInsertVariable": "Insert variable","automationTemplateTip": "Calculated in the rule's time zone; empty output clears the field, and errors roll back the change",- "automationTemplateExample": "Example","automationTemplatePreview": "Preview result","automationPreviewData": "Data used for preview","automationPreviewItem": "Example entry","automationPreviewTime": "Date used for preview","automationPreviewOnly": "Preview only; entries are not modified",- "automationTimeZone": "Rule time zone","startupFailed": "SiYuan failed to start","startupStage": "Failed stage: ${stage}","startupReload": "Reload",diff --git a/app/appearance/langs/es.json b/app/appearance/langs/es.jsonindex 643810f128..365dd79583 100644--- a/app/appearance/langs/es.json+++ b/app/appearance/langs/es.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "No se puede confirmar el último guardado. Mantén este editor abierto y copia tus cambios antes de recargar para comprobar lo que se ha guardado.",- "automationInsertVariable": "Insertar variable","automationTemplateTip": "Se calcula en la zona horaria de la regla; un resultado vacío borra el campo y los errores revierten el cambio",- "automationTemplateExample": "Ejemplo","automationTemplatePreview": "Resultado de la vista previa","automationPreviewData": "Datos para la vista previa","automationPreviewItem": "Entrada de ejemplo","automationPreviewTime": "Fecha para la vista previa","automationPreviewOnly": "Solo vista previa; no se modifican las entradas",- "automationTimeZone": "Zona horaria de la regla","startupFailed": "SiYuan no pudo iniciarse","startupStage": "Etapa con error: ${stage}","startupReload": "Volver a cargar",diff --git a/app/appearance/langs/fr.json b/app/appearance/langs/fr.jsonindex d03c46f3a0..2e2b68ac74 100644--- a/app/appearance/langs/fr.json+++ b/app/appearance/langs/fr.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "Impossible de confirmer le dernier enregistrement. Gardez cet éditeur ouvert et copiez vos modifications avant de recharger pour vérifier le contenu enregistré.",- "automationInsertVariable": "Insérer une variable","automationTemplateTip": "Calcul dans le fuseau de la règle ; un résultat vide efface le champ et une erreur annule la modification",- "automationTemplateExample": "Exemple","automationTemplatePreview": "Résultat de l’aperçu","automationPreviewData": "Données utilisées pour l’aperçu","automationPreviewItem": "Entrée d’exemple","automationPreviewTime": "Date utilisée pour l’aperçu","automationPreviewOnly": "Aperçu uniquement ; les entrées ne sont pas modifiées",- "automationTimeZone": "Fuseau horaire de la règle","startupFailed": "SiYuan n’a pas pu démarrer","startupStage": "Étape en échec : ${stage}","startupReload": "Recharger",diff --git a/app/appearance/langs/he.json b/app/appearance/langs/he.jsonindex 6fe2953c93..1143894d81 100644--- a/app/appearance/langs/he.json+++ b/app/appearance/langs/he.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "לא ניתן לאשר שהשמירה האחרונה הצליחה. יש להשאיר את העורך הזה פתוח ולהעתיק את השינויים לפני טעינה מחדש כדי לבדוק מה נשמר.",- "automationInsertVariable": "הוספת משתנה","automationTemplateTip": "החישוב לפי אזור הזמן של הכלל; תוצאה ריקה מנקה את השדה ושגיאות מבטלות את השינוי",- "automationTemplateExample": "דוגמה","automationTemplatePreview": "תוצאת התצוגה המקדימה","automationPreviewData": "נתונים לתצוגה מקדימה","automationPreviewItem": "רשומה לדוגמה","automationPreviewTime": "תאריך לתצוגה מקדימה","automationPreviewOnly": "תצוגה מקדימה בלבד; הרשומות לא משתנות",- "automationTimeZone": "אזור הזמן של הכלל","startupFailed": "לא ניתן להפעיל את SiYuan","startupStage": "השלב שנכשל: ${stage}","startupReload": "טעינה מחדש",diff --git a/app/appearance/langs/hi.json b/app/appearance/langs/hi.jsonindex dc564b214d..99afc56e03 100644--- a/app/appearance/langs/hi.json+++ b/app/appearance/langs/hi.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "पिछली बार सहेजना सफल हुआ या नहीं, इसकी पुष्टि नहीं हो सकी। इस संपादक को खुला रखें और सहेजी गई सामग्री जाँचने के लिए दोबारा लोड करने से पहले अपने बदलाव कॉपी कर लें।",- "automationInsertVariable": "चर डालें","automationTemplateTip": "नियम के समय क्षेत्र में गणना होती है; खाली परिणाम फ़ील्ड साफ़ करता है और त्रुटि होने पर बदलाव वापस होता है",- "automationTemplateExample": "उदाहरण","automationTemplatePreview": "पूर्वावलोकन परिणाम","automationPreviewData": "पूर्वावलोकन का डेटा","automationPreviewItem": "उदाहरण प्रविष्टि","automationPreviewTime": "पूर्वावलोकन की तारीख","automationPreviewOnly": "केवल पूर्वावलोकन; प्रविष्टियाँ नहीं बदलतीं",- "automationTimeZone": "नियम का समय क्षेत्र","startupFailed": "SiYuan शुरू नहीं हो सका","startupStage": "विफल चरण: ${stage}","startupReload": "फिर से लोड करें",diff --git a/app/appearance/langs/id.json b/app/appearance/langs/id.jsonindex aeafbcd0af..92c0522206 100644--- a/app/appearance/langs/id.json+++ b/app/appearance/langs/id.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "Penyimpanan terakhir belum dapat dipastikan berhasil. Biarkan editor ini terbuka dan salin perubahan Anda sebelum memuat ulang untuk memeriksa hasil yang tersimpan.",- "automationInsertVariable": "Sisipkan variabel","automationTemplateTip": "Dihitung dalam zona waktu aturan; hasil kosong mengosongkan kolom dan kesalahan membatalkan perubahan",- "automationTemplateExample": "Contoh","automationTemplatePreview": "Hasil pratinjau","automationPreviewData": "Data untuk pratinjau","automationPreviewItem": "Entri contoh","automationPreviewTime": "Tanggal untuk pratinjau","automationPreviewOnly": "Hanya pratinjau; entri tidak diubah",- "automationTimeZone": "Zona waktu aturan","startupFailed": "SiYuan gagal dimulai","startupStage": "Tahap yang gagal: ${stage}","startupReload": "Muat ulang",diff --git a/app/appearance/langs/it.json b/app/appearance/langs/it.jsonindex beb63bd19d..4093099e1f 100644--- a/app/appearance/langs/it.json+++ b/app/appearance/langs/it.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "Impossibile confermare l'ultimo salvataggio. Mantieni aperto questo editor e copia le modifiche prima di ricaricare per verificare il contenuto salvato.",- "automationInsertVariable": "Inserisci variabile","automationTemplateTip": "Calcolo nel fuso orario della regola; un risultato vuoto cancella il campo e gli errori annullano la modifica",- "automationTemplateExample": "Esempio","automationTemplatePreview": "Risultato dell’anteprima","automationPreviewData": "Dati per l’anteprima","automationPreviewItem": "Voce di esempio","automationPreviewTime": "Data per l’anteprima","automationPreviewOnly": "Solo anteprima; le voci non vengono modificate",- "automationTimeZone": "Fuso orario della regola","startupFailed": "Impossibile avviare SiYuan","startupStage": "Fase non riuscita: ${stage}","startupReload": "Ricarica",diff --git a/app/appearance/langs/ja.json b/app/appearance/langs/ja.jsonindex 1eac82f8e7..b619428b36 100644--- a/app/appearance/langs/ja.json+++ b/app/appearance/langs/ja.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "直前の保存が成功したか確認できません。このエディターを開いたままにし、再読み込みして保存結果を確認する前に、変更内容をコピーしてください。",- "automationInsertVariable": "変数を挿入","automationTemplateTip": "ルールのタイムゾーンで計算し、空の結果はフィールドを消去、エラー時は変更を取り消します",- "automationTemplateExample": "例","automationTemplatePreview": "プレビュー結果","automationPreviewData": "プレビューに使用するデータ","automationPreviewItem": "サンプル項目","automationPreviewTime": "プレビューに使用する日時","automationPreviewOnly": "プレビュー専用で、項目は変更しません",- "automationTimeZone": "ルールのタイムゾーン","startupFailed": "SiYuan を起動できませんでした","startupStage": "失敗した段階:${stage}","startupReload": "再読み込み",diff --git a/app/appearance/langs/ko.json b/app/appearance/langs/ko.jsonindex 4c5994e1a0..4a10aad4f9 100644--- a/app/appearance/langs/ko.json+++ b/app/appearance/langs/ko.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "마지막 저장이 성공했는지 확인할 수 없습니다. 이 편집기를 열어 둔 채로 변경 내용을 복사한 후 새로고침하여 저장 결과를 확인하세요.",- "automationInsertVariable": "변수 삽입","automationTemplateTip": "규칙의 시간대로 계산하며, 빈 결과는 필드를 지우고 오류가 발생하면 변경을 되돌립니다",- "automationTemplateExample": "예제","automationTemplatePreview": "미리보기 결과","automationPreviewData": "미리보기에 사용할 데이터","automationPreviewItem": "예제 항목","automationPreviewTime": "미리보기에 사용할 날짜","automationPreviewOnly": "미리보기 전용이며 항목을 수정하지 않습니다",- "automationTimeZone": "규칙 시간대","startupFailed": "SiYuan을 시작하지 못했습니다","startupStage": "실패한 단계: ${stage}","startupReload": "다시 불러오기",diff --git a/app/appearance/langs/nl.json b/app/appearance/langs/nl.jsonindex 5ddbdda53a..947714674c 100644--- a/app/appearance/langs/nl.json+++ b/app/appearance/langs/nl.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "De laatste opslag kon niet worden bevestigd. Houd deze editor open en kopieer je wijzigingen voordat je opnieuw laadt om te controleren wat is opgeslagen.",- "automationInsertVariable": "Variabele invoegen","automationTemplateTip": "Berekend in de tijdzone van de regel; lege uitvoer wist het veld en fouten draaien de wijziging terug",- "automationTemplateExample": "Voorbeeld","automationTemplatePreview": "Voorbeeldresultaat","automationPreviewData": "Gegevens voor het voorbeeld","automationPreviewItem": "Voorbeelditem","automationPreviewTime": "Datum voor het voorbeeld","automationPreviewOnly": "Alleen een voorbeeld; items worden niet gewijzigd",- "automationTimeZone": "Tijdzone van de regel","startupFailed": "SiYuan kon niet worden gestart","startupStage": "Mislukte stap: ${stage}","startupReload": "Opnieuw laden",diff --git a/app/appearance/langs/pl.json b/app/appearance/langs/pl.jsonindex be048af069..a0779ec7f4 100644--- a/app/appearance/langs/pl.json+++ b/app/appearance/langs/pl.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "Nie można potwierdzić ostatniego zapisu. Pozostaw ten edytor otwarty i skopiuj zmiany przed ponownym wczytaniem, aby sprawdzić zapisaną zawartość.",- "automationInsertVariable": "Wstaw zmienną","automationTemplateTip": "Obliczanie w strefie czasowej reguły; pusty wynik czyści pole, a błędy cofają zmianę",- "automationTemplateExample": "Przykład","automationTemplatePreview": "Wynik podglądu","automationPreviewData": "Dane do podglądu","automationPreviewItem": "Przykładowy wpis","automationPreviewTime": "Data do podglądu","automationPreviewOnly": "Tylko podgląd; wpisy nie są zmieniane",- "automationTimeZone": "Strefa czasowa reguły","startupFailed": "Nie udało się uruchomić SiYuan","startupStage": "Etap błędu: ${stage}","startupReload": "Wczytaj ponownie",diff --git a/app/appearance/langs/pt-BR.json b/app/appearance/langs/pt-BR.jsonindex 83eba3e5cc..c7ff2de296 100644--- a/app/appearance/langs/pt-BR.json+++ b/app/appearance/langs/pt-BR.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "Não foi possível confirmar o último salvamento. Mantenha este editor aberto e copie suas alterações antes de recarregar para conferir o conteúdo salvo.",- "automationInsertVariable": "Inserir variável","automationTemplateTip": "Calculado no fuso horário da regra; resultados vazios limpam o campo e erros revertem a alteração",- "automationTemplateExample": "Exemplo","automationTemplatePreview": "Resultado da prévia","automationPreviewData": "Dados usados na prévia","automationPreviewItem": "Item de exemplo","automationPreviewTime": "Data usada na prévia","automationPreviewOnly": "Somente prévia; os itens não são alterados",- "automationTimeZone": "Fuso horário da regra","startupFailed": "Não foi possível iniciar o SiYuan","startupStage": "Etapa com falha: ${stage}","startupReload": "Recarregar",diff --git a/app/appearance/langs/ru.json b/app/appearance/langs/ru.jsonindex b47ac67cd8..07f8fb87eb 100644--- a/app/appearance/langs/ru.json+++ b/app/appearance/langs/ru.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "Не удалось подтвердить последнее сохранение. Оставьте этот редактор открытым и скопируйте изменения перед перезагрузкой, чтобы проверить сохранённое содержимое.",- "automationInsertVariable": "Вставить переменную","automationTemplateTip": "Расчёт в часовом поясе правила; пустой результат очищает поле, ошибки отменяют изменение",- "automationTemplateExample": "Пример","automationTemplatePreview": "Результат предпросмотра","automationPreviewData": "Данные для предпросмотра","automationPreviewItem": "Пример записи","automationPreviewTime": "Дата для предпросмотра","automationPreviewOnly": "Только предпросмотр; записи не изменяются",- "automationTimeZone": "Часовой пояс правила","startupFailed": "Не удалось запустить SiYuan","startupStage": "Этап сбоя: ${stage}","startupReload": "Перезагрузить",diff --git a/app/appearance/langs/sk.json b/app/appearance/langs/sk.jsonindex d287605bf1..4b937f9a4d 100644--- a/app/appearance/langs/sk.json+++ b/app/appearance/langs/sk.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "Posledné uloženie sa nepodarilo potvrdiť. Nechajte tento editor otvorený a pred opätovným načítaním na kontrolu uloženého obsahu skopírujte svoje zmeny.",- "automationInsertVariable": "Vložiť premennú","automationTemplateTip": "Výpočet v časovom pásme pravidla; prázdny výsledok vymaže pole a chyby vrátia zmenu späť",- "automationTemplateExample": "Príklad","automationTemplatePreview": "Výsledok náhľadu","automationPreviewData": "Údaje pre náhľad","automationPreviewItem": "Vzorová položka","automationPreviewTime": "Dátum pre náhľad","automationPreviewOnly": "Iba náhľad; položky sa nemenia",- "automationTimeZone": "Časové pásmo pravidla","startupFailed": "SiYuan sa nepodarilo spustiť","startupStage": "Neúspešný krok: ${stage}","startupReload": "Znova načítať",diff --git a/app/appearance/langs/sr.json b/app/appearance/langs/sr.jsonindex ef54cdca58..7ec64848e7 100644--- a/app/appearance/langs/sr.json+++ b/app/appearance/langs/sr.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "Није могуће потврдити последње чување. Оставите овај уређивач отворен и копирајте измене пре поновног учитавања да бисте проверили сачувани садржај.",- "automationInsertVariable": "Уметни променљиву","automationTemplateTip": "Израчунавање у временској зони правила; празан резултат брише поље, а грешке поништавају измену",- "automationTemplateExample": "Пример","automationTemplatePreview": "Резултат прегледа","automationPreviewData": "Подаци за преглед","automationPreviewItem": "Пример ставке","automationPreviewTime": "Датум за преглед","automationPreviewOnly": "Само преглед; ставке се не мењају",- "automationTimeZone": "Временска зона правила","startupFailed": "SiYuan није могао да се покрене","startupStage": "Неуспешна фаза: ${stage}","startupReload": "Учитај поново",diff --git a/app/appearance/langs/th.json b/app/appearance/langs/th.jsonindex bef7ca79cc..92d8eab0ee 100644--- a/app/appearance/langs/th.json+++ b/app/appearance/langs/th.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "ไม่สามารถยืนยันได้ว่าการบันทึกล่าสุดสำเร็จ โปรดเปิดตัวแก้ไขนี้ค้างไว้และคัดลอกการเปลี่ยนแปลงก่อนโหลดใหม่เพื่อตรวจสอบเนื้อหาที่บันทึกไว้",- "automationInsertVariable": "แทรกตัวแปร","automationTemplateTip": "คำนวณตามเขตเวลาของกฎ ผลลัพธ์ว่างจะล้างช่อง และข้อผิดพลาดจะย้อนการเปลี่ยนแปลง",- "automationTemplateExample": "ตัวอย่าง","automationTemplatePreview": "ผลการแสดงตัวอย่าง","automationPreviewData": "ข้อมูลที่ใช้แสดงตัวอย่าง","automationPreviewItem": "รายการตัวอย่าง","automationPreviewTime": "วันที่ที่ใช้แสดงตัวอย่าง","automationPreviewOnly": "ใช้แสดงตัวอย่างเท่านั้น ไม่แก้ไขรายการ",- "automationTimeZone": "เขตเวลาของกฎ","startupFailed": "ไม่สามารถเริ่ม SiYuan ได้","startupStage": "ขั้นตอนที่ล้มเหลว: ${stage}","startupReload": "โหลดใหม่",diff --git a/app/appearance/langs/tr.json b/app/appearance/langs/tr.jsonindex ea906d3c97..3cb43e9fb5 100644--- a/app/appearance/langs/tr.json+++ b/app/appearance/langs/tr.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "Son kaydetme işlemi doğrulanamadı. Kaydedilen içeriği kontrol etmek için yeniden yüklemeden önce bu düzenleyiciyi açık tutun ve değişikliklerinizi kopyalayın.",- "automationInsertVariable": "Değişken ekle","automationTemplateTip": "Kuralın saat diliminde hesaplanır; boş sonuç alanı temizler ve hatalar değişikliği geri alır",- "automationTemplateExample": "Örnek","automationTemplatePreview": "Önizleme sonucu","automationPreviewData": "Önizleme verileri","automationPreviewItem": "Örnek kayıt","automationPreviewTime": "Önizleme tarihi","automationPreviewOnly": "Yalnızca önizleme; kayıtlar değiştirilmez",- "automationTimeZone": "Kuralın saat dilimi","startupFailed": "SiYuan başlatılamadı","startupStage": "Başarısız aşama: ${stage}","startupReload": "Yeniden yükle",diff --git a/app/appearance/langs/uk.json b/app/appearance/langs/uk.jsonindex ef6faa23a6..6bb896d839 100644--- a/app/appearance/langs/uk.json+++ b/app/appearance/langs/uk.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "Не вдалося підтвердити останнє збереження. Залиште цей редактор відкритим і скопіюйте зміни перед перезавантаженням, щоб перевірити збережений вміст.",- "automationInsertVariable": "Вставити змінну","automationTemplateTip": "Обчислення в часовому поясі правила; порожній результат очищає поле, помилки скасовують зміну",- "automationTemplateExample": "Приклад","automationTemplatePreview": "Результат попереднього перегляду","automationPreviewData": "Дані для попереднього перегляду","automationPreviewItem": "Приклад запису","automationPreviewTime": "Дата для попереднього перегляду","automationPreviewOnly": "Лише перегляд; записи не змінюються",- "automationTimeZone": "Часовий пояс правила","startupFailed": "Не вдалося запустити SiYuan","startupStage": "Етап збою: ${stage}","startupReload": "Перезавантажити",diff --git a/app/appearance/langs/zh-CN.json b/app/appearance/langs/zh-CN.jsonindex 8a60b197f4..9096a04994 100644--- a/app/appearance/langs/zh-CN.json+++ b/app/appearance/langs/zh-CN.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "无法确认最近一次保存是否成功。请保留当前编辑器,刷新核对保存结果前先复制修改内容。",- "automationInsertVariable": "插入变量","automationTemplateTip": "按规则时区计算;空结果清空字段,错误会回滚本次修改",- "automationTemplateExample": "示例","automationTemplatePreview": "预览结果","automationPreviewData": "预览使用的数据","automationPreviewItem": "示例条目","automationPreviewTime": "预览使用的日期","automationPreviewOnly": "仅用于预览,不会修改条目",- "automationTimeZone": "规则时区","startupFailed": "思源启动失败","startupStage": "失败阶段:${stage}","startupReload": "重新加载",diff --git a/app/appearance/langs/zh-TW.json b/app/appearance/langs/zh-TW.jsonindex 72a806c1cb..38a756c132 100644--- a/app/appearance/langs/zh-TW.json+++ b/app/appearance/langs/zh-TW.json@@ -1,14 +1,11 @@{"transactionSaveUnconfirmed": "無法確認最近一次儲存是否成功。請保留目前的編輯器,重新載入以核對儲存結果前,先複製修改內容。",- "automationInsertVariable": "插入變數","automationTemplateTip": "依規則時區計算;空結果清空欄位,錯誤會復原本次修改",- "automationTemplateExample": "範例","automationTemplatePreview": "預覽結果","automationPreviewData": "預覽使用的資料","automationPreviewItem": "範例項目","automationPreviewTime": "預覽使用的日期","automationPreviewOnly": "僅供預覽,不會修改項目",- "automationTimeZone": "規則時區","startupFailed": "思源啟動失敗","startupStage": "失敗階段:${stage}","startupReload": "重新載入",diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20240208172514-9dsv6na.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20240208172514-9dsv6na.syindex 8f771abcb4..eb285af196 100644--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20240208172514-9dsv6na.sy+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20240208172514-9dsv6na.sy@@ -7,7 +7,7 @@"id": "20240208172514-9dsv6na","title": "Database","type": "doc",- "updated": "20261016165601"+ "updated": "20261016174753"},"Children": [{@@ -3820,7 +3820,7 @@"HeadingLevel": 2,"Properties": {"id": "20261002224707-n5wvv5s",- "updated": "20261016165601"+ "updated": "20261016174753"},"Children": [{@@ -3912,7 +3912,7 @@"Type": "NodeParagraph","Properties": {"id": "20261016165601-kcsjytv",- "updated": "20261016165601"+ "updated": "20261016174215"},"Children": [{@@ -3926,7 +3926,7 @@},{"Type": "NodeText",- "Data": " template inline. Use the variable menu to insert the trigger time or source fields. Editing a template pauses the rule; enable it again after editing. Every editable field supports templates; computed fields such as creation time, update time, row number, rollup, and template fields cannot be assigned. Primary fields retain their existing binding"+ "Data": " template inline. Editing a template pauses the rule; enable it again after editing. Every editable field supports templates; computed fields such as creation time, update time, row number, rollup, and template fields cannot be assigned. Primary fields retain their existing binding"}]},@@ -4128,6 +4128,349 @@}]},+ {+ "ID": "20261016174753-qsam7m8",+ "Type": "NodeHeading",+ "HeadingLevel": 3,+ "Properties": {+ "id": "20261016174753-qsam7m8",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Template examples"+ }+ ]+ },+ {+ "ID": "20261016174753-9j350k4",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261016174753-9j350k4",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Copy a complete example into the template editor. "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "FIELD_ID"+ },+ {+ "Type": "NodeText",+ "Data": " is a placeholder: replace it with the source field ID in the triggering item's database, not the field name. When copying a field, use matching source and target types. When copying relations, both relation fields must also point to the same database"+ }+ ]+ },+ {+ "ID": "20261016174753-knf2f34",+ "Type": "NodeTable",+ "TableAligns": [+ 0,+ 0+ ],+ "Properties": {+ "id": "20261016174753-knf2f34",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeTableHead",+ "Children": [+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Use"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Template content"+ }+ ]+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Date: trigger day"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{now | date \"2006-01-02\"}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Date: seven days after the trigger"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{((now).AddDate 0 0 7).Format \"2006-01-02\"}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Date: move a source date or range forward seven days, preserving time settings"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{toJson (dateAdd 0 0 7 (value \"FIELD_ID\"))}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Text, primary, URL, email, or phone: copy a source field"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{field \"FIELD_ID\"}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Text or primary: append a suffix to source text"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{field \"FIELD_ID\"} (next)"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Number: add one to the source number, including decimals"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{addf (field \"FIELD_ID\") 1}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Checkbox: invert the source value"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{not (field \"FIELD_ID\")}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Select: use an existing option"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "Done"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Multi-select: use two existing options"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "[\"Work\",\"Important\"]"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Date, multi-select, relation, asset, or location: copy a source field of the same type"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{toJson (value \"FIELD_ID\")}"+ }+ ]+ }+ ]+ }+ ]+ },+ {+ "ID": "20261016174753-dmprrcl",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261016174753-dmprrcl",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": ""+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "2006-01-02"+ },+ {+ "Type": "NodeText",+ "Data": " is a fixed date format layout; do not replace it with the current date. The option names in the select and multi-select examples must already exist in the target field; replace them as needed. Check the preview before enabling the rule"+ }+ ]+ },{"ID": "20261015141042-fm4qoja","Type": "NodeHeading",diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20240208113259-nykkvaq.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20240208113259-nykkvaq.syindex 66ed9745e5..321d060f06 100644--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20240208113259-nykkvaq.sy+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20240208113259-nykkvaq.sy@@ -7,7 +7,7 @@"id": "20240208113259-nykkvaq","title": "数据库","type": "doc",- "updated": "20261016165601"+ "updated": "20261016174753"},"Children": [{@@ -3820,7 +3820,7 @@"HeadingLevel": 2,"Properties": {"id": "20261002224707-l8jclpi",- "updated": "20261016165601"+ "updated": "20261016174753"},"Children": [{@@ -3912,7 +3912,7 @@"Type": "NodeParagraph","Properties": {"id": "20261016165601-0p95j4w",- "updated": "20261016165601"+ "updated": "20261016174215"},"Children": [{@@ -3926,7 +3926,7 @@},{"Type": "NodeText",- "Data": " 模板,使用变量菜单插入触发时间或源字段。编辑模板会暂停规则,完成后请重新启用。所有可编辑字段均支持模板;创建时间、更新时间、行号、汇总和模板字段等计算字段不支持赋值。主键只修改文本,保留已有绑定"+ "Data": " 模板。编辑模板会暂停规则,完成后请重新启用。所有可编辑字段均支持模板;创建时间、更新时间、行号、汇总和模板字段等计算字段不支持赋值。主键只修改文本,保留已有绑定"}]},@@ -4128,6 +4128,349 @@}]},+ {+ "ID": "20261016174753-qli8mci",+ "Type": "NodeHeading",+ "HeadingLevel": 3,+ "Properties": {+ "id": "20261016174753-qli8mci",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "模板示例"+ }+ ]+ },+ {+ "ID": "20261016174753-tw20bbb",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261016174753-tw20bbb",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "将完整示例复制到模板输入框。"+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "FIELD_ID"+ },+ {+ "Type": "NodeText",+ "Data": " 是占位符,请替换为触发条目所在数据库的源字段 ID,而不是字段名称。复制字段时,源字段与目标字段应为相同类型;复制关联时,两个关联字段还须指向同一数据库"+ }+ ]+ },+ {+ "ID": "20261016174753-foj8hiq",+ "Type": "NodeTable",+ "TableAligns": [+ 0,+ 0+ ],+ "Properties": {+ "id": "20261016174753-foj8hiq",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeTableHead",+ "Children": [+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "用途"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "模板内容"+ }+ ]+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日期:触发当天"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{now | date \"2006-01-02\"}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日期:触发七天后"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{((now).AddDate 0 0 7).Format \"2006-01-02\"}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日期:源日期或范围顺延七天,保留时间设置"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{toJson (dateAdd 0 0 7 (value \"FIELD_ID\"))}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "文本、主键、链接、邮箱或电话:复制源字段"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{field \"FIELD_ID\"}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "文本或主键:在源文本后添加后缀"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{field \"FIELD_ID\"}(下次)"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "数字:源数字加一,支持小数"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{addf (field \"FIELD_ID\") 1}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "复选框:取源字段的相反值"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{not (field \"FIELD_ID\")}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "单选:设置为已有选项"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "已完成"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "多选:设置两个已有选项"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "[\"工作\",\"重要\"]"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日期、多选、关联、资源或位置:复制同类型源字段"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{toJson (value \"FIELD_ID\")}"+ }+ ]+ }+ ]+ }+ ]+ },+ {+ "ID": "20261016174753-dc87okn",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261016174753-dc87okn",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日期格式中的 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "2006-01-02"+ },+ {+ "Type": "NodeText",+ "Data": " 是固定的格式写法,不要替换为当前日期。单选和多选示例中的选项名称须已存在于目标字段,可按需替换。配置后先使用预览检查结果,再启用规则"+ }+ ]+ },{"ID": "20261015141042-j06dkl9","Type": "NodeHeading",diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20240208171522-y7dxcno.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20240208171522-y7dxcno.syindex 336c98b5cf..aae98038d5 100644--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20240208171522-y7dxcno.sy+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20240208171522-y7dxcno.sy@@ -7,7 +7,7 @@"id": "20240208171522-y7dxcno","title": "資料庫","type": "doc",- "updated": "20261016165601"+ "updated": "20261016174753"},"Children": [{@@ -3820,7 +3820,7 @@"HeadingLevel": 2,"Properties": {"id": "20261002224707-f9wjtlr",- "updated": "20261016165601"+ "updated": "20261016174753"},"Children": [{@@ -3912,7 +3912,7 @@"Type": "NodeParagraph","Properties": {"id": "20261016165601-zk0dnna",- "updated": "20261016165601"+ "updated": "20261016174215"},"Children": [{@@ -3926,7 +3926,7 @@},{"Type": "NodeText",- "Data": " 模板,使用變數選單插入觸發時間或來源欄位。編輯模板會暫停規則,完成後請重新啟用。所有可編輯欄位均支援模板;建立時間、更新時間、行號、彙總及模板欄位等計算欄位不支援賦值。主鍵只修改文字,保留既有繫結"+ "Data": " 模板。編輯模板會暫停規則,完成後請重新啟用。所有可編輯欄位均支援模板;建立時間、更新時間、行號、彙總及模板欄位等計算欄位不支援賦值。主鍵只修改文字,保留既有繫結"}]},@@ -4128,6 +4128,349 @@}]},+ {+ "ID": "20261016174753-ir30l97",+ "Type": "NodeHeading",+ "HeadingLevel": 3,+ "Properties": {+ "id": "20261016174753-ir30l97",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "模板範例"+ }+ ]+ },+ {+ "ID": "20261016174753-bfygs5z",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261016174753-bfygs5z",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "將完整範例複製到模板輸入框。"+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "FIELD_ID"+ },+ {+ "Type": "NodeText",+ "Data": " 是預留位置,請替換為觸發條目所在資料庫的來源欄位 ID,而非欄位名稱。複製欄位時,來源與目標欄位應為相同類型;複製關聯時,兩個關聯欄位還須指向同一資料庫"+ }+ ]+ },+ {+ "ID": "20261016174753-8mlxif2",+ "Type": "NodeTable",+ "TableAligns": [+ 0,+ 0+ ],+ "Properties": {+ "id": "20261016174753-8mlxif2",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeTableHead",+ "Children": [+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "用途"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "模板內容"+ }+ ]+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日期:觸發當天"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{now | date \"2006-01-02\"}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日期:觸發七天後"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{((now).AddDate 0 0 7).Format \"2006-01-02\"}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日期:來源日期或範圍順延七天,保留時間設定"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{toJson (dateAdd 0 0 7 (value \"FIELD_ID\"))}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "文字、主鍵、連結、電子郵件或電話:複製來源欄位"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{field \"FIELD_ID\"}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "文字或主鍵:在來源文字後加上後綴"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{field \"FIELD_ID\"}(下次)"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "數字:來源數字加一,支援小數"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{addf (field \"FIELD_ID\") 1}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "核取方塊:取來源欄位的相反值"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{not (field \"FIELD_ID\")}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "單選:設定為既有選項"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "已完成"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "多選:設定兩個既有選項"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "[\"工作\",\"重要\"]"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日期、多選、關聯、資源或位置:複製同類型來源欄位"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{toJson (value \"FIELD_ID\")}"+ }+ ]+ }+ ]+ }+ ]+ },+ {+ "ID": "20261016174753-m04acgg",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261016174753-m04acgg",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日期格式中的 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "2006-01-02"+ },+ {+ "Type": "NodeText",+ "Data": " 是固定的格式寫法,請勿替換為目前日期。單選與多選範例中的選項名稱須已存在於目標欄位,可依需要替換。設定後先使用預覽檢查結果,再啟用規則"+ }+ ]+ },{"ID": "20261015141042-sk1ubzp","Type": "NodeHeading",diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-3eaevtp.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-3eaevtp.syindex 99c941b8b8..8fa0dd8b3b 100644--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-3eaevtp.sy+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-3eaevtp.sy@@ -8,7 +8,7 @@"id": "20240530101000-3eaevtp","title": "データベース","type": "doc",- "updated": "20261016165601"+ "updated": "20261016174753"},"Children": [{@@ -3830,7 +3830,7 @@"HeadingLevel": 2,"Properties": {"id": "20261002224707-2ctdjhm",- "updated": "20261016165601"+ "updated": "20261016174753"},"Children": [{@@ -3922,7 +3922,7 @@"Type": "NodeParagraph","Properties": {"id": "20261016165601-3mbpi7s",- "updated": "20261016165601"+ "updated": "20261016174215"},"Children": [{@@ -3936,7 +3936,7 @@},{"Type": "NodeText",- "Data": " をインラインで編集できます。変数メニューからトリガー時刻やソースフィールドを挿入します。テンプレートを編集するとルールが一時停止するため、編集後に再度有効にしてください。編集可能なすべてのフィールドに対応しますが、作成日時、更新日時、行番号、ロールアップ、テンプレートなどの計算フィールドには代入できません。主キーは既存のバインドを維持します"+ "Data": " をインラインで編集できます。テンプレートを編集するとルールが一時停止するため、編集後に再度有効にしてください。編集可能なすべてのフィールドに対応しますが、作成日時、更新日時、行番号、ロールアップ、テンプレートなどの計算フィールドには代入できません。主キーは既存のバインドを維持します"}]},@@ -4138,6 +4138,349 @@}]},+ {+ "ID": "20261016174753-54vbc83",+ "Type": "NodeHeading",+ "HeadingLevel": 3,+ "Properties": {+ "id": "20261016174753-54vbc83",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "テンプレートの使用例"+ }+ ]+ },+ {+ "ID": "20261016174753-fyb1nlk",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261016174753-fyb1nlk",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "使用例全体をテンプレート入力欄にコピーしてください。"+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "FIELD_ID"+ },+ {+ "Type": "NodeText",+ "Data": " はプレースホルダーです。フィールド名ではなく、トリガー元アイテムのデータベースにあるソースフィールドの ID に置き換えます。コピー元とコピー先のフィールドは同じ型にしてください。リレーションをコピーする場合は、両方のリレーションフィールドが同じデータベースを参照している必要があります"+ }+ ]+ },+ {+ "ID": "20261016174753-z6xd85j",+ "Type": "NodeTable",+ "TableAligns": [+ 0,+ 0+ ],+ "Properties": {+ "id": "20261016174753-z6xd85j",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeTableHead",+ "Children": [+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "用途"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "テンプレートの内容"+ }+ ]+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日付:トリガー当日"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{now | date \"2006-01-02\"}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日付:トリガーの7日後"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{((now).AddDate 0 0 7).Format \"2006-01-02\"}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日付:ソースの日付または範囲を7日後にずらし、時刻設定を保持"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{toJson (dateAdd 0 0 7 (value \"FIELD_ID\"))}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "テキスト、主キー、URL、メール、電話:ソースフィールドをコピー"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{field \"FIELD_ID\"}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "テキストまたは主キー:ソーステキストに接尾辞を追加"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{field \"FIELD_ID\"}(次回)"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "数値:ソースの数値に1を加算、小数にも対応"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{addf (field \"FIELD_ID\") 1}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "チェックボックス:ソースの値を反転"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{not (field \"FIELD_ID\")}"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "選択:既存の選択肢を設定"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "完了"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "複数選択:既存の選択肢を2つ設定"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "[\"仕事\",\"重要\"]"+ }+ ]+ }+ ]+ },+ {+ "Type": "NodeTableRow",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日付、複数選択、リレーション、アセット、位置:同じ型のソースフィールドをコピー"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Children": [+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": ".action{toJson (value \"FIELD_ID\")}"+ }+ ]+ }+ ]+ }+ ]+ },+ {+ "ID": "20261016174753-9csv5xs",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261016174753-9csv5xs",+ "updated": "20261016174753"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "日付書式の "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "code",+ "TextMarkTextContent": "2006-01-02"+ },+ {+ "Type": "NodeText",+ "Data": " は固定の書式指定です。現在の日付に置き換えないでください。選択と複数選択の例では、コピー先フィールドに既存の選択肢名を指定し、必要に応じて置き換えます。ルールを有効にする前にプレビューで結果を確認してください"+ }+ ]+ },{"ID": "20261015141042-aj3t5af","Type": "NodeHeading",diff --git a/app/src/assets/scss/business/_av.scss b/app/src/assets/scss/business/_av.scssindex 7e6b25e5f4..2cdfd2956d 100644--- a/app/src/assets/scss/business/_av.scss+++ b/app/src/assets/scss/business/_av.scss@@ -3222,8 +3222,6 @@ img.av__cellassetimg {}&-field[data-template-assignment] {- align-items: start;-> .av__automation-value {grid-column: 1 / -1;}@@ -3241,6 +3239,15 @@ img.av__cellassetimg {margin-top: 8px;}+ &-template-toggle {+ justify-content: flex-start;+ list-style: none;++ &::-webkit-details-marker {+ display: none;+ }+ }+&-template-result {white-space: pre-wrap;overflow-wrap: anywhere;diff --git a/app/src/protyle/render/av/automation.ts b/app/src/protyle/render/av/automation.tsindex 58ed232270..3ae2034314 100644--- a/app/src/protyle/render/av/automation.ts+++ b/app/src/protyle/render/av/automation.ts@@ -71,6 +71,7 @@ export const openAutomationMenu = async (options: {</div></div>`;const panel = menuElement.querySelector<HTMLElement>(".av__automation");const body = panel.querySelector<HTMLElement>("[data-body]");+ const scrollElement = menuElement.querySelector<HTMLElement>(".b3-menu__items");// 先收起已打开的选项菜单,再由本次点击打开新菜单,避免冒泡被面板拦截后菜单滞留。const closeMenu = (event: MouseEvent) => {if (!panel.isConnected) {@@ -306,6 +307,7 @@ export const openAutomationMenu = async (options: {if (!body.isConnected || rules[index] !== rule || version !== renderVersion) {return;}+ const scrollTop = scrollElement.scrollTop;body.innerHTML = `<div class="ft__on-surface ft__smaller">${lang.automationTip}</div><div class="av__automation-row">${rule ? `<label class="av__automation-control fn__flex-1"><span class="ft__on-surface">${lang.automationRule}</span><select class="b3-select" data-rule>${rules.map((item, i) => optionHTML(String(i), item.name, String(index))).join("")}</select></label>` : ""}<div class="av__automation-row av__automation-tools">${iconButton("add-rule", "iconAdd", lang.new)}${rule ? iconButton("remove-rule", "iconTrashcan", lang.delete, true) : ""}</div></div>${rule ? `<div class="av__automation-row"><label class="av__automation-control fn__flex-1"><span class="ft__on-surface">${lang.name}</span><input class="b3-text-field" data-name value="${escapeAttr(rule.name)}"></label><label class="av__automation-row av__automation-enabled"><input type="checkbox" class="b3-switch ariaLabel" aria-label="${escapeAttr(lang.enable)}" data-position="north" data-enabled${rule.enabled ? " checked" : ""}></label></div>@@ -319,6 +321,7 @@ ${rule.trigger === "block" ? "" : `<div class="ft__on-surface ft__smaller">${lan<section class="av__automation-section"><div class="av__automation-row ft__b"><span class="ft__on-surface">3</span><span>${lang.automationThen}</span></div><div data-actions></div>${rule.trigger === "block" ? `<button type="button" class="b3-button b3-button--outline" data-action="preview-collection"${rule.enabled ? "" : " disabled"}>${lang.automationCollectionPreview}</button>` : `<button type="button" class="b3-button b3-button--cancel" data-action="add-action"><svg><use xlink:href="#iconAdd"></use></svg>${lang.automationAddAction}</button>`}</section>` : ""}`;if (!rule) {onResize();+ scrollElement.scrollTop = scrollTop;return;}if (rule.trigger === "block") {@@ -383,6 +386,8 @@ ${iconButton("remove-field", "iconClose", lang.delete, true, true)}`;});updateStatus();onResize();+ // 重建期间内容高度可能暂时变小,所有字段挂载并完成定位后再恢复滚动位置。+ scrollElement.scrollTop = scrollTop;};body.addEventListener("input", event => {if ((event.target as HTMLElement).matches("[data-name]")) {diff --git a/app/src/protyle/render/av/automationTemplate.ts b/app/src/protyle/render/av/automationTemplate.tsindex 49b2eb6a33..234a47825e 100644--- a/app/src/protyle/render/av/automationTemplate.ts+++ b/app/src/protyle/render/av/automationTemplate.ts@@ -56,16 +56,10 @@ export const mountAutomationTemplate = (options: {const fields = source.keyValues.filter(item => item?.key && hasAVCapability(item.key.type, "editable"));const rows = fields.find(item => item.key.type === "block")?.values || [];let version = 0;- const example = field.type === "date" ? '.action{((now).AddDate 0 0 7).Format "2006-01-02"}' :- field.type === "checkbox" ? "true" : field.type === "number" ? ".action{add 1 2}" :- field.type === "mSelect" || field.type === "relation" || field.type === "mAsset" ? "[]" :- field.type === "location" ? '{"name":"","latitude":0,"longitude":0}' : ".action{now | date \"2006-01-02\"}";host.classList.add("av__automation-template");host.innerHTML = `<textarea class="b3-text-field fn__block" data-template rows="3" maxlength="8192" aria-label="${escapeAttr(lang.template)}">${escapeHtml(value.template || "")}</textarea>-<div class="av__automation-row"><label class="av__automation-control fn__flex-1"><span>${lang.variables}</span><select class="b3-select" data-template-variable><option value="">${lang.automationInsertVariable}</option><option value="now">${lang.automationTriggerTime}</option>${fields.map(item => `<option value="${escapeAttr(item.key.id)}">${escapeHtml(item.key.name)}</option><option value="value:${escapeAttr(item.key.id)}">${escapeHtml(item.key.name)} (JSON)</option>`).join("")}</select></label><button type="button" class="b3-button b3-button--cancel" data-template-example>${lang.automationTemplateExample}</button></div><div class="ft__on-surface ft__smaller">${lang.automationTemplateTip}</div>-<div class="ft__on-surface ft__smaller">${lang.automationTimeZone} ${escapeHtml(timeZone)}</div>-<details data-template-preview><summary>${lang.automationPreviewData}</summary><div class="av__automation-template-data">+<details data-template-preview><summary class="av__automation-template-toggle b3-button b3-button--cancel fn__block"><svg aria-hidden="true"><use xlink:href="#iconRight"></use></svg><span>${lang.automationPreviewData}</span></summary><div class="av__automation-template-data"><div class="ft__on-surface ft__smaller">${lang.automationPreviewOnly}</div><label class="av__automation-control"><span>${lang.automationPreviewItem}</span><select class="b3-select" data-template-item><option value="">${lang.selectRelationItems}</option>${rows.map(row => `<option value="${escapeAttr(row.blockID)}">${escapeHtml(row.block?.content || row.blockID)}</option>`).join("")}</select></label><label class="av__automation-control"><span>${lang.automationPreviewTime}</span><input class="b3-text-field" type="datetime-local" data-template-time value="${automationDateInput(Date.now(), timeZone)}"></label>@@ -102,27 +96,6 @@ export const mountAutomationTemplate = (options: {value.template = editor.value;save();});- host.querySelector<HTMLSelectElement>("[data-template-variable]").addEventListener("change", event => {- const select = event.target as HTMLSelectElement;- if (!select.value) {- return;- }- const variable = select.value;- const text = variable === "now" ? ".action{now}" : variable.startsWith("value:") ?- `.action{toJson (value ${JSON.stringify(variable.substring(6))})}` : `.action{field ${JSON.stringify(variable)}}`;- editor.setRangeText(text, editor.selectionStart, editor.selectionEnd, "end");- value.template = editor.value;- select.value = "";- save();- renderInputs();- editor.focus();- });- host.querySelector("[data-template-example]").addEventListener("click", () => {- editor.value = example;- value.template = example;- save();- renderInputs();- });host.addEventListener("input", event => {const input = event.target as HTMLInputElement;if (input.matches("[data-template-input]")) {@@ -130,7 +103,11 @@ export const mountAutomationTemplate = (options: {}invalidate();});- host.querySelector("[data-template-preview]").addEventListener("toggle", onResize);+ const preview = host.querySelector<HTMLDetailsElement>("[data-template-preview]");+ preview.addEventListener("toggle", () => {+ preview.querySelector("summary use").setAttribute("xlink:href", preview.open ? "#iconDown" : "#iconRight");+ onResize();+ });host.querySelector<HTMLButtonElement>("[data-template-run]").addEventListener("click", async event => {const button = event.currentTarget as HTMLButtonElement;if (!item.value || !triggerTime.checkValidity() || !triggerTime.value) {diff --git a/app/tests/automationPanel.test.js b/app/tests/automationPanel.test.jsindex d85afc31a7..b55fbdb9b8 100644--- a/app/tests/automationPanel.test.js+++ b/app/tests/automationPanel.test.js@@ -55,6 +55,7 @@ const runCases = async (sources, css, mobile) => {"protyle/render/av/cell": {getCellValueText: value => value.text?.content || "",genCellValue: (type, value) => ({type, mSelect: value})},"protyle/render/av/relation": {openSearchAV: options => options.callback({dataset: {avId: "target"}})},+ "layout/getTopBarHeight": {getTopBarHeight: () => 0},};const cache = {};const load = name => {@@ -68,7 +69,13 @@ const runCases = async (sources, css, mobile) => {return exports;};await load("protyle/render/av/automation").openAutomationMenu({protyle: {options: {}, block: {rootID: "document"}},- blockElement: {dataset: {nodeId: "carrier"}}, avID: "source", menuElement: menu, onResize() {}});+ blockElement: {dataset: {nodeId: "carrier"}}, avID: "source", menuElement: menu, onResize() {+ if (mobile) {+ void menu.offsetHeight;+ } else {+ load("util/setPosition").setPosition(menu, window.innerWidth - menu.clientWidth, 100, 30, 0, true);+ }+ }});const get = selector => {const element = menu.querySelector(selector); assert.ok(element, selector); return element;};const change = async (selector, value) => {const element = get(selector);@@ -283,10 +290,30 @@ const runCases = async (sources, css, mobile) => {await tick();await change("[data-mode]", "currentTime");const theme = document.createElement("style");+ await require("electron").ipcRenderer.invoke("automation-size", mobile ? 360 : 560, 620);+ get("[data-mode]").scrollIntoView({block: "center"});+ await tick();+ const scroller = get(".b3-menu__items");+ const assignmentScrollTop = scroller.scrollTop;+ assert.ok(assignmentScrollTop > 100, "the assignment is reached by scrolling before changing its mode");+ await change("[data-mode]", "template");+ assert.ok(Math.abs(scroller.scrollTop - assignmentScrollTop) <= 1,+ `switching to a template preserves the scrolled assignment: ${assignmentScrollTop} -> ${scroller.scrollTop}`);+ assert.ok(get("[data-mode]").getBoundingClientRect().top >= scroller.getBoundingClientRect().top,+ "the assignment remains visible after its template editor expands");+ await change("[data-mode]", "currentTime");+ get("[data-mode]").scrollIntoView({block: "center"});+ await tick();+ const repeatedScrollTop = scroller.scrollTop;await change("[data-mode]", "template");+ assert.ok(Math.abs(scroller.scrollTop - repeatedScrollTop) <= 1, "repeated mode switches also preserve scrolling");+ await require("electron").ipcRenderer.invoke("automation-size", mobile ? 360 : 560, 900);assert.equal(transactions.at(-1).perform[0].data.spec, 2, "templates use the new format");assert.ok(latest().timeZone, "the rule records the frontend timezone");- await click("[data-template-example]");+ const editor = get("[data-template]");+ editor.value = '.action{((now).AddDate 0 0 7).Format "2006-01-02"}';+ editor.dispatchEvent(new Event("input", {bubbles: true}));+ editor.dispatchEvent(new Event("change", {bubbles: true}));assert.match(latest().actions[0].fields.finished.template, /AddDate 0 0 7/);get("[data-template-preview]").open = true;await change("[data-template-item]", "sample");@@ -299,7 +326,6 @@ const runCases = async (sources, css, mobile) => {assert.ok(get("[data-template-result]").textContent);assert.ok(get("[data-template-time]").getBoundingClientRect().bottom < get("[data-template-result]").getBoundingClientRect().top,"preview inputs precede the result");- const editor = get("[data-template]");editor.value = '.action{field "finished"}';editor.dispatchEvent(new Event("input", {bubbles: true}));editor.dispatchEvent(new Event("change", {bubbles: true}));@@ -377,9 +403,11 @@ if (process.versions.electron && process.type === "browser") {compilerOptions: {module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2022},}).outputText;}- sources["util/escape"] = ts.transpileModule(fs.readFileSync(path.join(__dirname, "../src/util/escape.ts"), "utf8"), {- compilerOptions: {module: ts.ModuleKind.CommonJS},- }).outputText;+ for (const name of ["escape", "setPosition"]) {+ sources[`util/${name}`] = ts.transpileModule(fs.readFileSync(path.join(__dirname, `../src/util/${name}.ts`), "utf8"), {+ compilerOptions: {module: ts.ModuleKind.CommonJS},+ }).outputText;+ }for (const name of ["daylight", "midnight"]) sources[name] = fs.readFileSync(path.join(__dirname, `../appearance/themes/${name}/theme.css`), "utf8");for (const mobile of [false, true]) {await win.loadURL("data:text/html,<html><body></body></html>");