Compare commits

...

2 commits

Author SHA1 Message Date
075e33d2af Fix settings aka it does not do stuff when the user has logged in.
Some checks are pending
Build and Push Beta Image / build-and-push (push) Waiting to run
2025-06-12 23:16:24 +08:00
10e1354f27 Add onBoarding & funding.yml? 2025-06-12 17:52:51 +08:00
7 changed files with 19 additions and 9 deletions

1
.github/funding.yml vendored Normal file
View file

@ -0,0 +1 @@
ko_fi: howard00

View file

@ -19,7 +19,7 @@ Video Guide: [YouTube](https://youtu.be/8P3qgVm6m6g)
## Demo: ## Demo:
Production (Latest Docker Image): https://yhw.tw/news Production (Latest Docker Image): https://yhw.tw/news
Beta (Beta Docekr Image): https://newsbeta.20090526.xyz Beta (Beta Docker Image): https://newsbeta.20090526.xyz
## Video Guide ## Video Guide

View file

@ -1,9 +1,11 @@
<template> <template>
<!--YouTube Embed--> <!--YouTube Embed-->
<div class="justify-center absolute inset-0 flex flex-col"> <div
class="justify-center align-center text-center absolute inset-0 flex flex-col mt-12"
>
<iframe <iframe
width="560" width="600"
height="315" height="395"
src="https://www.youtube-nocookie.com/embed/8P3qgVm6m6g?si=0t8eR0wtWv6b3REE" src="https://www.youtube-nocookie.com/embed/8P3qgVm6m6g?si=0t8eR0wtWv6b3REE"
title="YouTube video player" title="YouTube video player"
frameborder="0" frameborder="0"

View file

@ -27,6 +27,10 @@ const userData = ref({
}); });
const enteruseremail = ref(); const enteruseremail = ref();
onMounted(async () => { onMounted(async () => {
await validateUserInfo();
});
const validateUserInfo = async () => {
const req = await fetch("/api/user/validateUserToken"); const req = await fetch("/api/user/validateUserToken");
const res = await req.json(); const res = await req.json();
if (res.current_spot === "LOGOUT") { if (res.current_spot === "LOGOUT") {
@ -37,7 +41,7 @@ onMounted(async () => {
userData.value = res; userData.value = res;
useremail.value = res.email; useremail.value = res.email;
isLoggedIn.value = true; isLoggedIn.value = true;
}); };
const emit = defineEmits(["windowopener"]); const emit = defineEmits(["windowopener"]);
@ -166,6 +170,7 @@ const submitUserPassword = async () => {
success.value = true; success.value = true;
console.log(res); console.log(res);
userAccount.value = ""; userAccount.value = "";
await validateUserInfo();
} else { } else {
error.value = true; error.value = true;
errormsg.value = res.error; errormsg.value = res.error;

View file

@ -54,9 +54,9 @@ const createSources = await sql`
const createArticlesArchive = await sql` const createArticlesArchive = await sql`
create table if not exists news_articles ( create table if not exists news_articles (
uuid text primary key, uuid text primary key,
article_id text primary key, article_id text,
jsondata json not null, jsondata json not null,
archive_timestamp timestamp default CURRENT_TIMESTAMP, archive_timestamp timestamp default CURRENT_TIMESTAMP
) )
`; `;

View file

@ -374,7 +374,9 @@ onMounted(async () => {
if (openApp.value === "newsView") { if (openApp.value === "newsView") {
return; return;
} }
openWindow(openApp.value); setTimeout(() => {
openWindow(openApp.value);
}, 2000);
} }
}); });

View file

@ -132,7 +132,7 @@ useSeoMeta({
<TooltipProvider> <TooltipProvider>
<Tooltip> <Tooltip>
<TooltipTrigger> <TooltipTrigger>
<NuxtLink :to="localePath('/desktop')"> <NuxtLink :to="localePath('/desktop?openapp=onboard')">
<button <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" 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"
> >