add auto set Feed Url,adapter Rsshub

This commit is contained in:
rebron1900 2023-12-30 12:28:31 +08:00
parent 9d5b8d99f7
commit 2cc9488ef9
2 changed files with 12 additions and 1 deletions

View File

@ -358,7 +358,7 @@
<p class="cursor-default"><b>New Feed</b></p>
<form action="" @submit.prevent="createFeed(event)" class="mt-4">
<label for="feed-url">URL</label>
<input id="feed-url" name="url" type="url" class="form-control" required autocomplete="off" :readonly="feedNewChoice.length > 0" placeholder="https://example.com/feed" v-focus>
<input id="feed-url" name="url" type="url" class="form-control" required autocomplete="off" :readonly="feedNewChoice.length > 0" placeholder="https://example.com/feed" v-focus V-model="autoFeedUrl">
<label for="feed-folder" class="mt-3 d-block">
Folder
<a href="#" class="float-right text-decoration-none" @click.prevent="createNewFeedFolder()">new folder</a>

View File

@ -183,6 +183,14 @@ Vue.component('relative-time', {
})
var vm = new Vue({
mounted:function(){
const subscribe_to = new URLSearchParams(window.location.search).get('subscribe_to');
if(subscribe_to){
vm.settings = 'create'
//document.getElementById("feed-url").value = subscribe_to;
this.autoFeedUrl = subscribe_to;
}
},
created: function() {
this.refreshStats()
.then(this.refreshFeeds.bind(this))
@ -191,6 +199,8 @@ var vm = new Vue({
api.feeds.list_errors().then(function(errors) {
vm.feed_errors = errors
})
alert(new URLSearchParams(window.location.search).get('test'))
},
data: function() {
var s = app.settings
@ -676,6 +686,7 @@ var vm = new Vue({
this.filteredTotalStats = statsTotal
},
}
})
vm.$mount('#app')