mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-27 16:59:43 +01:00
Preferences: list the script file access kept with Always, with Revoke
Preferences > General gets a Script File Access section after Show External Script Warning. It reads script.grants and shows one row for each script and path, grouped by script, with the widest access any kept version has (read file, read and write file, or read and write folder). Revoke runs script.grants.revoke for that script and path, which removes every kept version of the pair, so the next run asks again. The list is read again after a revoke, the keyboard focus moves to the row now in that place, and the status bar says whether anything was removed or shows the command's error. Paths and script names show control and bidirectional formatting characters as escapes and are cut at 1,024 characters. A grants file that is not well formed or is larger than 4 MiB makes Revoke show the error and leaves the file as it was. Without a settings folder, and on the web, the section is not shown. The rows are drawn only where they are in view, so a long list stays fast.
This commit is contained in:
1 parent
1759064a3e
commit
9965de4ec2
33 files changed
+643
No files matched your search
@@ -4711,6 +4711,14 @@ axis Both И двете
|
||||
The script asks to read and write a folder you choose, with everything in it. Скриптът иска да чете и записва папка, която изберете, с цялото ѝ съдържание.
|
||||
Allow Once Разреши веднъж
|
||||
Always Allow This Script Винаги разрешавай този скрипт
|
||||
No script has kept file access. Няма скрипт със запазен достъп до файлове.
|
||||
Read file Четене на файл
|
||||
Read and write file Четене и запис на файл
|
||||
Read and write folder Четене и запис на папка
|
||||
Revoke Отнемане
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Отнемането премахва достъпа, запазен за всяка версия на скрипта. Достъпът до папка обхваща всичко в нея.
|
||||
@msg Script file access revoked Достъпът на скрипта до файлове е отнет
|
||||
@msg The script file access was already revoked Достъпът на скрипта до файлове вече е отнет
|
||||
Deny Откажи
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Скриптът може да променя отворените документи и да записва файлове чрез командите, които изпълнява. Изпълнявайте само скриптове, на които имате доверие.
|
||||
Do not show this warning again Не показвай повече това предупреждение
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5115,6 +5115,14 @@ imageTrace Outline Obris
|
||||
The script asks to read and write a folder you choose, with everything in it. Skripta traži da čita i piše folder koji odaberete, sa svim što je u njemu.
|
||||
Allow Once Dozvoli jednom
|
||||
Always Allow This Script Uvijek dozvoli ovu skriptu
|
||||
No script has kept file access. Nijedna skripta nema sačuvan pristup datotekama.
|
||||
Read file Čitanje datoteke
|
||||
Read and write file Čitanje i pisanje datoteke
|
||||
Read and write folder Čitanje i pisanje foldera
|
||||
Revoke Opozovi
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Opozovi uklanja pristup sačuvan za svaku verziju skripte. Pristup folderu obuhvata sve u njemu.
|
||||
@msg Script file access revoked Pristup skripte datotekama je opozvan
|
||||
@msg The script file access was already revoked Pristup skripte datotekama je već opozvan
|
||||
Deny Odbij
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Skripta može mijenjati otvorene dokumente i pisati datoteke putem naredbi koje pokreće. Pokrećite samo skripte kojima vjerujete.
|
||||
Do not show this warning again Ne prikazuj više ovo upozorenje
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -6422,6 +6422,14 @@ digits Malayalam Malaiàlam
|
||||
The script asks to read and write a folder you choose, with everything in it. L’script demana llegir i escriure una carpeta que trieu, amb tot el que conté.
|
||||
Allow Once Permet un cop
|
||||
Always Allow This Script Permet sempre aquest script
|
||||
No script has kept file access. Cap script no ha conservat accés als fitxers.
|
||||
Read file Lectura del fitxer
|
||||
Read and write file Lectura i escriptura del fitxer
|
||||
Read and write folder Lectura i escriptura de la carpeta
|
||||
Revoke Revoca
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Revoca elimina l’accés conservat per a cada versió de l’script. L’accés a una carpeta inclou tot el que conté.
|
||||
@msg Script file access revoked S’ha revocat l’accés de l’script als fitxers
|
||||
@msg The script file access was already revoked L’accés de l’script als fitxers ja s’havia revocat
|
||||
Deny Denega
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Un script pot canviar els documents oberts i escriure fitxers mitjançant les ordres que executa. Executeu només scripts de confiança.
|
||||
Do not show this warning again No tornis a mostrar aquest avís
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5230,6 +5230,14 @@ imageTrace Outline Obrys
|
||||
The script asks to read and write a folder you choose, with everything in it. Skript žádá o čtení a zápis složky, kterou vyberete, se vším, co obsahuje.
|
||||
Allow Once Povolit jednou
|
||||
Always Allow This Script Vždy povolit tento skript
|
||||
No script has kept file access. Žádný skript nemá uložený přístup k souborům.
|
||||
Read file Čtení souboru
|
||||
Read and write file Čtení a zápis souboru
|
||||
Read and write folder Čtení a zápis složky
|
||||
Revoke Odvolat
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Odvolat odebere přístup uložený pro každou verzi skriptu. Přístup ke složce zahrnuje vše, co obsahuje.
|
||||
@msg Script file access revoked Přístup skriptu k souborům byl odvolán
|
||||
@msg The script file access was already revoked Přístup skriptu k souborům už byl odvolán
|
||||
Deny Zamítnout
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Skript může měnit otevřené dokumenty a prostřednictvím příkazů, které spouští, zapisovat soubory. Spouštějte jen skripty, kterým důvěřujete.
|
||||
Do not show this warning again Toto upozornění již nezobrazovat
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -7660,6 +7660,14 @@ imageTrace Outline Kontur
|
||||
The script asks to read and write a folder you choose, with everything in it. Scriptet beder om at læse og skrive en mappe, du vælger, med alt indhold.
|
||||
Allow Once Tillad én gang
|
||||
Always Allow This Script Tillad altid dette script
|
||||
No script has kept file access. Intet script har gemt adgang til filer.
|
||||
Read file Læs fil
|
||||
Read and write file Læs og skriv fil
|
||||
Read and write folder Læs og skriv mappe
|
||||
Revoke Tilbagekald
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Tilbagekald fjerner den adgang, der er gemt for hver version af scriptet. Adgang til en mappe omfatter alt i den.
|
||||
@msg Script file access revoked Scriptets adgang til filer er tilbagekaldt
|
||||
@msg The script file access was already revoked Scriptets adgang til filer var allerede tilbagekaldt
|
||||
Deny Afvis
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Et script kan ændre de åbne dokumenter og skrive filer gennem de kommandoer, det kører. Kør kun scripts, du stoler på.
|
||||
Do not show this warning again Vis ikke denne advarsel igen
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4815,6 +4815,14 @@ theme Appearance Erscheinungsbild
|
||||
The script asks to read and write a folder you choose, with everything in it. Das Skript möchte einen Ordner, den Sie auswählen, mit seinem gesamten Inhalt lesen und schreiben.
|
||||
Allow Once Einmal erlauben
|
||||
Always Allow This Script Dieses Skript immer erlauben
|
||||
No script has kept file access. Kein Skript hat einen gespeicherten Dateizugriff.
|
||||
Read file Datei lesen
|
||||
Read and write file Datei lesen und schreiben
|
||||
Read and write folder Ordner lesen und schreiben
|
||||
Revoke Widerrufen
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. „Widerrufen“ entfernt den Zugriff, der für jede Version des Skripts gespeichert ist. Der Zugriff auf einen Ordner umfasst seinen gesamten Inhalt.
|
||||
@msg Script file access revoked Dateizugriff des Skripts widerrufen
|
||||
@msg The script file access was already revoked Der Dateizugriff des Skripts wurde bereits widerrufen
|
||||
Deny Ablehnen
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Ein Skript kann die geöffneten Dokumente ändern und über die ausgeführten Befehle Dateien schreiben. Führen Sie nur Skripte aus, denen Sie vertrauen.
|
||||
Do not show this warning again Diese Warnung nicht mehr anzeigen
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2619,6 +2619,14 @@ axis Both Και τα δύο
|
||||
The script asks to read and write a folder you choose, with everything in it. Το σενάριο ζητά να διαβάσει και να γράψει έναν φάκελο που θα επιλέξετε, με όλο το περιεχόμενό του.
|
||||
Allow Once Να επιτραπεί μία φορά
|
||||
Always Allow This Script Να επιτρέπεται πάντα αυτό το σενάριο
|
||||
No script has kept file access. Κανένα σενάριο δεν έχει αποθηκευμένη πρόσβαση σε αρχεία.
|
||||
Read file Ανάγνωση αρχείου
|
||||
Read and write file Ανάγνωση και εγγραφή αρχείου
|
||||
Read and write folder Ανάγνωση και εγγραφή φακέλου
|
||||
Revoke Ανάκληση
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Η ανάκληση αφαιρεί την πρόσβαση που έχει αποθηκευτεί για κάθε έκδοση του σεναρίου. Η πρόσβαση σε φάκελο καλύπτει όλο το περιεχόμενό του.
|
||||
@msg Script file access revoked Η πρόσβαση του σεναρίου σε αρχεία ανακλήθηκε
|
||||
@msg The script file access was already revoked Η πρόσβαση του σεναρίου σε αρχεία είχε ήδη ανακληθεί
|
||||
Deny Άρνηση
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Ένα σενάριο μπορεί να αλλάξει τα ανοιχτά έγγραφα και να γράψει αρχεία μέσω των εντολών που εκτελεί. Εκτελείτε μόνο σενάρια που εμπιστεύεστε.
|
||||
Do not show this warning again Να μην εμφανιστεί ξανά αυτή η προειδοποίηση
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4894,6 +4894,14 @@ axis Both Ambos
|
||||
The script asks to read and write a folder you choose, with everything in it. El script pide leer y escribir una carpeta que usted elija, con todo su contenido.
|
||||
Allow Once Permitir una vez
|
||||
Always Allow This Script Permitir siempre este script
|
||||
No script has kept file access. Ningún script tiene acceso a archivos guardado.
|
||||
Read file Leer archivo
|
||||
Read and write file Leer y escribir archivo
|
||||
Read and write folder Leer y escribir carpeta
|
||||
Revoke Revocar
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Revocar quita el acceso guardado para cada versión del script. El acceso a una carpeta abarca todo su contenido.
|
||||
@msg Script file access revoked Acceso del script a archivos revocado
|
||||
@msg The script file access was already revoked El acceso del script a archivos ya estaba revocado
|
||||
Deny Denegar
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Un script puede cambiar los documentos abiertos y escribir archivos mediante los comandos que ejecuta. Ejecute solo scripts de confianza.
|
||||
Do not show this warning again No volver a mostrar esta advertencia
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5135,6 +5135,14 @@ imageTrace Outline Ääriviiva
|
||||
The script asks to read and write a folder you choose, with everything in it. Komentosarja pyytää lupaa lukea ja kirjoittaa valitsemasi kansion ja kaiken sen sisällön.
|
||||
Allow Once Salli kerran
|
||||
Always Allow This Script Salli tämä komentosarja aina
|
||||
No script has kept file access. Millään komentosarjalla ei ole tallennettua tiedostojen käyttöoikeutta.
|
||||
Read file Tiedoston luku
|
||||
Read and write file Tiedoston luku ja kirjoitus
|
||||
Read and write folder Kansion luku ja kirjoitus
|
||||
Revoke Peruuta oikeus
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Peruuta oikeus poistaa käyttöoikeuden, joka on tallennettu komentosarjan jokaiselle versiolle. Kansion käyttöoikeus kattaa kaiken sen sisällön.
|
||||
@msg Script file access revoked Komentosarjan tiedostojen käyttöoikeus peruttu
|
||||
@msg The script file access was already revoked Komentosarjan tiedostojen käyttöoikeus oli jo peruttu
|
||||
Deny Estä
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Komentosarja voi muuttaa avoimia asiakirjoja ja kirjoittaa tiedostoja suorittamillaan komennoilla. Suorita vain komentosarjoja, joihin luotat.
|
||||
Do not show this warning again Älä näytä tätä varoitusta uudelleen
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4876,6 +4876,14 @@ axis Both Les deux
|
||||
The script asks to read and write a folder you choose, with everything in it. Le script demande à lire et écrire un dossier que vous choisissez, avec tout son contenu.
|
||||
Allow Once Autoriser une fois
|
||||
Always Allow This Script Toujours autoriser ce script
|
||||
No script has kept file access. Aucun script n’a conservé d’accès aux fichiers.
|
||||
Read file Lire le fichier
|
||||
Read and write file Lire et écrire le fichier
|
||||
Read and write folder Lire et écrire le dossier
|
||||
Revoke Révoquer
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Révoquer supprime l’accès conservé pour chaque version du script. L’accès à un dossier couvre tout son contenu.
|
||||
@msg Script file access revoked Accès du script aux fichiers révoqué
|
||||
@msg The script file access was already revoked L’accès du script aux fichiers était déjà révoqué
|
||||
Deny Refuser
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Un script peut modifier les documents ouverts et écrire des fichiers au moyen des commandes qu’il exécute. N’exécutez que des scripts de confiance.
|
||||
Do not show this warning again Ne plus afficher cet avertissement
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3979,6 +3979,15 @@ arrowhead Feather પીંછું
|
||||
Show East Asian Options પૂર્વ એશિયન વિકલ્પો બતાવો
|
||||
Show Edges કિનારીઓ બતાવો
|
||||
Show External Script Warning બાહ્ય સ્ક્રિપ્ટ ચેતવણી બતાવો
|
||||
Script File Access સ્ક્રિપ્ટની ફાઇલ ઍક્સેસ
|
||||
No script has kept file access. કોઈ સ્ક્રિપ્ટ પાસે સાચવેલ ફાઇલ ઍક્સેસ નથી.
|
||||
Read file ફાઇલ વાંચો
|
||||
Read and write file ફાઇલ વાંચો અને લખો
|
||||
Read and write folder ફોલ્ડર વાંચો અને લખો
|
||||
Revoke પરવાનગી પાછી ખેંચો
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. પરવાનગી પાછી ખેંચવાથી સ્ક્રિપ્ટના દરેક સંસ્કરણ માટે સાચવેલ ઍક્સેસ દૂર થાય છે. ફોલ્ડરની ઍક્સેસમાં તેની અંદરનું બધું આવે છે.
|
||||
@msg Script file access revoked સ્ક્રિપ્ટની ફાઇલ ઍક્સેસ પાછી ખેંચી
|
||||
@msg The script file access was already revoked સ્ક્રિપ્ટની ફાઇલ ઍક્સેસ પહેલેથી પાછી ખેંચાઈ હતી
|
||||
Show Find Field શોધ ફીલ્ડ બતાવો
|
||||
Show Font Height Options ફોન્ટ ઊંચાઈ વિકલ્પો બતાવો
|
||||
Show Font Names in English ફોન્ટ નામો અંગ્રેજીમાં બતાવો
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 72 and column 5.
|
@@ -7568,6 +7568,14 @@ arrowhead Feather पंख
|
||||
The script asks to read and write a folder you choose, with everything in it. स्क्रिप्ट आपका चुना हुआ फ़ोल्डर और उसकी सारी सामग्री पढ़ने और लिखने की अनुमति माँगती है।
|
||||
Allow Once एक बार अनुमति दें
|
||||
Always Allow This Script इस स्क्रिप्ट को हमेशा अनुमति दें
|
||||
No script has kept file access. किसी भी स्क्रिप्ट के पास रखी गई फ़ाइल पहुँच नहीं है।
|
||||
Read file फ़ाइल पढ़ें
|
||||
Read and write file फ़ाइल पढ़ें और लिखें
|
||||
Read and write folder फ़ोल्डर पढ़ें और लिखें
|
||||
Revoke वापस लें
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. वापस लें स्क्रिप्ट के हर संस्करण के लिए रखी गई पहुँच हटा देता है। किसी फ़ोल्डर की पहुँच में उसके भीतर का सब कुछ शामिल है।
|
||||
@msg Script file access revoked स्क्रिप्ट की फ़ाइल पहुँच वापस ली गई
|
||||
@msg The script file access was already revoked स्क्रिप्ट की फ़ाइल पहुँच पहले ही वापस ली जा चुकी थी
|
||||
Deny अस्वीकार करें
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. स्क्रिप्ट खुले दस्तावेज़ बदल सकती है और अपने चलाए कमांड से फ़ाइलें लिख सकती है। केवल भरोसेमंद स्क्रिप्ट चलाएँ।
|
||||
Do not show this warning again यह चेतावनी फिर न दिखाएँ
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5747,6 +5747,14 @@ imageTrace Outline Körvonal
|
||||
The script asks to read and write a folder you choose, with everything in it. A parancsfájl egy Ön által választott mappa és teljes tartalma olvasását és írását kéri.
|
||||
Allow Once Engedélyezés egyszer
|
||||
Always Allow This Script A parancsfájl engedélyezése mindig
|
||||
No script has kept file access. Egy parancsfájlnak sincs megőrzött fájlhozzáférése.
|
||||
Read file Fájl olvasása
|
||||
Read and write file Fájl olvasása és írása
|
||||
Read and write folder Mappa olvasása és írása
|
||||
Revoke Engedély visszavonása
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Az Engedély visszavonása a parancsfájl minden verziójához megőrzött hozzáférést eltávolítja. Egy mappához való hozzáférés a teljes tartalmára kiterjed.
|
||||
@msg Script file access revoked A parancsfájl fájlhozzáférése visszavonva
|
||||
@msg The script file access was already revoked A parancsfájl fájlhozzáférése már vissza volt vonva
|
||||
Deny Elutasítás
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. A parancsfájl módosíthatja a megnyitott dokumentumokat, és a futtatott parancsokkal fájlokat írhat. Csak megbízható parancsfájlokat futtasson.
|
||||
Do not show this warning again Ne jelenjen meg többé ez a figyelmeztetés
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5526,6 +5526,14 @@ imageTrace Outline Kontur
|
||||
The script asks to read and write a folder you choose, with everything in it. Skrip meminta izin untuk membaca dan menulis folder yang Anda pilih, beserta seluruh isinya.
|
||||
Allow Once Izinkan Sekali
|
||||
Always Allow This Script Selalu Izinkan Skrip Ini
|
||||
No script has kept file access. Tidak ada skrip yang memiliki akses berkas tersimpan.
|
||||
Read file Baca Berkas
|
||||
Read and write file Baca dan Tulis Berkas
|
||||
Read and write folder Baca dan Tulis Folder
|
||||
Revoke Cabut
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Cabut menghapus akses yang disimpan untuk setiap versi skrip. Akses ke folder mencakup semua isinya.
|
||||
@msg Script file access revoked Akses berkas skrip dicabut
|
||||
@msg The script file access was already revoked Akses berkas skrip sudah dicabut
|
||||
Deny Tolak
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Skrip dapat mengubah dokumen yang terbuka dan menulis file melalui perintah yang dijalankannya. Jalankan hanya skrip yang Anda percayai.
|
||||
Do not show this warning again Jangan tampilkan peringatan ini lagi
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4953,6 +4953,14 @@ axis Both Entrambi
|
||||
The script asks to read and write a folder you choose, with everything in it. Lo script chiede di leggere e scrivere una cartella che scegli, con tutto il suo contenuto.
|
||||
Allow Once Consenti una volta
|
||||
Always Allow This Script Consenti sempre questo script
|
||||
No script has kept file access. Nessuno script ha conservato un accesso ai file.
|
||||
Read file Lettura file
|
||||
Read and write file Lettura e scrittura file
|
||||
Read and write folder Lettura e scrittura cartella
|
||||
Revoke Revoca
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Revoca rimuove l'accesso conservato per ogni versione dello script. L'accesso a una cartella comprende tutto il suo contenuto.
|
||||
@msg Script file access revoked Accesso dello script ai file revocato
|
||||
@msg The script file access was already revoked L'accesso dello script ai file era già stato revocato
|
||||
Deny Nega
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Uno script può modificare i documenti aperti e scrivere file tramite i comandi che esegue. Esegui solo script di cui ti fidi.
|
||||
Do not show this warning again Non mostrare più questo avviso
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5779,6 +5779,14 @@ variable-list-end {0}, {1} {0}、{1}
|
||||
The script asks to read and write a folder you choose, with everything in it. スクリプトが、選択したフォルダーとその中身すべての読み書きを求めています。
|
||||
Allow Once 今回のみ許可
|
||||
Always Allow This Script このスクリプトを常に許可
|
||||
No script has kept file access. ファイルアクセスを保持しているスクリプトはありません。
|
||||
Read file ファイルの読み取り
|
||||
Read and write file ファイルの読み取りと書き込み
|
||||
Read and write folder フォルダーの読み取りと書き込み
|
||||
Revoke 許可を取り消す
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. 「許可を取り消す」は、スクリプトのすべてのバージョンに保持されたアクセスを削除します。フォルダーへのアクセスには、その中のすべてが含まれます。
|
||||
@msg Script file access revoked スクリプトのファイルアクセスを取り消しました
|
||||
@msg The script file access was already revoked スクリプトのファイルアクセスはすでに取り消されています
|
||||
Deny 拒否
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. スクリプトは開いているドキュメントを変更でき、実行するコマンドを通じてファイルを書き込むこともできます。信頼できるスクリプトだけを実行してください。
|
||||
Do not show this warning again 今後この警告を表示しない
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -8448,6 +8448,14 @@ imageTrace Outline კონტური
|
||||
The script asks to read and write a folder you choose, with everything in it. სკრიპტი ითხოვს თქვენ მიერ არჩეული საქაღალდისა და მთელი მისი შიგთავსის წაკითხვასა და ჩაწერას.
|
||||
Allow Once ერთხელ დაშვება
|
||||
Always Allow This Script ამ სკრიპტის ყოველთვის დაშვება
|
||||
No script has kept file access. არცერთ სკრიპტს არ აქვს შენახული წვდომა ფაილებზე.
|
||||
Read file ფაილის წაკითხვა
|
||||
Read and write file ფაილის წაკითხვა და ჩაწერა
|
||||
Read and write folder საქაღალდის წაკითხვა და ჩაწერა
|
||||
Revoke ნებართვის გაუქმება
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. ნებართვის გაუქმება შლის სკრიპტის ყველა ვერსიისთვის შენახულ წვდომას. საქაღალდეზე წვდომა მოიცავს მასში არსებულ ყველაფერს.
|
||||
@msg Script file access revoked სკრიპტის წვდომა ფაილებზე გაუქმდა
|
||||
@msg The script file access was already revoked სკრიპტის წვდომა ფაილებზე უკვე გაუქმებული იყო
|
||||
Deny უარყოფა
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. სკრიპტს შეუძლია ღია დოკუმენტების შეცვლა და მის მიერ გაშვებული ბრძანებებით ფაილების ჩაწერა. გაუშვით მხოლოდ სანდო სკრიპტები.
|
||||
Do not show this warning again აღარ აჩვენო ეს გაფრთხილება
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5708,6 +5708,14 @@ variable-list-end {0}, {1} {0} 및 {1}
|
||||
The script asks to read and write a folder you choose, with everything in it. 스크립트가 선택한 폴더와 그 안의 모든 항목을 읽고 쓰도록 요청합니다.
|
||||
Allow Once 한 번 허용
|
||||
Always Allow This Script 이 스크립트 항상 허용
|
||||
No script has kept file access. 파일 접근을 유지한 스크립트가 없습니다.
|
||||
Read file 파일 읽기
|
||||
Read and write file 파일 읽기 및 쓰기
|
||||
Read and write folder 폴더 읽기 및 쓰기
|
||||
Revoke 권한 취소
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. 권한 취소는 스크립트의 모든 버전에 유지된 접근을 제거합니다. 폴더 접근에는 폴더 안의 모든 항목이 포함됩니다.
|
||||
@msg Script file access revoked 스크립트 파일 접근 권한을 취소했습니다
|
||||
@msg The script file access was already revoked 스크립트 파일 접근 권한이 이미 취소되었습니다
|
||||
Deny 거부
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. 스크립트는 열려 있는 문서를 변경하고 실행하는 명령을 통해 파일을 쓸 수 있습니다. 신뢰할 수 있는 스크립트만 실행하세요.
|
||||
Do not show this warning again 이 경고를 다시 표시하지 않음
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5526,6 +5526,14 @@ imageTrace Outline Contour
|
||||
The script asks to read and write a folder you choose, with everything in it. Het script vraagt een map die u kiest te lezen en te schrijven, met alles wat erin staat.
|
||||
Allow Once Eenmaal toestaan
|
||||
Always Allow This Script Dit script altijd toestaan
|
||||
No script has kept file access. Geen enkel script heeft bewaarde bestandstoegang.
|
||||
Read file Bestand lezen
|
||||
Read and write file Bestand lezen en schrijven
|
||||
Read and write folder Map lezen en schrijven
|
||||
Revoke Intrekken
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Intrekken verwijdert de toegang die voor elke versie van het script is bewaard. Toegang tot een map omvat alles erin.
|
||||
@msg Script file access revoked Bestandstoegang van script ingetrokken
|
||||
@msg The script file access was already revoked De bestandstoegang van het script was al ingetrokken
|
||||
Deny Weigeren
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Een script kan de geopende documenten wijzigen en via de uitgevoerde opdrachten bestanden schrijven. Voer alleen scripts uit die u vertrouwt.
|
||||
Do not show this warning again Deze waarschuwing niet meer tonen
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5058,6 +5058,14 @@ imageTrace Outline Kontur
|
||||
The script asks to read and write a folder you choose, with everything in it. Skrypt prosi o odczyt i zapis wybranego przez Ciebie folderu wraz z całą jego zawartością.
|
||||
Allow Once Zezwól raz
|
||||
Always Allow This Script Zawsze zezwalaj temu skryptowi
|
||||
No script has kept file access. Żaden skrypt nie ma zachowanego dostępu do plików.
|
||||
Read file Odczyt pliku
|
||||
Read and write file Odczyt i zapis pliku
|
||||
Read and write folder Odczyt i zapis folderu
|
||||
Revoke Odwołaj
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Odwołaj usuwa dostęp zachowany dla każdej wersji skryptu. Dostęp do folderu obejmuje całą jego zawartość.
|
||||
@msg Script file access revoked Odwołano dostęp skryptu do plików
|
||||
@msg The script file access was already revoked Dostęp skryptu do plików został już odwołany
|
||||
Deny Odmów
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Skrypt może zmieniać otwarte dokumenty i zapisywać pliki za pomocą wykonywanych poleceń. Uruchamiaj tylko skrypty, którym ufasz.
|
||||
Do not show this warning again Nie pokazuj więcej tego ostrzeżenia
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6097,6 +6097,14 @@ variable-list-end {0}, {1} {0} e {1}
|
||||
The script asks to read and write a folder you choose, with everything in it. O script pede para ler e gravar uma pasta que você escolher, com todo o seu conteúdo.
|
||||
Allow Once Permitir uma vez
|
||||
Always Allow This Script Sempre permitir este script
|
||||
No script has kept file access. Nenhum script manteve acesso a arquivos.
|
||||
Read file Ler arquivo
|
||||
Read and write file Ler e gravar arquivo
|
||||
Read and write folder Ler e gravar pasta
|
||||
Revoke Revogar
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Revogar remove o acesso mantido para cada versão do script. O acesso a uma pasta abrange tudo o que ela contém.
|
||||
@msg Script file access revoked Acesso do script a arquivos revogado
|
||||
@msg The script file access was already revoked O acesso do script a arquivos já estava revogado
|
||||
Deny Negar
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Um script pode alterar os documentos abertos e gravar arquivos pelos comandos que executa. Execute apenas scripts em que você confia.
|
||||
Do not show this warning again Não mostrar este aviso novamente
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4929,6 +4929,14 @@ axis Both Оба
|
||||
The script asks to read and write a folder you choose, with everything in it. Скрипт запрашивает чтение и запись выбранной вами папки со всем её содержимым.
|
||||
Allow Once Разрешить один раз
|
||||
Always Allow This Script Всегда разрешать этот скрипт
|
||||
No script has kept file access. Ни у одного скрипта нет сохранённого доступа к файлам.
|
||||
Read file Чтение файла
|
||||
Read and write file Чтение и запись файла
|
||||
Read and write folder Чтение и запись папки
|
||||
Revoke Отозвать
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. «Отозвать» удаляет доступ, сохранённый для каждой версии скрипта. Доступ к папке распространяется на всё её содержимое.
|
||||
@msg Script file access revoked Доступ скрипта к файлам отозван
|
||||
@msg The script file access was already revoked Доступ скрипта к файлам уже был отозван
|
||||
Deny Запретить
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Скрипт может изменять открытые документы и записывать файлы с помощью выполняемых команд. Запускайте только те скрипты, которым доверяете.
|
||||
Do not show this warning again Больше не показывать это предупреждение
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4791,6 +4791,14 @@ axis Both Båda
|
||||
The script asks to read and write a folder you choose, with everything in it. Skriptet ber om att läsa och skriva en mapp som du väljer, med allt innehåll.
|
||||
Allow Once Tillåt en gång
|
||||
Always Allow This Script Tillåt alltid det här skriptet
|
||||
No script has kept file access. Inget skript har sparad filåtkomst.
|
||||
Read file Läs fil
|
||||
Read and write file Läs och skriv fil
|
||||
Read and write folder Läs och skriv mapp
|
||||
Revoke Återkalla
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Återkalla tar bort åtkomsten som sparats för varje version av skriptet. Åtkomst till en mapp omfattar allt i den.
|
||||
@msg Script file access revoked Skriptets filåtkomst har återkallats
|
||||
@msg The script file access was already revoked Skriptets filåtkomst var redan återkallad
|
||||
Deny Neka
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Ett skript kan ändra de öppna dokumenten och skriva filer genom de kommandon det kör. Kör bara skript du litar på.
|
||||
Do not show this warning again Visa inte den här varningen igen
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3024,6 +3024,41 @@ fn script_file_messages_translate_in_every_complete_message_language() {
|
||||
assert_eq!(message(de, "Script file access denied: C:/x/a.txt"), "Dateizugriff des Skripts verweigert: C:/x/a.txt");
|
||||
}
|
||||
|
||||
/// Preferences › General › Script File Access: its labels have a row in every catalog with menus,
|
||||
/// and the status messages of its Revoke button a translated row in every complete-message
|
||||
/// language.
|
||||
#[test]
|
||||
fn script_file_access_list_strings_are_in_complete_catalogs() {
|
||||
let labels = [
|
||||
"Script File Access",
|
||||
"No script has kept file access.",
|
||||
"Read file",
|
||||
"Read and write file",
|
||||
"Read and write folder",
|
||||
"Revoke",
|
||||
"Revoke removes the access kept for every version of the script. A folder's access covers everything in it.",
|
||||
];
|
||||
let literals = tl_literals();
|
||||
let mut missing = vec![];
|
||||
for label in labels {
|
||||
assert!(literals.contains(label), "{label:?} is no longer a tl! literal");
|
||||
for lang in LANGUAGES.iter().filter(|lang| lang.complete_menus) {
|
||||
if lang.catalog().plain(label).is_none_or(|row| row == label) {
|
||||
missing.push(format!("{} {label}", lang.code));
|
||||
}
|
||||
}
|
||||
}
|
||||
assert!(missing.is_empty(), "{missing:?}");
|
||||
let messages = message_literals();
|
||||
for m in ["Script file access revoked", "The script file access was already revoked"] {
|
||||
assert!(messages.contains(m), "{m:?} is no longer a message");
|
||||
for code in COMPLETE_MESSAGES {
|
||||
let lang = Lang::from_code(code).expect("registered");
|
||||
assert_ne!(message(lang, m), m, "{code}: {m}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The error that `text.setFormat` and the paragraph style commands give when a justification
|
||||
/// setting's Minimum, Desired and Maximum are out of order is translated in every
|
||||
/// complete-message language, with the setting's name kept.
|
||||
|
||||
@@ -4643,6 +4643,14 @@ axis Both Her İkisi
|
||||
The script asks to read and write a folder you choose, with everything in it. Betik, seçtiğiniz bir klasörü içindeki her şeyle birlikte okumak ve yazmak için izin istiyor.
|
||||
Allow Once Bir Kez İzin Ver
|
||||
Always Allow This Script Bu Betiğe Her Zaman İzin Ver
|
||||
No script has kept file access. Hiçbir betiğin kayıtlı dosya erişimi yok.
|
||||
Read file Dosya Okuma
|
||||
Read and write file Dosya Okuma ve Yazma
|
||||
Read and write folder Klasör Okuma ve Yazma
|
||||
Revoke İzni Kaldır
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. İzni Kaldır, betiğin her sürümü için kayıtlı erişimi kaldırır. Bir klasöre erişim, içindeki her şeyi kapsar.
|
||||
@msg Script file access revoked Betiğin dosya erişimi kaldırıldı
|
||||
@msg The script file access was already revoked Betiğin dosya erişimi zaten kaldırılmıştı
|
||||
Deny Reddet
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Bir betik açık belgeleri değiştirebilir ve çalıştırdığı komutlarla dosya yazabilir. Yalnızca güvendiğiniz betikleri çalıştırın.
|
||||
Do not show this warning again Bu uyarıyı bir daha gösterme
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -4937,6 +4937,14 @@ axis Both Обидві
|
||||
The script asks to read and write a folder you choose, with everything in it. Скрипт просить дозволу читати й записувати вибрану вами папку з усім її вмістом.
|
||||
Allow Once Дозволити один раз
|
||||
Always Allow This Script Завжди дозволяти цей скрипт
|
||||
No script has kept file access. Жоден скрипт не має збереженого доступу до файлів.
|
||||
Read file Читання файлу
|
||||
Read and write file Читання й запис файлу
|
||||
Read and write folder Читання й запис папки
|
||||
Revoke Відкликати
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. «Відкликати» прибирає доступ, збережений для кожної версії скрипту. Доступ до папки охоплює весь її вміст.
|
||||
@msg Script file access revoked Доступ скрипту до файлів відкликано
|
||||
@msg The script file access was already revoked Доступ скрипту до файлів уже було відкликано
|
||||
Deny Заборонити
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Скрипт може змінювати відкриті документи й записувати файли за допомогою команд, які виконує. Запускайте лише ті скрипти, яким довіряєте.
|
||||
Do not show this warning again Більше не показувати це попередження
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5415,6 +5415,14 @@ theme Appearance Giao diện
|
||||
The script asks to read and write a folder you choose, with everything in it. Tập lệnh yêu cầu đọc và ghi một thư mục bạn chọn, cùng mọi thứ bên trong.
|
||||
Allow Once Cho phép một lần
|
||||
Always Allow This Script Luôn cho phép tập lệnh này
|
||||
No script has kept file access. Không có tập lệnh nào được giữ quyền truy cập tệp.
|
||||
Read file Đọc tệp
|
||||
Read and write file Đọc và ghi tệp
|
||||
Read and write folder Đọc và ghi thư mục
|
||||
Revoke Thu hồi
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. Thu hồi gỡ quyền truy cập đã giữ cho mọi phiên bản của tập lệnh. Quyền truy cập một thư mục bao gồm mọi thứ bên trong.
|
||||
@msg Script file access revoked Đã thu hồi quyền truy cập tệp của tập lệnh
|
||||
@msg The script file access was already revoked Quyền truy cập tệp của tập lệnh đã được thu hồi trước đó
|
||||
Deny Từ chối
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. Tập lệnh có thể thay đổi các tài liệu đang mở và ghi tệp thông qua các lệnh mà nó chạy. Chỉ chạy những tập lệnh bạn tin cậy.
|
||||
Do not show this warning again Không hiện lại cảnh báo này
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5444,6 +5444,14 @@ imageTrace Outline 轮廓
|
||||
The script asks to read and write a folder you choose, with everything in it. 脚本请求读写您选择的文件夹及其中的所有内容。
|
||||
Allow Once 允许一次
|
||||
Always Allow This Script 始终允许此脚本
|
||||
No script has kept file access. 没有脚本保留了文件访问权限。
|
||||
Read file 读取文件
|
||||
Read and write file 读取和写入文件
|
||||
Read and write folder 读取和写入文件夹
|
||||
Revoke 收回权限
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. “收回权限”会移除为脚本每个版本保留的访问权限。文件夹的访问权限包括其中的所有内容。
|
||||
@msg Script file access revoked 已收回脚本的文件访问权限
|
||||
@msg The script file access was already revoked 脚本的文件访问权限已被收回
|
||||
Deny 拒绝
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. 脚本可以更改打开的文档,并可通过其运行的命令写入文件。请只运行您信任的脚本。
|
||||
Do not show this warning again 不再显示此警告
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -2790,6 +2790,14 @@ file-filter Templates 範本
|
||||
The script asks to read and write a folder you choose, with everything in it. 指令碼要求讀寫您選擇的資料夾及其中的所有內容。
|
||||
Allow Once 允許一次
|
||||
Always Allow This Script 一律允許此指令碼
|
||||
No script has kept file access. 沒有指令碼保留檔案存取權。
|
||||
Read file 讀取檔案
|
||||
Read and write file 讀取和寫入檔案
|
||||
Read and write folder 讀取和寫入資料夾
|
||||
Revoke 收回權限
|
||||
Revoke removes the access kept for every version of the script. A folder's access covers everything in it. 「收回權限」會移除為指令碼每個版本保留的存取權。資料夾的存取權包含其中的所有內容。
|
||||
@msg Script file access revoked 已收回指令碼的檔案存取權
|
||||
@msg The script file access was already revoked 指令碼的檔案存取權已被收回
|
||||
Deny 拒絕
|
||||
A script can change the open documents and can write files through the commands it runs. Run only scripts you trust. 指令碼可以變更開啟的文件,並可透過其執行的命令寫入檔案。請只執行您信任的指令碼。
|
||||
Do not show this warning again 不再顯示此警告
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -13,6 +13,7 @@ use crate::theme::{self, Accent, Brightness, Scheme, Tokens};
|
||||
use crate::{VectorcraftApp, widgets};
|
||||
|
||||
mod descriptions;
|
||||
mod script_access;
|
||||
|
||||
/// UI-only fields shown in the dialog (backed by `UiState`, not engine prefs).
|
||||
pub const UI_FIELDS: &[(&str, &str, &str)] = &[
|
||||
@@ -55,6 +56,8 @@ pub fn open(app: &mut VectorcraftApp, category: Option<&str>) {
|
||||
fields.insert("__desktopKeepsFrame".into(), json!(app.desktop_keeps_frame));
|
||||
fields.insert("__search".into(), json!(""));
|
||||
fields.insert("__focusSearch".into(), json!(true));
|
||||
// Read-only: the script file access kept with Always (General › Script File Access).
|
||||
script_access::load(app, &mut fields);
|
||||
app.ui.dialog = Some(Dialog { kind: "preferences".into(), fields });
|
||||
}
|
||||
|
||||
@@ -780,6 +783,9 @@ fn category_fields(ui: &mut egui::Ui, app: &mut VectorcraftApp, d: &mut Dialog,
|
||||
}
|
||||
found_paint(ui, d, mark);
|
||||
described.row(ui, sp.key, top);
|
||||
if sp.key == "showExternalScriptWarning" {
|
||||
script_access::show(ui, app, d);
|
||||
}
|
||||
}
|
||||
described
|
||||
}
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
//! Preferences › General › Script File Access: the file access people allowed scripts with Always
|
||||
//! Allow This Script in a script's file dialog (`script.grants`), one row for each script and path,
|
||||
//! each with a Revoke button (`script.grants.revoke`).
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use serde_json::{Map, Value, json};
|
||||
use vectorcraft_plugins::permissions;
|
||||
|
||||
use crate::state::Dialog;
|
||||
use crate::theme::{self, Tokens};
|
||||
use crate::{VectorcraftApp, widgets};
|
||||
|
||||
/// The dialog field that holds the rows, `[{script, path, access, versions}]`. It is absent where
|
||||
/// the session keeps no grants (no settings folder, and the web), and the section is not shown.
|
||||
pub(super) const ROWS: &str = "__scriptAccess";
|
||||
|
||||
/// The dialog field that holds the row whose Revoke button takes the keyboard focus next.
|
||||
const FOCUS: &str = "__scriptAccessFocus";
|
||||
|
||||
/// The most characters of a path a row shows.
|
||||
const MAX_SHOWN_PATH: usize = 1024;
|
||||
|
||||
/// A row's height in the list.
|
||||
const ROW_HEIGHT: f32 = 30.0;
|
||||
|
||||
/// The list's height before it scrolls.
|
||||
const LIST_HEIGHT: f32 = 180.0;
|
||||
|
||||
/// The kept grants (`script.grants`) as the rows of the field [`ROWS`] in the Preferences dialog's
|
||||
/// `fields`. Where the session keeps no grants, the field is removed.
|
||||
pub(super) fn load(app: &mut VectorcraftApp, fields: &mut Map<String, Value>) {
|
||||
match app.session.execute("script.grants", &json!({})) {
|
||||
Ok(v) if !v["file"].is_null() => {
|
||||
fields.insert(ROWS.into(), Value::Array(rows(&v["grants"])));
|
||||
}
|
||||
_ => {
|
||||
fields.remove(ROWS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The rows for the grants `grants` lists: one for each script and path, sorted by script and then
|
||||
/// by path, with the widest access any kept version of the pair has (`folder`, then `write`, then
|
||||
/// `read`) and how many versions are kept. A grant without a script or a path is left out.
|
||||
pub(super) fn rows(grants: &Value) -> Vec<Value> {
|
||||
let rank = |access: &str| match access {
|
||||
"folder" => 2,
|
||||
"write" => 1,
|
||||
_ => 0,
|
||||
};
|
||||
let mut pairs: BTreeMap<(&str, &str), (&str, usize)> = BTreeMap::new();
|
||||
for g in grants.as_array().into_iter().flatten() {
|
||||
let (Some(script), Some(path)) = (g["script"].as_str(), g["path"].as_str()) else { continue };
|
||||
let access = if g["folder"] == true {
|
||||
"folder"
|
||||
} else if g["write"] == true {
|
||||
"write"
|
||||
} else {
|
||||
"read"
|
||||
};
|
||||
let pair = pairs.entry((script, path)).or_insert((access, 0));
|
||||
if rank(access) > rank(pair.0) {
|
||||
pair.0 = access;
|
||||
}
|
||||
pair.1 += 1;
|
||||
}
|
||||
pairs
|
||||
.into_iter()
|
||||
.map(|((script, path), (access, versions))| json!({"script": script, "path": path, "access": access, "versions": versions}))
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// `path` as a row shows it: control and bidirectional formatting characters written as escapes,
|
||||
/// and at most [`MAX_SHOWN_PATH`] characters.
|
||||
pub(super) fn shown(path: &str) -> String {
|
||||
permissions::display_text(path, MAX_SHOWN_PATH)
|
||||
}
|
||||
|
||||
/// The label of a row's access.
|
||||
fn access_label(access: &str) -> &'static str {
|
||||
match access {
|
||||
"folder" => tl!("Read and write folder"),
|
||||
"write" => tl!("Read and write file"),
|
||||
_ => tl!("Read file"),
|
||||
}
|
||||
}
|
||||
|
||||
/// A line of the list: the script that the rows below it belong to, or a row, by its index.
|
||||
enum Line {
|
||||
Script(usize),
|
||||
Row(usize),
|
||||
}
|
||||
|
||||
/// The section, after General › Show External Script Warning, when the dialog `d` has rows: each
|
||||
/// script, its paths with their access and a Revoke button, or a line saying there are none.
|
||||
pub(super) fn show(ui: &mut egui::Ui, app: &mut VectorcraftApp, d: &mut Dialog) {
|
||||
let Some(rows) = d.fields.get(ROWS).and_then(Value::as_array).cloned() else { return };
|
||||
let t = Tokens::get(ui.ctx());
|
||||
ui.add_space(8.0);
|
||||
ui.label(egui::RichText::new(tl!("Script File Access")).font(theme::semibold(12.5)).color(t.text_strong));
|
||||
ui.add_space(2.0);
|
||||
if rows.is_empty() {
|
||||
ui.label(egui::RichText::new(tl!("No script has kept file access.")).color(t.text_dim).size(11.5));
|
||||
return;
|
||||
}
|
||||
let mut lines = Vec::with_capacity(rows.len() * 2);
|
||||
for (i, row) in rows.iter().enumerate() {
|
||||
if i == 0 || rows[i - 1]["script"] != row["script"] {
|
||||
lines.push(Line::Script(i));
|
||||
}
|
||||
lines.push(Line::Row(i));
|
||||
}
|
||||
let focus = d.fields.get(FOCUS).and_then(Value::as_u64).and_then(|i| usize::try_from(i).ok());
|
||||
let mut revoke_at = None;
|
||||
// The widths of the access column and of the Revoke button, so the path takes the rest.
|
||||
let text_width = |text: &str, font: egui::FontId| ui.painter().layout_no_wrap(text.to_string(), font, t.text).size().x;
|
||||
let access_width =
|
||||
["folder", "write", "read"].map(|a| text_width(access_label(a), egui::FontId::proportional(11.5))).into_iter().fold(0.0, f32::max);
|
||||
let revoke_width = (text_width(tl!("Revoke"), theme::semibold(12.5)) + 32.0).max(72.0);
|
||||
// The list is as tall as its lines, up to LIST_HEIGHT, also at the bottom of the scrolled field
|
||||
// list, where a scroll area would otherwise take only the height left in view.
|
||||
let spacing = ui.spacing().item_spacing;
|
||||
let height = ((ROW_HEIGHT + spacing.y) * lines.len() as f32 - spacing.y).min(LIST_HEIGHT);
|
||||
let scroll =
|
||||
egui::ScrollArea::vertical().id_salt("prefs-script-access").max_height(LIST_HEIGHT).min_scrolled_height(height).auto_shrink([false, true]);
|
||||
scroll.show_rows(ui, ROW_HEIGHT, lines.len(), |ui, range| {
|
||||
for line in &lines[range] {
|
||||
let size = egui::vec2(ui.available_width(), ROW_HEIGHT);
|
||||
match *line {
|
||||
Line::Script(i) => {
|
||||
let script = shown(rows[i]["script"].as_str().unwrap_or_default());
|
||||
ui.allocate_ui_with_layout(size, egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
||||
let text = egui::RichText::new(&script).color(t.text_strong).size(12.0);
|
||||
ui.add(egui::Label::new(text).truncate()).on_hover_text(&script);
|
||||
});
|
||||
}
|
||||
Line::Row(i) => {
|
||||
let row = &rows[i];
|
||||
let (script, path) = (shown(row["script"].as_str().unwrap_or_default()), shown(row["path"].as_str().unwrap_or_default()));
|
||||
ui.allocate_ui_with_layout(size, egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
||||
ui.add_space(12.0);
|
||||
// The path, then the access and the Revoke button at the right.
|
||||
let gaps = 12.0 + 2.0 * ui.spacing().item_spacing.x;
|
||||
let path_width = (ui.available_width() - access_width - revoke_width - gaps).max(40.0);
|
||||
let cell = |width: f32| egui::vec2(width, ROW_HEIGHT);
|
||||
ui.allocate_ui_with_layout(cell(path_width), egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
||||
ui.set_width(path_width);
|
||||
ui.add(egui::Label::new(egui::RichText::new(&path).color(t.text)).truncate()).on_hover_text(&path);
|
||||
});
|
||||
ui.add_space(12.0);
|
||||
ui.allocate_ui_with_layout(cell(access_width), egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
||||
ui.set_width(access_width);
|
||||
let access = egui::RichText::new(access_label(row["access"].as_str().unwrap_or_default())).color(t.text_dim).size(11.5);
|
||||
ui.add(egui::Label::new(access).wrap_mode(egui::TextWrapMode::Extend));
|
||||
});
|
||||
let button = widgets::secondary_button(ui, tl!("Revoke"));
|
||||
// A screen reader names the script and the path along with the button.
|
||||
ui.ctx().accesskit_node_builder(button.id, |node| node.set_description(format!("{script}: {path}")));
|
||||
if focus == Some(i) {
|
||||
button.request_focus();
|
||||
}
|
||||
if button.on_hover_text(&path).clicked() {
|
||||
revoke_at = Some(i);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
if focus.is_some() {
|
||||
d.fields.remove(FOCUS);
|
||||
}
|
||||
let note = tl!("Revoke removes the access kept for every version of the script. A folder's access covers everything in it.");
|
||||
ui.label(egui::RichText::new(note).color(t.text_dim).size(11.0));
|
||||
if let Some(i) = revoke_at {
|
||||
revoke(app, d, i);
|
||||
}
|
||||
}
|
||||
|
||||
/// Revoke on the row `i` of the Preferences dialog `d`: every kept grant of its script and path is
|
||||
/// removed (`script.grants.revoke`), the rows are read again and the row now at `i`, or the last
|
||||
/// row, takes the keyboard focus. The status bar says what happened; on an error the rows stay as
|
||||
/// they were.
|
||||
pub(super) fn revoke(app: &mut VectorcraftApp, d: &mut Dialog, i: usize) {
|
||||
let Some(row) = d.fields.get(ROWS).and_then(|rows| rows.get(i)).cloned() else { return };
|
||||
match app.run("script.grants.revoke", json!({"script": row["script"], "path": row["path"]})) {
|
||||
Ok(v) => {
|
||||
load(app, &mut d.fields);
|
||||
let left = d.fields.get(ROWS).and_then(Value::as_array).map_or(0, Vec::len);
|
||||
if left > 0 {
|
||||
d.fields.insert(FOCUS.into(), json!(i.min(left - 1)));
|
||||
}
|
||||
if v["removed"].as_u64().unwrap_or(0) > 0 {
|
||||
app.status("Script file access revoked");
|
||||
} else {
|
||||
app.status("The script file access was already revoked");
|
||||
}
|
||||
}
|
||||
Err(e) => app.status(e),
|
||||
}
|
||||
}
|
||||
@@ -3001,3 +3001,177 @@ fn every_description_names_a_setting_and_fits_in_every_language() {
|
||||
out.textures_delta.clear();
|
||||
assert!(bad.is_empty(), "{}", bad.join("\n"));
|
||||
}
|
||||
|
||||
/// A kept script file grant, as the grants file holds it.
|
||||
fn grant(script: &std::path::Path, path: &std::path::Path, sha256: &str, write: bool, folder: bool) -> Value {
|
||||
json!({"script": script.to_string_lossy(), "sha256": sha256, "code": [], "path": path.to_string_lossy(), "write": write, "folder": folder})
|
||||
}
|
||||
|
||||
/// An app whose session keeps its script data in a new folder for test `name`, with a grants file
|
||||
/// beside it that holds `grants`. → The app and the grants file.
|
||||
fn app_with_grants(name: &str, grants: Value) -> (VectorcraftApp, std::path::PathBuf) {
|
||||
let base = temp_folder(name);
|
||||
let store = base.join(vectorcraft_engine::script::files::GRANTS_FILE);
|
||||
std::fs::write(&store, serde_json::to_vec_pretty(&json!({"version": 1, "grants": grants})).unwrap()).unwrap();
|
||||
let mut a = app();
|
||||
a.session.attach_script_data(base.join("Script Data"));
|
||||
(a, store)
|
||||
}
|
||||
|
||||
/// The rows General › Script File Access shows, as (script, path, access, versions).
|
||||
fn access_rows(a: &VectorcraftApp) -> Vec<(String, String, String, u64)> {
|
||||
let d = a.ui.dialog.as_ref().unwrap();
|
||||
let rows = d.fields.get(script_access::ROWS).and_then(Value::as_array).cloned().unwrap_or_default();
|
||||
rows.iter()
|
||||
.map(|r| {
|
||||
let s = |k: &str| r[k].as_str().unwrap_or_default().to_string();
|
||||
(s("script"), s("path"), s("access"), r["versions"].as_u64().unwrap_or(0))
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// The open Preferences dialog drawn in `ctx` with the field list scrolled by the wheel, over the
|
||||
/// Keyboard Increment row, until the last text `label` lies wholly inside it → the texts of the
|
||||
/// last frame that lie in their clip rectangle.
|
||||
fn script_access_in_view(a: &mut VectorcraftApp, ctx: &egui::Context, label: &str) -> Vec<(String, egui::Rect)> {
|
||||
description_frame(a, ctx, vec![]);
|
||||
let texts = whole_texts_frame(a, ctx, vec![]);
|
||||
let at = texts.iter().find(|(t, _)| t == "Keyboard Increment:").map(|(_, r)| r.center()).expect("General shows Keyboard Increment");
|
||||
let texts = description_frame(a, ctx, vec![egui::Event::PointerMoved(at)]).0;
|
||||
scroll_into_view(a, ctx, texts, label)
|
||||
}
|
||||
|
||||
/// Click the first text `label` of `texts`, which the last frame in `ctx` drew, with the pointer.
|
||||
fn click_shown(a: &mut VectorcraftApp, ctx: &egui::Context, texts: &[(String, egui::Rect)], label: &str) {
|
||||
let at = texts.iter().find(|(t, _)| t == label).map(|(_, r)| r.center()).unwrap_or_else(|| panic!("no `{label}` in {texts:?}"));
|
||||
let press = |pressed| egui::Event::PointerButton { pos: at, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() };
|
||||
description_frame(a, ctx, vec![egui::Event::PointerMoved(at)]);
|
||||
description_frame(a, ctx, vec![press(true)]);
|
||||
description_frame(a, ctx, vec![press(false)]);
|
||||
}
|
||||
|
||||
/// A new context with the app's fonts.
|
||||
fn fonts_context() -> egui::Context {
|
||||
let ctx = egui::Context::default();
|
||||
crate::theme::install_fonts(&ctx);
|
||||
ctx
|
||||
}
|
||||
|
||||
/// General › Script File Access lists each script and path once, with the widest access any kept
|
||||
/// version of the pair has, and Revoke removes every kept version of that pair through
|
||||
/// `script.grants.revoke`, so the next run asks again; the other pairs stay.
|
||||
#[test]
|
||||
fn script_file_access_lists_each_script_and_path_once_and_revoke_removes_them() {
|
||||
let dir = std::env::temp_dir().join("vc-ui-prefs-grants-nowhere");
|
||||
let (a_js, b_js) = (dir.join("a.jsx"), dir.join("b.jsx"));
|
||||
let (out, folder) = (dir.join("out.txt"), dir.join("work"));
|
||||
let grants = json!([
|
||||
grant(&a_js, &out, "1", false, false),
|
||||
grant(&a_js, &out, "2", true, false),
|
||||
grant(&a_js, &folder, "1", true, true),
|
||||
grant(&b_js, &out, "3", false, false),
|
||||
]);
|
||||
let (mut a, store) = app_with_grants("grants-list", grants);
|
||||
open(&mut a, Some("General"));
|
||||
let (a_s, b_s, out_s, folder_s) = (a_js.to_string_lossy(), b_js.to_string_lossy(), out.to_string_lossy(), folder.to_string_lossy());
|
||||
let row = |s: &str, p: &str, access: &str, n: u64| (s.to_string(), p.to_string(), access.to_string(), n);
|
||||
assert_eq!(
|
||||
access_rows(&a),
|
||||
[row(&a_s, &out_s, "write", 2), row(&a_s, &folder_s, "folder", 1), row(&b_s, &out_s, "read", 1)],
|
||||
"one row for each script and path, sorted by script and then path"
|
||||
);
|
||||
let ctx = fonts_context();
|
||||
let note = "Revoke removes the access kept for every version of the script. A folder's access covers everything in it.";
|
||||
let texts = script_access_in_view(&mut a, &ctx, note);
|
||||
let painted = |label: &str| texts.iter().filter(|(t, _)| t == label).count();
|
||||
for label in ["Script File Access", "Read and write file", "Read and write folder", "Read file"] {
|
||||
assert_eq!(painted(label), 1, "{label:?} in {texts:?}");
|
||||
}
|
||||
assert_eq!(painted("Revoke"), 3, "a Revoke for each row: {texts:?}");
|
||||
assert_eq!(painted(&a_s), 1, "the script shows once over its rows: {texts:?}");
|
||||
assert_eq!(painted(&out_s), 2, "{texts:?}");
|
||||
let rect = |label: &str| texts.iter().find(|(t, _)| t == label).map(|(_, r)| *r).unwrap_or_else(|| panic!("no `{label}`"));
|
||||
let (path, access, revoke) = (rect(&out_s), rect("Read and write file"), rect("Revoke"));
|
||||
assert!(path.max.x < access.min.x && access.max.x < revoke.min.x, "a row's path, access and Revoke do not overlap: {texts:?}");
|
||||
// The first Revoke is the first row's: a.jsx and out.txt, kept for two versions.
|
||||
click_shown(&mut a, &ctx, &texts, "Revoke");
|
||||
assert_eq!(a.ui.status, "Script file access revoked");
|
||||
assert_eq!(access_rows(&a), [row(&a_s, &folder_s, "folder", 1), row(&b_s, &out_s, "read", 1)]);
|
||||
let kept = a.session.execute("script.grants", &json!({})).unwrap();
|
||||
assert_eq!(kept["grants"].as_array().unwrap().len(), 2, "{kept}");
|
||||
let stored: Value = serde_json::from_slice(&std::fs::read(&store).unwrap()).unwrap();
|
||||
assert!(stored["grants"].as_array().unwrap().iter().all(|g| !(g["script"] == *a_s && g["path"] == *out_s)), "{stored}");
|
||||
let _ = std::fs::remove_dir_all(store.parent().unwrap());
|
||||
}
|
||||
|
||||
/// Revoke on a row whose grants were removed elsewhere removes nothing and says so; with no kept
|
||||
/// grants the section says there are none, and a session without a settings folder (the web among
|
||||
/// them) shows no section.
|
||||
#[test]
|
||||
fn script_file_access_shows_none_and_a_revoke_of_a_removed_row() {
|
||||
let dir = std::env::temp_dir().join("vc-ui-prefs-grants-nowhere");
|
||||
let (mut a, store) = app_with_grants("grants-gone", json!([grant(&dir.join("a.jsx"), &dir.join("out.txt"), "1", false, false)]));
|
||||
open(&mut a, Some("General"));
|
||||
assert_eq!(access_rows(&a).len(), 1);
|
||||
a.session.execute("script.grants.revoke", &json!({"all": true})).unwrap();
|
||||
let mut d = a.ui.dialog.clone().unwrap();
|
||||
script_access::revoke(&mut a, &mut d, 0);
|
||||
a.ui.dialog = Some(d);
|
||||
assert_eq!(a.ui.status, "The script file access was already revoked");
|
||||
assert!(access_rows(&a).is_empty());
|
||||
let texts = script_access_in_view(&mut a, &fonts_context(), "No script has kept file access.");
|
||||
assert!(texts.iter().any(|(t, _)| t == "Script File Access"), "{texts:?}");
|
||||
let _ = std::fs::remove_dir_all(store.parent().unwrap());
|
||||
let mut web = app();
|
||||
open(&mut web, Some("General"));
|
||||
assert!(web.ui.dialog.as_ref().unwrap().fields.get(script_access::ROWS).is_none());
|
||||
let text = crate::tests_labels::painted_text(&mut web, |a, ui| show(a, ui.ctx()));
|
||||
assert!(!text.contains("No script has kept file access."), "{text}");
|
||||
}
|
||||
|
||||
/// A grants file that is not well formed or is larger than may be read is refused: Revoke shows
|
||||
/// the error, grants nothing and leaves the file and the rows as they were.
|
||||
#[test]
|
||||
fn script_file_access_revoke_refuses_a_malformed_or_oversized_grants_file() {
|
||||
let dir = std::env::temp_dir().join("vc-ui-prefs-grants-nowhere");
|
||||
let mut oversized = br#"{"version": 1, "grants": []}"#.to_vec();
|
||||
oversized.resize((4 << 20) + 1, b' ');
|
||||
for (name, held) in
|
||||
[("malformed", br#"{"version": 1, "grants": [{"script": "x"}]}"#.to_vec()), ("broken", b"{ not json".to_vec()), ("oversized", oversized)]
|
||||
{
|
||||
let (mut a, store) = app_with_grants(&format!("grants-{name}"), json!([grant(&dir.join("a.jsx"), &dir.join("out.txt"), "1", false, false)]));
|
||||
open(&mut a, Some("General"));
|
||||
let before = access_rows(&a);
|
||||
assert_eq!(before.len(), 1, "{name}");
|
||||
std::fs::write(&store, &held).unwrap();
|
||||
let mut d = a.ui.dialog.clone().unwrap();
|
||||
script_access::revoke(&mut a, &mut d, 0);
|
||||
a.ui.dialog = Some(d);
|
||||
assert!(a.ui.status.contains("could not be saved"), "{name}: {}", a.ui.status);
|
||||
assert_eq!(std::fs::read(&store).unwrap(), held, "{name}: the grants file is left as it was");
|
||||
assert_eq!(access_rows(&a), before, "{name}: the rows stay");
|
||||
let listed = a.session.execute("script.grants", &json!({}));
|
||||
assert!(
|
||||
listed.as_ref().is_ok_and(|v| v["grants"].as_array().is_some_and(Vec::is_empty)) || listed.is_err(),
|
||||
"{name}: nothing is granted: {listed:?}"
|
||||
);
|
||||
let _ = std::fs::remove_dir_all(store.parent().unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
/// A script or path with control or bidirectional formatting characters shows them as escapes, so
|
||||
/// it cannot break its row or draw as another name.
|
||||
#[test]
|
||||
fn script_file_access_shows_paths_as_plain_text() {
|
||||
let dir = std::env::temp_dir().join("vc-ui-prefs-grants-nowhere");
|
||||
let (script, path) = (dir.join("a\u{202E}txt.jsx"), dir.join("two\nlines.txt"));
|
||||
let (mut a, store) = app_with_grants("grants-plain", json!([grant(&script, &path, "1", false, false)]));
|
||||
open(&mut a, Some("General"));
|
||||
let (script_s, path_s) = (script_access::shown(&script.to_string_lossy()), script_access::shown(&path.to_string_lossy()));
|
||||
assert!(script_s.ends_with("a\\u{202E}txt.jsx") && path_s.ends_with("two\\u{000A}lines.txt"), "{script_s} {path_s}");
|
||||
let texts = script_access_in_view(&mut a, &fonts_context(), &path_s);
|
||||
assert!(texts.iter().any(|(t, _)| *t == script_s), "{texts:?}");
|
||||
let text: String = crate::tests_labels::painted_text(&mut a, |a, ui| show(a, ui.ctx()));
|
||||
assert!(!text.contains('\u{202E}') && !text.contains("two\nlines"), "{text}");
|
||||
let _ = std::fs::remove_dir_all(store.parent().unwrap());
|
||||
}
|
||||
@@ -1040,6 +1040,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- Scripts: `$.line` is the line of the running script, counting from 1, and `$.stack` is the current stack trace ([the help page](https://extendscript.docsforadobe.dev/extendscript-tools-features/dollar-object/)). VectorCraft's own rules: both count lines in the file the code is in (the script, a file it included, a file `$.evalFile` ran, or the file of an earlier run of the named engine), and `$.stack` writes each frame as `name@file:line`, outermost first; code that `eval` or `Function` compiled keeps its own line in `[eval]`, and code whose place the engine no longer keeps is at line 0 of `[unknown]`. `crates/engine/src/tests/script_include.rs`, `crates/engine/src/tests/script_engines.rs`, `crates/js/src/extension_tests.rs`.
|
||||
- Scripts: `File` and `Folder` ([File object](https://extendscript.docsforadobe.dev/file-system-access/file-object/), [Folder object](https://extendscript.docsforadobe.dev/file-system-access/folder-object/)) name files and folders by platform or URI path, with `name`, `fsName`, `absoluteURI`, `relativeURI`, `parent`, `Folder.current` and `encode`/`decode`, and read them: `exists`, `length`, the dates, `getFiles` with a mask or a function, and `open('r')` with `read`, `readln`, `readch`, `seek`, `tell` and `close`, decoding by byte order mark, `encoding`, UTF-8 or CP1252. VectorCraft's own rules: a script reads only in its own folder and below (and inside the automation read roots when they are set); any other path and a network or device path are refused before anything is looked up, and a link that leads out is refused as well (`false` or `null`, with `error` set); a file is read whole up to 8 MiB and a run reads up to 32 MiB; `execute` is not available. `crates/engine/src/tests/script_io.rs`.
|
||||
- Scripts: `File` and `Folder` write ([File object](https://extendscript.docsforadobe.dev/file-system-access/file-object/), [Folder object](https://extendscript.docsforadobe.dev/file-system-access/folder-object/)): `open('w')`, `open('e')` and `open('a')` with `write` and `writeln` by `lineFeed`, `copy`, `remove` (a folder only when empty), `rename`, `folder.create()`, the `length` and `readonly` setters, and `File.openDialog`, `File.saveDialog`, `Folder.selectDialog`, `openDlg`, `saveDlg` and `selectDlg`, with a `filter` of file types or a filter function and `multiSelect`. VectorCraft's own rules: a script writes only in `Folder.temp` (one for the run, deleted when it ends), its own `Folder.userData` next to the settings, and what a person allowed it in a file dialog, once or always; Always keeps the grant for that script file with that text by its SHA-256 and for the sources the run evaluated (`$.evalFile`, `eval`, `Function`), so a run that evaluates other code, or whose named engine holds other code, loses it first; `script.grants` lists the grants and `script.grants.revoke` removes them; the settings folder is kept out of every grant; the commands a script runs with `vc.run` read and write only in the same places and the open documents' own files; a run with nobody to ask gets `null` from the dialogs; a file is written at close or when the run ends, 8 MiB a file and 32 MiB a run, and named in `written`, also after a run that failed. `crates/engine/src/tests/script_io.rs`.
|
||||
- Scripts: Preferences › General › Script File Access lists the file access kept with Always Allow This Script (`script.grants`), one row for each script and path with its widest access (read file, read and write file, or read and write folder), and its Revoke button removes every kept version of that script and path (`script.grants.revoke`), so the next run asks again. Paths show control and bidirectional characters as escapes; a grants file that is not well formed or is over 4 MiB makes Revoke show its error and leaves the file as it was. VectorCraft's own addition. `crates/ui-egui/src/prefs_dialog/tests.rs` (`script_file_access_*`).
|
||||
- Scripts: `#strict on` (and `//@strict on`) runs the script with the checks the [`$` object](https://extendscript.docsforadobe.dev/extendscript-tools-features/dollar-object/) help page gives for `$.strict`: an assignment to a read-only property throws a `TypeError`, and so does a new property on an object that takes none. VectorCraft's own rules: a getter-only property counts as read-only, the objects that take no new properties are the non-extensible ones (`Object.preventExtensions`, `seal`, `freeze`, and the frozen `vc` and `$` objects), the last `#strict` line of the script and its includes sets the whole run, a file `$.evalFile` runs keeps its own line's checks for its code, and the rest of ES5 strict mode stays with `'use strict'`. Without the line, runs are unchanged. `crates/engine/src/tests/script_include.rs` (`strict_on_*`, `strict_mode_in_eval_file_is_scoped`), `crates/js/src/interp_tests.rs` (`strict_writes_are_separate_from_es5_strict`).
|
||||
- Scripts folder: File › Scripts lists the `.js` and `.jsx` files of the `Scripts` folder next to the preferences, each named after its file without the extension, with each subfolder as a submenu, above Check Script… and Other Script… (https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/install-and-run-scripts.html). VectorCraft's own rules: the folder is read again when the window becomes active and when the File menu opens (in the macOS menu bar, when any of its menus opens, and the new listing shows the next time the menu opens), links are not followed, and one read stops at 2,048 entries, 512 scripts, 128 subfolders, 4 levels or 250 ms. `script.listInstalled` returns the listing. `crates/engine/src/tests/script_folder.rs`, `crates/ui-egui/src/tests/scripts_menu.rs`.
|
||||
- Messages over the window: `app.toast {message, level?, seconds?}` shows a message at the window's bottom right that does not stop work and closes after its time (4 seconds by default) or when clicked; at most 5 show at once, the newest lowest. Scripts raise one through `vc.run`, MCP clients through the command, and an action records it as a step. The limits are VectorCraft's own values. Tests: `cmd::toast::tests` in `vectorcraft-engine`, `toasts::tests` in `vectorcraft-ui-egui`.
|
||||
|
||||
Reference in new issue
Block a user