[web] Reinforce check of URL entry

This commit is contained in:
Alain Nussbaumer 2023-11-23 20:36:55 +01:00
parent 406c87f765
commit 11616f5d32
2 changed files with 35 additions and 35 deletions

View File

@ -4,25 +4,25 @@
<div v-if="show" class="modal is-active">
<div class="modal-background" @click="$emit('close')" />
<div class="modal-content fd-modal-card">
<div class="card">
<form class="card" @submit.prevent="add_stream">
<div class="card-content">
<p class="title is-4" v-text="$t('dialog.add.rss.title')" />
<form @submit.prevent="add_stream">
<div class="field">
<p class="control is-expanded has-icons-left">
<input
ref="url_field"
v-model="url"
class="input is-shadowless"
type="text"
:placeholder="$t('dialog.add.rss.placeholder')"
:disabled="loading"
/>
<mdicon class="icon is-left" name="rss" size="16" />
</p>
<p class="help" v-text="$t('dialog.add.rss.help')" />
</div>
</form>
<div class="field">
<p class="control is-expanded has-icons-left">
<input
ref="url_field"
v-model="url"
class="input is-shadowless"
type="url"
pattern="http[s]?://.*"
required
:placeholder="$t('dialog.add.rss.placeholder')"
:disabled="loading"
/>
<mdicon class="icon is-left" name="rss" size="16" />
</p>
<p class="help" v-text="$t('dialog.add.rss.help')" />
</div>
</div>
<footer v-if="loading" class="card-footer">
<a class="card-footer-item button is-loading">
@ -49,7 +49,7 @@
<span class="is-size-7" v-text="$t('dialog.add.rss.add')" />
</a>
</footer>
</div>
</form>
</div>
<button
class="modal-close is-large"

View File

@ -4,24 +4,24 @@
<div v-if="show" class="modal is-active">
<div class="modal-background" @click="$emit('close')" />
<div class="modal-content fd-modal-card">
<div class="card">
<form class="card" @submit.prevent="play">
<div class="card-content">
<p class="title is-4" v-text="$t('dialog.add.stream.title')" />
<form class="mb-5" @submit.prevent="play">
<div class="field">
<p class="control is-expanded has-icons-left">
<input
ref="url_field"
v-model="url"
class="input is-shadowless"
type="text"
:placeholder="$t('dialog.add.stream.placeholder')"
:disabled="loading"
/>
<mdicon class="icon is-left" name="web" size="16" />
</p>
</div>
</form>
<div class="field">
<p class="control is-expanded has-icons-left">
<input
ref="url_field"
v-model="url"
class="input is-shadowless"
type="url"
pattern="http[s]?://.*"
required
:placeholder="$t('dialog.add.stream.placeholder')"
:disabled="loading"
/>
<mdicon class="icon is-left" name="web" size="16" />
</p>
</div>
</div>
<footer v-if="loading" class="card-footer">
<a class="card-footer-item has-text-dark">
@ -55,7 +55,7 @@
<span class="is-size-7" v-text="$t('dialog.add.stream.play')" />
</a>
</footer>
</div>
</form>
</div>
<button
class="modal-close is-large"