{ 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 $user?.role === 'admin' || $user?.permissions?.features?.automations} { if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) return; e.preventDefault(); show = false; goto('/automations'); if ($mobile) { await tick(); showSidebar.set(false); } }} >
{$i18n.t('Automations')}
{/if} {#if role === 'admin'} { if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) { return; } e.preventDefault(); show = false; goto('/playground'); if ($mobile) { await tick(); showSidebar.set(false); } }} >
{$i18n.t('Playground')}
{ 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 help}
{#if $user?.role === 'admin'} { show = false; }} >
{$i18n.t('Documentation')}
{ show = false; }} >
{$i18n.t('Releases')}
{/if} {/if}
{#if showActiveUsers && ($config?.features?.enable_public_active_users_count || role === 'admin') && usage} {#if usage?.user_count}
0 ? `${$i18n.t('Running')}: ${usage.model_ids.join(', ')} ✨` : ''} >
{ if ($config?.features?.enable_public_active_users_count || role === 'admin') { getUsageInfo(); } }} >
{$i18n.t('Active Users')}: {usage?.user_count}
{/if} {/if}