mirror of
https://github.com/koloml/furbooru-tagging-assistant.git
synced 2025-12-23 23:02:58 +00:00
Deleting profile from the profile editor page
This commit is contained in:
@@ -57,6 +57,16 @@
|
||||
await goto('/settings/maintenance/' + targetProfile.id);
|
||||
}
|
||||
|
||||
async function deleteProfile() {
|
||||
if (!targetProfile) {
|
||||
console.warn('Attempting to delete the profile, but the profile is not loaded yet.');
|
||||
return;
|
||||
}
|
||||
|
||||
await targetProfile.delete();
|
||||
await goto('/settings/maintenance');
|
||||
}
|
||||
|
||||
onDestroy(unsubscribeFromProfiles);
|
||||
</script>
|
||||
|
||||
@@ -77,4 +87,7 @@
|
||||
<Menu>
|
||||
<hr>
|
||||
<MenuLink href="#" on:click={saveProfile}>Save Profile</MenuLink>
|
||||
{#if profileId !== 'new'}
|
||||
<MenuLink href="#" on:click={deleteProfile}>Delete Profile</MenuLink>
|
||||
{/if}
|
||||
</Menu>
|
||||
|
||||
Reference in New Issue
Block a user