feat: implement smart forms everywhere

This commit is contained in:
Torsten Dittmann
2023-03-10 03:10:16 +05:30
parent f4542dfd6c
commit c21085f67d
97 changed files with 116 additions and 113 deletions
+1 -1
View File
@@ -245,7 +245,7 @@
}
</script>
<Modal bind:show on:submit={create} size="big">
<Modal bind:show onSubmit={create} size="big">
<svelte:fragment slot="header">Create Event</svelte:fragment>
<slot />
<div>
+1 -1
View File
@@ -51,7 +51,7 @@
Your feedback is important to us. Please be honest and tell us what you think.
</div>
<Form on:submit={handleSubmit}>
<Form onSubmit={handleSubmit}>
<FormList>
<InputText
label="name"
+1 -1
View File
@@ -49,7 +49,7 @@
think.
</div>
<Form on:submit={handleSubmit}>
<Form onSubmit={handleSubmit}>
<Evaluation bind:value>
How likely are you to recommend Appwrite to a friend or colleague?
</Evaluation>
+6 -3
View File
@@ -2,12 +2,16 @@
import { createEventDispatcher, onDestroy, onMount } from 'svelte';
import { Alert } from '$lib/components';
import { trackEvent } from '$lib/actions/analytics';
import { Form } from '$lib/elements/forms';
export let show = false;
export let size: 'small' | 'big' = null;
export let warning = false;
export let error: string = null;
export let closable = true;
export let onSubmit: () => Promise<void> | void = function () {
return;
};
let dialog: HTMLDialogElement;
let alert: HTMLElement;
@@ -77,8 +81,7 @@
class:is-big={size === 'big'}
bind:this={dialog}>
{#if show}
<!-- svelte-ignore a11y-no-redundant-roles -->
<form class="modal-form" role="form" on:submit|preventDefault>
<Form isModal {onSubmit}>
<header class="modal-header">
{#if warning}
<div class="avatar is-warning is-medium">
@@ -127,6 +130,6 @@
</div>
</div>
{/if}
</form>
</Form>
{/if}
</dialog>
+1 -1
View File
@@ -25,7 +25,7 @@
$: disabled = !value || $groups.has(value);
</script>
<Modal bind:show on:close={reset} on:submit={create}>
<Modal bind:show on:close={reset} onSubmit={create}>
<svelte:fragment slot="header">Custom permission</svelte:fragment>
<p class="text">
Custom permissions allow you to grant access to specific users or teams using their ID and
+1 -1
View File
@@ -58,7 +58,7 @@
}
</script>
<Modal bind:show on:submit={create} on:close={reset} size="big">
<Modal bind:show onSubmit={create} on:close={reset} size="big">
<svelte:fragment slot="header">Select teams</svelte:fragment>
<p class="text">
Grant access to any member of a specific team. To grant access to team members with specific
+1 -1
View File
@@ -58,7 +58,7 @@
}
</script>
<Modal bind:show on:submit={create} on:close={reset} size="big">
<Modal bind:show onSubmit={create} on:close={reset} size="big">
<svelte:fragment slot="header">Select users</svelte:fragment>
<p class="text">Grant access to any authenticated or anonymous user.</p>
<InputSearch
+1 -1
View File
@@ -122,7 +122,7 @@
{/if}
</div>
<div class="wizard-main">
<Form noStyle on:submit={submit}>
<Form noStyle onSubmit={submit}>
{#each sortedSteps as [step, { component }]}
{#if currentStep === step}
<svelte:component this={component} />
+1 -1
View File
@@ -11,7 +11,7 @@
}
</script>
<Modal bind:show on:submit={handleSubmit} warning>
<Modal bind:show onSubmit={handleSubmit} warning>
<svelte:fragment slot="header">Exit Process</svelte:fragment>
<p>
Are you sure you want to exit from <slot />? All data will be deleted. This action is
+4 -4
View File
@@ -27,7 +27,7 @@
async function updateName() {
try {
await sdkForConsole.account.updateName(name);
invalidate(Dependencies.ACCOUNT);
await invalidate(Dependencies.ACCOUNT);
addNotification({
message: 'Name has been updated',
type: 'success'
@@ -79,7 +79,7 @@
</script>
<Container>
<Form on:submit={updateName}>
<Form onSubmit={updateName}>
<CardGrid>
<Heading tag="h6" size="7">Update Name</Heading>
@@ -94,7 +94,7 @@
</svelte:fragment>
</CardGrid>
</Form>
<Form on:submit={updateEmail}>
<Form onSubmit={updateEmail}>
<CardGrid>
<Heading tag="h6" size="7">Update Email</Heading>
@@ -122,7 +122,7 @@
</svelte:fragment>
</CardGrid>
</Form>
<Form on:submit={updatePassword}>
<Form onSubmit={updatePassword}>
<CardGrid>
<Heading tag="h6" size="7">Update Password</Heading>
<p class="text">
+1 -1
View File
@@ -29,7 +29,7 @@
};
</script>
<Modal bind:show={showDelete} on:submit={deleteAccount} warning>
<Modal bind:show={showDelete} onSubmit={deleteAccount} warning>
<svelte:fragment slot="header">Delete Account</svelte:fragment>
<p>Are you sure you want to delete your account?</p>
<svelte:fragment slot="footer">
+1 -1
View File
@@ -42,7 +42,7 @@
};
</script>
<Modal {error} on:submit={create} size="big" bind:show>
<Modal {error} onSubmit={create} size="big" bind:show>
<svelte:fragment slot="header">Create New Organization</svelte:fragment>
<FormList>
<InputText
+1 -1
View File
@@ -50,7 +50,7 @@
<Container overlapCover size="large">
<Card>
<Form on:submit={createProject}>
<Form onSubmit={createProject}>
<FormList>
<InputText
id="name"
@@ -47,7 +47,7 @@
}
</script>
<Modal {error} size="big" bind:show={showCreate} on:submit={create}>
<Modal {error} size="big" bind:show={showCreate} onSubmit={create}>
<svelte:fragment slot="header">Invite Member</svelte:fragment>
<FormList>
<InputEmail
@@ -47,7 +47,7 @@
}
</script>
<Modal {error} on:submit={create} size="big" bind:show>
<Modal {error} onSubmit={create} size="big" bind:show>
<svelte:fragment slot="header">Create Project</svelte:fragment>
<FormList>
<InputText
@@ -43,7 +43,7 @@
$: isUser = selectedMember?.userId === $user?.$id;
</script>
<Modal bind:show={showDelete} on:submit={deleteMembership} warning>
<Modal bind:show={showDelete} onSubmit={deleteMembership} warning>
<svelte:fragment slot="header">
{isUser ? 'Leave Organization' : 'Delete Member'}
</svelte:fragment>
@@ -37,7 +37,7 @@
};
</script>
<Modal on:submit={deleteOrg} bind:show={showDelete} warning>
<Modal onSubmit={deleteOrg} bind:show={showDelete} warning>
<svelte:fragment slot="header">Delete Organization</svelte:fragment>
<p>
Are you sure you want to delete <b>{$organization.name}</b>? All projects ({$organization.total})
@@ -41,7 +41,7 @@
<Container>
{#if $organization}
<Form on:submit={updateName}>
<Form onSubmit={updateName}>
<CardGrid>
<Heading tag="h6" size="7">Update Name</Heading>
@@ -57,7 +57,7 @@
$: secret = keyID && teamID && p8 ? JSON.stringify({ keyID, teamID, p8 }) : provider.secret;
</script>
<Modal {error} on:submit={update} size="big" show on:close>
<Modal {error} onSubmit={update} size="big" show on:close>
<svelte:fragment slot="header">{provider.name} OAuth2 Settings</svelte:fragment>
<FormList>
<p>
@@ -58,7 +58,7 @@
: provider.secret;
</script>
<Modal {error} size="big" show on:submit={update} on:close>
<Modal {error} size="big" show onSubmit={update} on:close>
<svelte:fragment slot="header">{provider.name} OAuth2 Settings</svelte:fragment>
<FormList>
<p>
@@ -58,7 +58,7 @@
: provider.secret;
</script>
<Modal {error} size="big" show on:submit={update} on:close>
<Modal {error} size="big" show onSubmit={update} on:close>
<svelte:fragment slot="header">{provider.name} OAuth2 Settings</svelte:fragment>
<FormList>
<p>
@@ -41,7 +41,7 @@
}
</script>
<Modal {error} size="big" bind:show={showCreate} on:submit={create}>
<Modal {error} size="big" bind:show={showCreate} onSubmit={create}>
<svelte:fragment slot="header">Create Team</svelte:fragment>
<FormList>
<InputText
@@ -58,7 +58,7 @@
}
</script>
<Modal {error} size="big" bind:show={showCreate} on:submit={create}>
<Modal {error} size="big" bind:show={showCreate} onSubmit={create}>
<svelte:fragment slot="header">Create User</svelte:fragment>
<FormList>
<InputText
@@ -56,7 +56,7 @@
clientSecret && endpoint ? JSON.stringify({ clientSecret, endpoint }) : provider.secret;
</script>
<Modal {error} size="big" show on:submit={update} on:close>
<Modal {error} size="big" show onSubmit={update} on:close>
<svelte:fragment slot="header">{provider.name} OAuth2 Settings</svelte:fragment>
<FormList>
<p>
@@ -54,7 +54,7 @@
};
</script>
<Modal {error} size="big" show on:submit={update} on:close>
<Modal {error} size="big" show onSubmit={update} on:close>
<svelte:fragment slot="header">{provider.name} OAuth2 Settings</svelte:fragment>
<FormList>
<p>
@@ -57,7 +57,7 @@
clientSecret && tenantID ? JSON.stringify({ clientSecret, tenantID }) : provider.secret;
</script>
<Modal {error} on:submit={update} size="big" show on:close>
<Modal {error} onSubmit={update} size="big" show on:close>
<svelte:fragment slot="header">{provider.name} OAuth2 Settings</svelte:fragment>
<FormList>
<p>
@@ -62,7 +62,7 @@
: provider.secret;
</script>
<Modal {error} on:submit={update} size="big" show on:close>
<Modal {error} onSubmit={update} size="big" show on:close>
<svelte:fragment slot="header">{provider.name} OAuth2 Settings</svelte:fragment>
<FormList>
<p>
@@ -29,7 +29,7 @@
}
</script>
<Form on:submit={updateSessionsLimit}>
<Form onSubmit={updateSessionsLimit}>
<CardGrid>
<Heading tag="h2" size="6">Sessions Limit</Heading>
<p>Maximum number of active sessions allowed per user.</p>
@@ -55,7 +55,7 @@
</svelte:fragment>
</CardGrid>
<Form on:submit={updateName}>
<Form onSubmit={updateName}>
<CardGrid>
<Heading tag="h6" size="7">Update Name</Heading>
@@ -42,7 +42,7 @@
};
</script>
<Modal {error} on:submit={create} size="big" bind:show={showCreate}>
<Modal {error} onSubmit={create} size="big" bind:show={showCreate}>
<svelte:fragment slot="header">Create Membership</svelte:fragment>
<FormList>
<InputEmail
@@ -37,7 +37,7 @@
};
</script>
<Modal bind:show={showDelete} on:submit={deleteMembership} warning>
<Modal bind:show={showDelete} onSubmit={deleteMembership} warning>
<svelte:fragment slot="header">Delete Member</svelte:fragment>
<p data-private>
Are you sure you want to delete <b>{selectedMembership.userName}</b> from '{selectedMembership.teamName}'?
@@ -28,7 +28,7 @@
};
</script>
<Modal bind:show={showDelete} on:submit={deleteTeam} warning>
<Modal bind:show={showDelete} onSubmit={deleteTeam} warning>
<svelte:fragment slot="header">Delete Team</svelte:fragment>
<p data-private>
Are you sure you want to delete <b>{team.name}</b>?
@@ -31,7 +31,7 @@
};
</script>
<Modal bind:show={showDeleteAll} on:submit={deleteAllSessions} warning>
<Modal bind:show={showDeleteAll} onSubmit={deleteAllSessions} warning>
<svelte:fragment slot="header">Delete All Sessions</svelte:fragment>
<p data-private>
Are you sure you want to delete <b>all of {$user.name}'s sessions?</b>
@@ -40,7 +40,7 @@
};
</script>
<Modal bind:show={showDelete} on:submit={deleteMembership} warning>
<Modal bind:show={showDelete} onSubmit={deleteMembership} warning>
<svelte:fragment slot="header">Delete Member</svelte:fragment>
{#if selectedMembership}
<p data-private>
@@ -30,7 +30,7 @@
};
</script>
<Modal bind:show={showDelete} on:submit={deleteSession} warning>
<Modal bind:show={showDelete} onSubmit={deleteSession} warning>
<svelte:fragment slot="header">Delete Sessions</svelte:fragment>
<p>Are you sure you want to delete this session?</p>
@@ -32,7 +32,7 @@
};
</script>
<Modal bind:show={showDelete} on:submit={deleteUser} warning>
<Modal bind:show={showDelete} onSubmit={deleteUser} warning>
<svelte:fragment slot="header">Delete User</svelte:fragment>
<p data-private>Are you sure you want to delete <b>{$user.name}</b> from '{$project.name}'?</p>
<svelte:fragment slot="footer">
@@ -33,7 +33,7 @@
}
</script>
<Form on:submit={updateEmail}>
<Form onSubmit={updateEmail}>
<CardGrid>
<Heading tag="h6" size="7">Update Email</Heading>
<svelte:fragment slot="aside">
@@ -33,7 +33,7 @@
}
</script>
<Form on:submit={updateName}>
<Form onSubmit={updateName}>
<CardGrid>
<Heading tag="h6" size="7">Update Name</Heading>
@@ -27,7 +27,7 @@
}
</script>
<Form on:submit={updatePassword}>
<Form onSubmit={updatePassword}>
<CardGrid>
<div>
<Heading tag="h6" size="7">Update Password</Heading>
@@ -33,7 +33,7 @@
}
</script>
<Form on:submit={updatePhone}>
<Form onSubmit={updatePhone}>
<CardGrid>
<Heading tag="h6" size="7">Update Phone</Heading>
<svelte:fragment slot="aside">
@@ -54,7 +54,7 @@
}
</script>
<Form on:submit={updatePrefs}>
<Form onSubmit={updatePrefs}>
<CardGrid>
<Heading tag="h6" size="7">User Preferences</Heading>
<p>
@@ -39,7 +39,7 @@
};
</script>
<Modal size="big" on:submit={create} bind:show={showCreate}>
<Modal size="big" onSubmit={create} bind:show={showCreate}>
<svelte:fragment slot="header">Create Database</svelte:fragment>
<FormList>
<InputText
@@ -42,7 +42,7 @@
};
</script>
<Modal warning={true} bind:show={showDelete} on:submit={handleDelete}>
<Modal warning={true} bind:show={showDelete} onSubmit={handleDelete}>
<svelte:fragment slot="header">Delete Attribute</svelte:fragment>
<p data-private>
Are you sure you want to delete <b>'{selectedAttribute?.key}' from {$collection?.name}</b>?
@@ -62,7 +62,7 @@
}
</script>
<Modal size="big" bind:show={showCreate} on:submit={submit}>
<Modal size="big" bind:show={showCreate} onSubmit={submit}>
<svelte:fragment slot="header">Create Attribute</svelte:fragment>
<FormList>
<div>
@@ -39,7 +39,7 @@
};
</script>
<Modal warning={true} on:submit={handleDelete} bind:show={showDelete}>
<Modal warning={true} onSubmit={handleDelete} bind:show={showDelete}>
<svelte:fragment slot="header">Delete Document</svelte:fragment>
<p data-private>
@@ -101,7 +101,7 @@
}
</script>
<Modal bind:error size="big" on:submit={create} bind:show={showCreateIndex}>
<Modal bind:error size="big" onSubmit={create} bind:show={showCreateIndex}>
<svelte:fragment slot="header">Create Index</svelte:fragment>
<FormList>
<InputText id="key" label="Index Key" placeholder="Enter Key" bind:value={key} autofocus />
@@ -39,7 +39,7 @@
};
</script>
<Modal warning={true} on:submit={handleDelete} bind:show={showDelete}>
<Modal warning={true} onSubmit={handleDelete} bind:show={showDelete}>
<svelte:fragment slot="header">Delete Index</svelte:fragment>
<p data-private>
@@ -35,7 +35,7 @@
};
</script>
<Modal warning={true} bind:show={showDelete} on:submit={handleDelete}>
<Modal warning={true} bind:show={showDelete} onSubmit={handleDelete}>
<svelte:fragment slot="header">Delete Collection</svelte:fragment>
<p data-private>
@@ -44,7 +44,7 @@
}
</script>
<Form on:submit={updateName}>
<Form onSubmit={updateName}>
<CardGrid>
<Heading tag="h6" size="7">Update Name</Heading>
@@ -46,7 +46,7 @@
};
</script>
<Modal size="big" bind:show={showCreate} on:submit={create}>
<Modal size="big" bind:show={showCreate} onSubmit={create}>
<svelte:fragment slot="header">Create Collection</svelte:fragment>
<FormList>
<InputText
@@ -32,7 +32,7 @@
};
</script>
<Modal warning={true} bind:show={showDelete} on:submit={handleDelete}>
<Modal warning={true} bind:show={showDelete} onSubmit={handleDelete}>
<svelte:fragment slot="header">Delete Database</svelte:fragment>
<p class="text" data-private>
Are you sure you want to delete <b>{$database.name}</b>?
@@ -31,7 +31,7 @@
}
</script>
<Modal bind:show={showCreate} on:submit={handleVariable} size="big">
<Modal bind:show={showCreate} onSubmit={handleVariable} size="big">
<svelte:fragment slot="header">
{selectedVar ? 'Update' : 'Create'} Variable
</svelte:fragment>
@@ -35,7 +35,7 @@
};
</script>
<Modal bind:show={showActivate} on:submit={handleSubmit}>
<Modal bind:show={showActivate} onSubmit={handleSubmit}>
<svelte:fragment slot="header">Activate Deployment</svelte:fragment>
<p>Are you sure you want to activate this deployment?</p>
<svelte:fragment slot="footer">
@@ -133,7 +133,7 @@
}
</script>
<Modal {error} size="big" bind:show={showCreate} on:submit={create}>
<Modal {error} size="big" bind:show={showCreate} onSubmit={create}>
<svelte:fragment slot="header">Create Deployment</svelte:fragment>
<Tabs>
<Tab on:click={() => (mode = Mode.CLI)} selected={mode === Mode.CLI} event="deploy_cli">
@@ -34,7 +34,7 @@
};
</script>
<Modal bind:show={showDelete} on:submit={handleSubmit} warning>
<Modal bind:show={showDelete} onSubmit={handleSubmit} warning>
<svelte:fragment slot="header">Delete Deployment</svelte:fragment>
<p data-private>Are you sure you want to delete this deployment?</p>
<svelte:fragment slot="footer">
@@ -63,7 +63,7 @@
afterNavigate(close);
</script>
<Modal bind:show size="big" on:submit={handleSubmit} on:close={close}>
<Modal bind:show size="big" onSubmit={handleSubmit} on:close={close}>
<svelte:fragment slot="header">Execute Function</svelte:fragment>
<FormList>
<InputTextarea bind:value={data} id="data" label="Custom data (optional)" />
@@ -282,7 +282,7 @@
</svelte:fragment>
</CardGrid>
<Form on:submit={updateName}>
<Form onSubmit={updateName}>
<CardGrid>
<Heading tag="h6" size="7">Update Name</Heading>
@@ -305,7 +305,7 @@
</CardGrid>
</Form>
<Form on:submit={updatePermissions}>
<Form onSubmit={updatePermissions}>
<CardGrid>
<Heading tag="h6" size="7">Execute Access</Heading>
<p>
@@ -330,7 +330,7 @@
<UpdateEvents />
<Form on:submit={updateSchedule}>
<Form onSubmit={updateSchedule}>
<CardGrid>
<Heading tag="h6" size="7">Update Schedule</Heading>
<p>
@@ -452,7 +452,7 @@
</svelte:fragment>
</CardGrid>
<Form on:submit={updateTimeout}>
<Form onSubmit={updateTimeout}>
<CardGrid>
<Heading tag="h6" size="7">Update Timeout</Heading>
<p>
@@ -31,7 +31,7 @@
};
</script>
<Modal bind:show={showDelete} on:submit={handleSubmit} warning>
<Modal bind:show={showDelete} onSubmit={handleSubmit} warning>
<svelte:fragment slot="header">Delete Function</svelte:fragment>
<p data-private>
Are you sure you want to delete this function and all associated deployments from your
@@ -76,7 +76,7 @@
}
</script>
<Form on:submit={updateEvents}>
<Form onSubmit={updateEvents}>
<CardGrid>
<Heading tag="h6" size="7">Update Events</Heading>
<p>Set the events that will trigger your function. Maximum 100 events allowed.</p>
@@ -59,7 +59,7 @@
}
</script>
<Modal bind:show on:submit={handleSubmit}>
<Modal bind:show onSubmit={handleSubmit}>
<svelte:fragment slot="header">Upload Variables</svelte:fragment>
<p>
Upload multiple variables via a .env file that will be passed to your function at runtime.
@@ -103,7 +103,7 @@
</svelte:fragment>
</CardGrid>
<Form on:submit={updateName}>
<Form onSubmit={updateName}>
<CardGrid>
<Heading tag="h6" size="7">Update Name</Heading>
<p class="text">Choose any name that will help you distinguish between API keys.</p>
@@ -123,7 +123,7 @@
</svelte:fragment>
</CardGrid>
</Form>
<Form on:submit={updateScopes}>
<Form onSubmit={updateScopes}>
<CardGrid>
<Heading tag="h6" size="7">Update Scopes</Heading>
<p class="text">
@@ -33,7 +33,7 @@
}
</script>
<Modal bind:show={showDelete} on:submit={handleDelete} warning>
<Modal bind:show={showDelete} onSubmit={handleDelete} warning>
<svelte:fragment slot="header">Delete API Key</svelte:fragment>
<p>The API Key will be permanently deleted. This action is irreversible.</p>
@@ -43,7 +43,7 @@
$: isExpired = !alertsDismissed && $key.expire !== null && new Date($key.expire) < new Date();
</script>
<Form on:submit={updateExpire}>
<Form onSubmit={updateExpire}>
<CardGrid>
<Heading tag="h6" size="7">Update Expiration Date</Heading>
<p class="text">Set a date after which your API Key will expire.</p>
@@ -76,7 +76,7 @@
</script>
<Container>
<Form on:submit={updateName}>
<Form onSubmit={updateName}>
<CardGrid>
<Heading tag="h6" size="7">Update Name</Heading>
<p class="text">Choose any name that will help you distinguish between platforms.</p>
@@ -44,7 +44,7 @@
};
</script>
<Form on:submit={updateHostname}>
<Form onSubmit={updateHostname}>
<CardGrid>
<Heading tag="h6" size="7">Update Package Name</Heading>
<p class="text">
@@ -44,7 +44,7 @@
};
</script>
<Form on:submit={updateHostname}>
<Form onSubmit={updateHostname}>
<CardGrid>
<Heading tag="h6" size="7">Update Bundle ID</Heading>
<p class="text">
@@ -44,7 +44,7 @@
};
</script>
<Form on:submit={updateHostname}>
<Form onSubmit={updateHostname}>
<CardGrid>
<Heading tag="h6" size="7">Update Bundle ID</Heading>
<p class="text">
@@ -44,7 +44,7 @@
};
</script>
<Form on:submit={updateHostname}>
<Form onSubmit={updateHostname}>
<CardGrid>
<Heading tag="h6" size="7">Update Bundle ID</Heading>
<p class="text">
@@ -44,7 +44,7 @@
};
</script>
<Form on:submit={updateHostname}>
<Form onSubmit={updateHostname}>
<CardGrid>
<Heading tag="h6" size="7">Update Bundle ID</Heading>
<p class="text">
@@ -33,7 +33,7 @@
};
</script>
<Modal bind:show={showDelete} on:submit={handleDelete} warning>
<Modal bind:show={showDelete} onSubmit={handleDelete} warning>
<svelte:fragment slot="header">Delete Platform</svelte:fragment>
<p>The Platform will be permanently deleted. This action is irreversible.</p>
@@ -44,7 +44,7 @@
};
</script>
<Form on:submit={updateHostname}>
<Form onSubmit={updateHostname}>
<CardGrid>
<Heading tag="h6" size="7">Update Package Name</Heading>
<p class="text">
@@ -44,7 +44,7 @@
};
</script>
<Form on:submit={updateHostname}>
<Form onSubmit={updateHostname}>
<CardGrid>
<Heading tag="h6" size="7">Update Bundle ID</Heading>
<p class="text">
@@ -44,7 +44,7 @@
};
</script>
<Form on:submit={updateHostname}>
<Form onSubmit={updateHostname}>
<CardGrid>
<Heading tag="h6" size="7">Update Package Name</Heading>
<p class="text">Your application name.</p>
@@ -44,7 +44,7 @@
};
</script>
<Form on:submit={updateHostname}>
<Form onSubmit={updateHostname}>
<CardGrid>
<Heading tag="h6" size="7">Update Bundle ID</Heading>
<p class="text">
@@ -44,7 +44,7 @@
};
</script>
<Form on:submit={updateHostname}>
<Form onSubmit={updateHostname}>
<CardGrid>
<Heading tag="h6" size="7">Update Package Name</Heading>
<p class="text">Your application name.</p>
@@ -39,7 +39,7 @@
};
</script>
<Form on:submit={updateHostname}>
<Form onSubmit={updateHostname}>
<CardGrid>
<Heading tag="h6" size="7">Update Hostname</Heading>
<p class="text">You can use * to allow wildcard hostnames or subdomains.</p>
@@ -82,7 +82,7 @@
<Container>
{#if $project}
<Form on:submit={updateName}>
<Form onSubmit={updateName}>
<CardGrid>
<Heading tag="h6" size="7">API Credentials</Heading>
<p class="text">Access Appwrite services using your API Endpoint and Project ID.</p>
@@ -33,7 +33,7 @@
};
</script>
<Modal bind:show={showDelete} on:submit={handleDelete} warning>
<Modal bind:show={showDelete} onSubmit={handleDelete} warning>
<svelte:fragment slot="header">Delete Project</svelte:fragment>
<p>
<b>This project will be deleted</b>, along with all of its metadata, stats, and other
@@ -32,7 +32,7 @@
};
</script>
<Modal bind:show={showDelete} on:submit={deleteDomain} warning>
<Modal bind:show={showDelete} onSubmit={deleteDomain} warning>
<svelte:fragment slot="header">Delete Domain</svelte:fragment>
{#if selectedDomain}
<p data-private>
@@ -33,7 +33,7 @@
}
</script>
<Modal bind:show={showDelete} on:submit={handleDelete} warning>
<Modal bind:show={showDelete} onSubmit={handleDelete} warning>
<svelte:fragment slot="header">Delete Webhook</svelte:fragment>
<p data-private>
Are you sure you want to delete <b>{$webhook.name}</b> from '{$project.name}'?
@@ -32,7 +32,7 @@
}
</script>
<Modal bind:show on:submit={regenerate}>
<Modal bind:show onSubmit={regenerate}>
<svelte:fragment slot="header">Regenerate Key</svelte:fragment>
<p class="u-text">
Are you sure you want to generate a new Signature Key?
@@ -64,7 +64,7 @@
}
</script>
<Form on:submit={updateEvents}>
<Form onSubmit={updateEvents}>
<CardGrid>
<Heading tag="h6" size="7">Update Events</Heading>
<p class="text">
@@ -45,7 +45,7 @@
}
</script>
<Form on:submit={updateName}>
<Form onSubmit={updateName}>
<CardGrid>
<Heading tag="h2" size="7">Update Name</Heading>
<p>Choose any name that will help you distinguish between Webhooks.</p>
@@ -56,7 +56,7 @@
}
</script>
<Form on:submit={updateSecurity}>
<Form onSubmit={updateSecurity}>
<CardGrid>
<Heading tag="h2" size="7">Security</Heading>
<p class="text">
@@ -45,7 +45,7 @@
}
</script>
<Form on:submit={updateUrl}>
<Form onSubmit={updateUrl}>
<CardGrid>
<Heading tag="h2" size="7">Update Url</Heading>
@@ -48,7 +48,7 @@
}
</script>
<Modal size="big" {error} bind:show={showCreate} on:submit={create}>
<Modal size="big" {error} bind:show={showCreate} onSubmit={create}>
<svelte:fragment slot="header">Create File</svelte:fragment>
<FormList>
<div>
@@ -31,7 +31,7 @@
};
</script>
<Modal bind:show={showDelete} on:submit={deleteUser} warning>
<Modal bind:show={showDelete} onSubmit={deleteUser} warning>
<svelte:fragment slot="header">Delete Bucket</svelte:fragment>
<p data-private>Are you sure you want to delete <b>{$bucket.name}</b>?</p>
<svelte:fragment slot="footer">
@@ -32,7 +32,7 @@
};
</script>
<Modal bind:show={showDelete} on:submit={deleteFile} warning>
<Modal bind:show={showDelete} onSubmit={deleteFile} warning>
<svelte:fragment slot="header">Delete File</svelte:fragment>
<p data-private>Are you sure you want to delete <b>{file.name}</b>?</p>
<svelte:fragment slot="footer">
@@ -33,7 +33,7 @@
};
</script>
<Modal bind:show={showDelete} on:submit={deleteFile} warning>
<Modal bind:show={showDelete} onSubmit={deleteFile} warning>
<svelte:fragment slot="header">Delete File</svelte:fragment>
<p data-private>Are you sure you want to delete <b>{$file.name}</b>?</p>
<svelte:fragment slot="footer">
@@ -211,7 +211,7 @@
<Container>
{#if $bucket}
<Form on:submit={toggleBucket}>
<Form onSubmit={toggleBucket}>
<CardGrid>
<Heading tag="h2" size="7">{$bucket.name}</Heading>
@@ -234,7 +234,7 @@
</CardGrid>
</Form>
<Form on:submit={updateName}>
<Form onSubmit={updateName}>
<CardGrid>
<Heading tag="h6" size="7">Update Name</Heading>
<svelte:fragment slot="aside">
@@ -256,7 +256,7 @@
</CardGrid>
</Form>
<Form on:submit={updatePermissions}>
<Form onSubmit={updatePermissions}>
<CardGrid>
<Heading tag="h6" size="7">Update Permissions</Heading>
<p class="text">
@@ -280,7 +280,7 @@
</CardGrid>
</Form>
<Form on:submit={updateFileSecurity}>
<Form onSubmit={updateFileSecurity}>
<CardGrid>
<Heading tag="h6" size="7">Update File Security</Heading>
<svelte:fragment slot="aside">
@@ -308,7 +308,7 @@
</CardGrid>
</Form>
<Form on:submit={updateSecurity}>
<Form onSubmit={updateSecurity}>
<CardGrid>
<Heading tag="h2" size="7">Update Security Settings</Heading>
<p class="text">
@@ -379,7 +379,7 @@
</CardGrid>
</Form>
<Form on:submit={updateCompression}>
<Form onSubmit={updateCompression}>
<CardGrid>
<Heading tag="h2" size="6">Update Compression Algorithm</Heading>
<p class="text">
@@ -404,7 +404,7 @@
<UpdateMaxFileSize />
<Form on:submit={updateAllowedExtensions}>
<Form onSubmit={updateAllowedExtensions}>
<CardGrid>
<Heading tag="h6" size="7">Update Allowed File Extensions</Heading>
<p class="text">
@@ -22,7 +22,7 @@
}
</script>
<Form on:submit={updateMaxSize}>
<Form onSubmit={updateMaxSize}>
<CardGrid>
<Heading tag="h2" size="6">Update Maximum File Size</Heading>
<p class="text">Set the maximum file size allowed in the bucket.</p>
@@ -45,7 +45,7 @@
}
</script>
<Modal {error} on:submit={create} size="big" bind:show={showCreate}>
<Modal {error} onSubmit={create} size="big" bind:show={showCreate}>
<svelte:fragment slot="header">Create Bucket</svelte:fragment>
<FormList>
<InputText
+1 -1
View File
@@ -62,7 +62,7 @@
</div>
{:else}
<p class="text">You have been invited to join a team project on Appwrite</p>
<Form on:submit={acceptInvite}>
<Form onSubmit={acceptInvite}>
<FormList>
<InputChoice
required
+1 -1
View File
@@ -46,7 +46,7 @@
<Unauthenticated>
<svelte:fragment slot="title">Sign in</svelte:fragment>
<svelte:fragment>
<Form on:submit={login}>
<Form onSubmit={login}>
<FormList>
<InputEmail
id="email"
+2 -2
View File
@@ -70,7 +70,7 @@
<svelte:fragment slot="title">Password Recovery</svelte:fragment>
<svelte:fragment>
{#if userId && secret}
<Form on:submit={setPassword}>
<Form onSubmit={setPassword}>
<FormList>
<InputPassword
label="New password"
@@ -94,7 +94,7 @@
</FormList>
</Form>
{:else}
<Form on:submit={recover}>
<Form onSubmit={recover}>
<FormList>
<InputEmail
id="email"
+1 -1
View File
@@ -47,7 +47,7 @@
<Unauthenticated>
<svelte:fragment slot="title">Sign up</svelte:fragment>
<svelte:fragment>
<Form on:submit={register}>
<Form onSubmit={register}>
<FormList>
<InputText
id="name"
@@ -94,7 +94,7 @@
<Unauthenticated {imgLight} {imgDark}>
<svelte:fragment slot="title">{title}</svelte:fragment>
<svelte:fragment>
<Form on:submit={invite}>
<Form onSubmit={invite}>
<FormList>
<InputText
id="name"