better errors

This commit is contained in:
tglide
2023-08-21 13:54:07 +01:00
parent d899623012
commit ebcf8ee516
2 changed files with 9 additions and 6 deletions
@@ -15,6 +15,7 @@
resourcesToMigrationForm
} from '$lib/stores/migration';
import { addNotification } from '$lib/stores/notifications';
import { wizard } from '$lib/stores/wizard';
export let formData: ReturnType<typeof createMigrationFormStore>;
export let provider: ReturnType<typeof createMigrationProviderStore>;
@@ -137,7 +138,7 @@
} catch (e) {
if (!isOpen) return;
addNotification({
message: e.message,
message: 'Request failed, please check your crendentials and try again.',
type: 'error'
});
}
@@ -148,8 +149,7 @@
});
$: resources = providerResources[$provider.provider];
// $: wizard.setNextDisabled(!report);
$: wizard.setNextDisabled(!report);
</script>
<div class="box" style:border-radius="0.5rem">
@@ -7,7 +7,8 @@
InputNumber,
InputPassword,
InputSelect,
InputText
InputText,
InputTextarea
} from '$lib/elements/forms';
import { WizardStep } from '$lib/layout';
import type { Provider } from '$lib/stores/migration';
@@ -112,7 +113,7 @@
<!-- {#if showAuth} -->
<div class="u-margin-block-start-16">
<InputText
<InputTextarea
id="credentials"
label="Account credentials"
required
@@ -195,7 +196,9 @@
<InputText
id="database"
label="Database"
placeholder={$provider.subdomain || 'Enter database'}
placeholder={$provider.subdomain
? `Default: ${$provider.subdomain}`
: 'Enter database'}
bind:value={$provider.database} />
<InputText
id="username"