Made the basic newsView, the only issue? You need to luanch the window TWICE in order to see the window, strange behavior? this also exists before btw.

This commit is contained in:
yuanhau 2025-05-30 00:29:59 +08:00
parent 122a01fe73
commit b6f67d9db8
6 changed files with 36 additions and 15 deletions

View file

@ -31,7 +31,12 @@ const displayHelp = () => {
};
// Great, there are now no errors ig
const emit = defineEmits(["windowopener", "error", "loadValue", "openArticles"]);
const emit = defineEmits([
"windowopener",
"error",
"loadValue",
"openArticles",
]);
const props = defineProps<{
values?: string;
}>();
@ -67,7 +72,7 @@ const findExecutable = (inputContent: string) => {
if (executeMatch) {
const targetPath = executeMatch[1].trim();
if (targetPath === "newsView") {
return
return;
}
openNewWindow(targetPath);
printData(`Running ${targetPath}...`);
@ -93,7 +98,11 @@ const openArticle = (inputContent: string) => {
emit("openArticles", articleId);
printData(`Opening article ${articleId}...`);
} else {
printData("Invalid article ID format. Please use 'openarticle' followed by a 7-character alphanumeric ID.", false, true);
printData(
"Invalid article ID format. Please use 'openarticle' followed by a 7-character alphanumeric ID.",
false,
true,
);
}
};
// scripts