From 8a7e8b57a80e305f3731f8799ad2371896c7bf96 Mon Sep 17 00:00:00 2001 From: cvaz1306 Date: Fri, 27 Dec 2024 17:06:15 -0800 Subject: [PATCH 1/2] Add reset panzoom button to SVGPanZoom and cleanup --- src/lib/components/common/SVGPanZoom.svelte | 24 ++++++++++++++++++-- src/lib/components/icons/Reset.svelte | 9 ++++++++ src/lib/i18n/locales/ar-BH/translation.json | 1 + src/lib/i18n/locales/bg-BG/translation.json | 1 + src/lib/i18n/locales/bn-BD/translation.json | 1 + src/lib/i18n/locales/ca-ES/translation.json | 1 + src/lib/i18n/locales/ceb-PH/translation.json | 1 + src/lib/i18n/locales/cs-CZ/translation.json | 1 + src/lib/i18n/locales/da-DK/translation.json | 1 + src/lib/i18n/locales/de-DE/translation.json | 1 + src/lib/i18n/locales/dg-DG/translation.json | 1 + src/lib/i18n/locales/el-GR/translation.json | 1 + src/lib/i18n/locales/en-GB/translation.json | 1 + src/lib/i18n/locales/en-US/translation.json | 1 + src/lib/i18n/locales/es-ES/translation.json | 1 + src/lib/i18n/locales/eu-ES/translation.json | 1 + src/lib/i18n/locales/fa-IR/translation.json | 1 + src/lib/i18n/locales/fi-FI/translation.json | 1 + src/lib/i18n/locales/fr-CA/translation.json | 1 + src/lib/i18n/locales/fr-FR/translation.json | 1 + src/lib/i18n/locales/he-IL/translation.json | 1 + src/lib/i18n/locales/hi-IN/translation.json | 1 + src/lib/i18n/locales/hr-HR/translation.json | 1 + src/lib/i18n/locales/hu-HU/translation.json | 1 + src/lib/i18n/locales/id-ID/translation.json | 1 + src/lib/i18n/locales/ie-GA/translation.json | 1 + src/lib/i18n/locales/it-IT/translation.json | 1 + src/lib/i18n/locales/ja-JP/translation.json | 1 + src/lib/i18n/locales/ka-GE/translation.json | 1 + src/lib/i18n/locales/ko-KR/translation.json | 1 + src/lib/i18n/locales/lt-LT/translation.json | 1 + src/lib/i18n/locales/ms-MY/translation.json | 1 + src/lib/i18n/locales/nb-NO/translation.json | 1 + src/lib/i18n/locales/nl-NL/translation.json | 1 + src/lib/i18n/locales/pa-IN/translation.json | 1 + src/lib/i18n/locales/pl-PL/translation.json | 1 + src/lib/i18n/locales/pt-BR/translation.json | 1 + src/lib/i18n/locales/pt-PT/translation.json | 1 + src/lib/i18n/locales/ro-RO/translation.json | 1 + src/lib/i18n/locales/ru-RU/translation.json | 1 + src/lib/i18n/locales/sk-SK/translation.json | 1 + src/lib/i18n/locales/sr-RS/translation.json | 1 + src/lib/i18n/locales/sv-SE/translation.json | 1 + src/lib/i18n/locales/th-TH/translation.json | 1 + src/lib/i18n/locales/tk-TW/translation.json | 1 + src/lib/i18n/locales/tr-TR/translation.json | 1 + src/lib/i18n/locales/uk-UA/translation.json | 1 + src/lib/i18n/locales/ur-PK/translation.json | 1 + src/lib/i18n/locales/vi-VN/translation.json | 1 + src/lib/i18n/locales/zh-CN/translation.json | 1 + src/lib/i18n/locales/zh-TW/translation.json | 1 + 51 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 src/lib/components/icons/Reset.svelte diff --git a/src/lib/components/common/SVGPanZoom.svelte b/src/lib/components/common/SVGPanZoom.svelte index e576ffb06c..9a2b0fd6ef 100644 --- a/src/lib/components/common/SVGPanZoom.svelte +++ b/src/lib/components/common/SVGPanZoom.svelte @@ -2,7 +2,7 @@ import { onMount, getContext } from 'svelte'; const i18n = getContext('i18n'); - import panzoom from 'panzoom'; + import panzoom, { type PanZoom } from 'panzoom'; import DOMPurify from 'dompurify'; import DocumentDuplicate from '../icons/DocumentDuplicate.svelte'; @@ -10,12 +10,13 @@ import { toast } from 'svelte-sonner'; import Tooltip from './Tooltip.svelte'; import Clipboard from '../icons/Clipboard.svelte'; + import Reset from '../icons/Reset.svelte'; export let className = ''; export let svg = ''; export let content = ''; - let instance; + let instance: PanZoom; let sceneParentElement: HTMLElement; let sceneElement: HTMLElement; @@ -28,6 +29,12 @@ zoomSpeed: 0.065 }); } + function resetPanZoomViewport() { + console.log('Reset View'); + instance.moveTo(0, 0); + instance.zoomAbs(0, 0, 1); + console.log(instance.getTransform()); + }
@@ -49,5 +56,18 @@
+
+ + + +
{/if} diff --git a/src/lib/components/icons/Reset.svelte b/src/lib/components/icons/Reset.svelte new file mode 100644 index 0000000000..c1263fd38a --- /dev/null +++ b/src/lib/components/icons/Reset.svelte @@ -0,0 +1,9 @@ + + + + + diff --git a/src/lib/i18n/locales/ar-BH/translation.json b/src/lib/i18n/locales/ar-BH/translation.json index 112f628ab0..4131ef250d 100644 --- a/src/lib/i18n/locales/ar-BH/translation.json +++ b/src/lib/i18n/locales/ar-BH/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/bg-BG/translation.json b/src/lib/i18n/locales/bg-BG/translation.json index 59fa54e3f7..8282801ff8 100644 --- a/src/lib/i18n/locales/bg-BG/translation.json +++ b/src/lib/i18n/locales/bg-BG/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/bn-BD/translation.json b/src/lib/i18n/locales/bn-BD/translation.json index f9867a3c4f..93ffbd5d3e 100644 --- a/src/lib/i18n/locales/bn-BD/translation.json +++ b/src/lib/i18n/locales/bn-BD/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/ca-ES/translation.json b/src/lib/i18n/locales/ca-ES/translation.json index 7c616f0afe..f8bc128b9c 100644 --- a/src/lib/i18n/locales/ca-ES/translation.json +++ b/src/lib/i18n/locales/ca-ES/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "Restablir tots els models", "Reset Upload Directory": "Restableix el directori de pujades", "Reset Vector Storage/Knowledge": "Restableix el Repositori de vectors/Coneixement", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Les notifications de resposta no es poden activar perquè els permisos del lloc web han estat rebutjats. Comprova les preferències del navegador per donar l'accés necessari.", "Response splitting": "Divisió de la resposta", "Result": "Resultat", diff --git a/src/lib/i18n/locales/ceb-PH/translation.json b/src/lib/i18n/locales/ceb-PH/translation.json index 03c602fbff..3f009d970a 100644 --- a/src/lib/i18n/locales/ceb-PH/translation.json +++ b/src/lib/i18n/locales/ceb-PH/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/cs-CZ/translation.json b/src/lib/i18n/locales/cs-CZ/translation.json index 2f7a2850ea..4018a8d098 100644 --- a/src/lib/i18n/locales/cs-CZ/translation.json +++ b/src/lib/i18n/locales/cs-CZ/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Resetovat adresář nahrávání", "Reset Vector Storage/Knowledge": "Resetování úložiště vektorů/znalostí", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Oznámení o odpovědích nelze aktivovat, protože oprávnění webu byla zamítnuta. Navštivte nastavení svého prohlížeče a udělte potřebný přístup.", "Response splitting": "Rozdělení odpovědi", "Result": "Výsledek", diff --git a/src/lib/i18n/locales/da-DK/translation.json b/src/lib/i18n/locales/da-DK/translation.json index cb063f7e0d..cf188b814e 100644 --- a/src/lib/i18n/locales/da-DK/translation.json +++ b/src/lib/i18n/locales/da-DK/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Nulstil uploadmappe", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Svarnotifikationer kan ikke aktiveres, da webstedets tilladelser er blevet nægtet. Besøg dine browserindstillinger for at give den nødvendige adgang.", "Response splitting": "Svaropdeling", "Result": "", diff --git a/src/lib/i18n/locales/de-DE/translation.json b/src/lib/i18n/locales/de-DE/translation.json index 770bafa930..f1fbcf0155 100644 --- a/src/lib/i18n/locales/de-DE/translation.json +++ b/src/lib/i18n/locales/de-DE/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Upload-Verzeichnis zurücksetzen", "Reset Vector Storage/Knowledge": "Vektorspeicher/Wissen zurücksetzen", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Benachrichtigungen können nicht aktiviert werden, da die Website-Berechtigungen abgelehnt wurden. Bitte besuchen Sie Ihre Browser-Einstellungen, um den erforderlichen Zugriff zu gewähren.", "Response splitting": "Antwortaufteilung", "Result": "Ergebnis", diff --git a/src/lib/i18n/locales/dg-DG/translation.json b/src/lib/i18n/locales/dg-DG/translation.json index f239549b51..fdfe72a73f 100644 --- a/src/lib/i18n/locales/dg-DG/translation.json +++ b/src/lib/i18n/locales/dg-DG/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/el-GR/translation.json b/src/lib/i18n/locales/el-GR/translation.json index bb33a67bfe..b1d1c8f94b 100644 --- a/src/lib/i18n/locales/el-GR/translation.json +++ b/src/lib/i18n/locales/el-GR/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "Επαναφορά Όλων των Μοντέλων", "Reset Upload Directory": "Επαναφορά Καταλόγου Ανεβάσματος", "Reset Vector Storage/Knowledge": "Επαναφορά Αποθήκευσης Διανυσμάτων/Γνώσης", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Οι ειδοποιήσεις απάντησης δεν μπορούν να ενεργοποιηθούν καθώς οι άδειες του ιστότοπου έχουν αρνηθεί. Παρακαλώ επισκεφτείτε τις ρυθμίσεις του περιηγητή σας για να δώσετε την απαραίτητη πρόσβαση.", "Response splitting": "Διαχωρισμός απάντησης", "Result": "Αποτέλεσμα", diff --git a/src/lib/i18n/locales/en-GB/translation.json b/src/lib/i18n/locales/en-GB/translation.json index f98dd0af17..4aa68bf79d 100644 --- a/src/lib/i18n/locales/en-GB/translation.json +++ b/src/lib/i18n/locales/en-GB/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/en-US/translation.json b/src/lib/i18n/locales/en-US/translation.json index f98dd0af17..4aa68bf79d 100644 --- a/src/lib/i18n/locales/en-US/translation.json +++ b/src/lib/i18n/locales/en-US/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/es-ES/translation.json b/src/lib/i18n/locales/es-ES/translation.json index b18c372ffd..f87ed9450c 100644 --- a/src/lib/i18n/locales/es-ES/translation.json +++ b/src/lib/i18n/locales/es-ES/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Reiniciar Directorio de carga", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Las notificaciones de respuesta no pueden activarse debido a que los permisos del sitio web han sido denegados. Por favor, visite las configuraciones de su navegador para otorgar el acceso necesario.", "Response splitting": "División de respuestas", "Result": "", diff --git a/src/lib/i18n/locales/eu-ES/translation.json b/src/lib/i18n/locales/eu-ES/translation.json index 34a5deaa9c..5e042e6992 100644 --- a/src/lib/i18n/locales/eu-ES/translation.json +++ b/src/lib/i18n/locales/eu-ES/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Berrezarri karga direktorioa", "Reset Vector Storage/Knowledge": "Berrezarri bektore biltegia/ezagutza", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Erantzunen jakinarazpenak ezin dira aktibatu webgunearen baimenak ukatu direlako. Mesedez, bisitatu zure nabigatzailearen ezarpenak beharrezko sarbidea emateko.", "Response splitting": "Erantzun banaketa", "Result": "Emaitza", diff --git a/src/lib/i18n/locales/fa-IR/translation.json b/src/lib/i18n/locales/fa-IR/translation.json index 95b1b7275f..3d4da3c907 100644 --- a/src/lib/i18n/locales/fa-IR/translation.json +++ b/src/lib/i18n/locales/fa-IR/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "نتیجه", diff --git a/src/lib/i18n/locales/fi-FI/translation.json b/src/lib/i18n/locales/fi-FI/translation.json index d0c2868037..0c1bd69034 100644 --- a/src/lib/i18n/locales/fi-FI/translation.json +++ b/src/lib/i18n/locales/fi-FI/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "Palauta kaikki mallit", "Reset Upload Directory": "Palauta latauspolku", "Reset Vector Storage/Knowledge": "Tyhjennä vektoritallennukset/tietämys", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Vastausilmoituksia ei voida ottaa käyttöön, koska verkkosivuston käyttöoikeudet on evätty. Myönnä tarvittavat käyttöoikeudet selaimesi asetuksista.", "Response splitting": "Vastauksen jakaminen", "Result": "Tulos", diff --git a/src/lib/i18n/locales/fr-CA/translation.json b/src/lib/i18n/locales/fr-CA/translation.json index 567e0e3486..b78af2489a 100644 --- a/src/lib/i18n/locales/fr-CA/translation.json +++ b/src/lib/i18n/locales/fr-CA/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Répertoire de téléchargement réinitialisé", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Les notifications de réponse ne peuvent pas être activées car les autorisations du site web ont été refusées. Veuillez visiter les paramètres de votre navigateur pour accorder l'accès nécessaire.", "Response splitting": "Fractionnement de la réponse", "Result": "", diff --git a/src/lib/i18n/locales/fr-FR/translation.json b/src/lib/i18n/locales/fr-FR/translation.json index 0071bfabc0..9d14ef8e95 100644 --- a/src/lib/i18n/locales/fr-FR/translation.json +++ b/src/lib/i18n/locales/fr-FR/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "Réinitialiser tous les modèles", "Reset Upload Directory": "Réinitialiser le répertoire de téléchargement", "Reset Vector Storage/Knowledge": "Réinitialiser le stockage vectoriel/connaissances", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Les notifications de réponse ne peuvent pas être activées car les autorisations du site web ont été refusées. Veuillez vérifier les paramètres de votre navigateur pour accorder l'accès nécessaire.", "Response splitting": "Fractionnement de la réponse", "Result": "Résultat", diff --git a/src/lib/i18n/locales/he-IL/translation.json b/src/lib/i18n/locales/he-IL/translation.json index 9aac5bdaba..c6b117520d 100644 --- a/src/lib/i18n/locales/he-IL/translation.json +++ b/src/lib/i18n/locales/he-IL/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/hi-IN/translation.json b/src/lib/i18n/locales/hi-IN/translation.json index dcb5208f07..a47e8a9fec 100644 --- a/src/lib/i18n/locales/hi-IN/translation.json +++ b/src/lib/i18n/locales/hi-IN/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/hr-HR/translation.json b/src/lib/i18n/locales/hr-HR/translation.json index 9dae6ad48c..4b5a0ad8dd 100644 --- a/src/lib/i18n/locales/hr-HR/translation.json +++ b/src/lib/i18n/locales/hr-HR/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Poništi upload direktorij", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/hu-HU/translation.json b/src/lib/i18n/locales/hu-HU/translation.json index dafeca0957..1897885a12 100644 --- a/src/lib/i18n/locales/hu-HU/translation.json +++ b/src/lib/i18n/locales/hu-HU/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Feltöltési könyvtár visszaállítása", "Reset Vector Storage/Knowledge": "Vektor tárhely/tudásbázis visszaállítása", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "A válasz értesítések nem aktiválhatók, mert a weboldal engedélyei meg lettek tagadva. Kérjük, látogasson el a böngésző beállításaihoz a szükséges hozzáférés megadásához.", "Response splitting": "Válasz felosztás", "Result": "Eredmény", diff --git a/src/lib/i18n/locales/id-ID/translation.json b/src/lib/i18n/locales/id-ID/translation.json index 9c98100fb3..9be7a696da 100644 --- a/src/lib/i18n/locales/id-ID/translation.json +++ b/src/lib/i18n/locales/id-ID/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Setel Ulang Direktori Unggahan", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Notifikasi respons tidak dapat diaktifkan karena izin situs web telah ditolak. Silakan kunjungi pengaturan browser Anda untuk memberikan akses yang diperlukan.", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/ie-GA/translation.json b/src/lib/i18n/locales/ie-GA/translation.json index 5e51d99043..84bc5be34d 100644 --- a/src/lib/i18n/locales/ie-GA/translation.json +++ b/src/lib/i18n/locales/ie-GA/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Athshocraigh Eolaire Uas", "Reset Vector Storage/Knowledge": "Athshocraigh Stóráil/Eolas Veicteoir", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Ní féidir fógraí freagartha a ghníomhachtú toisc gur diúltaíodh ceadanna an tsuímh Ghréasáin. Tabhair cuairt ar do shocruithe brabhsálaí chun an rochtain riachtanach a dheonú.", "Response splitting": "Scoilt freagartha", "Result": "Toradh", diff --git a/src/lib/i18n/locales/it-IT/translation.json b/src/lib/i18n/locales/it-IT/translation.json index b1cebc309e..db394dec74 100644 --- a/src/lib/i18n/locales/it-IT/translation.json +++ b/src/lib/i18n/locales/it-IT/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/ja-JP/translation.json b/src/lib/i18n/locales/ja-JP/translation.json index d184532796..5a42abf0e3 100644 --- a/src/lib/i18n/locales/ja-JP/translation.json +++ b/src/lib/i18n/locales/ja-JP/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "アップロードディレクトリをリセット", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "応答の分割", "Result": "", diff --git a/src/lib/i18n/locales/ka-GE/translation.json b/src/lib/i18n/locales/ka-GE/translation.json index 338ee22b14..53b518efd7 100644 --- a/src/lib/i18n/locales/ka-GE/translation.json +++ b/src/lib/i18n/locales/ka-GE/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/ko-KR/translation.json b/src/lib/i18n/locales/ko-KR/translation.json index d92b986682..41df46b8cc 100644 --- a/src/lib/i18n/locales/ko-KR/translation.json +++ b/src/lib/i18n/locales/ko-KR/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "업로드 디렉토리 초기화", "Reset Vector Storage/Knowledge": "벡터 저장 공간/지식 기반 초기화", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "웹사이트 권환과 같이 응답 알림이 활성화될 수 없습니다. 필요한 접근을 사용하기 위해 브라우져 설정을 확인 부탁드립니다.", "Response splitting": "응답 나누기", "Result": "결과", diff --git a/src/lib/i18n/locales/lt-LT/translation.json b/src/lib/i18n/locales/lt-LT/translation.json index b0c257f889..2df87de13d 100644 --- a/src/lib/i18n/locales/lt-LT/translation.json +++ b/src/lib/i18n/locales/lt-LT/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Atkurti įkėlimų direktoiją", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Naršyklė neleidžia siųsti pranešimų", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/ms-MY/translation.json b/src/lib/i18n/locales/ms-MY/translation.json index b5698fb2fa..5030087b00 100644 --- a/src/lib/i18n/locales/ms-MY/translation.json +++ b/src/lib/i18n/locales/ms-MY/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Tetapkan Semula Direktori Muat Naik", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Pemberitahuan respons tidak boleh diaktifkan kerana kebenaran tapak web tidak diberi. Sila lawati tetapan pelayar web anda untuk memberikan akses yang diperlukan.", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/nb-NO/translation.json b/src/lib/i18n/locales/nb-NO/translation.json index f27507b3b8..0b3f13961d 100644 --- a/src/lib/i18n/locales/nb-NO/translation.json +++ b/src/lib/i18n/locales/nb-NO/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Tilbakestill opplastingskatalog", "Reset Vector Storage/Knowledge": "Tilbakestill Vector-lagring/kunnskap", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Svar-varsler kan ikke aktiveres fordi tilgang til nettstedet er nektet. Gå til nettleserinnstillingene dine for å gi den nødvendige tilgangen.", "Response splitting": "Oppdeling av svar", "Result": "Resultat", diff --git a/src/lib/i18n/locales/nl-NL/translation.json b/src/lib/i18n/locales/nl-NL/translation.json index 4d038785f8..6335c5f850 100644 --- a/src/lib/i18n/locales/nl-NL/translation.json +++ b/src/lib/i18n/locales/nl-NL/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "Herstel alle modellen", "Reset Upload Directory": "Herstel Uploadmap", "Reset Vector Storage/Knowledge": "Herstel Vectoropslag/-kennis", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Antwoordmeldingen kunnen niet worden geactiveerd omdat de rechten voor de website zijn geweigerd. Ga naar de instellingen van uw browser om de benodigde toegang te verlenen.", "Response splitting": "Antwoord splitsing", "Result": "Resultaat", diff --git a/src/lib/i18n/locales/pa-IN/translation.json b/src/lib/i18n/locales/pa-IN/translation.json index be887e1b01..2d66508e1a 100644 --- a/src/lib/i18n/locales/pa-IN/translation.json +++ b/src/lib/i18n/locales/pa-IN/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/pl-PL/translation.json b/src/lib/i18n/locales/pl-PL/translation.json index 9ceb41c66b..6c0aaea630 100644 --- a/src/lib/i18n/locales/pl-PL/translation.json +++ b/src/lib/i18n/locales/pl-PL/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/pt-BR/translation.json b/src/lib/i18n/locales/pt-BR/translation.json index 3dcebb6bec..37bfd1b653 100644 --- a/src/lib/i18n/locales/pt-BR/translation.json +++ b/src/lib/i18n/locales/pt-BR/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Redefinir Diretório de Upload", "Reset Vector Storage/Knowledge": "Redefinir Armazenamento de Vetores/Conhecimento", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Notificações de resposta não podem ser ativadas pois as permissões do site foram negadas. Por favor, visite as configurações do seu navegador para conceder o acesso necessário.", "Response splitting": "Divisão da Resposta", "Result": "Resultado", diff --git a/src/lib/i18n/locales/pt-PT/translation.json b/src/lib/i18n/locales/pt-PT/translation.json index 2313b86768..7d4c90e21d 100644 --- a/src/lib/i18n/locales/pt-PT/translation.json +++ b/src/lib/i18n/locales/pt-PT/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Limpar Pasta de Carregamento", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/ro-RO/translation.json b/src/lib/i18n/locales/ro-RO/translation.json index c26dbb193e..535e1903e9 100644 --- a/src/lib/i18n/locales/ro-RO/translation.json +++ b/src/lib/i18n/locales/ro-RO/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Resetează Directorul de Încărcare", "Reset Vector Storage/Knowledge": "Resetarea Stocării/Vectoului de Cunoștințe", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Notificările de răspuns nu pot fi activate deoarece permisiunile site-ului au fost refuzate. Vă rugăm să vizitați setările browserului pentru a acorda accesul necesar.", "Response splitting": "Împărțirea răspunsurilor", "Result": "Rezultat", diff --git a/src/lib/i18n/locales/ru-RU/translation.json b/src/lib/i18n/locales/ru-RU/translation.json index cd6e17adb4..e60b76098e 100644 --- a/src/lib/i18n/locales/ru-RU/translation.json +++ b/src/lib/i18n/locales/ru-RU/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Сбросить каталог загрузок", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Уведомления об ответах не могут быть активированы, поскольку доступ к веб-сайту был заблокирован. Пожалуйста, перейдите к настройкам своего браузера, чтобы предоставить необходимый доступ.", "Response splitting": "Разделение ответов", "Result": "", diff --git a/src/lib/i18n/locales/sk-SK/translation.json b/src/lib/i18n/locales/sk-SK/translation.json index 208c58e826..143b27c40e 100644 --- a/src/lib/i18n/locales/sk-SK/translation.json +++ b/src/lib/i18n/locales/sk-SK/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Resetovať adresár nahrávania", "Reset Vector Storage/Knowledge": "Resetovanie úložiska vektorov/znalostí", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Oznámenia o odpovediach nie je možné aktivovať, pretože povolenia webu boli zamietnuté. Navštívte nastavenia svojho prehliadača a povoľte potrebný prístup.", "Response splitting": "Rozdelenie odpovede", "Result": "Výsledok", diff --git a/src/lib/i18n/locales/sr-RS/translation.json b/src/lib/i18n/locales/sr-RS/translation.json index 9508a77d09..b9fd76245b 100644 --- a/src/lib/i18n/locales/sr-RS/translation.json +++ b/src/lib/i18n/locales/sr-RS/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/sv-SE/translation.json b/src/lib/i18n/locales/sv-SE/translation.json index a62de812ae..cd4b32b7ec 100644 --- a/src/lib/i18n/locales/sv-SE/translation.json +++ b/src/lib/i18n/locales/sv-SE/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Återställ uppladdningskatalog", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/th-TH/translation.json b/src/lib/i18n/locales/th-TH/translation.json index 81e4724568..ca79e28903 100644 --- a/src/lib/i18n/locales/th-TH/translation.json +++ b/src/lib/i18n/locales/th-TH/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "รีเซ็ตไดเร็กทอรีการอัปโหลด", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "ไม่สามารถเปิดการแจ้งเตือนการตอบสนองได้เนื่องจากเว็บไซต์ปฏิเสธ กรุณาเข้าการตั้งค่าเบราว์เซอร์ของคุณเพื่อให้สิทธิ์การเข้าถึงที่จำเป็น", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/tk-TW/translation.json b/src/lib/i18n/locales/tk-TW/translation.json index f98dd0af17..4aa68bf79d 100644 --- a/src/lib/i18n/locales/tk-TW/translation.json +++ b/src/lib/i18n/locales/tk-TW/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/tr-TR/translation.json b/src/lib/i18n/locales/tr-TR/translation.json index 53a87ae691..5a0666b16d 100644 --- a/src/lib/i18n/locales/tr-TR/translation.json +++ b/src/lib/i18n/locales/tr-TR/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Yükleme Dizinini Sıfırla", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Web sitesi izinleri reddedildiğinden yanıt bildirimleri etkinleştirilemiyor. Gerekli erişimi sağlamak için lütfen tarayıcı ayarlarınızı ziyaret edin.", "Response splitting": "Yanıt bölme", "Result": "", diff --git a/src/lib/i18n/locales/uk-UA/translation.json b/src/lib/i18n/locales/uk-UA/translation.json index f8b3dc346b..3d089bc692 100644 --- a/src/lib/i18n/locales/uk-UA/translation.json +++ b/src/lib/i18n/locales/uk-UA/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "Скинути всі моделі", "Reset Upload Directory": "Скинути каталог завантажень", "Reset Vector Storage/Knowledge": "Скинути векторне сховище/Знання", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Сповіщення про відповіді не можуть бути активовані, оскільки вам було відмовлено в доступі до веб-сайту. Будь ласка, відвідайте налаштування вашого браузера, щоб надати необхідний доступ.", "Response splitting": "Розбиття відповіді", "Result": "Результат", diff --git a/src/lib/i18n/locales/ur-PK/translation.json b/src/lib/i18n/locales/ur-PK/translation.json index 5c08806962..9eceee7257 100644 --- a/src/lib/i18n/locales/ur-PK/translation.json +++ b/src/lib/i18n/locales/ur-PK/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "اپلوڈ ڈائریکٹری کو ری سیٹ کریں", "Reset Vector Storage/Knowledge": "ویكٹر اسٹوریج/علم کو ری سیٹ کریں", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "جواب کی اطلاعات کو فعال نہیں کیا جا سکتا کیونکہ ویب سائٹ کی اجازتیں مسترد کر دی گئی ہیں براہ کرم اپنے براؤزر کی سیٹنگز پر جائیں تاکہ ضروری رسائی کی اجازت دے سکیں", "Response splitting": "جواب کو تقسیم کرنا", "Result": "نتیجہ", diff --git a/src/lib/i18n/locales/vi-VN/translation.json b/src/lib/i18n/locales/vi-VN/translation.json index 5f5469433f..084cbf2f06 100644 --- a/src/lib/i18n/locales/vi-VN/translation.json +++ b/src/lib/i18n/locales/vi-VN/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "", "Reset Upload Directory": "Xóa toàn bộ thư mục Upload", "Reset Vector Storage/Knowledge": "", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Không thể kích hoạt thông báo vì trang web không cấp quyền. Vui lòng truy cập cài đặt trình duyệt của bạn để cấp quyền cần thiết.", "Response splitting": "", "Result": "", diff --git a/src/lib/i18n/locales/zh-CN/translation.json b/src/lib/i18n/locales/zh-CN/translation.json index 9b7d6f7ae0..950b2d3578 100644 --- a/src/lib/i18n/locales/zh-CN/translation.json +++ b/src/lib/i18n/locales/zh-CN/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "重置所有模型", "Reset Upload Directory": "重置上传目录", "Reset Vector Storage/Knowledge": "重置向量存储/知识", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "无法激活回复时发送通知。请检查浏览器设置,并授予必要的访问权限。", "Response splitting": "拆分回复", "Result": "结果", diff --git a/src/lib/i18n/locales/zh-TW/translation.json b/src/lib/i18n/locales/zh-TW/translation.json index 140256656c..ae88e0978c 100644 --- a/src/lib/i18n/locales/zh-TW/translation.json +++ b/src/lib/i18n/locales/zh-TW/translation.json @@ -747,6 +747,7 @@ "Reset All Models": "重設所有模型", "Reset Upload Directory": "重設上傳目錄", "Reset Vector Storage/Knowledge": "重設向量儲存或知識", + "Reset view": "", "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "無法啟用回應通知,因為網站權限已遭拒。請前往瀏覽器設定以授予必要存取權限。", "Response splitting": "回應分割", "Result": "結果", From f7d1833f4156845e3419141ebfe5cc223eb0fb4d Mon Sep 17 00:00:00 2001 From: cvaz1306 Date: Sat, 28 Dec 2024 15:50:23 -0800 Subject: [PATCH 2/2] Fixing formatting --- src/lib/components/common/SVGPanZoom.svelte | 12 ++++++------ src/lib/components/icons/Reset.svelte | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/lib/components/common/SVGPanZoom.svelte b/src/lib/components/common/SVGPanZoom.svelte index 08f620d620..9a2b0fd6ef 100644 --- a/src/lib/components/common/SVGPanZoom.svelte +++ b/src/lib/components/common/SVGPanZoom.svelte @@ -29,12 +29,12 @@ zoomSpeed: 0.065 }); } -function resetPanZoomViewport() { - console.log('Reset View'); - instance.moveTo(0, 0); - instance.zoomAbs(0, 0, 1); - console.log(instance.getTransform()); -} + function resetPanZoomViewport() { + console.log('Reset View'); + instance.moveTo(0, 0); + instance.zoomAbs(0, 0, 1); + console.log(instance.getTransform()); + }
diff --git a/src/lib/components/icons/Reset.svelte b/src/lib/components/icons/Reset.svelte index f57a6aaa24..c1263fd38a 100644 --- a/src/lib/components/icons/Reset.svelte +++ b/src/lib/components/icons/Reset.svelte @@ -2,8 +2,8 @@ export let className = 'size-4'; - - - \ No newline at end of file + + +