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 {
|
||||
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>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<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">
|
||||
<button class="btn mx-1">
|
||||
<router-link to="/import" v-t="'actions.import_from_json'" />
|
||||
|
@ -57,7 +57,7 @@ export default {
|
|||
},
|
||||
});
|
||||
} else {
|
||||
return await this.fetchJson(this.authApiUrl() + "/subscriptions/unauthenticated", null, {
|
||||
return await this.fetchJson(this.authApiUrl() + "/subscriptions/unauthenticated", {
|
||||
channels: this.getUnauthenticatedChannels(),
|
||||
});
|
||||
}
|
||||
|
|
|
@ -220,12 +220,6 @@ const mixin = {
|
|||
const localSubscriptions = this.getLocalSubscriptions();
|
||||
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: {
|
||||
theme() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue