1 line
No EOL
3.7 KiB
Text
1 line
No EOL
3.7 KiB
Text
{"version":3,"file":"LoginForm-DtR3F2ZT.js","sources":["../../src/lib/components/organisms/LoginForm.svelte"],"sourcesContent":["<!--\nLoginForm organism.\nCopyright (C) 2024 André Jaenisch\nSPDX-FileCopyrightText: 2024 André Jaenisch\nSPDX-License-Identifier: AGPL-3.0-or-later\n\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<script>\n\timport { _ } from 'svelte-i18n';\n\n\t/**\n\t * PageData provided by SvelteKit.\n\t */\n\texport let data = {\n\t\tservers: {}\n\t};\n\n\t/**\n\t * Form handling by SvelteKit\n\t */\n\texport let form = {\n\t\tservers: {}\n\t};\n\n\t/**\n\t * Translation keys to enable reuse\n\t */\n\texport let i18n = {\n\t\tfields: {\n\t\t\taccount: {\n\t\t\t\tlabel: ''\n\t\t\t},\n\t\t\tpassphrase: {\n\t\t\t\tlabel: '',\n\t\t\t\tplaceholder: ''\n\t\t\t},\n\t\t\tserver: {\n\t\t\t\tlabel: ''\n\t\t\t}\n\t\t},\n\t\treset: '',\n\t\tsubmit: '',\n\t\tvalidation: {\n\t\t\tincorrect: '',\n\t\t\tmissing: ''\n\t\t}\n\t};\n\n\t/**\n\t * Allow for linking stories in Storybook.\n\t */\n\texport let sb = '';\n</script>\n\n<form class=\"space-y-4\" name=\"login\" method=\"POST\" action=\"?/login\">\n\t{#if form?.missing}\n\t\t<p class=\"error\">{$_(i18n.validation.missing)}</p>\n\t{/if}\n\t{#if form?.incorrect}\n\t\t<p class=\"error\">{$_(i18n.validation.incorrect)}</p>\n\t{/if}\n\t<label class=\"label\">\n\t\t<span>{$_(i18n.fields.server.label)}</span>\n\t\t<select class=\"select\" name=\"server\">\n\t\t\t{#each Object.entries(data.servers) as [value, label]}\n\t\t\t\t<option {value}>{label}</option>\n\t\t\t{/each}\n\t\t</select>\n\t</label>\n\t<label class=\"label\">\n\t\t<span>{$_(i18n.fields.account.label)}</span>\n\t\t<input class=\"input\" name=\"account\" type=\"text\" value={form?.account ?? ''} />\n\t</label>\n\t<label class=\"label\">\n\t\t<span>{$_(i18n.fields.passphrase.label)}</span>\n\t\t<input\n\t\t\tclass=\"input\"\n\t\t\tname=\"passphrase\"\n\t\t\ttype=\"password\"\n\t\t\tplaceholder={$_(i18n.fields.passphrase.placeholder)}\n\t\t/>\n\t</label>\n\t<div class=\"text-right\">\n\t\t<a href=\"/\" class=\"btn btn-bg-initial\">\n\t\t\t{$_(i18n.reset)}\n\t\t</a>\n\t</div>\n\t<button type=\"submit\" class=\"w-full btn variant-filled-primary\" data-sb-kind={sb}>\n\t\t{$_(i18n.submit)}\n\t</button>\n</form>\n"],"names":["ctx","submit","t13","if_block0","cov_zidqh8wio","s","b","missing","create_if_block_1","form_1","label0","set_data","t13_value","$$props","sb"],"mappings":"wtoDAiEEA,EAAmD,CAAA,EAAAA,EAAAC,CAAAA,EAAAA,MAAA,MAHjCC,EAAAC,GAAAC,EAAA,EAAAC,EAAA,EAAA,IAAAD,EAAA,EAAAE,EAAAN,EAAAA,EAAAA,CAAAA,MAAAA,GAAAA,EAAAO,CAAAA,IAAAP,YAAAA,GAAAO,WAAAH,EAAA,EAAAE,EAAAE,EAAAA,EAAAA,CAAAA,IAAAA,GAAAR,CAAA,+7HAGAS,EAAAC,CAAA,EAAAN,EAAAC,EAAAA,qoBAHAL,EAAAA,EAAA,CAAA,IAAAA,MAAAA,EAAAO,SAAAH,IAAAE,EAAA,EAAA,EAAA,CAAA,IAAAF,IAAAC,s3DAGlBL,IAAAA,EAAAA,EAAAA,EAAAA,CAAAA,IAAAA,EAAAA,KAAAA,IAAAA,EAAAA,EAAAA,EAAAA,CAAAA,IAAAA,KAAAA,EAAAA,KAAmDA,EAAA,CAAA,EAAAC,MAAA,EAAA,MAAAG,EAAA,EAAAE,EAAAF,EAAAA,EAAAA,CAAAA,IAAAA,EAAA,EAAAC,EAAA,GAAA,IAAAM,EAAAT,EAAAU,CAAA,GAAAR,EAAAE,EAAAA,WAAAF,EAAA,EAAAC,qsBAHF,GAAAD,EAAA,EAAA,EAAA,GAAA,IAAAS,GAAA,CAAAC,GAAAA,GAAAV,EAAA,EAAAE,EAAA,EAAA,EAAA,CAAA,IAAA,GAAAF,GAAAA,EAAA,EAAAC,EAAA,GAAA,IAAAQ,GAAAT,OAAAA,EAAAC,EAAAA"} |