1
0
mirror of https://github.com/koloml/furbooru-tagging-assistant.git synced 2025-12-24 07:12:57 +00:00

Extracted the logic of previewing the tagging profiles into component

This commit is contained in:
2024-07-07 19:08:31 +04:00
parent b240c2aefe
commit d3fc78533d
2 changed files with 36 additions and 26 deletions

View File

@@ -4,6 +4,7 @@
import {page} from "$app/stores";
import {goto} from "$app/navigation";
import {activeProfileStore, maintenanceProfilesStore} from "$stores/maintenance-profiles-store.js";
import ProfileView from "$components/maintenance/ProfileView.svelte";
const profileId = $page.params.id;
/** @type {import('$lib/extension/entities/MaintenanceProfile.js').default|null} */
@@ -41,18 +42,7 @@
<hr>
</Menu>
{#if profile}
<div class="block">
<strong>Profile:</strong>
<div>{profile.settings.name}</div>
</div>
<div class="block">
<strong>Tags:</strong>
<div class="tags-list">
{#each profile.settings.tags as tagName}
<span class="tag">{tagName}</span>
{/each}
</div>
</div>
<ProfileView {profile}/>
{/if}
<Menu>
<hr>
@@ -70,18 +60,4 @@
</Menu>
<style lang="scss">
.tags-list {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.block + .block {
margin-top: .5em;
strong {
display: block;
margin-bottom: .25em;
}
}
</style>