diff --git a/src/app.d.ts b/src/app.d.ts index ffec69b..d56ae6a 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -1,6 +1,6 @@ // See https://kit.svelte.dev/docs/types#app // for information about these interfaces -import MaintenanceProfile from "$entities/MaintenanceProfile"; +import TaggingProfile from "$entities/TaggingProfile"; import type TagGroup from "$entities/TagGroup"; declare global { @@ -37,7 +37,7 @@ declare global { ); interface EntityNamesMap { - profiles: MaintenanceProfile; + profiles: TaggingProfile; groups: TagGroup; } diff --git a/src/components/features/ProfileView.svelte b/src/components/features/ProfileView.svelte index d39f965..ed97361 100644 --- a/src/components/features/ProfileView.svelte +++ b/src/components/features/ProfileView.svelte @@ -1,8 +1,8 @@ {#if activeProfile} - + Active Profile: {activeProfile.settings.name}
{/if} - Tagging Profiles + Tagging Profiles Tag Groups
Import/Export diff --git a/src/routes/features/+page.svelte b/src/routes/features/+page.svelte index 5ae405f..216b5d2 100644 --- a/src/routes/features/+page.svelte +++ b/src/routes/features/+page.svelte @@ -6,5 +6,5 @@ Back
- Tagging Profiles + Tagging Profiles
diff --git a/src/routes/features/maintenance/+page.svelte b/src/routes/features/profiles/+page.svelte similarity index 58% rename from src/routes/features/maintenance/+page.svelte rename to src/routes/features/profiles/+page.svelte index 3c66f72..5841977 100644 --- a/src/routes/features/maintenance/+page.svelte +++ b/src/routes/features/profiles/+page.svelte @@ -2,45 +2,45 @@ import Menu from "$components/ui/menu/Menu.svelte"; import MenuItem from "$components/ui/menu/MenuItem.svelte"; import MenuRadioItem from "$components/ui/menu/MenuRadioItem.svelte"; - import { activeProfileStore, maintenanceProfiles } from "$stores/entities/maintenance-profiles"; - import MaintenanceProfile from "$entities/MaintenanceProfile"; + import { activeTaggingProfile, taggingProfiles } from "$stores/entities/tagging-profiles"; + import TaggingProfile from "$entities/TaggingProfile"; import { popupTitle } from "$stores/popup"; $popupTitle = 'Tagging Profiles'; - let profiles = $derived( - $maintenanceProfiles.sort((a, b) => a.settings.name.localeCompare(b.settings.name)) + let profiles = $derived( + $taggingProfiles.sort((a, b) => a.settings.name.localeCompare(b.settings.name)) ); function resetActiveProfile() { - $activeProfileStore = null; + $activeTaggingProfile = null; } function enableSelectedProfile(event: Event) { const target = event.target; if (target instanceof HTMLInputElement && target.checked) { - activeProfileStore.set(target.value); + activeTaggingProfile.set(target.value); } } Back - Create New + Create New {#if profiles.length}
{/if} {#each profiles as profile} - {profile.settings.name} {/each}
Reset Active Profile - Import Profile + Import Profile
diff --git a/src/routes/features/maintenance/[id]/+page.svelte b/src/routes/features/profiles/[id]/+page.svelte similarity index 53% rename from src/routes/features/maintenance/[id]/+page.svelte rename to src/routes/features/profiles/[id]/+page.svelte index f304bf4..1c2c09c 100644 --- a/src/routes/features/maintenance/[id]/+page.svelte +++ b/src/routes/features/profiles/[id]/+page.svelte @@ -3,26 +3,26 @@ import MenuItem from "$components/ui/menu/MenuItem.svelte"; import { page } from "$app/state"; import { goto } from "$app/navigation"; - import { activeProfileStore, maintenanceProfiles } from "$stores/entities/maintenance-profiles"; + import { activeTaggingProfile, taggingProfiles } from "$stores/entities/tagging-profiles"; import ProfileView from "$components/features/ProfileView.svelte"; import MenuCheckboxItem from "$components/ui/menu/MenuCheckboxItem.svelte"; - import MaintenanceProfile from "$entities/MaintenanceProfile"; + import TaggingProfile from "$entities/TaggingProfile"; import { popupTitle } from "$stores/popup"; let profileId = $derived(page.params.id); - let profile = $derived( - $maintenanceProfiles.find(profile => profile.id === profileId) || null + let profile = $derived( + $taggingProfiles.find(profile => profile.id === profileId) || null ); $effect(() => { if (profileId === 'new') { - goto('/features/maintenance/new/edit'); + goto('/features/profiles/new/edit'); return; } if (!profile) { console.warn(`Profile ${profileId} not found.`); - goto('/features/maintenance'); + goto('/features/profiles'); } else { $popupTitle = `Tagging Profile: ${profile.settings.name}`; } @@ -31,22 +31,22 @@ let isActiveProfile = $state(false); $effect.pre(() => { - isActiveProfile = $activeProfileStore === profileId; + isActiveProfile = $activeTaggingProfile === profileId; }); $effect(() => { - if (isActiveProfile && $activeProfileStore !== profileId) { - $activeProfileStore = profileId; + if (isActiveProfile && $activeTaggingProfile !== profileId) { + $activeTaggingProfile = profileId; } - if (!isActiveProfile && $activeProfileStore === profileId) { - $activeProfileStore = null; + if (!isActiveProfile && $activeTaggingProfile === profileId) { + $activeTaggingProfile = null; } }); - Back + Back
{#if profile} @@ -54,14 +54,14 @@ {/if}
- Edit Profile + Edit Profile Activate Profile - + Export Profile - + Delete Profile
diff --git a/src/routes/features/maintenance/[id]/delete/+page.svelte b/src/routes/features/profiles/[id]/delete/+page.svelte similarity index 64% rename from src/routes/features/maintenance/[id]/delete/+page.svelte rename to src/routes/features/profiles/[id]/delete/+page.svelte index b487d06..67fce00 100644 --- a/src/routes/features/maintenance/[id]/delete/+page.svelte +++ b/src/routes/features/profiles/[id]/delete/+page.svelte @@ -3,18 +3,18 @@ import Menu from "$components/ui/menu/Menu.svelte"; import MenuItem from "$components/ui/menu/MenuItem.svelte"; import { page } from "$app/state"; - import { maintenanceProfiles } from "$stores/entities/maintenance-profiles"; - import MaintenanceProfile from "$entities/MaintenanceProfile"; + import { taggingProfiles } from "$stores/entities/tagging-profiles"; + import TaggingProfile from "$entities/TaggingProfile"; import { popupTitle } from "$stores/popup"; const profileId = $derived(page.params.id); - const targetProfile = $derived( - $maintenanceProfiles.find(profile => profile.id === profileId) || null + const targetProfile = $derived( + $taggingProfiles.find(profile => profile.id === profileId) || null ); $effect(() => { if (!targetProfile) { - goto('/features/maintenance'); + goto('/features/profiles'); } else { $popupTitle = `Deleting Tagging Profile: ${targetProfile.settings.name}` } @@ -27,12 +27,12 @@ } await targetProfile.delete(); - await goto('/features/maintenance'); + await goto('/features/profiles'); } - Back + Back
{#if targetProfile} @@ -42,7 +42,7 @@
Yes - No + No
{:else}

Loading...

diff --git a/src/routes/features/maintenance/[id]/edit/+page.svelte b/src/routes/features/profiles/[id]/edit/+page.svelte similarity index 76% rename from src/routes/features/maintenance/[id]/edit/+page.svelte rename to src/routes/features/profiles/[id]/edit/+page.svelte index 504700b..63bff1c 100644 --- a/src/routes/features/maintenance/[id]/edit/+page.svelte +++ b/src/routes/features/profiles/[id]/edit/+page.svelte @@ -7,19 +7,19 @@ import FormContainer from "$components/ui/forms/FormContainer.svelte"; import { page } from "$app/state"; import { goto } from "$app/navigation"; - import { maintenanceProfiles } from "$stores/entities/maintenance-profiles"; - import MaintenanceProfile from "$entities/MaintenanceProfile"; + import { taggingProfiles } from "$stores/entities/tagging-profiles"; + import TaggingProfile from "$entities/TaggingProfile"; import { popupTitle } from "$stores/popup"; let profileId = $derived(page.params.id); - let targetProfile = $derived.by(() => { + let targetProfile = $derived.by(() => { if (profileId === 'new') { - return new MaintenanceProfile(crypto.randomUUID(), {}); + return new TaggingProfile(crypto.randomUUID(), {}); } - return $maintenanceProfiles.find(profile => profile.id === profileId) || null; + return $taggingProfiles.find(profile => profile.id === profileId) || null; }); let profileName = $state(''); @@ -32,7 +32,7 @@ } if (!targetProfile) { - goto('/features/maintenance'); + goto('/features/profiles'); return; } @@ -53,12 +53,12 @@ targetProfile.settings.temporary = false; await targetProfile.save(); - await goto('/features/maintenance/' + targetProfile.id); + await goto('/features/profiles/' + targetProfile.id); } - + Back
diff --git a/src/routes/features/maintenance/[id]/export/+page.svelte b/src/routes/features/profiles/[id]/export/+page.svelte similarity index 76% rename from src/routes/features/maintenance/[id]/export/+page.svelte rename to src/routes/features/profiles/[id]/export/+page.svelte index c85e236..db039f9 100644 --- a/src/routes/features/maintenance/[id]/export/+page.svelte +++ b/src/routes/features/profiles/[id]/export/+page.svelte @@ -1,31 +1,31 @@ - + Back
diff --git a/src/routes/features/maintenance/import/+page.svelte b/src/routes/features/profiles/import/+page.svelte similarity index 80% rename from src/routes/features/maintenance/import/+page.svelte rename to src/routes/features/profiles/import/+page.svelte index 19202fd..f1b9f12 100644 --- a/src/routes/features/maintenance/import/+page.svelte +++ b/src/routes/features/profiles/import/+page.svelte @@ -2,22 +2,22 @@ import Menu from "$components/ui/menu/Menu.svelte"; import MenuItem from "$components/ui/menu/MenuItem.svelte"; import FormContainer from "$components/ui/forms/FormContainer.svelte"; - import MaintenanceProfile from "$entities/MaintenanceProfile"; + import TaggingProfile from "$entities/TaggingProfile"; import FormControl from "$components/ui/forms/FormControl.svelte"; import ProfileView from "$components/features/ProfileView.svelte"; - import { maintenanceProfiles } from "$stores/entities/maintenance-profiles"; + import { taggingProfiles } from "$stores/entities/tagging-profiles"; import { goto } from "$app/navigation"; import EntitiesTransporter from "$lib/extension/EntitiesTransporter"; import { popupTitle } from "$stores/popup"; import Notice from "$components/ui/Notice.svelte"; - const profilesTransporter = new EntitiesTransporter(MaintenanceProfile); + const profilesTransporter = new EntitiesTransporter(TaggingProfile); let importedString = $state(''); let errorMessage = $state(''); - let candidateProfile = $state(null); - let existingProfile = $state(null); + let candidateProfile = $state(null); + let existingProfile = $state(null); $effect(() => { $popupTitle = candidateProfile @@ -49,7 +49,7 @@ } if (candidateProfile) { - existingProfile = $maintenanceProfiles.find(profile => profile.id === candidateProfile?.id) ?? null; + existingProfile = $taggingProfiles.find(profile => profile.id === candidateProfile?.id) ?? null; } } @@ -59,7 +59,7 @@ } candidateProfile.save().then(() => { - goto(`/features/maintenance`); + goto(`/features/profiles`); }); } @@ -68,16 +68,16 @@ return; } - const clonedProfile = new MaintenanceProfile(crypto.randomUUID(), candidateProfile.settings); + const clonedProfile = new TaggingProfile(crypto.randomUUID(), candidateProfile.settings); clonedProfile.settings.name += ` (Clone ${new Date().toISOString()})`; clonedProfile.save().then(() => { - goto(`/features/maintenance`); + goto(`/features/profiles`); }); } - Back + Back
{#if errorMessage} diff --git a/src/routes/preferences/tags/+page.svelte b/src/routes/preferences/tags/+page.svelte index a9e4df2..0187835 100644 --- a/src/routes/preferences/tags/+page.svelte +++ b/src/routes/preferences/tags/+page.svelte @@ -4,12 +4,12 @@ import FormControl from "$components/ui/forms/FormControl.svelte"; import Menu from "$components/ui/menu/Menu.svelte"; import MenuItem from "$components/ui/menu/MenuItem.svelte"; - import { stripBlacklistedTagsEnabled } from "$stores/preferences/maintenance"; + import { stripBlacklistedTagsEnabled } from "$stores/preferences/profiles"; import { shouldReplaceLinksOnForumPosts, shouldReplaceTextOfTagLinks, shouldSeparateTagGroups - } from "$stores/preferences/tag"; + } from "$stores/preferences/tags"; import { popupTitle } from "$stores/popup"; $popupTitle = 'Tagging Preferences'; diff --git a/src/routes/transporting/export/+page.svelte b/src/routes/transporting/export/+page.svelte index 438f124..ed63fc7 100644 --- a/src/routes/transporting/export/+page.svelte +++ b/src/routes/transporting/export/+page.svelte @@ -1,7 +1,7 @@