merge v0.23.0-rc changes

This commit is contained in:
Gani Georgiev
2024-09-29 19:23:19 +03:00
parent ad92992324
commit 844f18cac3
753 changed files with 85141 additions and 63396 deletions

View File

@@ -2,35 +2,32 @@
import { tick } from "svelte";
import tooltip from "@/actions/tooltip";
export let mask = false;
export let value = "";
export let mask = "******";
let inputElem;
let locked = false;
$: locked = value === mask;
async function unlock() {
value = "";
locked = false;
mask = false;
await tick();
inputElem?.focus();
}
</script>
{#if locked}
{#if mask}
<div class="form-field-addon">
<button
type="button"
class="btn btn-transparent btn-circle"
use:tooltip={{ position: "left", text: "Set new value" }}
on:click={() => unlock()}
on:click|preventDefault={unlock}
>
<i class="ri-key-line" />
</button>
</div>
<input readonly type="text" placeholder={mask} {...$$restProps} />
<input readonly type="text" placeholder="******" {...$$restProps} />
{:else}
<input bind:this={inputElem} bind:value type="password" autocomplete="new-password" {...$$restProps} />
{/if}