mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Fix:OPML file upload reset
This commit is contained in:
parent
cfcd351570
commit
6161daeef0
@ -8,7 +8,7 @@
|
|||||||
<ui-text-input v-model="searchInput" :disabled="processing" placeholder="Enter search term or RSS feed URL" class="flex-grow mr-2" />
|
<ui-text-input v-model="searchInput" :disabled="processing" placeholder="Enter search term or RSS feed URL" class="flex-grow mr-2" />
|
||||||
<ui-btn type="submit" :disabled="processing">Submit</ui-btn>
|
<ui-btn type="submit" :disabled="processing">Submit</ui-btn>
|
||||||
</form>
|
</form>
|
||||||
<ui-file-input :accept="'.opml, .txt'" class="mx-2" @change="opmlFileUpload"> Upload OPML File </ui-file-input>
|
<ui-file-input ref="fileInput" :accept="'.opml, .txt'" class="mx-2" @change="opmlFileUpload"> Upload OPML File </ui-file-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w-full max-w-3xl mx-auto py-4">
|
<div class="w-full max-w-3xl mx-auto py-4">
|
||||||
@ -86,6 +86,10 @@ export default {
|
|||||||
reader.readAsText(file)
|
reader.readAsText(file)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (this.$refs.fileInput) {
|
||||||
|
this.$refs.fileInput.reset()
|
||||||
|
}
|
||||||
|
|
||||||
if (!txt || !txt.includes('<opml') || !txt.includes('<outline ')) {
|
if (!txt || !txt.includes('<opml') || !txt.includes('<outline ')) {
|
||||||
// Quick lazy check for valid OPML
|
// Quick lazy check for valid OPML
|
||||||
this.$toast.error('Invalid OPML file <opml> tag not found OR an <outline> tag was not found')
|
this.$toast.error('Invalid OPML file <opml> tag not found OR an <outline> tag was not found')
|
||||||
|
Loading…
Reference in New Issue
Block a user