Add about & help message

This commit is contained in:
yuanhau 2025-05-15 20:51:48 +08:00
parent 99cfa4957f
commit a1aecb4623

View file

@ -6,6 +6,8 @@ interface prevCommandsInterface {
error: boolean; error: boolean;
} }
const router = useRouter();
const localePath = useLocalePath();
const commandInputBox = ref(); const commandInputBox = ref();
const inputRef = ref<HTMLInputElement | null>(null); const inputRef = ref<HTMLInputElement | null>(null);
const prevCommandsId = ref(0); const prevCommandsId = ref(0);
@ -21,6 +23,12 @@ const printData = (content: any, userinput?: boolean, error?: boolean) => {
prevCommandsId.value++; 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 // Great, there are now no errors ig
const emit = defineEmits(["windowopener", "error", "loadValue"]); const emit = defineEmits(["windowopener", "error", "loadValue"]);
const props = defineProps<{ const props = defineProps<{
@ -64,9 +72,9 @@ const findExecutable = (inputContent: string) => {
} }
}; };
const aboutMessage = "This is a about message \n Cool ig";
const printAbout = () => { 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); printData(aboutMessage);
}; };
@ -91,6 +99,10 @@ const commands = [
command: "clean", command: "clean",
run: cleanTTY, run: cleanTTY,
}, },
{
command: "help",
run: displayHelp,
},
]; ];
</script> </script>