mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 15:51:01 +08:00
feat: update nuxt.config.ts with redirects for specific paths; remove index.vue and add desktop/index.vue for app structure
This commit is contained in:
parent
3c1eb8176b
commit
8b07d4b3be
@ -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",
|
||||
|
@ -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
|
3
pages/app/mobile/index.vue
Normal file
3
pages/app/mobile/index.vue
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
目前沒有手機版本
|
||||
</template>
|
@ -54,7 +54,7 @@ onMounted(() => {
|
||||
></span
|
||||
></span>
|
||||
<div class="flex flex-row justify-center align-center gap-0s">
|
||||
<NuxtLink :to="localePath('/app/')">
|
||||
<NuxtLink :to="localePath('/app/desktop/?openapp=hotnews')">
|
||||
<button
|
||||
class="m-4 mr-1 ml-1 bg-[#8C9393] text-white p-3 rounded-[10px] bg-gradient-to-l from-sky-500 to-purple-600 transition-all duration-150 hover:transform hover:scale-105 hover:shadow-lg"
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user