mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 07:41:02 +08:00
Fix open articles in the TTY, as it is broken while in the demo. And
Added YouTube OnBoarding to the App (Currently in testing and this is the beta branch :) Oh also updated some more stuff as well!
This commit is contained in:
parent
378689da87
commit
3d392dd788
15
components/app/windows/onBoarding.vue
Normal file
15
components/app/windows/onBoarding.vue
Normal file
@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<!--YouTube Embed-->
|
||||
<div class="justify-center absolute inset-0 flex flex-col">
|
||||
<iframe
|
||||
width="560"
|
||||
height="315"
|
||||
src="https://www.youtube-nocookie.com/embed/8P3qgVm6m6g?si=0t8eR0wtWv6b3REE"
|
||||
title="YouTube video player"
|
||||
frameborder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
referrerpolicy="strict-origin-when-cross-origin"
|
||||
allowfullscreen
|
||||
></iframe>
|
||||
</div>
|
||||
</template>
|
@ -174,14 +174,10 @@ const submitUserPassword = async () => {
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<div
|
||||
class="justify-center align-center text-center absloute inset-0 p-1"
|
||||
v-if="!isLoggedIn"
|
||||
>
|
||||
<form
|
||||
class="flex flex-col items-center justify-center h-full"
|
||||
class="flex flex-col items-center justify-center h-full align-center text-center absloute inset-0 p-1 bg-gray-200/50 backdrop-blur-sm text-black w-full absolute align-middle z-[20]"
|
||||
@submit.prevent="submitUserPassword"
|
||||
v-if="!success"
|
||||
v-if="!isLoggedIn"
|
||||
>
|
||||
<span class="text-2xl text-bold mb-0">{{ t("settings.login") }}</span>
|
||||
<span class="mb-4 text-sm mt-0"> {{ t("settings.loginmessage") }}</span>
|
||||
@ -208,8 +204,7 @@ const submitUserPassword = async () => {
|
||||
{{ t("settings.loginButton") }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="justify-center align-center text-center" v-if="isLoggedIn">
|
||||
<div class="justify-center align-center text-center">
|
||||
<h1 class="text-3xl text-bold p-2">
|
||||
{{ t("settings.greet")
|
||||
}}{{ user || userData.userAccount || t("settings.defaultname") }}
|
||||
|
@ -26,7 +26,7 @@ const printData = (content: any, userinput?: boolean, error?: boolean) => {
|
||||
|
||||
const displayHelp = () => {
|
||||
const helpContent =
|
||||
"Here are the commands for the Terminal \n\n execute [app]: This command opens an application in the [app] slot. \n article [id]: This command will open a LINE Today article in a window. \n about: This displays the about text window \n clear/clean: Wipe the terminal log. \n help: This help text system :D \n\n For more info, please view the documentation: https://news.yuanhau.com/docs";
|
||||
"Here are the commands for the Terminal \n\n execute [app]: This command opens an application in the [app] slot. \n article [id]: This command will open a LINE Today article in a window. \n about: This displays the about text window \n clear/clean: Wipe the terminal log. \n help: This help text system :D";
|
||||
printData(helpContent);
|
||||
};
|
||||
|
||||
@ -94,7 +94,7 @@ const cleanTTY = () => {
|
||||
const openArticle = (inputContent: string) => {
|
||||
const match = inputContent.match(/^article\s+[a-zA-Z0-9]{7}$/);
|
||||
if (match) {
|
||||
const articleId = match[1].trim();
|
||||
const articleId = match[0].trim();
|
||||
emit("openArticles", articleId);
|
||||
printData(`Opening article ${articleId}...`);
|
||||
} else {
|
||||
|
@ -60,6 +60,7 @@ import NewsViewWindow from "~/components/app/windows/newsView.vue";
|
||||
import SettingsWindow from "~/components/app/windows/settings.vue";
|
||||
import PrivacyPolicyWindow from "~/components/app/windows/privacypolicy.vue";
|
||||
import TOSWindow from "~/components/app/windows/tos.vue";
|
||||
import onBoardingWindow from "~/components/app/windows/onBoarding.vue";
|
||||
|
||||
// Import Icons
|
||||
import {
|
||||
@ -203,6 +204,13 @@ const associAppWindow = [
|
||||
component: TOSWindow,
|
||||
translatable: false,
|
||||
},
|
||||
{
|
||||
name: "onboard",
|
||||
id: "14",
|
||||
title: "OnBoarding",
|
||||
component: onBoardingWindow,
|
||||
translatable: false,
|
||||
},
|
||||
];
|
||||
|
||||
// OnBoarding
|
||||
|
@ -2,7 +2,7 @@ import sql from "~/server/components/postgres";
|
||||
import getUserTokenMinusSQLInjection from "~/server/components/getUserToken";
|
||||
export default defineEventHandler(async (event) => {
|
||||
// Check user data.
|
||||
const user = getUserTokenMinusSQLInjection(event);
|
||||
const user = await getUserTokenMinusSQLInjection(event);
|
||||
if (user.error.length !== 0) {
|
||||
return {
|
||||
error: user.error,
|
||||
|
Loading…
x
Reference in New Issue
Block a user