1
0

Alert when indexeddb not available

This commit is contained in:
Zef Hemel 2023-05-24 05:42:24 +02:00
parent 863b92df6a
commit c746d77a6b
2 changed files with 7 additions and 1 deletions

View File

@ -33,7 +33,7 @@ export class HttpServer {
this.hostname = options.hostname; this.hostname = options.hostname;
this.port = options.port; this.port = options.port;
this.app = new Application(); this.app = new Application();
this.user = options.user ?? Deno.env.get("SB_USER"); this.user = options.user;
this.clientAssetBundle = options.clientAssetBundle; this.clientAssetBundle = options.clientAssetBundle;
} }

View File

@ -32,3 +32,9 @@ if (navigator.serviceWorker) {
"Not launching service worker, likely because not running from localhost or over HTTPs. This means SilverBullet will not be available offline.", "Not launching service worker, likely because not running from localhost or over HTTPs. This means SilverBullet will not be available offline.",
); );
} }
if (!globalThis.indexedDB) {
alert(
"SilverBullet requires IndexedDB to operate and it is not available in your browser. Please use a recent version of Chrome, Firefox (not in private mode) or Safari.",
);
}