Skip to content

Commit

Permalink
show an error if showDirectoryPicker is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
ading2210 committed Mar 31, 2024
1 parent dff13d8 commit 22e06ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ The next-gen webOS and development environment with full Linux emulation.
An entirely local browser-based "OS" and development environment with complete graphical Linux emulation, visually based on ChromiumOS. See a demo [here](https://anura.pro), fully in your browser.

> [!WARNING]
> Due to numerous issues with its implementation of certain web standards, Firefox is not supported on Anura.
> Please use a Chromium-based browser or you will have a significantly diminished user experience.
>
> Safari is also fully compatible, as long as you have macOS Sonoma, or iOS/iPadOS 17 or later.
> Anura OS has only been extensively tested on Chromium and Safari. Although nearly everything should work on Firefox, you may run into problems with instability.
Anura uses the features of a PWA (Progressive Web App) to make its environment work fully offline, providing a virtual filesystem (synced with the Linux emulator), a code editor, and a modular and extensible app system. You can even edit Anura's code live while inside of it!

Expand Down
8 changes: 8 additions & 0 deletions apps/fsapp.app/operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ window.Buffer = Filer.Buffer;
let sh = new anura.fs.Shell();

async function mountLocalFs() {
if (!window.showDirectoryPicker) {
anura.notifications.add({
title: "File Manager",
description: "Your browser does not support mounting local directories. Currently, this is only supported in Chromium v86 and higher.",
timeout: 5000,
});
return;
}
let path = prompt(
"Enter the path where you want to mount the local filesystem",
);
Expand Down

0 comments on commit 22e06ae

Please sign in to comment.