From 88c060b00d53d1eb81a5f028bb187feb6118d5ff Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Thu, 18 Mar 2021 16:19:09 +0100 Subject: [HTML5] Export as Progressive Web App. Adds possibility to export as a progressive web app. Allows customizing base icons, display mode, orientation and offline page. --- misc/dist/html/offline-export.html | 42 ++++++++++++++++++++++++++++++++++++++ misc/dist/html/service-worker.js | 17 +++------------ 2 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 misc/dist/html/offline-export.html (limited to 'misc/dist') diff --git a/misc/dist/html/offline-export.html b/misc/dist/html/offline-export.html new file mode 100644 index 0000000000..41ab42b04b --- /dev/null +++ b/misc/dist/html/offline-export.html @@ -0,0 +1,42 @@ + + + + + + + You are offline + + + +

You are offline

+

This application requires an Internet connection to run for the first time.

+

Press the button below to try reloading:

+ + + + + diff --git a/misc/dist/html/service-worker.js b/misc/dist/html/service-worker.js index d4eaed2b17..f8dee8cd5b 100644 --- a/misc/dist/html/service-worker.js +++ b/misc/dist/html/service-worker.js @@ -5,22 +5,11 @@ // previously cached resources to be updated from the network. const CACHE_VERSION = "@GODOT_VERSION@"; const CACHE_NAME = "@GODOT_NAME@-cache"; -const OFFLINE_URL = "offline.html"; +const OFFLINE_URL = "@GODOT_OFFLINE_PAGE@"; // Files that will be cached on load. -const CACHED_FILES = [ - "godot.tools.html", - "offline.html", - "godot.tools.js", - "godot.tools.worker.js", - "godot.tools.audio.worklet.js", - "logo.svg", - "favicon.png", -]; - +const CACHED_FILES = @GODOT_CACHE@; // Files that we might not want the user to preload, and will only be cached on first load. -const CACHABLE_FILES = [ - "godot.tools.wasm", -]; +const CACHABLE_FILES = @GODOT_OPT_CACHE@; const FULL_CACHE = CACHED_FILES.concat(CACHABLE_FILES); self.addEventListener("install", (event) => { -- cgit v1.2.3