chore: format
This commit is contained in:
@@ -122,16 +122,16 @@
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.skills}
|
||||
<a
|
||||
class="min-w-fit p-1.5 {$page.url.pathname.includes('/workspace/skills')
|
||||
? ''
|
||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition"
|
||||
href="/workspace/skills"
|
||||
>
|
||||
{$i18n.t('Skills')}
|
||||
</a>
|
||||
{/if}
|
||||
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.skills}
|
||||
<a
|
||||
class="min-w-fit p-1.5 {$page.url.pathname.includes('/workspace/skills')
|
||||
? ''
|
||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition"
|
||||
href="/workspace/skills"
|
||||
>
|
||||
{$i18n.t('Skills')}
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -35,17 +35,15 @@
|
||||
content: updatedPrompt.content,
|
||||
version_id: updatedPrompt.version_id,
|
||||
tags: updatedPrompt.tags,
|
||||
access_grants: updatedPrompt?.access_grants === undefined ? [] : updatedPrompt?.access_grants
|
||||
access_grants:
|
||||
updatedPrompt?.access_grants === undefined ? [] : updatedPrompt?.access_grants
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
onMount(async () => {
|
||||
if (promptId) {
|
||||
const _prompt = await getPromptById(
|
||||
localStorage.token,
|
||||
promptId
|
||||
).catch((error) => {
|
||||
const _prompt = await getPromptById(localStorage.token, promptId).catch((error) => {
|
||||
toast.error(`${error}`);
|
||||
return null;
|
||||
});
|
||||
|
||||
@@ -33,8 +33,7 @@
|
||||
description: updatedSkill.description,
|
||||
content: updatedSkill.content,
|
||||
is_active: updatedSkill.is_active,
|
||||
access_grants:
|
||||
updatedSkill?.access_grants === undefined ? [] : updatedSkill?.access_grants
|
||||
access_grants: updatedSkill?.access_grants === undefined ? [] : updatedSkill?.access_grants
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -54,8 +53,7 @@
|
||||
description: _skill.description,
|
||||
content: _skill.content,
|
||||
is_active: _skill.is_active,
|
||||
access_grants:
|
||||
_skill?.access_grants === undefined ? [] : _skill?.access_grants
|
||||
access_grants: _skill?.access_grants === undefined ? [] : _skill?.access_grants
|
||||
};
|
||||
} else {
|
||||
goto('/workspace/skills');
|
||||
|
||||
Reference in New Issue
Block a user