Made the line_today.py kinda work ig. But I have no idea how can I run

this without issues in prod tho. and the "BlurPageBeforeLogin" thing
works just file, oh and checkCookie is now working (but without the
database part just yet)
This commit is contained in:
yuanhau 2025-05-17 23:31:55 +08:00
parent 0e26a23261
commit 81012f5061
6 changed files with 91 additions and 36 deletions

View file

@ -48,7 +48,11 @@ const sendChatData = (event?: KeyboardEvent) => {
}, 3000);
};
onMounted(async () => {
const stopChatGenerate = () => {
aiGenerating.value = false;
};
/*onMounted(async () => {
console.log(cookieChatId);
if (cookieChatId) {
} else {
@ -63,7 +67,7 @@ onMounted(async () => {
);
cookieChatId.value = checkUserChatId.value;
}
});
});*/
onMounted(async () => {
/*const {
data: getData,
@ -136,7 +140,7 @@ onMounted(async () => {
</button>
<button
class="pl-2 pr-2 mr-1 ml-1 bg-black text-white rounded-full hover:bg-gray-700 hover:translate-y-[-4px] transition-all duration-300 disabled:cursor-not-allowed disabled:hover:translate-y-0 disabled:bg-color-500"
@click=""
@click="stopChatGenerate"
v-else
>
<Square class="w-5 h-5" />

View file

@ -5,34 +5,34 @@ const { t } = useI18n();
const allowed = ref(false);
const error = ref(false);
const errorMsg = ref("");
const emit = defineEmits(["windowopener", "error", "loadValue"]);
onMounted(async () => {
// Check Cookie
try {
const { data, error: sendError } = useFetch("/api/user/checkcookie");
if (sendError) {
error.value = true;
}
if (false) {
allowed.value = true;
} else {
allowed.value = false;
}
} catch (e) {
try {
// await :(
const { data, error: sendError } = await useFetch("/api/user/checkcookie");
if (sendError.value) {
error.value = true;
errorMsg.value = e.message;
}
});
if (true) {
allowed.value = true;
} else {
allowed.value = false;
}
} catch (e) {
error.value = true;
errorMsg.value = e.message;
}
</script>
<template>
<div
class="flex flex-col bg-gray-200/50 text-black w-full h-full absolute inset-0 justify-center align-middle text-center z-[20] backdrop-blur-sm"
v-if="!allowed || error"
>
<div v-if="!allowed && !error" class="m-2">
{{ t("error") }}
</div>
<div v-if="error" class="m-2">
<span>{{ errorMsg ? errorMsg : t("systemerror") }}</span>
<span>{{ errorMsg ? errorMsg : "" }} {{ t("systemerror") }}</span>
</div>
</div>
<slot></slot>