diff --git a/nuxt.config.ts b/nuxt.config.ts index 735b58c..ae183ea 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -8,12 +8,15 @@ export default defineNuxtConfig({ "/api/rss/**": { swr: 3600 }, "/go/**": { ssr: true }, "/find/**": { ssr: true }, + // Send ZIP bombs to troll bots + "/wp-admin/**": { redirect: "https://s3.yhw.tw/data/def-zip-bomb/wp-admin.php.zip" }, + "/xmlrpc.php": { redirect: "https://s3.yhw.tw/data/def-zip-bomb/xmlrpc.php.zip" }, + "/wp-login.php": { redirect: "https://s3.yhw.tw/data/def-zip-bomb/wp-login.php.zip" }, }, css: ["~/styles/main.css"], modules: [ - "@nuxt/image", "@nuxtjs/robots", "@nuxtjs/seo", "@nuxtjs/i18n", diff --git a/pages/app/index.vue b/pages/app/desktop/index.vue similarity index 93% rename from pages/app/index.vue rename to pages/app/desktop/index.vue index 983c6f4..152ab9a 100644 --- a/pages/app/index.vue +++ b/pages/app/desktop/index.vue @@ -10,7 +10,7 @@ interface currentNavBarInterface { icon: string; action: any; flash: boolean; - windowAssociated: boolean; + windowAssociated: string; } // Import plugins @@ -39,6 +39,22 @@ const localePath = useLocalePath(); // Router const router = useRouter(); +const route = useRoute(); + +// ?opemapp= component +const openApp = ref(false); +const openAppId = ref(); +watch(() => route.query.openapp, (newVal) => { + if (newVal) { + openApp.value = true; + openAppId.value = newVal; + // Remove query parameter without page reload + router.replace({ + path: route.path, + query: {}, + }); + } +}); // values const popMessage = ref(null); @@ -80,17 +96,11 @@ const openWindow = (windowName?: string) => { router.push(localePath("/home")); } console.log(windowName); - alertOpen.value = true; - menuOpen.value = false; + menuOpen.value = false; } const unMinWindow = (windowName?: string) => { - if (windowName === "leave") { - router.push(localePath("/home")); - } - console.log(windowName); - alertOpen.value = true; - menuOpen.value = false; + } // menus diff --git a/pages/app/mobile/index.vue b/pages/app/mobile/index.vue new file mode 100644 index 0000000..99abe0a --- /dev/null +++ b/pages/app/mobile/index.vue @@ -0,0 +1,3 @@ + + 目前沒有手機版本 + \ No newline at end of file diff --git a/pages/home.vue b/pages/home.vue index 496e370..213d8fe 100644 --- a/pages/home.vue +++ b/pages/home.vue @@ -54,7 +54,7 @@ onMounted(() => { >