mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-25 06:57:22 +00:00
Add support for overriding subscriptions when importing.
This commit is contained in:
parent
08df4866a7
commit
f33a51e61f
@ -7,6 +7,9 @@
|
|||||||
<div class="uk-form-row">
|
<div class="uk-form-row">
|
||||||
<b>Selected Subscriptions: {{ selectedSubscriptions }}</b>
|
<b>Selected Subscriptions: {{ selectedSubscriptions }}</b>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="uk-form-row">
|
||||||
|
<b>Override: <input class="uk-checkbox" v-model="override" type="checkbox"/></b>
|
||||||
|
</div>
|
||||||
<div class="uk-form-row">
|
<div class="uk-form-row">
|
||||||
<a
|
<a
|
||||||
class="uk-width-1-1 uk-button uk-button-primary uk-button-large uk-width-auto"
|
class="uk-width-1-1 uk-button uk-button-primary uk-button-large uk-width-auto"
|
||||||
@ -62,6 +65,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
subscriptions: [],
|
subscriptions: [],
|
||||||
|
override: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -125,13 +129,19 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleImport() {
|
handleImport() {
|
||||||
this.fetchJson(this.apiUrl() + "/import", null, {
|
this.fetchJson(
|
||||||
method: "POST",
|
this.apiUrl() + "/import",
|
||||||
headers: {
|
{
|
||||||
Authorization: this.getAuthToken(),
|
override: this.override,
|
||||||
},
|
},
|
||||||
body: JSON.stringify(this.subscriptions),
|
{
|
||||||
}).then(json => {
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
Authorization: this.getAuthToken(),
|
||||||
|
},
|
||||||
|
body: JSON.stringify(this.subscriptions),
|
||||||
|
},
|
||||||
|
).then(json => {
|
||||||
if (json.message === "ok") window.location = "/feed";
|
if (json.message === "ok") window.location = "/feed";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user