Skip to content

Commit

Permalink
Fix settings modal popup
Browse files Browse the repository at this point in the history
Added freedom for users to customise boot apps.
  • Loading branch information
ItsLap committed Dec 8, 2023
1 parent af747c0 commit 6647044
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 17 deletions.
18 changes: 9 additions & 9 deletions pkgs/apps/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -786,15 +786,15 @@ export default {
averageResponse = "slow";
}

Root.Modal.alert(
"Success",
"You're online and good to go!\n\nYour internet speed is " +
averageResponse +
". " +
"Average response time: " +
averageResponseTime +
"ms"
);
// Root.Modal.alert(
// "Success",
// "You're online and good to go!\n\nYour internet speed is " +
// averageResponse +
// ". " +
// "Average response time: " +
// averageResponseTime +
// "ms"
// );
new Html("span")
.appendMany(
new Html("span")
Expand Down
41 changes: 33 additions & 8 deletions pkgs/system/BootLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default {

// Make app
const ls = await Root.Core.startPkg("ui:LoadingScreen");
const FileMapping = await Root.Core.startPkg("lib:FileMappings");
// start loading screen
const lsg = ls.loader();
try {
Expand All @@ -47,7 +48,9 @@ export default {
await vfs.importFS();

if (await vfs.exists("Root/Pluto/config/fsVersionUpdate.txt")) {
let version = await vfs.readFile("Root/Pluto/config/fsVersionUpdate.txt");
let version = await vfs.readFile(
"Root/Pluto/config/fsVersionUpdate.txt"
);

if (Number(version) < Root.Lib.systemInfo.version) {
await vfs.importFS();
Expand All @@ -56,15 +59,13 @@ export default {
await vfs.importFS();
}
} else {

await vfs.importFS();

}
console.log(Root.Lib.systemInfo)
console.log(Root.Lib.systemInfo);
await vfs.writeFile(
"Root/Pluto/config/fsVersionUpdate.txt",
Root.Lib.systemInfo.version.toString()
)
);
let appearanceConfig = JSON.parse(
await vfs.readFile("Root/Pluto/config/appearanceConfig.json")
);
Expand All @@ -80,9 +81,33 @@ export default {
Root.Core.setLanguage(appearanceConfig.language);
}

await Root.Core.startPkg("apps:FTGSF");

await Root.Core.startPkg("ui:Desktop", true, true);
if (await vfs.exists("Root/Pluto/config/settingsConfig.json")) {
let settingsConfig = JSON.parse(
await vfs.readFile("Root/Pluto/config/settingsConfig.json")
);
if (
settingsConfig !== undefined &&
settingsConfig.bootApp !== undefined
) {
let appMapping = await FileMapping.retrieveAllMIMEdata(
settingsConfig.bootApp,
vfs
);
appMapping.onClick(Root.Core);
// await Root.Core.startPkg(
// mapping.onClick(Root.Core);
// await vfs.readFile(settingsConfig.bootApp),
// false,
// true
// );
} else {
await Root.Core.startPkg("apps:FTGSF");
await Root.Core.startPkg("ui:Desktop", true, true);
}
} else {
await Root.Core.startPkg("apps:FTGSF");
await Root.Core.startPkg("ui:Desktop", true, true);
}

let themeLib = await Root.Core.startPkg("lib:ThemeLib");

Expand Down

0 comments on commit 6647044

Please sign in to comment.