Hide subscribe button when not subscribable

This commit is contained in:
Alex Ling
2022-06-05 12:33:26 +00:00
parent 2d97faa7c0
commit 30d5ad0c19
5 changed files with 25 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
const component = () => {
return {
plugins: [],
subscribable: false,
info: undefined,
pid: undefined,
chapters: undefined, // undefined: not searched yet, []: empty
@@ -60,6 +61,7 @@ const component = () => {
.then((data) => {
if (!data.success) throw new Error(data.error);
this.info = data.info;
this.subscribable = data.subscribable;
this.pid = pid;
})
.catch((e) => {
@@ -140,6 +142,7 @@ const component = () => {
if (!query) return;
this.manga = undefined;
this.mid = undefined;
if (this.info.version === 1) {
this.searchChapters(query);
} else {