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

View File

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