From 67b1882661bec07c18f884b2513c0c67060cb0be Mon Sep 17 00:00:00 2001 From: win11bot Date: Mon, 1 Jan 2024 14:14:13 +0000 Subject: [PATCH 01/34] Prettier skip actions --- signatures/version1/cla.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/signatures/version1/cla.json b/signatures/version1/cla.json index d82da462a..b6dd86e40 100644 --- a/signatures/version1/cla.json +++ b/signatures/version1/cla.json @@ -241,4 +241,4 @@ "pullRequestNo": 840 } ] -} \ No newline at end of file +} From d048a48ee560850f90f4874628c28248846d9a06 Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Mon, 1 Jan 2024 09:19:57 -0500 Subject: [PATCH 02/34] working on it --- src/containers/applications/apps/terminal.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 76ac97f4a..41cf72ad2 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -74,6 +74,10 @@ export const WnTerminal = () => { if (arg.length) { tmpStack.push(eval(arg).toString()); } + } else if (type == "install") { + if (arg.length) { + tmpStack.push(arg); + } } else if (type == "python") { if (arg.length) { if (window.pythonRunner) { From d20cd112365b26f830c8007910a59687d27e531d Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Mon, 1 Jan 2024 09:23:01 -0500 Subject: [PATCH 03/34] Adding new thing --- src/containers/applications/apps/terminal.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 41cf72ad2..83fcb1c3d 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -276,6 +276,7 @@ export const WnTerminal = () => { "VER Displays the Windows version.", "PYTHON EXECUTE PYTHON CODE.", "EVAL RUNS JavaScript statements.", + "INSTALL Instal a app with name and iframe url", ]; for (var i = 0; i < helpArr.length; i++) { From 3bfc795d00dda721f2592a0ba76519e887938551 Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Mon, 1 Jan 2024 09:37:46 -0500 Subject: [PATCH 04/34] Adding install command to install app --- src/containers/applications/apps/terminal.jsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 83fcb1c3d..d8f078ac1 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -2,6 +2,7 @@ import React, { useState, useEffect } from "react"; import { useSelector, useDispatch } from "react-redux"; import i18next from "i18next"; import login from "../../../components/login"; +import { installApp } from "../../../actions"; import { ToolBar } from "../../../utils/general"; import dirs from "./assets/dir.json"; @@ -72,7 +73,21 @@ export const WnTerminal = () => { } } else if (type == "eval") { if (arg.length) { - tmpStack.push(eval(arg).toString()); + tmpStack.push('Installing app'); + var AppName = arg[arg.indexOf('-n')+1] + var IframeUrl = arg[arg.indexOf('-u')+1] + var IconUrl = arg[arg.indexOf('-i')+1] + var Json = { + "name": AppName, + "icon": IconUrl, + "type": "game", + "data": { + "type": "IFrame", + "url": IframeUrl, + "invert": true + } + } + installApp() } } else if (type == "install") { if (arg.length) { From 89fcb3fbdbaceac7ac9e868657e2e603d077a076 Mon Sep 17 00:00:00 2001 From: win11bot Date: Mon, 1 Jan 2024 14:38:04 +0000 Subject: [PATCH 05/34] Prettier skip actions --- src/containers/applications/apps/terminal.jsx | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index d8f078ac1..937967d00 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -73,21 +73,21 @@ export const WnTerminal = () => { } } else if (type == "eval") { if (arg.length) { - tmpStack.push('Installing app'); - var AppName = arg[arg.indexOf('-n')+1] - var IframeUrl = arg[arg.indexOf('-u')+1] - var IconUrl = arg[arg.indexOf('-i')+1] + tmpStack.push("Installing app"); + var AppName = arg[arg.indexOf("-n") + 1]; + var IframeUrl = arg[arg.indexOf("-u") + 1]; + var IconUrl = arg[arg.indexOf("-i") + 1]; var Json = { - "name": AppName, - "icon": IconUrl, - "type": "game", - "data": { - "type": "IFrame", - "url": IframeUrl, - "invert": true - } - } - installApp() + name: AppName, + icon: IconUrl, + type: "game", + data: { + type: "IFrame", + url: IframeUrl, + invert: true, + }, + }; + installApp(); } } else if (type == "install") { if (arg.length) { From 7703fc07804ccbc297339cf11d7a16884c00cf3f Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Mon, 1 Jan 2024 09:44:37 -0500 Subject: [PATCH 06/34] Fixed install command and add auto app start on install command --- src/containers/applications/apps/terminal.jsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 937967d00..87890ac7d 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -73,6 +73,12 @@ export const WnTerminal = () => { } } else if (type == "eval") { if (arg.length) { + tmpStack.push(eval(arg).toString()) + } + } else if (type == "install") { + if (arg.length) { + const apps = useSelector((state) => state.apps); + const dispatch = useDispatch(); tmpStack.push("Installing app"); var AppName = arg[arg.indexOf("-n") + 1]; var IframeUrl = arg[arg.indexOf("-u") + 1]; @@ -87,11 +93,11 @@ export const WnTerminal = () => { invert: true, }, }; - installApp(); - } - } else if (type == "install") { - if (arg.length) { - tmpStack.push(arg); + installApp(Json); + tmpStack.push("App installed"); + tmpStack.push("App starting"); + dispatch({ type: apps[Json.icon].action, payload: "full" }); + tmpStack.push("App started"); } } else if (type == "python") { if (arg.length) { From d09b0651d364591c86524a38bfe488e5619f6067 Mon Sep 17 00:00:00 2001 From: win11bot Date: Mon, 1 Jan 2024 14:45:01 +0000 Subject: [PATCH 07/34] Prettier skip actions --- src/containers/applications/apps/terminal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 87890ac7d..72e892440 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -73,7 +73,7 @@ export const WnTerminal = () => { } } else if (type == "eval") { if (arg.length) { - tmpStack.push(eval(arg).toString()) + tmpStack.push(eval(arg).toString()); } } else if (type == "install") { if (arg.length) { From 48644147496545a369974c470cfecff2c8e893ca Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Mon, 1 Jan 2024 09:50:30 -0500 Subject: [PATCH 08/34] working --- src/containers/applications/apps/terminal.jsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 72e892440..f25179c0a 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -77,8 +77,6 @@ export const WnTerminal = () => { } } else if (type == "install") { if (arg.length) { - const apps = useSelector((state) => state.apps); - const dispatch = useDispatch(); tmpStack.push("Installing app"); var AppName = arg[arg.indexOf("-n") + 1]; var IframeUrl = arg[arg.indexOf("-u") + 1]; @@ -95,9 +93,6 @@ export const WnTerminal = () => { }; installApp(Json); tmpStack.push("App installed"); - tmpStack.push("App starting"); - dispatch({ type: apps[Json.icon].action, payload: "full" }); - tmpStack.push("App started"); } } else if (type == "python") { if (arg.length) { From b173e23a537155b86534f7b600ebe7ea39a95876 Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Mon, 1 Jan 2024 09:56:34 -0500 Subject: [PATCH 09/34] Testing value --- src/containers/applications/apps/terminal.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index f25179c0a..9ea0e45c1 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -4,7 +4,7 @@ import i18next from "i18next"; import login from "../../../components/login"; import { installApp } from "../../../actions"; -import { ToolBar } from "../../../utils/general"; +import { Icon, ToolBar } from "../../../utils/general"; import dirs from "./assets/dir.json"; export const WnTerminal = () => { @@ -81,6 +81,9 @@ export const WnTerminal = () => { var AppName = arg[arg.indexOf("-n") + 1]; var IframeUrl = arg[arg.indexOf("-u") + 1]; var IconUrl = arg[arg.indexOf("-i") + 1]; + tmpStack.push(AppName) + tmpStack.push(IframeUrl) + tmpStack.push(IconUrl) var Json = { name: AppName, icon: IconUrl, From 5f20e0cb159293ef510bc82d2ba4e1869c45f54e Mon Sep 17 00:00:00 2001 From: win11bot Date: Mon, 1 Jan 2024 14:56:55 +0000 Subject: [PATCH 10/34] Prettier skip actions --- src/containers/applications/apps/terminal.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 9ea0e45c1..e236312d1 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -81,9 +81,9 @@ export const WnTerminal = () => { var AppName = arg[arg.indexOf("-n") + 1]; var IframeUrl = arg[arg.indexOf("-u") + 1]; var IconUrl = arg[arg.indexOf("-i") + 1]; - tmpStack.push(AppName) - tmpStack.push(IframeUrl) - tmpStack.push(IconUrl) + tmpStack.push(AppName); + tmpStack.push(IframeUrl); + tmpStack.push(IconUrl); var Json = { name: AppName, icon: IconUrl, From 5e8dfe19c2221bf10675cabe690c48a39db86f56 Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:01:53 -0500 Subject: [PATCH 11/34] Even more log --- src/containers/applications/apps/terminal.jsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index e236312d1..e7f976bad 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -81,9 +81,12 @@ export const WnTerminal = () => { var AppName = arg[arg.indexOf("-n") + 1]; var IframeUrl = arg[arg.indexOf("-u") + 1]; var IconUrl = arg[arg.indexOf("-i") + 1]; - tmpStack.push(AppName); - tmpStack.push(IframeUrl); - tmpStack.push(IconUrl); + tmpStack.push(arg.indexOf("-n")) + tmpStack.push(arg.indexOf("-u")) + tmpStack.push(arg.indexOf("-i")) + tmpStack.push(AppName) + tmpStack.push(IframeUrl) + tmpStack.push(IconUrl) var Json = { name: AppName, icon: IconUrl, From a269f3512dc0aa38ab411d51413ae108f121d62b Mon Sep 17 00:00:00 2001 From: win11bot Date: Mon, 1 Jan 2024 15:02:08 +0000 Subject: [PATCH 12/34] Prettier skip actions --- src/containers/applications/apps/terminal.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index e7f976bad..81d1990eb 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -81,12 +81,12 @@ export const WnTerminal = () => { var AppName = arg[arg.indexOf("-n") + 1]; var IframeUrl = arg[arg.indexOf("-u") + 1]; var IconUrl = arg[arg.indexOf("-i") + 1]; - tmpStack.push(arg.indexOf("-n")) - tmpStack.push(arg.indexOf("-u")) - tmpStack.push(arg.indexOf("-i")) - tmpStack.push(AppName) - tmpStack.push(IframeUrl) - tmpStack.push(IconUrl) + tmpStack.push(arg.indexOf("-n")); + tmpStack.push(arg.indexOf("-u")); + tmpStack.push(arg.indexOf("-i")); + tmpStack.push(AppName); + tmpStack.push(IframeUrl); + tmpStack.push(IconUrl); var Json = { name: AppName, icon: IconUrl, From 52ac62c91c183def787024482fc86bc159cc68be Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:10:53 -0500 Subject: [PATCH 13/34] Changing how the arg is send to the install command --- src/containers/applications/apps/terminal.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 81d1990eb..35ffd52d7 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -78,6 +78,7 @@ export const WnTerminal = () => { } else if (type == "install") { if (arg.length) { tmpStack.push("Installing app"); + var arg = arg.toString().split(" ") var AppName = arg[arg.indexOf("-n") + 1]; var IframeUrl = arg[arg.indexOf("-u") + 1]; var IconUrl = arg[arg.indexOf("-i") + 1]; From ad05ee4fcdc27ea494fcc22cce987c39a056263d Mon Sep 17 00:00:00 2001 From: win11bot Date: Mon, 1 Jan 2024 15:11:15 +0000 Subject: [PATCH 14/34] Prettier skip actions --- src/containers/applications/apps/terminal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 35ffd52d7..45f1ff76d 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -78,7 +78,7 @@ export const WnTerminal = () => { } else if (type == "install") { if (arg.length) { tmpStack.push("Installing app"); - var arg = arg.toString().split(" ") + var arg = arg.toString().split(" "); var AppName = arg[arg.indexOf("-n") + 1]; var IframeUrl = arg[arg.indexOf("-u") + 1]; var IconUrl = arg[arg.indexOf("-i") + 1]; From b0fe731623500f9f0aadeca1b346fae0cf9e491b Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:35:59 -0500 Subject: [PATCH 15/34] Prettier return value and adding uninstall to uninstall app --- src/containers/applications/apps/terminal.jsx | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 45f1ff76d..b7ce026e9 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react"; import { useSelector, useDispatch } from "react-redux"; import i18next from "i18next"; import login from "../../../components/login"; -import { installApp } from "../../../actions"; +import { installApp, delApp } from "../../../actions"; import { Icon, ToolBar } from "../../../utils/general"; import dirs from "./assets/dir.json"; @@ -82,12 +82,6 @@ export const WnTerminal = () => { var AppName = arg[arg.indexOf("-n") + 1]; var IframeUrl = arg[arg.indexOf("-u") + 1]; var IconUrl = arg[arg.indexOf("-i") + 1]; - tmpStack.push(arg.indexOf("-n")); - tmpStack.push(arg.indexOf("-u")); - tmpStack.push(arg.indexOf("-i")); - tmpStack.push(AppName); - tmpStack.push(IframeUrl); - tmpStack.push(IconUrl); var Json = { name: AppName, icon: IconUrl, @@ -101,6 +95,27 @@ export const WnTerminal = () => { installApp(Json); tmpStack.push("App installed"); } + } else if (type == "uninstall") { + if (arg.length) { + tmpStack.push("Uninstalling app"); + var arg = arg.toString().split(" ") + var AppName = arg[arg.indexOf("-n") + 1]; + tmpStack.push(AppName); + var apps = document.getElementsByClassName('dskApp') + var Mainmenu = '' + for (let i = 0; i < apps.length; i++) { + var app = apps[i] + var Appcname = app.getElementsByClassName('appName')[0] + var menu = app.getElementsByClassName('uicon')[0] + console.log(Appcname.innerHTML) + if (Appcname.innerTEXT == 'n') { + Mainmenu = menu + } + } + + delApp('delete',Mainmenu); + tmpStack.push("App uninstalled"); + } } else if (type == "python") { if (arg.length) { if (window.pythonRunner) { From 9ad2fd8f6053deb8ab5a8229f1b4cc3b5ea5dfa3 Mon Sep 17 00:00:00 2001 From: win11bot Date: Mon, 1 Jan 2024 15:36:23 +0000 Subject: [PATCH 16/34] Prettier skip actions --- src/containers/applications/apps/terminal.jsx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index b7ce026e9..36c4c5fc4 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -98,22 +98,22 @@ export const WnTerminal = () => { } else if (type == "uninstall") { if (arg.length) { tmpStack.push("Uninstalling app"); - var arg = arg.toString().split(" ") + var arg = arg.toString().split(" "); var AppName = arg[arg.indexOf("-n") + 1]; tmpStack.push(AppName); - var apps = document.getElementsByClassName('dskApp') - var Mainmenu = '' + var apps = document.getElementsByClassName("dskApp"); + var Mainmenu = ""; for (let i = 0; i < apps.length; i++) { - var app = apps[i] - var Appcname = app.getElementsByClassName('appName')[0] - var menu = app.getElementsByClassName('uicon')[0] - console.log(Appcname.innerHTML) - if (Appcname.innerTEXT == 'n') { - Mainmenu = menu - } + var app = apps[i]; + var Appcname = app.getElementsByClassName("appName")[0]; + var menu = app.getElementsByClassName("uicon")[0]; + console.log(Appcname.innerHTML); + if (Appcname.innerTEXT == "n") { + Mainmenu = menu; + } } - delApp('delete',Mainmenu); + delApp("delete", Mainmenu); tmpStack.push("App uninstalled"); } } else if (type == "python") { From 7b70f098ff0a5c85a3fd01ff53170600744434fc Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:40:49 -0500 Subject: [PATCH 17/34] WHY --- src/containers/applications/apps/terminal.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 36c4c5fc4..0b14b0dca 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -112,6 +112,7 @@ export const WnTerminal = () => { Mainmenu = menu; } } + console.log(Mainmenu) delApp("delete", Mainmenu); tmpStack.push("App uninstalled"); From 7a54df126529197f9355c03d84b77fab1d83f997 Mon Sep 17 00:00:00 2001 From: win11bot Date: Mon, 1 Jan 2024 15:41:06 +0000 Subject: [PATCH 18/34] Prettier skip actions --- src/containers/applications/apps/terminal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 0b14b0dca..9da564243 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -112,7 +112,7 @@ export const WnTerminal = () => { Mainmenu = menu; } } - console.log(Mainmenu) + console.log(Mainmenu); delApp("delete", Mainmenu); tmpStack.push("App uninstalled"); From a18aa6bb828a5ce9a3d6121684b6e02f79203a36 Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:44:51 -0500 Subject: [PATCH 19/34] More logs --- src/containers/applications/apps/terminal.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 9da564243..b1db22a28 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -110,6 +110,7 @@ export const WnTerminal = () => { console.log(Appcname.innerHTML); if (Appcname.innerTEXT == "n") { Mainmenu = menu; + console.log(menu) } } console.log(Mainmenu); From e886ec4432b8bd59c12c0756445df2d963d728fc Mon Sep 17 00:00:00 2001 From: win11bot Date: Mon, 1 Jan 2024 15:45:07 +0000 Subject: [PATCH 20/34] Prettier skip actions --- src/containers/applications/apps/terminal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index b1db22a28..62b2394d7 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -110,7 +110,7 @@ export const WnTerminal = () => { console.log(Appcname.innerHTML); if (Appcname.innerTEXT == "n") { Mainmenu = menu; - console.log(menu) + console.log(menu); } } console.log(Mainmenu); From 087a06c0eaeca51d42aebcaa7650f22f0bbe02aa Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:52:51 -0500 Subject: [PATCH 21/34] Fixed a bug in the code with variable --- src/containers/applications/apps/terminal.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 62b2394d7..733b5240b 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -107,10 +107,9 @@ export const WnTerminal = () => { var app = apps[i]; var Appcname = app.getElementsByClassName("appName")[0]; var menu = app.getElementsByClassName("uicon")[0]; - console.log(Appcname.innerHTML); - if (Appcname.innerTEXT == "n") { - Mainmenu = menu; - console.log(menu); + if (Appcname.innerHTML == "n") { + var Mainmenu = menu; + console.log(menu) } } console.log(Mainmenu); From 47958ec33c69501961761b7ff77c6a419c61b79b Mon Sep 17 00:00:00 2001 From: win11bot Date: Mon, 1 Jan 2024 15:53:13 +0000 Subject: [PATCH 22/34] Prettier skip actions --- src/containers/applications/apps/terminal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 733b5240b..2f95d4cb3 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -109,7 +109,7 @@ export const WnTerminal = () => { var menu = app.getElementsByClassName("uicon")[0]; if (Appcname.innerHTML == "n") { var Mainmenu = menu; - console.log(menu) + console.log(menu); } } console.log(Mainmenu); From ed7523ba9f804ad40ac5d6e5e3e94ca061289df0 Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Mon, 1 Jan 2024 11:03:29 -0500 Subject: [PATCH 23/34] Change the desc for the 2 new command --- src/containers/applications/apps/terminal.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 2f95d4cb3..465a655ac 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -315,7 +315,8 @@ export const WnTerminal = () => { "VER Displays the Windows version.", "PYTHON EXECUTE PYTHON CODE.", "EVAL RUNS JavaScript statements.", - "INSTALL Instal a app with name and iframe url", + "INSTALL Instal a app with app name and iframe url", + "UNINSTALL Uninstal a app with app name", ]; for (var i = 0; i < helpArr.length; i++) { From d708ff341e04a3ead95ebe26ba2e15aaae6fdc26 Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Tue, 2 Jan 2024 19:06:53 -0500 Subject: [PATCH 24/34] Uninstall command fixing error in appName check --- src/containers/applications/apps/terminal.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 465a655ac..e5503fc5c 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -99,7 +99,7 @@ export const WnTerminal = () => { if (arg.length) { tmpStack.push("Uninstalling app"); var arg = arg.toString().split(" "); - var AppName = arg[arg.indexOf("-n") + 1]; + var AppName = arg[1]; tmpStack.push(AppName); var apps = document.getElementsByClassName("dskApp"); var Mainmenu = ""; @@ -107,7 +107,7 @@ export const WnTerminal = () => { var app = apps[i]; var Appcname = app.getElementsByClassName("appName")[0]; var menu = app.getElementsByClassName("uicon")[0]; - if (Appcname.innerHTML == "n") { + if (Appcname.innerHTML == appName) { var Mainmenu = menu; console.log(menu); } From 6f761ef61fdd0d352b077e472c52058961f9f9da Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Tue, 2 Jan 2024 19:09:43 -0500 Subject: [PATCH 25/34] Removing need with -n -i -u but default appName and etc info getting --- src/containers/applications/apps/terminal.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index e5503fc5c..88c5e732e 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -79,9 +79,9 @@ export const WnTerminal = () => { if (arg.length) { tmpStack.push("Installing app"); var arg = arg.toString().split(" "); - var AppName = arg[arg.indexOf("-n") + 1]; - var IframeUrl = arg[arg.indexOf("-u") + 1]; - var IconUrl = arg[arg.indexOf("-i") + 1]; + var AppName = arg[1]; + var IframeUrl = arg[2]; + var IconUrl = arg[3]; var Json = { name: AppName, icon: IconUrl, From fe4155971e5e6dfff9e4889f5cca354901b9fdaa Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Wed, 3 Jan 2024 16:34:50 -0500 Subject: [PATCH 26/34] typo error --- src/containers/applications/apps/terminal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 88c5e732e..80690f60f 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -107,7 +107,7 @@ export const WnTerminal = () => { var app = apps[i]; var Appcname = app.getElementsByClassName("appName")[0]; var menu = app.getElementsByClassName("uicon")[0]; - if (Appcname.innerHTML == appName) { + if (Appcname.innerHTML == AppName) { var Mainmenu = menu; console.log(menu); } From da0546e578be6bcd14f711fc67d66b44c48ff6ca Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Wed, 3 Jan 2024 17:12:17 -0500 Subject: [PATCH 27/34] Adding debuging to find the error in install App --- src/containers/applications/apps/terminal.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 80690f60f..fd2da34dc 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -107,6 +107,7 @@ export const WnTerminal = () => { var app = apps[i]; var Appcname = app.getElementsByClassName("appName")[0]; var menu = app.getElementsByClassName("uicon")[0]; + console.log(Appcname.innerHTML); if (Appcname.innerHTML == AppName) { var Mainmenu = menu; console.log(menu); From 5a0492019773785ac4296e8ed3b2c21fc3a6b3af Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Wed, 3 Jan 2024 17:14:15 -0500 Subject: [PATCH 28/34] Changing id to get parm in command --- src/containers/applications/apps/terminal.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index fd2da34dc..30053d1ca 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -79,9 +79,9 @@ export const WnTerminal = () => { if (arg.length) { tmpStack.push("Installing app"); var arg = arg.toString().split(" "); - var AppName = arg[1]; - var IframeUrl = arg[2]; - var IconUrl = arg[3]; + var AppName = arg[0]; + var IframeUrl = arg[1]; + var IconUrl = arg[2]; var Json = { name: AppName, icon: IconUrl, @@ -99,7 +99,7 @@ export const WnTerminal = () => { if (arg.length) { tmpStack.push("Uninstalling app"); var arg = arg.toString().split(" "); - var AppName = arg[1]; + var AppName = arg[0]; tmpStack.push(AppName); var apps = document.getElementsByClassName("dskApp"); var Mainmenu = ""; From 1b179212c3c373e7102f0d75e6d91254e3728851 Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Wed, 3 Jan 2024 17:57:06 -0500 Subject: [PATCH 29/34] changing how app uninstall to prevent bug with app.pwa --- src/actions/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actions/index.js b/src/actions/index.js index 355324ccf..bf458a63f 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -123,7 +123,7 @@ export const delApp = (act, menu) => { var app = Object.keys(apps).filter((x) => apps[x].action == data.type); if (app) { app = apps[app]; - if (app.pwa == true) { + if (app.pwa == true || app.pwa == False /*what is that for ?*/) { store.dispatch({ type: app.action, payload: "close" }); store.dispatch({ type: "DELAPP", payload: app.icon }); From 8e8293dc2b6eb4f34d49dea2324ea6202f65f617 Mon Sep 17 00:00:00 2001 From: win11bot Date: Wed, 3 Jan 2024 22:57:24 +0000 Subject: [PATCH 30/34] Prettier skip actions --- src/actions/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actions/index.js b/src/actions/index.js index bf458a63f..1a149d91c 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -123,7 +123,7 @@ export const delApp = (act, menu) => { var app = Object.keys(apps).filter((x) => apps[x].action == data.type); if (app) { app = apps[app]; - if (app.pwa == true || app.pwa == False /*what is that for ?*/) { + if (app.pwa == true || app.pwa == False /*what is that for ?*/) { store.dispatch({ type: app.action, payload: "close" }); store.dispatch({ type: "DELAPP", payload: app.icon }); From 51e7ad00fb6fb99c031280d78bbd57936193a2a6 Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Wed, 3 Jan 2024 18:19:44 -0500 Subject: [PATCH 31/34] More debugin --- src/containers/applications/apps/terminal.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 30053d1ca..26fd196cc 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -79,6 +79,7 @@ export const WnTerminal = () => { if (arg.length) { tmpStack.push("Installing app"); var arg = arg.toString().split(" "); + print(arg) var AppName = arg[0]; var IframeUrl = arg[1]; var IconUrl = arg[2]; From e16b7c2284692b120163ede39734cf84d9719a0f Mon Sep 17 00:00:00 2001 From: win11bot Date: Wed, 3 Jan 2024 23:20:01 +0000 Subject: [PATCH 32/34] Prettier skip actions --- src/containers/applications/apps/terminal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 26fd196cc..0f6c8aae7 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -79,7 +79,7 @@ export const WnTerminal = () => { if (arg.length) { tmpStack.push("Installing app"); var arg = arg.toString().split(" "); - print(arg) + print(arg); var AppName = arg[0]; var IframeUrl = arg[1]; var IconUrl = arg[2]; From 9e4c873cfb3ccab65032d914a7456960da7217b6 Mon Sep 17 00:00:00 2001 From: franck403 <79372051+franck403@users.noreply.github.com> Date: Wed, 3 Jan 2024 18:45:21 -0500 Subject: [PATCH 33/34] Add more log to console for debug --- src/containers/applications/apps/terminal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index 0f6c8aae7..f4d63f357 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -79,7 +79,7 @@ export const WnTerminal = () => { if (arg.length) { tmpStack.push("Installing app"); var arg = arg.toString().split(" "); - print(arg); + console.log(arg) var AppName = arg[0]; var IframeUrl = arg[1]; var IconUrl = arg[2]; From 24f2eab747a0dce500537758a082e2c573762682 Mon Sep 17 00:00:00 2001 From: win11bot Date: Wed, 3 Jan 2024 23:45:39 +0000 Subject: [PATCH 34/34] Prettier skip actions --- src/containers/applications/apps/terminal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/applications/apps/terminal.jsx b/src/containers/applications/apps/terminal.jsx index f4d63f357..ad646b78a 100644 --- a/src/containers/applications/apps/terminal.jsx +++ b/src/containers/applications/apps/terminal.jsx @@ -79,7 +79,7 @@ export const WnTerminal = () => { if (arg.length) { tmpStack.push("Installing app"); var arg = arg.toString().split(" "); - console.log(arg) + console.log(arg); var AppName = arg[0]; var IframeUrl = arg[1]; var IconUrl = arg[2];