From 9b77cf1fd89d8991d0d9c6b51fe0d728095cdec4 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Fri, 21 Jul 2023 17:53:14 +0200 Subject: [PATCH] Remove donation popup --- packages/client/src/components/MkDonation.vue | 190 ------------------ packages/client/src/init.ts | 23 --- 2 files changed, 213 deletions(-) delete mode 100644 packages/client/src/components/MkDonation.vue diff --git a/packages/client/src/components/MkDonation.vue b/packages/client/src/components/MkDonation.vue deleted file mode 100644 index b3f4d2790..000000000 --- a/packages/client/src/components/MkDonation.vue +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - diff --git a/packages/client/src/init.ts b/packages/client/src/init.ts index bba23d9db..643dc630f 100644 --- a/packages/client/src/init.ts +++ b/packages/client/src/init.ts @@ -450,29 +450,6 @@ function checkForSplash() { } localStorage.setItem("lastUsed", Date.now().toString()); - const latestDonationInfoShownAt = localStorage.getItem( - "latestDonationInfoShownAt", - ); - const neverShowDonationInfo = localStorage.getItem("neverShowDonationInfo"); - if ( - neverShowDonationInfo !== "true" && - new Date($i.createdAt).getTime() < Date.now() - 1000 * 60 * 60 * 24 * 3 && - !location.pathname.startsWith("/miauth") - ) { - if ( - latestDonationInfoShownAt == null || - new Date(latestDonationInfoShownAt).getTime() < - Date.now() - 1000 * 60 * 60 * 24 * 30 - ) { - popup( - defineAsyncComponent(() => import("@/components/MkDonation.vue")), - {}, - {}, - "closed", - ); - } - } - if ("Notification" in window) { // 許可を得ていなかったらリクエスト if (Notification.permission === "default") {