mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Branching from 1.5.x, ensures undefined tooltips are not shown
This commit is contained in:
1 parent
9fcbb3f4eb
commit
a1a85d5afd
3 files changed
+18
-4
No files matched your search
@@ -23,6 +23,7 @@
|
||||
export let maxlength: number = null;
|
||||
export let tooltip: string = null;
|
||||
export let isMultiple = false;
|
||||
export let isPopoverDefined = true;
|
||||
|
||||
let element: HTMLInputElement;
|
||||
let error: string;
|
||||
@@ -76,7 +77,7 @@
|
||||
<svelte:component this={wrapper} {fullWidth}>
|
||||
{#if label}
|
||||
<Label {required} {hideRequired} {tooltip} {optionalText} hide={!showLabel} for={id}>
|
||||
{label}{#if $$slots.popover}
|
||||
{label}{#if $$slots.popover && isPopoverDefined}
|
||||
<Drop bind:show display="inline-block">
|
||||
<!-- TODO: make unclicked icon greyed out and hover and clicked filled -->
|
||||
<button
|
||||
|
||||
@@ -24,7 +24,7 @@ type ProvidersMap = {
|
||||
configure: {
|
||||
label: string;
|
||||
name: string;
|
||||
type: 'text' | 'phone' | 'email' | 'domain' | 'file' | 'switch';
|
||||
type: 'text' | 'password' | 'phone' | 'email' | 'domain' | 'file' | 'switch';
|
||||
placeholder?: string;
|
||||
description?: string;
|
||||
popover?: string[];
|
||||
@@ -336,7 +336,7 @@ export const providers: ProvidersMap = {
|
||||
{
|
||||
label: 'Password',
|
||||
name: 'password',
|
||||
type: 'text',
|
||||
type: 'password',
|
||||
placeholder: 'Enter password'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
InputEmail,
|
||||
InputFile,
|
||||
InputSwitch,
|
||||
InputText
|
||||
InputText,
|
||||
InputPassword,
|
||||
} from '$lib/elements/forms';
|
||||
|
||||
import InputPhone from '$lib/elements/forms/inputPhone.svelte';
|
||||
import { WizardStep } from '$lib/layout';
|
||||
import { onMount } from 'svelte';
|
||||
@@ -56,11 +58,22 @@
|
||||
id={input.name}
|
||||
label={input.label}
|
||||
placeholder={input.placeholder}
|
||||
isPopoverDefined={input.popover !== undefined}
|
||||
bind:value={$providerParams[$provider][input.name]}>
|
||||
<svelte:fragment slot="popover">
|
||||
{@html input.popover?.join('<br/><br/>')}
|
||||
</svelte:fragment>
|
||||
</InputText>
|
||||
{:else if input.type === 'password'}
|
||||
<InputPassword
|
||||
id={input.name}
|
||||
label={input.label}
|
||||
placeholder={input.placeholder}
|
||||
bind:value={$providerParams[$provider][input.name]}>
|
||||
<svelte:fragment slot="popover">
|
||||
{@html input.popover?.join('<br/><br/>')}
|
||||
</svelte:fragment>
|
||||
</InputPassword>
|
||||
{:else if input.type === 'email'}
|
||||
<InputEmail
|
||||
id={input.name}
|
||||
|
||||
Reference in new issue
Block a user