fix(ui): podcasts remote search form
This commit is contained in:
parent
4681e23a1e
commit
154f68b153
|
@ -172,9 +172,30 @@ watch(() => props.initialId, () => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<Tabs
|
||||
<Alert red
|
||||
v-if="!isLoading && obj?.status === 'finished' && !redirectRoute"
|
||||
>
|
||||
{{ t('components.RemoteSearchForm.warning.unsupported') }}
|
||||
</Alert>
|
||||
<Alert red
|
||||
v-if="errors.length > 0"
|
||||
role="alert"
|
||||
title="t('components.RemoteSearchForm.header.fetchFailed')"
|
||||
>
|
||||
<ul class="list">
|
||||
<li
|
||||
v-for="(error, key) in errors"
|
||||
:key="key"
|
||||
>
|
||||
{{ error }}
|
||||
</li>
|
||||
</ul>
|
||||
</Alert>
|
||||
<Layout form
|
||||
v-if="type === 'both'"
|
||||
class="two ui buttons"
|
||||
id="remote-search"
|
||||
>
|
||||
<Tabs
|
||||
>
|
||||
<Tab
|
||||
icon="bi-feed"
|
||||
|
@ -207,40 +228,21 @@ watch(() => props.initialId, () => {
|
|||
/>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
<div v-else>
|
||||
<Layout form
|
||||
id="remote-search"
|
||||
:class="['ui', {loading: isLoading}, 'form']"
|
||||
@submit.stop.prevent="submit"
|
||||
</Layout>
|
||||
<Layout form
|
||||
v-else
|
||||
id="remote-search"
|
||||
:class="['ui', {loading: isLoading}, 'form']"
|
||||
@submit.stop.prevent="submit"
|
||||
>
|
||||
<Button
|
||||
v-if="showSubmit"
|
||||
primary
|
||||
type="submit"
|
||||
:class="{loading: isLoading}"
|
||||
:disabled="isLoading || !id || id.length === 0"
|
||||
>
|
||||
<Alert red
|
||||
v-if="errors.length > 0"
|
||||
role="alert"
|
||||
title="t('components.RemoteSearchForm.header.fetchFailed')"
|
||||
>
|
||||
<ul class="list">
|
||||
<li
|
||||
v-for="(error, key) in errors"
|
||||
:key="key"
|
||||
>
|
||||
{{ error }}
|
||||
</li>
|
||||
</ul>
|
||||
</Alert>
|
||||
<Button
|
||||
v-if="showSubmit"
|
||||
primary
|
||||
type="submit"
|
||||
:class="{loading: isLoading}"
|
||||
:disabled="isLoading || !id || id.length === 0"
|
||||
>
|
||||
{{ t('components.RemoteSearchForm.button.search') }}
|
||||
</Button>
|
||||
</Layout>
|
||||
<Alert
|
||||
v-if="!isLoading && obj?.status === 'finished' && !redirectRoute"
|
||||
>
|
||||
{{ t('components.RemoteSearchForm.warning.unsupported') }}
|
||||
</Alert>
|
||||
</div>
|
||||
{{ t('components.RemoteSearchForm.button.search') }}
|
||||
</Button>
|
||||
</Layout>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue