From 17f693538a8b7e90a4697ea30181524a8953a2df Mon Sep 17 00:00:00 2001 From: Tachibana Shin Date: Tue, 13 Jun 2023 07:24:01 +0000 Subject: [PATCH 1/3] fix not show screen error if exists cache --- src/pages/phim/_season.vue | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/pages/phim/_season.vue b/src/pages/phim/_season.vue index adfcb996..c98a5bd1 100644 --- a/src/pages/phim/_season.vue +++ b/src/pages/phim/_season.vue @@ -77,7 +77,7 @@
@@ -118,7 +118,7 @@
-
+

settingsStore.player.server, async (server) => { + loadedServerFB = false try { if (server === "DU") { if (typeCurrentConfig !== "DU") - // eslint-disable-next-line promise/catch-or-return PlayerLink(currentMetaChap).then((conf) => { // eslint-disable-next-line promise/always-return if (settingsStore.player.server === "DU") { @@ -1238,25 +1240,33 @@ watch( typeCurrentConfig = "DU" } }) + .catch(err => { + error.value =err + }) } if (server === "FB") { // PlayerFB は常に PlayerLink よりも遅いため、DU を使用して高速プリロード戦術を使用する必要があります。 if (typeCurrentConfig !== "DU") - // eslint-disable-next-line promise/catch-or-return PlayerLink(currentMetaChap).then((conf) => { // eslint-disable-next-line promise/always-return - if (settingsStore.player.server === "DU") { + if (!loadedServerFB && settingsStore.player.server === "DU") { configPlayer.value = conf typeCurrentConfig = "DU" } }) - // eslint-disable-next-line promise/catch-or-return + .catch(err => { + error.value =err + }) PlayerFB(currentMetaChap.id).then((conf) => { // eslint-disable-next-line promise/always-return if (settingsStore.player.server === "FB") { configPlayer.value = conf typeCurrentConfig = "FB" } + loadedServerFB = true + }) + .catch(err => { + error.value =err }) } } catch (err) { From 06e7513ab02e7508ddc081352c6fee2c64401f80 Mon Sep 17 00:00:00 2001 From: Tachibana Shin Date: Tue, 13 Jun 2023 07:45:35 +0000 Subject: [PATCH 2/3] no-spinner avatar --- src/layouts/MainLayout.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index a2c9811a..e322b218 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -624,6 +624,7 @@ Date: Tue, 13 Jun 2023 08:03:21 +0000 Subject: [PATCH 3/3] if error cloudflare -> reload --- src/components/errors/cloudflare.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/errors/cloudflare.vue b/src/components/errors/cloudflare.vue index d10c66ed..efaeac1f 100644 --- a/src/components/errors/cloudflare.vue +++ b/src/components/errors/cloudflare.vue @@ -32,7 +32,7 @@ no-caps outline rounded - @click="retry" + @click="reload" style="color: #00be06" >{{ t("thu-lai") }} @@ -53,6 +53,7 @@ const { t } = useI18n() function openAnimeVietsub() { window.open(C_URL) } +const reload = () => location.reload()