mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Format
This commit is contained in:
3 files changed
+46
-45
No files matched your search
+1
-1
@@ -21,5 +21,5 @@ function isFlagEnabled(name: string) {
|
||||
export const flags = {
|
||||
showSites: isFlagEnabled('sites'),
|
||||
showCsvImport: isFlagEnabled('csv-import'),
|
||||
showAttributeEncrypt: isFlagEnabled('attribute-encrypt'),
|
||||
showAttributeEncrypt: isFlagEnabled('attribute-encrypt')
|
||||
};
|
||||
+44
-43
@@ -131,51 +131,52 @@
|
||||
disabled={data.required || editing}
|
||||
description="Indicate whether this attribute is an array. Defaults to an empty array." />
|
||||
|
||||
{#if showEncrypt }
|
||||
<Layout.Stack gap="xs" direction="column">
|
||||
<div class="popover-holder" class:disabled-checkbox={!supportsStringEncryption || editing}>
|
||||
<Layout.Stack inline gap="s" alignItems="flex-start" direction="row">
|
||||
<Popover let:toggle placement="bottom-start">
|
||||
<Selector.Checkbox
|
||||
size="s"
|
||||
id="encrypt"
|
||||
bind:checked={data.encrypt}
|
||||
disabled={!supportsStringEncryption || editing} />
|
||||
{#if showEncrypt}
|
||||
<Layout.Stack gap="xs" direction="column">
|
||||
<div class="popover-holder" class:disabled-checkbox={!supportsStringEncryption || editing}>
|
||||
<Layout.Stack inline gap="s" alignItems="flex-start" direction="row">
|
||||
<Popover let:toggle placement="bottom-start">
|
||||
<Selector.Checkbox
|
||||
size="s"
|
||||
id="encrypt"
|
||||
bind:checked={data.encrypt}
|
||||
disabled={!supportsStringEncryption || editing} />
|
||||
|
||||
<Layout.Stack gap="xxs" direction="column">
|
||||
<button
|
||||
type="button"
|
||||
class="u-cursor-pointer"
|
||||
on:click={(e) => {
|
||||
if (!supportsStringEncryption) {
|
||||
toggle(e);
|
||||
} else {
|
||||
data.encrypt = !data.encrypt;
|
||||
}
|
||||
}}>
|
||||
<Layout.Stack inline gap="xxs" direction="row" alignItems="center">
|
||||
<Typography.Text variant="m-500">Encrypted</Typography.Text>
|
||||
{#if !supportsStringEncryption}
|
||||
<Tag variant="default" size="xs" on:click={toggle}>Pro</Tag>
|
||||
{/if}
|
||||
</Layout.Stack>
|
||||
</button>
|
||||
<Typography.Text color="--fgcolor-neutral-tertiary">
|
||||
Indicate whether this attribute is encrypted. Encrypted attributes cannot be
|
||||
queried.
|
||||
</Typography.Text>
|
||||
</Layout.Stack>
|
||||
<Layout.Stack gap="xxs" direction="column">
|
||||
<button
|
||||
type="button"
|
||||
class="u-cursor-pointer"
|
||||
on:click={(e) => {
|
||||
if (!supportsStringEncryption) {
|
||||
toggle(e);
|
||||
} else {
|
||||
data.encrypt = !data.encrypt;
|
||||
}
|
||||
}}>
|
||||
<Layout.Stack inline gap="xxs" direction="row" alignItems="center">
|
||||
<Typography.Text variant="m-500">Encrypted</Typography.Text>
|
||||
{#if !supportsStringEncryption}
|
||||
<Tag variant="default" size="xs" on:click={toggle}>Pro</Tag>
|
||||
{/if}
|
||||
</Layout.Stack>
|
||||
</button>
|
||||
<Typography.Text color="--fgcolor-neutral-tertiary">
|
||||
Indicate whether this attribute is encrypted. Encrypted attributes
|
||||
cannot be queried.
|
||||
</Typography.Text>
|
||||
</Layout.Stack>
|
||||
|
||||
<ActionMenu.Root width="180px" slot="tooltip">
|
||||
<Typography.Text variant="m-500">
|
||||
Available on Pro plan. <Link.Anchor href={$upgradeURL}>Upgrade</Link.Anchor>
|
||||
to enable encrypted attributes.
|
||||
</Typography.Text>
|
||||
</ActionMenu.Root>
|
||||
</Popover>
|
||||
</Layout.Stack>
|
||||
</div>
|
||||
</Layout.Stack>
|
||||
<ActionMenu.Root width="180px" slot="tooltip">
|
||||
<Typography.Text variant="m-500">
|
||||
Available on Pro plan. <Link.Anchor href={$upgradeURL}
|
||||
>Upgrade</Link.Anchor>
|
||||
to enable encrypted attributes.
|
||||
</Typography.Text>
|
||||
</ActionMenu.Root>
|
||||
</Popover>
|
||||
</Layout.Stack>
|
||||
</div>
|
||||
</Layout.Stack>
|
||||
{/if}
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
+1
-1
@@ -169,7 +169,7 @@
|
||||
|
||||
let checked = false;
|
||||
|
||||
let showEncrypt = flags.showAttributeEncrypt(data)
|
||||
let showEncrypt = flags.showAttributeEncrypt(data);
|
||||
</script>
|
||||
|
||||
<Table.Root
|
||||
|
||||
Reference in new issue
Block a user