From 0deafb4a003ca01c9810d2fa407247af97f0c61d Mon Sep 17 00:00:00 2001 From: KoloMl Date: Fri, 8 Aug 2025 20:41:55 +0400 Subject: [PATCH] Warn user of potentially different/unknown site imports --- src/routes/transporting/import/+page.svelte | 31 +++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/src/routes/transporting/import/+page.svelte b/src/routes/transporting/import/+page.svelte index 8020297..ddc744d 100644 --- a/src/routes/transporting/import/+page.svelte +++ b/src/routes/transporting/import/+page.svelte @@ -13,6 +13,7 @@ import ProfileView from "$components/features/ProfileView.svelte"; import GroupView from "$components/features/GroupView.svelte"; import { goto } from "$app/navigation"; + import type { SameSiteStatus } from "$lib/extension/EntitiesTransporter"; let importedString = $state(''); let errorMessage = $state(''); @@ -50,6 +51,8 @@ const transporter = new BulkEntitiesTransporter(); + let lastImportStatus = $state(null); + function tryBulkImport() { importedProfiles = []; importedGroups = []; @@ -75,6 +78,8 @@ return; } + lastImportStatus = transporter.lastImportSameSiteStatus; + if (importedEntities.length) { for (const targetImportedEntity of importedEntities) { switch (targetImportedEntity.type) { @@ -180,7 +185,25 @@ {:else} Cancel Import -
+ {#if lastImportStatus !== 'same'} +
+ {/if} +
+ {#if lastImportStatus === "different"} +

+ Warning! + Looks like these entities were exported for the different extension! There are many differences between tagging + systems of Furobooru and Derpibooru, so make sure to check if these settings are correct before using them! +

+ {/if} + {#if lastImportStatus === 'unknown'} +

+ Warning! + We couldn't verify if these settings are meant for this site or not. There are many differences between tagging + systems of Furbooru and Derpibooru, so make sure to check if these settings are correct before using them. +

+ {/if} + {#if importedProfiles.length}
@@ -234,7 +257,7 @@