feat: add to channel group modal on channel page

This commit is contained in:
Bnyro
2023-09-14 17:04:04 +02:00
parent 859908cb1f
commit d3290c16de
6 changed files with 99 additions and 30 deletions

View File

@@ -143,18 +143,8 @@ export default {
this.channelGroups.push(this.selectedGroup);
if (!window.db) return;
const cursor = this.getChannelGroupsCursor();
cursor.onsuccess = e => {
const cursor = e.target.result;
if (cursor) {
const group = cursor.value;
this.channelGroups.push({
groupName: group.groupName,
channels: JSON.parse(group.channels),
});
cursor.continue();
}
};
this.loadChannelGroups();
},
activated() {
document.title = "Subscriptions - Piped";
@@ -173,6 +163,10 @@ export default {
});
}
},
async loadChannelGroups() {
const groups = await this.getChannelGroups();
this.channelGroups.push(...groups);
},
handleButton(subscription) {
const channelId = subscription.url.split("/")[2];
if (this.authenticated) {