{ if (e.key === 'Shift') shiftKey = true; }} on:keyup={(e) => { if (e.key === 'Shift') shiftKey = false; }} /> { user.set(await getSessionUser(localStorage.token)); }} />
{#if profile}
profile
{$user.name}
{#if $user?.is_active ?? true}
{$i18n.t('Active')} {:else}
{$i18n.t('Away')} {/if}
{#if $user?.status_emoji || $user?.status_message}
{:else}
{/if}
{/if} {#if role === 'admin'} { if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) { return; } e.preventDefault(); show = false; goto('/admin'); if ($mobile) { await tick(); showSidebar.set(false); } }} >
{$i18n.t('Admin Panel')}
{/if}
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.models || $user?.permissions?.workspace?.knowledge || $user?.permissions?.workspace?.prompts || $user?.permissions?.workspace?.tools} {/if} {#if ($config?.features?.enable_notes ?? false) && ($user?.role === 'admin' || ($user?.permissions?.features?.notes ?? true))} {/if} {#if $config?.features?.enable_calendar && ($user?.role === 'admin' || $user?.permissions?.features?.calendar)} {/if} {#if $config?.features?.enable_automations && ($user?.role === 'admin' || $user?.permissions?.features?.automations)} {/if} {#if role === 'admin'} {/if} {#if help}
{#if $user?.role === 'admin'} { show = false; }} >
{$i18n.t('Documentation')}
{/if} {/if}