From fa47ec2e45675fb1529f1c58fbcbf13f654327f4 Mon Sep 17 00:00:00 2001 From: taskylizard <75871323+taskylizard@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:29:16 +0530 Subject: [PATCH] disable PWA --- .vitepress/config.mts | 210 ++++++++++------------- .vitepress/theme/components/Feedback.vue | 5 +- 2 files changed, 99 insertions(+), 116 deletions(-) diff --git a/.vitepress/config.mts b/.vitepress/config.mts index e02dd6861..21b3d6e29 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -6,122 +6,102 @@ import { meta } from "./constants"; import { pwa } from "./pwa"; import { generateMeta } from "./hooks/meta"; -export default withPwa( - defineConfig({ - title: "FMHY", - description: meta.description, - titleTemplate: ":title • freemediaheckyeah", - lang: "en-US", - lastUpdated: true, - cleanUrls: true, - appearance: "dark", - srcExclude: ["readme.md", "single-page"], - ignoreDeadLinks: true, - sitemap: { - hostname: meta.hostname, - }, - head: [ - ["meta", { name: "theme-color", content: "#7bc5e4" }], - ["meta", { name: "og:type", content: "website" }], - ["meta", { name: "og:locale", content: "en" }], - ["link", { rel: "icon", href: "/test.png" }], - // PWA - ["link", { rel: "icon", href: "/test.png", type: "image/svg+xml" }], - ["link", { rel: "alternate icon", href: "/test.png" }], - ["link", { rel: "mask-icon", href: "/test.png", color: "#7bc5e4" }], - // prettier-ignore - ["meta", { name: "keywords", content: meta.keywords.join(" ") }], - ["link", { rel: "apple-touch-icon", href: "/test.png", sizes: "192x192" }], - - // ["meta", { name: "theme-color", content: "#7bc5e4" }], - // ["meta", { name: "og:type", content: "website" }], - // ["meta", { name: "og:locale", content: "en" }], - // ["meta", { property: "og:type", content: "website" }], - // ["meta", { property: "og:title", content: meta.name }], - // ["link", { rel: "icon", href: "/fmhy.ico", sizes: "any" }], - // ["link", { rel: "icon", href: "/test.png", type: "image/svg+xml" }], - // ["link", { rel: "mask-icon", href: "/test.png", color: "#7bc5e4" }], - // // pwa - // ["link", { rel: "alternate icon", href: "/test.png" }], - // ["link", { rel: "apple-touch-icon", href: "/fmhy.png", sizes: "192x192" }], - // ["meta", { name: "apple-mobile-web-app-status-bar-style", content: "black-translucent" }], - // ["meta", { name: "keywords", content: meta.keywords.join(" ") }], - // ["meta", { name: "twitter:description", content: meta.description }], - // ["meta", { name: "twitter:title", content: meta.name }], - // ["meta", { name: "twitter:card", content: "summary_large_image" }], - // ["meta", { name: "twitter:site", content: meta.hostname }], +export default defineConfig({ + title: "FMHY", + description: meta.description, + titleTemplate: ":title • freemediaheckyeah", + lang: "en-US", + lastUpdated: true, + cleanUrls: true, + appearance: "dark", + srcExclude: ["readme.md", "single-page"], + ignoreDeadLinks: true, + sitemap: { + hostname: meta.hostname, + }, + head: [ + ["meta", { name: "theme-color", content: "#7bc5e4" }], + ["meta", { name: "og:type", content: "website" }], + ["meta", { name: "og:locale", content: "en" }], + ["link", { rel: "icon", href: "/test.png" }], + // PWA + ["link", { rel: "icon", href: "/test.png", type: "image/svg+xml" }], + ["link", { rel: "alternate icon", href: "/test.png" }], + ["link", { rel: "mask-icon", href: "/test.png", color: "#7bc5e4" }], + // prettier-ignore + ["meta", { name: "keywords", content: meta.keywords.join(" ") }], + ["link", { rel: "apple-touch-icon", href: "/test.png", sizes: "192x192" }], + ], + transformHead: async (context) => generateMeta(context, meta.hostname), + vite: { + plugins: [ + UnoCSS({ + presets: [ + presetUno(), + presetAttributify(), + presetIcons({ + scale: 1.2, + extraProperties: { + display: "inline-block", + "vertical-align": "middle", + }, + }), + ], + }), ], - transformHead: async (context) => generateMeta(context, meta.hostname), - vite: { - plugins: [ - UnoCSS({ - presets: [ - presetUno(), - presetAttributify(), - presetIcons({ - scale: 1.2, - extraProperties: { - display: "inline-block", - "vertical-align": "middle", - }, - }), - ], - }), - ], - // build: { - // // Shut the fuck up - // chunkSizeWarningLimit: Infinity, - // }, + build: { + // Shut the fuck up + chunkSizeWarningLimit: Infinity, }, - themeConfig: { - search: { - options: { - detailedView: true, - }, - provider: "local", + }, + themeConfig: { + search: { + options: { + detailedView: true, }, - outline: "deep", - logo: "/fmhy.ico", - nav: [ - { text: "Beginners Guide", link: "/beginners-guide" }, - { text: "Glossary", link: "https://rentry.org/The-Piracy-Glossary" }, - { text: "Guides", link: "https://rentry.co/fmhy-guides" }, - { text: "Backups", link: "https://www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/backups" }, - { text: "Updates", link: "https://www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/updates/" }, - ], - sidebar: [ - { text: "📛 Adblocking / Privacy", link: "/adblockvpnguide" }, - { text: "🤖 Artificial Intelligence", link: "/ai" }, - { text: "📺 Movies / TV / Anime", link: "/videopiracyguide" }, - { text: "🎵 Music / Podcasts / Radio", link: "/audiopiracyguide" }, - { text: "🎮 Gaming / Emulation", link: "/gamingpiracyguide" }, - { text: "📗 Books / Comics / Manga", link: "/readingpiracyguide" }, - { text: "💾 Downloading", link: "/downloadpiracyguide" }, - { text: "🌀 Torrenting", link: "/torrentpiracyguide" }, - { text: "🧠 Educational", link: "/edupiracyguide" }, - { text: "🔧 Tools", link: "/toolsguide" }, - { text: "📷 Image Tools", link: "/img-tools" }, - { text: "👨‍💻 Developer Tools", link: "/devtools" }, - { text: "📱 Android / iOS", link: "/Android-iosguide" }, - { text: "🐧 Linux / MacOS", link: "/linuxguide" }, - { text: "🌍 Non-English", link: "/non-english" }, - { text: "📂 Miscellaneous", link: "/miscguide" }, - { text: "🔞 NSFW", link: "/nsfwpiracy" }, - { text: "⚠️ Unsafe Sites", link: "/unsafesites" }, - { text: "🔑 Base64", link: "/base64" }, - { text: "📦 Storage", link: "/storage" }, - ], - socialLinks: [ - { icon: "github", link: "https://github.com/fmhy/FMHYEdit" }, - { icon: "discord", link: "https://discord.gg/Stz6y6NgNg" }, - { - icon: { - svg: '', - }, - link: "https://reddit.com/r/FREEMEDIAHECKYEAH", - }, - ], - ...pwa, + provider: "local", }, - }), -); + outline: "deep", + logo: "/fmhy.ico", + nav: [ + { text: "Beginners Guide", link: "/beginners-guide" }, + { text: "Glossary", link: "https://rentry.org/The-Piracy-Glossary" }, + { text: "Guides", link: "https://rentry.co/fmhy-guides" }, + { text: "Backups", link: "https://www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/backups" }, + { text: "Updates", link: "https://www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/updates/" }, + ], + sidebar: [ + { text: "📛 Adblocking / Privacy", link: "/adblockvpnguide" }, + { text: "🤖 Artificial Intelligence", link: "/ai" }, + { text: "📺 Movies / TV / Anime", link: "/videopiracyguide" }, + { text: "🎵 Music / Podcasts / Radio", link: "/audiopiracyguide" }, + { text: "🎮 Gaming / Emulation", link: "/gamingpiracyguide" }, + { text: "📗 Books / Comics / Manga", link: "/readingpiracyguide" }, + { text: "💾 Downloading", link: "/downloadpiracyguide" }, + { text: "🌀 Torrenting", link: "/torrentpiracyguide" }, + { text: "🧠 Educational", link: "/edupiracyguide" }, + { text: "🔧 Tools", link: "/toolsguide" }, + { text: "📷 Image Tools", link: "/img-tools" }, + { text: "👨‍💻 Developer Tools", link: "/devtools" }, + { text: "📱 Android / iOS", link: "/Android-iosguide" }, + { text: "🐧 Linux / MacOS", link: "/linuxguide" }, + { text: "🌍 Non-English", link: "/non-english" }, + { text: "📂 Miscellaneous", link: "/miscguide" }, + { text: "🔞 NSFW", link: "/nsfwpiracy" }, + { text: "⚠️ Unsafe Sites", link: "/unsafesites" }, + { text: "🔑 Base64", link: "/base64" }, + { text: "📦 Storage", link: "/storage" }, + ], + socialLinks: [ + { icon: "github", link: "https://github.com/fmhy/FMHYEdit" }, + { icon: "discord", link: "https://discord.gg/Stz6y6NgNg" }, + { + icon: { + svg: '', + }, + link: "https://reddit.com/r/FREEMEDIAHECKYEAH", + }, + ], + ...pwa, + }, +}); diff --git a/.vitepress/theme/components/Feedback.vue b/.vitepress/theme/components/Feedback.vue index 308eaaf3b..0aaa78704 100644 --- a/.vitepress/theme/components/Feedback.vue +++ b/.vitepress/theme/components/Feedback.vue @@ -45,7 +45,10 @@ async function handleSubmit(type?: string) { try { const response = await fetch("https://fmhy.vercel.app/api/feedback", { method: "POST", - body: JSON.parse(body), + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(body), }); const data = await response.json();