From 6e63c6ae314a8ba6844788db8f24768e7f1fcc7b Mon Sep 17 00:00:00 2001 From: Soitora Date: Mon, 14 Sep 2020 22:40:00 +0200 Subject: [PATCH] Download page tweaks (#345) * Tweaked ReleaseDate and VersionTag Also reworded README for Downloads * Tweak download buttons Also tweak constants and store to make them look more uniform. * Changed button to element-ui buttons Tweaked buttons though, but easier to make behave right * Tweak placeholder digit to double digit --- src/.vuepress/components/DownloadButtons.vue | 307 +++++++++---------- src/.vuepress/components/ReleaseDate.vue | 39 ++- src/.vuepress/components/VersionTag.vue | 36 ++- src/.vuepress/constants.js | 4 +- src/.vuepress/store/index.js | 14 +- src/download/README.md | 2 +- 6 files changed, 227 insertions(+), 175 deletions(-) diff --git a/src/.vuepress/components/DownloadButtons.vue b/src/.vuepress/components/DownloadButtons.vue index 826001a6..427b7767 100644 --- a/src/.vuepress/components/DownloadButtons.vue +++ b/src/.vuepress/components/DownloadButtons.vue @@ -1,156 +1,151 @@ - - - - - + + + + + diff --git a/src/.vuepress/components/ReleaseDate.vue b/src/.vuepress/components/ReleaseDate.vue index b963b8a7..e8a6b27a 100644 --- a/src/.vuepress/components/ReleaseDate.vue +++ b/src/.vuepress/components/ReleaseDate.vue @@ -1,23 +1,50 @@ diff --git a/src/.vuepress/constants.js b/src/.vuepress/constants.js index 69fd9650..b0bce710 100644 --- a/src/.vuepress/constants.js +++ b/src/.vuepress/constants.js @@ -1,5 +1,5 @@ export const GITHUB_EXTENSION_JSON = "https://raw.githubusercontent.com/inorichi/tachiyomi-extensions/repo/index.json"; -export const GITHUB_LATEST_RELEASE = "https://github.com/inorichi/tachiyomi/releases/latest"; -export const GITHUB_LATEST_API = "https://api.github.com/repos/inorichi/tachiyomi/releases/latest"; +export const GITHUB_STABLE_API = "https://api.github.com/repos/inorichi/tachiyomi/releases/latest"; +export const GITHUB_STABLE_RELEASE = "https://github.com/inorichi/tachiyomi/releases/latest"; export const GITHUB_PREVIEW_API = "https://api.github.com/repos/tachiyomiorg/android-app-preview/releases/latest"; export const GITHUB_PREVIEW_RELEASE = "https://github.com/tachiyomiorg/android-app-preview/releases/latest"; diff --git a/src/.vuepress/store/index.js b/src/.vuepress/store/index.js index ce978463..a5e62a5b 100644 --- a/src/.vuepress/store/index.js +++ b/src/.vuepress/store/index.js @@ -2,7 +2,7 @@ import Vue from "vue"; import Vuex from "vuex"; import axios from "axios"; -import { GITHUB_LATEST_API, GITHUB_PREVIEW_API } from "../constants"; +import { GITHUB_STABLE_API, GITHUB_PREVIEW_API } from "../constants"; const worker = (function () { const networkMap = new Map(); @@ -73,22 +73,22 @@ const worker = (function () { } return { - getPreviewData(store, name) { + getStableData(store, name) { return new Promise((resolve, reject) => { - _getData(store, name, "setPreviewReleaseData", GITHUB_PREVIEW_API) + _getData(store, name, "setStableReleaseData", GITHUB_STABLE_API) .then(() => { - resolve(store.state.preview); + resolve(store.state.stable); }) .catch((reason) => { reject(reason); }); }); }, - getStableData(store, name) { + getPreviewData(store, name) { return new Promise((resolve, reject) => { - _getData(store, name, "setStableReleaseData", GITHUB_LATEST_API) + _getData(store, name, "setPreviewReleaseData", GITHUB_PREVIEW_API) .then(() => { - resolve(store.state.stable); + resolve(store.state.preview); }) .catch((reason) => { reject(reason); diff --git a/src/download/README.md b/src/download/README.md index 795afbcb..0a89e491 100644 --- a/src/download/README.md +++ b/src/download/README.md @@ -8,7 +8,7 @@ lang: en-US --- # Download -Download the latest stable version of **Tachiyomi** (****) which released . +Download the latest stable version of **Tachiyomi** that released or the preview version that released .