mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-03-29 11:43:04 -04:00
updated to Svelte 4
This commit is contained in:
@@ -195,7 +195,7 @@
|
||||
|
||||
{#if isNew || changePasswordToggle}
|
||||
<div class="col-12">
|
||||
<div class="grid" transition:slide|local={{ duration: 150 }}>
|
||||
<div class="grid" transition:slide={{ duration: 150 }}>
|
||||
<div class="col-sm-6">
|
||||
<Field class="form-field required" name="password" let:uniqueId>
|
||||
<label for={uniqueId}>
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
</button>
|
||||
|
||||
{#if active}
|
||||
<div class="accordion-content" transition:slide|local={{ duration: 150 }}>
|
||||
<div class="accordion-content" transition:slide={{ duration: 150 }}>
|
||||
<slot />
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<div class="form-field-addon">
|
||||
<i
|
||||
class="ri-error-warning-fill txt-danger"
|
||||
transition:scale|local={{ duration: 150, start: 0.7 }}
|
||||
transition:scale={{ duration: 150, start: 0.7 }}
|
||||
use:tooltip={{
|
||||
position: "left",
|
||||
text: fieldErrors.map(getErrorMessage).join("\n"),
|
||||
@@ -61,7 +61,7 @@
|
||||
</div>
|
||||
{:else}
|
||||
{#each fieldErrors as error}
|
||||
<div class="help-block help-block-error" transition:slide|local={{ duration: 150 }}>
|
||||
<div class="help-block help-block-error" transition:slide={{ duration: 150 }}>
|
||||
<pre>{getErrorMessage(error)}</pre>
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
<div
|
||||
class="overlay"
|
||||
on:click|preventDefault={() => (overlayClose ? hide() : true)}
|
||||
transition:fade|local={{ duration: transitionSpeed, opacity: 0 }}
|
||||
transition:fade={{ duration: transitionSpeed, opacity: 0 }}
|
||||
/>
|
||||
|
||||
<div
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-expanded btn-sm btn-warning"
|
||||
transition:fly|local={{ duration: 150, x: 5 }}
|
||||
transition:fly={{ duration: 150, x: 5 }}
|
||||
>
|
||||
<span class="txt">Search</span>
|
||||
</button>
|
||||
@@ -96,7 +96,7 @@
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10"
|
||||
transition:fly|local={{ duration: 150, x: 5 }}
|
||||
transition:fly={{ duration: 150, x: 5 }}
|
||||
on:click={() => {
|
||||
clear(false);
|
||||
submit();
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
bind:this={containerChild}
|
||||
class={classes}
|
||||
class:active
|
||||
transition:fly|local={{ duration: 150, y: 3 }}
|
||||
transition:fly={{ duration: 150, y: 3 }}
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
{#if hasUsernameErrors}
|
||||
<i
|
||||
class="ri-error-warning-fill txt-danger"
|
||||
transition:scale|local={{ duration: 150, start: 0.7 }}
|
||||
transition:scale={{ duration: 150, start: 0.7 }}
|
||||
use:tooltip={{ text: "Has errors", position: "left" }}
|
||||
/>
|
||||
{/if}
|
||||
@@ -79,7 +79,7 @@
|
||||
{#if hasEmailErrors}
|
||||
<i
|
||||
class="ri-error-warning-fill txt-danger"
|
||||
transition:scale|local={{ duration: 150, start: 0.7 }}
|
||||
transition:scale={{ duration: 150, start: 0.7 }}
|
||||
use:tooltip={{ text: "Has errors", position: "left" }}
|
||||
/>
|
||||
{/if}
|
||||
@@ -91,7 +91,7 @@
|
||||
</Field>
|
||||
|
||||
{#if collection.options.allowEmailAuth}
|
||||
<div class="grid grid-sm p-t-sm" transition:slide|local={{ duration: 150 }}>
|
||||
<div class="grid grid-sm p-t-sm" transition:slide={{ duration: 150 }}>
|
||||
<div class="col-lg-6">
|
||||
<Field
|
||||
class="form-field {!CommonHelper.isEmpty(collection.options.onlyEmailDomains)
|
||||
@@ -166,7 +166,7 @@
|
||||
{#if hasOAuth2Errors}
|
||||
<i
|
||||
class="ri-error-warning-fill txt-danger"
|
||||
transition:scale|local={{ duration: 150, start: 0.7 }}
|
||||
transition:scale={{ duration: 150, start: 0.7 }}
|
||||
use:tooltip={{ text: "Has errors", position: "left" }}
|
||||
/>
|
||||
{/if}
|
||||
@@ -178,7 +178,7 @@
|
||||
</Field>
|
||||
|
||||
{#if collection.options.allowOAuth2Auth}
|
||||
<div class="block" transition:slide|local={{ duration: 150 }}>
|
||||
<div class="block" transition:slide={{ duration: 150 }}>
|
||||
<div class="flex p-t-base">
|
||||
<a href="#/settings/auth-providers" target="_blank" class="btn btn-sm btn-outline">
|
||||
<span class="txt">Manage OAuth2 providers</span>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
|
||||
{#if showFiltersInfo}
|
||||
<div transition:slide|local={{ duration: 150 }}>
|
||||
<div transition:slide={{ duration: 150 }}>
|
||||
<div class="alert alert-warning m-0">
|
||||
<div class="content">
|
||||
<p class="m-b-0">The following record fields are available:</p>
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
{#if !CommonHelper.isEmpty(schemaTabError)}
|
||||
<i
|
||||
class="ri-error-warning-fill txt-danger"
|
||||
transition:scale|local={{ duration: 150, start: 0.7 }}
|
||||
transition:scale={{ duration: 150, start: 0.7 }}
|
||||
use:tooltip={schemaTabError}
|
||||
/>
|
||||
{/if}
|
||||
@@ -394,7 +394,7 @@
|
||||
{#if !CommonHelper.isEmpty($errors?.listRule) || !CommonHelper.isEmpty($errors?.viewRule) || !CommonHelper.isEmpty($errors?.createRule) || !CommonHelper.isEmpty($errors?.updateRule) || !CommonHelper.isEmpty($errors?.deleteRule) || !CommonHelper.isEmpty($errors?.options?.manageRule)}
|
||||
<i
|
||||
class="ri-error-warning-fill txt-danger"
|
||||
transition:scale|local={{ duration: 150, start: 0.7 }}
|
||||
transition:scale={{ duration: 150, start: 0.7 }}
|
||||
use:tooltip={"Has errors"}
|
||||
/>
|
||||
{/if}
|
||||
@@ -411,7 +411,7 @@
|
||||
{#if !CommonHelper.isEmpty($errors?.options) && !$errors?.options?.manageRule}
|
||||
<i
|
||||
class="ri-error-warning-fill txt-danger"
|
||||
transition:scale|local={{ duration: 150, start: 0.7 }}
|
||||
transition:scale={{ duration: 150, start: 0.7 }}
|
||||
use:tooltip={"Has errors"}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
type="button"
|
||||
class="unlock-overlay"
|
||||
aria-label="Unlock and set custom rule"
|
||||
transition:scale|local={{ duration: 150, start: 0.98 }}
|
||||
transition:scale={{ duration: 150, start: 0.98 }}
|
||||
on:click={unlock}
|
||||
>
|
||||
<small class="txt">Unlock and set custom rule</small>
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
class:required={field.required}
|
||||
class:expanded={interactive && showOptions}
|
||||
class:deleted={field.toDelete}
|
||||
transition:slide|local={{ duration: 150 }}
|
||||
transition:slide={{ duration: 150 }}
|
||||
>
|
||||
<div class="schema-field-header">
|
||||
{#if interactive}
|
||||
@@ -197,7 +197,7 @@
|
||||
</div>
|
||||
|
||||
{#if interactive && showOptions}
|
||||
<div class="schema-field-options" transition:slide|local={{ duration: 150 }}>
|
||||
<div class="schema-field-options" transition:slide={{ duration: 150 }}>
|
||||
<div class="hidden-empty m-b-sm">
|
||||
<slot name="options" {interactive} {hasErrors} />
|
||||
</div>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</button>
|
||||
|
||||
{#if showInfo}
|
||||
<div class="block" transition:slide|local={{ duration: 150 }}>
|
||||
<div class="block" transition:slide={{ duration: 150 }}>
|
||||
<div class="alert alert-warning m-b-0 m-t-10">
|
||||
<div class="content">
|
||||
In order to support seamlessly both <code>application/json</code> and
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
<div class="chart-wrapper" class:loading={isLoading}>
|
||||
{#if isLoading}
|
||||
<div class="chart-loader loader" transition:scale|local={{ duration: 150 }} />
|
||||
<div class="chart-loader loader" transition:scale={{ duration: 150 }} />
|
||||
{/if}
|
||||
<canvas bind:this={chartCanvas} class="chart-canvas" style="height: 250px; width: 100%;" />
|
||||
</div>
|
||||
|
||||
@@ -539,7 +539,7 @@
|
||||
{/if}
|
||||
|
||||
{#if totalBulkSelected}
|
||||
<div class="bulkbar" transition:fly|local={{ duration: 150, y: 5 }}>
|
||||
<div class="bulkbar" transition:fly={{ duration: 150, y: 5 }}>
|
||||
<div class="txt">
|
||||
Selected <strong>{totalBulkSelected}</strong>
|
||||
{totalBulkSelected === 1 ? "record" : "records"}
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
{/if}
|
||||
|
||||
{#if isNew || changePasswordToggle}
|
||||
<div class="block" transition:slide|local={{ duration: 150 }}>
|
||||
<div class="block" transition:slide={{ duration: 150 }}>
|
||||
<div class="grid" class:p-t-xs={changePasswordToggle}>
|
||||
<div class="col-sm-6">
|
||||
<Field class="form-field required" name="password" let:uniqueId>
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
{/each}
|
||||
{:else}
|
||||
{#each backups as backup (backup.key)}
|
||||
<div class="list-item" transition:slide|local={{ duration: 150 }}>
|
||||
<div class="list-item" transition:slide={{ duration: 150 }}>
|
||||
<i class="ri-folder-zip-line" />
|
||||
<div class="content">
|
||||
<span class="name backup-name" title={backup.key}>{backup.key}</span>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
{#if hasErrors}
|
||||
<i
|
||||
class="ri-error-warning-fill txt-danger"
|
||||
transition:scale|local={{ duration: 150, start: 0.7 }}
|
||||
transition:scale={{ duration: 150, start: 0.7 }}
|
||||
use:tooltip={{ text: "Has errors", position: "left" }}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
class="block"
|
||||
autocomplete="off"
|
||||
on:submit|preventDefault={save}
|
||||
transition:slide|local={{ duration: 150 }}
|
||||
transition:slide={{ duration: 150 }}
|
||||
>
|
||||
<Field class="form-field form-field-toggle m-t-base m-b-0" let:uniqueId>
|
||||
<input type="checkbox" id={uniqueId} required bind:checked={enableAutoBackups} />
|
||||
@@ -144,7 +144,7 @@
|
||||
</Field>
|
||||
|
||||
{#if enableAutoBackups}
|
||||
<div class="block" transition:slide|local={{ duration: 150 }}>
|
||||
<div class="block" transition:slide={{ duration: 150 }}>
|
||||
<div class="grid p-t-base p-b-sm">
|
||||
<div class="col-lg-6">
|
||||
<Field class="form-field required" name="backups.cron" let:uniqueId>
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
</Field>
|
||||
|
||||
{#if formSettings.smtp.enabled}
|
||||
<div transition:slide|local={{ duration: 150 }}>
|
||||
<div transition:slide={{ duration: 150 }}>
|
||||
<div class="grid">
|
||||
<div class="col-lg-4">
|
||||
<Field class="form-field required" name="smtp.host" let:uniqueId>
|
||||
@@ -236,7 +236,7 @@
|
||||
</button>
|
||||
|
||||
{#if showMoreOptions}
|
||||
<div class="grid" transition:slide|local={{ duration: 150 }}>
|
||||
<div class="grid" transition:slide={{ duration: 150 }}>
|
||||
<div class="col-lg-3">
|
||||
<Field class="form-field" name="smtp.tls" let:uniqueId>
|
||||
<label for={uniqueId}>TLS encryption</label>
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
bind:testError
|
||||
>
|
||||
{#if originalFormSettings.s3?.enabled != formSettings.s3.enabled}
|
||||
<div transition:slide|local={{ duration: 150 }}>
|
||||
<div transition:slide={{ duration: 150 }}>
|
||||
<div class="alert alert-warning m-0">
|
||||
<div class="icon">
|
||||
<i class="ri-error-warning-line" />
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<slot {isTesting} {testError} enabled={config.enabled} />
|
||||
|
||||
{#if config.enabled}
|
||||
<div class="grid" transition:slide|local={{ duration: 150 }}>
|
||||
<div class="grid" transition:slide={{ duration: 150 }}>
|
||||
<div class="col-lg-6">
|
||||
<Field class="form-field required" name="{configKey}.endpoint" let:uniqueId>
|
||||
<label for={uniqueId}>Endpoint</label>
|
||||
|
||||
Reference in New Issue
Block a user