{ // console.log('submit'); await updateUserPermissions(localStorage.token, permissions); await updateModelFilterConfig(localStorage.token, whitelistEnabled, whitelistModels); saveHandler(); }} >
{$i18n.t('User Permissions')}
{$i18n.t('Allow Chat Deletion')}
{ permissions.chat.deletion = !permissions.chat.deletion; }} type="button" > {#if permissions.chat.deletion}
{$i18n.t('Allow')}
{:else}
{$i18n.t("Don't Allow")}
{/if}
Manage Models
Model Whitelisting
{ whitelistEnabled = !whitelistEnabled; }}>{whitelistEnabled ? 'On' : 'Off'}
{#if whitelistEnabled}
{#each whitelistModels as modelId, modelIdx}
Select a model
{#each $models.filter((model) => model.id) as model}
{model.name}
{/each}
{#if modelIdx === 0}
{ if (whitelistModels.at(-1) !== '') { whitelistModels = [...whitelistModels, '']; } }} >
{:else}
{ whitelistModels.splice(modelIdx, 1); whitelistModels = whitelistModels; }} >
{/if}
{/each}
{whitelistModels.length} Model(s) Whitelisted
{/if}
{$i18n.t('Save')}