more stuf

This commit is contained in:
taskylizard 2025-06-27 23:01:52 +00:00
parent 16bf6230c0
commit 639b22781b
No known key found for this signature in database
GPG key ID: 1820131ED1A24120
11 changed files with 31 additions and 193 deletions

View file

@ -1,3 +1,3 @@
This is the API for the website and other related services. This is the API for the website and other related services.
Licensed under the Apache License v2.0, see [LICENSE](../docs/.vitepress/LICENSE) for more information. Copyright (c) 2025 taskylizard. All Rights Reserved.

View file

@ -1,19 +1,3 @@
/**
* Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { corsEventHandler } from 'nitro-cors' import { corsEventHandler } from 'nitro-cors'
export default corsEventHandler( export default corsEventHandler(

View file

@ -1,18 +1,3 @@
/**
* Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default defineEventHandler(async (event) => { export default defineEventHandler(async (event) => {
const { cloudflare } = event.context const { cloudflare } = event.context
@ -21,7 +6,7 @@ export default defineEventHandler(async (event) => {
// or when using privacy-enabling proxies // or when using privacy-enabling proxies
const ipAddress = getHeader(event, 'CF-Connecting-IP') ?? '' const ipAddress = getHeader(event, 'CF-Connecting-IP') ?? ''
const { success } = await // KILL YOURSELF const { success } = await // im gonna kms
(cloudflare.env as unknown as Env).RATE_LIMITER.limit({ (cloudflare.env as unknown as Env).RATE_LIMITER.limit({
key: ipAddress key: ipAddress
}) })

View file

@ -1,24 +1,5 @@
/**
* Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { fetcher } from 'itty-fetcher' import { fetcher } from 'itty-fetcher'
import { import { FeedbackSchema, getFeedbackOption } from '../../website/types'
FeedbackSchema,
getFeedbackOption
} from '../../docs/.vitepress/types/Feedback'
export default defineEventHandler(async (event) => { export default defineEventHandler(async (event) => {
const { message, page, type, heading } = await readValidatedBody( const { message, page, type, heading } = await readValidatedBody(

View file

@ -1,18 +1,3 @@
/**
* Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default eventHandler(() => { export default eventHandler(() => {
return { nitro: 'works' } return { nitro: 'works' }
}) })

View file

@ -1,18 +1,3 @@
/**
* Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const files = ( const files = (
[ [
'adblockvpnguide.md', 'adblockvpnguide.md',

View file

@ -1,18 +1,3 @@
/**
* Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by Wrangler by running `wrangler types api/worker-configuration.d.ts` // Generated by Wrangler by running `wrangler types api/worker-configuration.d.ts`
interface Env { interface Env {

View file

@ -1,19 +1,3 @@
/**
* Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import nitroCloudflareBindings from 'nitro-cloudflare-dev' import nitroCloudflareBindings from 'nitro-cloudflare-dev'
import { defineNitroConfig } from 'nitropack/config' import { defineNitroConfig } from 'nitropack/config'

View file

@ -1,19 +1,3 @@
/**
* Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { Rule } from 'unocss' import type { Rule } from 'unocss'
import { colors, shortcuts } from '@fmhy/colors' import { colors, shortcuts } from '@fmhy/colors'
import { import {

View file

@ -1,8 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import type { FeedbackType } from '../../types/Feedback' import type { FeedbackType } from '../../types'
import { useRouter } from 'vitepress' import { useRouter } from 'vitepress'
import { computed, reactive, ref } from 'vue' import { computed, reactive, ref } from 'vue'
import { feedbackOptions, getFeedbackOption } from '../../types/Feedback' import { feedbackOptions, getFeedbackOption } from '../../types'
const props = defineProps<{ const props = defineProps<{
heading?: string heading?: string
@ -134,36 +134,24 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value)
<template> <template>
<template v-if="props.heading"> <template v-if="props.heading">
<button <button @click="toggleCard()"
@click="toggleCard()" class="bg-$vp-c-default-soft text-primary border-$vp-c-default-soft hover:border-primary ml-3 inline-flex h-7 items-center justify-center whitespace-nowrap rounded-md border-2 border-solid px-1.5 py-3.5 text-sm font-medium transition-all duration-300 sm:h-6">
class="bg-$vp-c-default-soft text-primary border-$vp-c-default-soft hover:border-primary ml-3 inline-flex h-7 items-center justify-center whitespace-nowrap rounded-md border-2 border-solid px-1.5 py-3.5 text-sm font-medium transition-all duration-300 sm:h-6" <span :class="isCardShown === false ? `i-lucide:mail` : `i-lucide:mail-x`" />
>
<span
:class="isCardShown === false ? `i-lucide:mail` : `i-lucide:mail-x`"
/>
</button> </button>
</template> </template>
<template v-else> <template v-else>
<div <div
class="mt-2 p-4 border-2 border-solid bg-brand-50 border-brand-300 dark:bg-brand-950 dark:border-brand-800 rounded-xl col-span-3 transition-colors duration-250" class="mt-2 p-4 border-2 border-solid bg-brand-50 border-brand-300 dark:bg-brand-950 dark:border-brand-800 rounded-xl col-span-3 transition-colors duration-250">
>
<div class="flex items-start md:items-center gap-3"> <div class="flex items-start md:items-center gap-3">
<div class="pt-1 md:pt-0"> <div class="pt-1 md:pt-0">
<div <div class="w-10 h-10 rounded-full flex items-center justify-center bg-brand-500 dark:bg-brand-400">
class="w-10 h-10 rounded-full flex items-center justify-center bg-brand-500 dark:bg-brand-400" <span :class="isCardShown === false
> ? `i-lucide:mail w-6 h-6 text-white dark:text-brand-950`
<span : `i-lucide:mail-x w-6 h-6 text-white dark:text-brand-950`
:class=" " />
isCardShown === false
? `i-lucide:mail w-6 h-6 text-white dark:text-brand-950`
: `i-lucide:mail-x w-6 h-6 text-white dark:text-brand-950`
"
/>
</div> </div>
</div> </div>
<div <div class="flex-grow flex items-start md:items-center gap-3 flex-col md:flex-row">
class="flex-grow flex items-start md:items-center gap-3 flex-col md:flex-row"
>
<div class="flex-grow"> <div class="flex-grow">
<div class="font-semibold text-brand-950 dark:text-brand-50"> <div class="font-semibold text-brand-950 dark:text-brand-50">
Got feedback? Got feedback?
@ -175,8 +163,7 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value)
<div> <div>
<button <button
class="inline-block text-center rounded-full px-4 py-2.5 text-sm font-medium border-2 border-solid text-brand-700 border-brand-300 dark:text-brand-100 dark:border-brand-800" class="inline-block text-center rounded-full px-4 py-2.5 text-sm font-medium border-2 border-solid text-brand-700 border-brand-300 dark:text-brand-100 dark:border-brand-800"
@click="toggleCard()" @click="toggleCard()">
>
Share Feedback Share Feedback
</button> </button>
</div> </div>
@ -186,22 +173,17 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value)
</template> </template>
<Transition name="fade" mode="out-in"> <Transition name="fade" mode="out-in">
<div <div v-if="isCardShown"
v-if="isCardShown" class="border-$vp-c-divider bg-$vp-c-bg-alt b-rd-4 m-[2rem 0] mt-4 border-2 border-solid p-6">
class="border-$vp-c-divider bg-$vp-c-bg-alt b-rd-4 m-[2rem 0] mt-4 border-2 border-solid p-6"
>
<Transition name="fade" mode="out-in"> <Transition name="fade" mode="out-in">
<div v-if="!feedback.type"> <div v-if="!feedback.type">
<p class="heading"> <p class="heading">
{{ helpfulText }} {{ helpfulText }}
</p> </p>
<div class="flex flex-wrap gap-2"> <div class="flex flex-wrap gap-2">
<button <button v-for="item in feedbackOptions" :key="item.value"
v-for="item in feedbackOptions"
:key="item.value"
class="bg-bg border-$vp-c-default-soft hover:border-primary mt-2 select-none rounded border-2 border-solid font-bold transition-all duration-250 rounded-lg text-[14px] font-500 leading-normal m-0 px-3 py-1.5 text-center align-middle whitespace-nowrap" class="bg-bg border-$vp-c-default-soft hover:border-primary mt-2 select-none rounded border-2 border-solid font-bold transition-all duration-250 rounded-lg text-[14px] font-500 leading-normal m-0 px-3 py-1.5 text-center align-middle whitespace-nowrap"
@click="handleSubmit(item.value)" @click="handleSubmit(item.value)">
>
<span>{{ item.label }}</span> <span>{{ item.label }}</span>
</button> </button>
</div> </div>
@ -221,30 +203,23 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value)
<strong>🕹 Emulators</strong> <strong>🕹 Emulators</strong>
<p class="desc"> <p class="desc">
They're already on the They're already on the
<a <a class="text-primary text-underline font-bold"
class="text-primary text-underline font-bold" href="https://emulation.gametechwiki.com/index.php/Main_Page">
href="https://emulation.gametechwiki.com/index.php/Main_Page"
>
Game Tech Wiki. Game Tech Wiki.
</a> </a>
</p> </p>
<strong>🔻 Leeches</strong> <strong>🔻 Leeches</strong>
<p class="desc"> <p class="desc">
They're already on the They're already on the
<a <a class="text-primary text-underline font-bold"
class="text-primary text-underline font-bold" href="https://filehostlist.miraheze.org/wiki/Free_Premium_Leeches">
href="https://filehostlist.miraheze.org/wiki/Free_Premium_Leeches"
>
File Hosting Wiki. File Hosting Wiki.
</a> </a>
</p> </p>
<strong>🐧 Distros</strong> <strong>🐧 Distros</strong>
<p class="desc"> <p class="desc">
They're already on They're already on
<a <a class="text-primary text-underline font-bold" href="https://distrowatch.com/">
class="text-primary text-underline font-bold"
href="https://distrowatch.com/"
>
DistroWatch. DistroWatch.
</a> </a>
</p> </p>
@ -259,35 +234,25 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value)
</p> </p>
</details> </details>
</div> </div>
<textarea <textarea v-model="feedback.message" autofocus
v-model="feedback.message"
autofocus
class="bg-$vp-c-bg-alt text-$vp-c-text-2 w-full h-[100px] border border-$vp-c-divider rounded px-3 py-1.5 border-$vp-c-divider bg-$vp-c-bg-alt b-rd-4 border-2 border-solid" class="bg-$vp-c-bg-alt text-$vp-c-text-2 w-full h-[100px] border border-$vp-c-divider rounded px-3 py-1.5 border-$vp-c-divider bg-$vp-c-bg-alt b-rd-4 border-2 border-solid"
placeholder="What a lovely wiki!" placeholder="What a lovely wiki!" />
/>
<p class="desc mb-2"> <p class="desc mb-2">
Add your Discord handle if you would like a response, or if we need Add your Discord handle if you would like a response, or if we need
more information from you, otherwise join our more information from you, otherwise join our
<a <a class="text-primary text-underline font-semibold" href="https://rentry.co/FMHY-Invite/">
class="text-primary text-underline font-semibold"
href="https://rentry.co/FMHY-Invite/"
>
Discord. Discord.
</a> </a>
</p> </p>
<div class="flex flex-row gap-2"> <div class="flex flex-row gap-2">
<button <button
class="bg-$vp-c-default-soft text-primary border-$vp-c-default-soft inline-flex h-7 items-center justify-center whitespace-nowrap rounded-md border-2 border-solid px-1.5 py-3.5 text-sm font-medium transition-all duration-300 sm:h-6" class="bg-$vp-c-default-soft text-primary border-$vp-c-default-soft inline-flex h-7 items-center justify-center whitespace-nowrap rounded-md border-2 border-solid px-1.5 py-3.5 text-sm font-medium transition-all duration-300 sm:h-6"
@click="feedback.type = undefined" @click="feedback.type = undefined">
>
<span class="i-lucide:panel-left-close">close</span> <span class="i-lucide:panel-left-close">close</span>
</button> </button>
<button <button type="submit"
type="submit"
class="border border-div rounded-lg transition-colors duration-250 inline-block text-14px font-500 leading-1.5 px-3 py-3 text-center align-middle whitespace-nowrap disabled:opacity-50 text-text-2 bg-brand-100 dark:bg-brand-700 border-brand-800 dark:border-brand-700 disabled:bg-brand-100 dark:disabled:bg-brand-900 hover:border-brand-900 dark:hover:border-brand-800 hover:bg-brand-200 dark:hover:bg-brand-800" class="border border-div rounded-lg transition-colors duration-250 inline-block text-14px font-500 leading-1.5 px-3 py-3 text-center align-middle whitespace-nowrap disabled:opacity-50 text-text-2 bg-brand-100 dark:bg-brand-700 border-brand-800 dark:border-brand-700 disabled:bg-brand-100 dark:disabled:bg-brand-900 hover:border-brand-900 dark:hover:border-brand-800 hover:bg-brand-200 dark:hover:bg-brand-800"
:disabled="isDisabled" :disabled="isDisabled" @click="handleSubmit()">
@click="handleSubmit()"
>
Send Feedback 📩 Send Feedback 📩
</button> </button>
</div> </div>