mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Fix some bugs and small improvements.
This commit is contained in:
parent
8e07948e28
commit
ea49201eb9
3 changed files with 11 additions and 8 deletions
|
@ -149,8 +149,17 @@ export default {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.importSubscriptionsLocally(this.subscriptions);
|
this.importSubscriptionsLocally(this.subscriptions);
|
||||||
|
window.location = "/feed";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
importSubscriptionsLocally(newChannels) {
|
||||||
|
const subscriptions = this.override
|
||||||
|
? [...new Set(newChannels)]
|
||||||
|
: [...new Set(this.getLocalSubscriptions().concat(newChannels))];
|
||||||
|
// Sort for better cache hits
|
||||||
|
subscriptions.sort();
|
||||||
|
localStorage.setItem("localSubscriptions", JSON.stringify(subscriptions));
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<h1 class="font-bold text-center my-4" v-t="'titles.subscriptions'" />
|
<h1 class="font-bold text-center my-4" v-t="'titles.subscriptions'" />
|
||||||
|
|
||||||
<div v-if="authenticated" class="flex justify-between w-full">
|
<div class="flex justify-between w-full">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<button class="btn mx-1">
|
<button class="btn mx-1">
|
||||||
<router-link to="/import" v-t="'actions.import_from_json'" />
|
<router-link to="/import" v-t="'actions.import_from_json'" />
|
||||||
|
@ -57,7 +57,7 @@ export default {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return await this.fetchJson(this.authApiUrl() + "/subscriptions/unauthenticated", null, {
|
return await this.fetchJson(this.authApiUrl() + "/subscriptions/unauthenticated", {
|
||||||
channels: this.getUnauthenticatedChannels(),
|
channels: this.getUnauthenticatedChannels(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,12 +220,6 @@ const mixin = {
|
||||||
const localSubscriptions = this.getLocalSubscriptions();
|
const localSubscriptions = this.getLocalSubscriptions();
|
||||||
return localSubscriptions.join(",");
|
return localSubscriptions.join(",");
|
||||||
},
|
},
|
||||||
importSubscriptionsLocally(newChannels) {
|
|
||||||
const subscriptions = this.getLocalSubscriptions().concat(newChannels);
|
|
||||||
// Sort for better cache hits
|
|
||||||
subscriptions.sort();
|
|
||||||
localStorage.setItem("localSubscriptions"), JSON.stringify(subscriptions);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
theme() {
|
theme() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue