remove analytics

This commit is contained in:
Kentai Radiquum 2025-05-29 15:12:53 +05:00
parent c2fc453406
commit 88064f05c4
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
6 changed files with 1 additions and 48 deletions

View file

@ -7,7 +7,6 @@ import { useEffect, useState } from "react";
import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from "flowbite-react"; import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from "flowbite-react";
import { Spinner } from "./components/Spinner/Spinner"; import { Spinner } from "./components/Spinner/Spinner";
import { ChangelogModal } from "#/components/ChangelogModal/ChangelogModal"; import { ChangelogModal } from "#/components/ChangelogModal/ChangelogModal";
import PlausibleProvider from "next-plausible";
import { Bounce, ToastContainer } from "react-toastify"; import { Bounce, ToastContainer } from "react-toastify";
const inter = Inter({ subsets: ["latin"] }); const inter = Inter({ subsets: ["latin"] });
@ -104,14 +103,6 @@ export const App = (props) => {
</Button> </Button>
</ModalFooter> </ModalFooter>
</Modal> </Modal>
{preferencesStore.flags.enableAnalytics && (
<PlausibleProvider
domain="anix.wah.su"
trackLocalhost={false}
selfHosted={true}
enabled={true}
/>
)}
<ToastContainer <ToastContainer
className={"mx-2 mb-20 sm:mb-0"} className={"mx-2 mb-20 sm:mb-0"}
position="bottom-center" position="bottom-center"

View file

@ -267,23 +267,6 @@ export const SettingsModal = (props: { isOpen: boolean; setIsOpen: any }) => {
checked={preferenceStore.flags.saveWatchHistory} checked={preferenceStore.flags.saveWatchHistory}
/> />
</div> </div>
<div className="flex items-center justify-between">
<div>
<p className=" dark:text-white">Отправка аналитики</p>
<p className="text-gray-500 dark:text-gray-300">
Требуется перезагрузка для применения
</p>
</div>
<ToggleSwitch
color="blue"
onChange={() =>
preferenceStore.setFlags({
enableAnalytics: !preferenceStore.flags.enableAnalytics,
})
}
checked={preferenceStore.flags.enableAnalytics}
/>
</div>
<HR className="my-4 dark:bg-slate-400" /> <HR className="my-4 dark:bg-slate-400" />
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<span className="w-6 h-6 iconify material-symbols--experiment-outline"></span> <span className="w-6 h-6 iconify material-symbols--experiment-outline"></span>

View file

@ -9,7 +9,6 @@ interface preferencesState {
// saveSearchHistory: boolean; // saveSearchHistory: boolean;
saveWatchHistory?: boolean; saveWatchHistory?: boolean;
showChangelog?: boolean; showChangelog?: boolean;
enableAnalytics?: boolean;
showNavbarTitles?: "always" | "links" | "selected" | "never"; showNavbarTitles?: "always" | "links" | "selected" | "never";
showFifthButton?: null | 3 | 4 | 5; showFifthButton?: null | 3 | 4 | 5;
}; };
@ -43,7 +42,6 @@ export const usePreferencesStore = create<preferencesState>()(
// saveSearchHistory: true, // saveSearchHistory: true,
saveWatchHistory: true, saveWatchHistory: true,
showChangelog: true, showChangelog: true,
enableAnalytics: true,
showNavbarTitles: "always", showNavbarTitles: "always",
showFifthButton: null, showFifthButton: null,
}, },

View file

@ -1,4 +1,3 @@
const { withPlausibleProxy } = require("next-plausible");
const withFlowbiteReact = require("flowbite-react/plugin/nextjs"); const withFlowbiteReact = require("flowbite-react/plugin/nextjs");
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const NextConfig = { const NextConfig = {
@ -75,8 +74,6 @@ const NextConfig = {
}, },
}; };
const config = withPlausibleProxy({ const config = withFlowbiteReact(NextConfig);
customDomain: "https://analytics.wah.su",
})(withFlowbiteReact(NextConfig));
module.exports = config; module.exports = config;

15
package-lock.json generated
View file

@ -17,7 +17,6 @@
"markdown-to-jsx": "^7.4.7", "markdown-to-jsx": "^7.4.7",
"media-chrome": "^4.9.0", "media-chrome": "^4.9.0",
"next": "^14.2.26", "next": "^14.2.26",
"next-plausible": "^3.12.1",
"prettier": "^3.5.3", "prettier": "^3.5.3",
"react": "^18", "react": "^18",
"react-cropper": "^2.3.3", "react-cropper": "^2.3.3",
@ -4956,20 +4955,6 @@
} }
} }
}, },
"node_modules/next-plausible": {
"version": "3.12.4",
"resolved": "https://registry.npmjs.org/next-plausible/-/next-plausible-3.12.4.tgz",
"integrity": "sha512-cD3+ixJxf8yBYvsideTxqli3fvrB7R4BXcvsNJz8Sm2X1QN039WfiXjCyNWkub4h5++rRs6fHhchUMnOuJokcg==",
"license": "MIT",
"funding": {
"url": "https://github.com/4lejandrito/next-plausible?sponsor=1"
},
"peerDependencies": {
"next": "^11.1.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 ",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
}
},
"node_modules/next/node_modules/postcss": { "node_modules/next/node_modules/postcss": {
"version": "8.4.31", "version": "8.4.31",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",

View file

@ -18,7 +18,6 @@
"markdown-to-jsx": "^7.4.7", "markdown-to-jsx": "^7.4.7",
"media-chrome": "^4.9.0", "media-chrome": "^4.9.0",
"next": "^14.2.26", "next": "^14.2.26",
"next-plausible": "^3.12.1",
"prettier": "^3.5.3", "prettier": "^3.5.3",
"react": "^18", "react": "^18",
"react-cropper": "^2.3.3", "react-cropper": "^2.3.3",