fix: strip leading https://, close #668
This commit is contained in:
1 parent
23eb816dc2
commit
98d56a0a0f
6 files changed
+24
-18
No files matched your search
@@ -64,7 +64,7 @@
|
||||
{#if removing.shown && removing.account}
|
||||
<Modal bind:open={removing.shown}>
|
||||
{#snippet customTitle()}
|
||||
<span>Removing Account</span>
|
||||
<span>{$t('account.logout')}</span>
|
||||
{/snippet}
|
||||
<div class="flex flex-row items-center gap-2">
|
||||
<ProfileAvatar profile={removing.account} selected={true} />
|
||||
@@ -76,7 +76,6 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<p>This removes the account from Photon, it does not delete the account.</p>
|
||||
<div class="flex flex-row gap-2 items-center">
|
||||
<Button size="lg" class="flex-1" onclick={() => (removing.shown = false)}>
|
||||
Cancel
|
||||
|
||||
@@ -55,7 +55,8 @@
|
||||
clearErrorScope(page.route.id)
|
||||
|
||||
try {
|
||||
data.instance = data.instance.trim()
|
||||
// leading HTTPS is redundant
|
||||
data.instance = data.instance.trim().replace(/^https:\/\//, '')
|
||||
|
||||
const response = await client({
|
||||
instanceURL: data.instance,
|
||||
@@ -143,7 +144,7 @@
|
||||
required
|
||||
pattern={DOMAIN_REGEX_FORMS}
|
||||
autocorrect="off"
|
||||
autocapitalize="none"
|
||||
autocapitalize="off"
|
||||
>
|
||||
{#snippet suffix()}
|
||||
<Select
|
||||
@@ -160,7 +161,9 @@
|
||||
}
|
||||
class="border-y-0! border-r-0! rounded-none! border-l max-w-24"
|
||||
>
|
||||
<Option data-label="true" value="placeholder" disabled>{$t('form.instanceType')}</Option>
|
||||
<Option data-label="true" value="placeholder" disabled>
|
||||
{$t('form.instanceType')}
|
||||
</Option>
|
||||
<Option value="lemmyv3">Lemmy</Option>
|
||||
<Option value="piefedvalpha">Piefed</Option>
|
||||
</Select>
|
||||
|
||||
Reference in new issue
Block a user