From a1aecb4623a5fa8d1de628d9e73bd5f872b5fc6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B3=E5=85=83=E7=9A=93?= Date: Thu, 15 May 2025 20:51:48 +0800 Subject: [PATCH] Add about & help message --- components/app/windows/tty.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/components/app/windows/tty.vue b/components/app/windows/tty.vue index ca14b06..4714752 100644 --- a/components/app/windows/tty.vue +++ b/components/app/windows/tty.vue @@ -6,6 +6,8 @@ interface prevCommandsInterface { error: boolean; } +const router = useRouter(); +const localePath = useLocalePath(); const commandInputBox = ref(); const inputRef = ref(null); const prevCommandsId = ref(0); @@ -21,6 +23,12 @@ const printData = (content: any, userinput?: boolean, error?: boolean) => { prevCommandsId.value++; }; +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 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"; + printData(helpContent); +}; + // Great, there are now no errors ig const emit = defineEmits(["windowopener", "error", "loadValue"]); const props = defineProps<{ @@ -64,9 +72,9 @@ const findExecutable = (inputContent: string) => { } }; -const aboutMessage = "This is a about message \n Cool ig"; - const printAbout = () => { + const aboutMessage = + "This platform is made by Howard :) \n You can learn more about me here: https://yuanhau.com/ \n And this website is also open source \n The Github repo is here: https://github.com/hpware/news-analyze"; printData(aboutMessage); }; @@ -91,6 +99,10 @@ const commands = [ command: "clean", run: cleanTTY, }, + { + command: "help", + run: displayHelp, + }, ];