Subscription groups

This commit is contained in:
Bnyro
2023-05-07 19:56:56 +02:00
parent 5e955b2286
commit c217d5e4e3
6 changed files with 200 additions and 8 deletions

View File

@@ -21,6 +21,7 @@ import {
faServer,
faDonate,
faBookmark,
faEdit,
} from "@fortawesome/free-solid-svg-icons";
import { faGithub, faBitcoin, faYoutube } from "@fortawesome/free-brands-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
@@ -48,6 +49,7 @@ library.add(
faServer,
faDonate,
faBookmark,
faEdit,
);
import router from "@/router/router.js";
@@ -271,6 +273,25 @@ const mixin = {
)
.replaceAll("\n", "<br>");
},
getChannelGroupsCursor() {
if (!window.db) return;
var tx = window.db.transaction("channel_groups", "readonly");
var store = tx.objectStore("channel_groups");
return store.index("groupName").openCursor();
},
createOrUpdateChannelGroup(group) {
var tx = window.db.transaction("channel_groups", "readwrite");
var store = tx.objectStore("channel_groups");
store.put({
groupName: group.groupName,
channels: JSON.stringify(group.channels),
});
},
deleteChannelGroup(groupName) {
var tx = window.db.transaction("channel_groups", "readwrite");
var store = tx.objectStore("channel_groups");
store.delete(groupName);
},
},
computed: {
authenticated(_this) {