@@ -15,11 +15,39 @@ import axios from "axios";
const RELEASE_URL =
"https://api.github.com/repos/inorichi/tachiyomi/releases/latest";
+const PREVIEW_URL =
+ "https://tachiyomi.kanade.eu/latest";
+
export default {
+ props: {
+ downloadStableTag: {
+ type: String,
+ required: true
+ },
+ downloadPreviewTag: {
+ type: String,
+ required: true
+ },
+ downloadStableLabel: {
+ type: String,
+ default: "Stable"
+ },
+ downloadPreviewLabel: {
+ type: String,
+ default: "Preview"
+ },
+ downloadStableUrl: {
+ type: String
+ },
+ downloadPreviewUrl: {
+ type: String
+ }
+ },
+
data() {
return {
tagName: "",
- browserDownloadUrl: ""
+ browserDownloadUrl: "",
};
},
@@ -36,7 +64,7 @@ export default {
downloadStable() {
this.$swal({
title: "Downloading",
- text: "Stable version is being downloaded.",
+ text: this.downloadStableLabel + " version is being downloaded.",
icon: "success",
focusConfirm: false,
focusCancel: false,
@@ -54,20 +82,14 @@ export default {
}
});
window.location.assign(
- this.$data.browserDownloadUrl || RELEASE_URL
- );
- window.ga(
- "send",
- "event",
- "Button",
- "Click",
- "Stable download - Getting Started"
+ this.$props.downloadStableUrl || this.$data.browserDownloadUrl || RELEASE_URL
);
+ window.ga("send", "event", "Action", "Download", this.downloadStableTag);
},
downloadPreview() {
this.$swal({
title: "Downloading",
- text: "Preview version is being downloaded.",
+ text: this.downloadPreviewLabel + " version is being downloaded.",
icon: "success",
focusConfirm: false,
focusCancel: false,
@@ -84,14 +106,10 @@ export default {
popup: "animated zoomOut faster"
}
});
- window.location.assign("https://tachiyomi.kanade.eu/latest");
- window.ga(
- "send",
- "event",
- "Button",
- "Click",
- "Dev download - Getting Started"
+ window.location.assign(
+ this.$props.downloadPreviewUrl || PREVIEW_URL
);
+ window.ga("send", "event", "Action", "Download", this.downloadPreviewTag);
}
}
};
diff --git a/src/.vuepress/components/ForkButtons.vue b/src/.vuepress/components/ForkButtons.vue
index 6f613396..4ed52374 100644
--- a/src/.vuepress/components/ForkButtons.vue
+++ b/src/.vuepress/components/ForkButtons.vue
@@ -75,13 +75,7 @@ export default {
window.location.assign(
this.$data.browserDownloadUrl || this.$props.downloadLink
);
- window.ga(
- "send",
- "event",
- "Button",
- "Click",
- this.$props.forkName + " download - Forks"
- );
+ window.ga("send", "event", "Action", "Download", this.$props.forkName);
}
}
};
diff --git a/src/.vuepress/theme/components/Home.vue b/src/.vuepress/theme/components/Home.vue
index d2937442..230f2909 100644
--- a/src/.vuepress/theme/components/Home.vue
+++ b/src/.vuepress/theme/components/Home.vue
@@ -55,6 +55,9 @@ import axios from "axios";
const RELEASE_URL =
"https://api.github.com/repos/inorichi/tachiyomi/releases/latest";
+const PREVIEW_URL =
+ "https://tachiyomi.kanade.eu/latest";
+
export default {
components: { NavLink },
@@ -130,16 +133,9 @@ export default {
}
});
window.location.assign(
- this.$data.browserDownloadUrl ||
- "https://github.com/inorichi/tachiyomi/releases/latest"
- );
- window.ga(
- "send",
- "event",
- "Button",
- "Click",
- "Stable download"
+ this.$data.browserDownloadUrl || RELEASE_URL
);
+ window.ga("send", "event", "Action", "Download", "Tachiyomi");
} else if (result.dismiss === "cancel") {
this.$swal({
title: "Downloading",
@@ -160,14 +156,10 @@ export default {
popup: "animated zoomOut faster"
}
});
- window.location.assign("https://tachiyomi.kanade.eu/latest");
- window.ga(
- "send",
- "event",
- "Button",
- "Click",
- "Dev download"
+ window.location.assign(
+ PREVIEW_URL
);
+ window.ga("send", "event", "Action", "Download", "Tachiyomi Preview");
}
});
}
diff --git a/src/help/guides/getting-started.md b/src/help/guides/getting-started.md
index 212b3715..ad8e0ae8 100644
--- a/src/help/guides/getting-started.md
+++ b/src/help/guides/getting-started.md
@@ -7,7 +7,7 @@ lang: en-US
## Installation
-