mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-30 04:29:05 +01:00
refactor: use paraglide markup instead of custom implementation
This commit is contained in:
@@ -42,9 +42,9 @@
|
||||
<ShieldPlus class="text-primary/80 size-5" />
|
||||
{m.create_api_key()}
|
||||
</Card.Title>
|
||||
<Card.Description
|
||||
><FormattedMessage m={m.add_a_new_api_key_for_programmatic_access()} /></Card.Description
|
||||
>
|
||||
<Card.Description>
|
||||
<FormattedMessage message={m.add_a_new_api_key_for_programmatic_access} />
|
||||
</Card.Description>
|
||||
</div>
|
||||
{#if !expandAddApiKey}
|
||||
<Button class="w-full md:w-auto" onclick={() => (expandAddApiKey = true)}
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
<LucidePlus class="text-primary/80 size-5" />
|
||||
{m.create_api()}
|
||||
</Card.Title>
|
||||
<Card.Description
|
||||
><FormattedMessage m={m.create_a_new_api_description()} /></Card.Description
|
||||
>
|
||||
<Card.Description>
|
||||
<FormattedMessage message={m.create_a_new_api_description} />
|
||||
</Card.Description>
|
||||
</div>
|
||||
{#if !expandAddApi}
|
||||
<Button class="w-full md:w-auto" onclick={() => (expandAddApi = true)}
|
||||
|
||||
@@ -127,7 +127,10 @@
|
||||
function disableGroupRestriction() {
|
||||
openConfirmDialog({
|
||||
title: m.unrestrict_oidc_client({ clientName: client.name }),
|
||||
message: m.confirm_unrestrict_oidc_client_description({ clientName: client.name }),
|
||||
message: {
|
||||
message: m.confirm_unrestrict_oidc_client_description,
|
||||
inputs: { clientName: client.name }
|
||||
},
|
||||
confirm: {
|
||||
label: m.unrestrict(),
|
||||
destructive: true,
|
||||
@@ -373,7 +376,7 @@
|
||||
<Card.Header>
|
||||
<Card.Title>{m.scim_provisioning()}</Card.Title>
|
||||
<Card.Description>
|
||||
<FormattedMessage m={m.scim_provisioning_description()} />
|
||||
<FormattedMessage message={m.scim_provisioning_description} />
|
||||
</Card.Description>
|
||||
</Card.Header>
|
||||
<Card.Content>
|
||||
|
||||
+4
-3
@@ -50,9 +50,10 @@
|
||||
async function onDisable() {
|
||||
openConfirmDialog({
|
||||
title: m.disable_scim_provisioning(),
|
||||
message: m.disable_scim_provisioning_confirm_description({
|
||||
clientName: existingProvider!.oidcClient.name
|
||||
}),
|
||||
message: {
|
||||
message: m.disable_scim_provisioning_confirm_description,
|
||||
inputs: { clientName: existingProvider!.oidcClient.name }
|
||||
},
|
||||
confirm: {
|
||||
label: m.disable(),
|
||||
destructive: true,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
...restProps
|
||||
}: HTMLAttributes<HTMLDivElement> & {
|
||||
label: string;
|
||||
description: string;
|
||||
description: string | Snippet;
|
||||
callbackURLs: string[];
|
||||
error?: string | null;
|
||||
children?: Snippet;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import FormInput from '$lib/components/form/form-input.svelte';
|
||||
import FormattedMessage from '$lib/components/formatted-message.svelte';
|
||||
import SwitchWithLabel from '$lib/components/form/switch-with-label.svelte';
|
||||
import { Button } from '$lib/components/ui/button';
|
||||
import * as Tabs from '$lib/components/ui/tabs';
|
||||
@@ -186,6 +187,14 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
{#snippet callbackUrlDescription()}
|
||||
<FormattedMessage message={m.callback_url_description} />
|
||||
{/snippet}
|
||||
|
||||
{#snippet logoutCallbackUrlDescription()}
|
||||
<FormattedMessage message={m.logout_callback_url_description} />
|
||||
{/snippet}
|
||||
|
||||
<form onsubmit={preventDefault(onSubmit)}>
|
||||
<div class="grid grid-cols-1 gap-x-3 gap-y-7 sm:flex-row md:grid-cols-2">
|
||||
<FormInput
|
||||
@@ -209,14 +218,14 @@
|
||||
/>
|
||||
<OidcCallbackUrlInput
|
||||
label={m.callback_urls()}
|
||||
description={m.callback_url_description()}
|
||||
description={callbackUrlDescription}
|
||||
class="w-full"
|
||||
bind:callbackURLs={$inputs.callbackURLs.value}
|
||||
bind:error={$inputs.callbackURLs.error}
|
||||
/>
|
||||
<OidcCallbackUrlInput
|
||||
label={m.logout_callback_urls()}
|
||||
description={m.logout_callback_url_description()}
|
||||
description={logoutCallbackUrlDescription}
|
||||
class="w-full"
|
||||
bind:callbackURLs={$inputs.logoutCallbackURLs.value}
|
||||
bind:error={$inputs.logoutCallbackURLs.error}
|
||||
|
||||
Reference in New Issue
Block a user