Skip to content

Commit

Permalink
QUICK FIX OF APPSTORE
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsLap committed May 26, 2024
1 parent 03fbce4 commit 46d9a27
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pkgs/apps/AppStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@ export default {
},
async appPage(app, pkg) {
this.clear();
let fileExtension = "." + app.assets.path.split(".").pop();
if (fileExtension === ".js") fileExtension = ".app";
console.log("loading new app page");

console.log(app, pkg);
Expand Down Expand Up @@ -482,7 +484,9 @@ export default {

async function makeInstallOrOpenButton() {
let localHash = new window.Hashes.MD5().hex(
await vfs.readFile(`${asFilePath}/${appNameSafe}.app`)
await vfs.readFile(
`${asFilePath}/${appNameSafe}${fileExtension}`
)
);
const appHash = await fetch(
`${host}pkgs/${pkg}/${app.assets.path}?t=` + performance.now()
Expand All @@ -491,7 +495,7 @@ export default {
});

const whatIsApp = await vfs.whatIs(
`${asFilePath}/${appNameSafe}.app`
`${asFilePath}/${appNameSafe}${fileExtension}`
);

return [
Expand Down Expand Up @@ -540,7 +544,9 @@ export default {
);

if (result === true) {
await vfs.delete(`${asFilePath}/${appNameSafe}.app`);
await vfs.delete(
`${asFilePath}/${appNameSafe}${fileExtension}`
);
// await Root.Modal.alert(
// "App Deleted!",
// `${app.name} has been successfully deleted!`
Expand Down

0 comments on commit 46d9a27

Please sign in to comment.