Improved offline page

Summary:
This change improves our offline page. Mainly:

- Remove Oops! wording as it may imply some error took place.
- Remove the reload button. Automatic reload takes place at 2.5s intervals so this is unnecessary.

Changelog: Improved offline page (reload button removal)

Reviewed By: antonk52

Differential Revision: D46720650

fbshipit-source-id: 522f86d1a4d3d4b091672077cba1a26f898d19e8
This commit is contained in:
Lorenzo Blasa
2023-06-14 04:44:51 -07:00
committed by Facebook GitHub Bot
parent 4646b12a83
commit c431969dde
2 changed files with 5 additions and 13 deletions

View File

@@ -73,22 +73,18 @@
<body> <body>
<div id="container"> <div id="container">
<div> <div>
<b>Oops! It seems Flipper is not running in the background</b> <b>Flipper is not running in the background</b>
<p>Flipper can be started by clicking the button below.</p> <p>It can be started by clicking the button below.</p>
<form action="flipper-launcher://start-server"> <form action="flipper-launcher://start-server">
<input type="submit" value="Start" /> <input type="submit" value="Start" />
</form> </form>
<p> <p>
Flipper will automatically reload once the connection is re-established. Flipper will automatically reload once the connection is re-established.
Click the button below to try reloading manually.
</p> </p>
<p>If is taking a bit longer than it should, you can manually start Flipper.</p>
<button type="button">⤾ Reload</button> <p>From the terminal, please run:</p>
<p>Also, you can manually start Flipper.
From the terminal, please run:</p>
<div class="console"> <div class="console">
<header> <header>
@@ -103,10 +99,6 @@
</div> </div>
<script> <script>
document.querySelector('button').addEventListener('click', () => {
window.location.reload();
});
// Listen to changes in the network state, reload when online. // Listen to changes in the network state, reload when online.
// This handles the case when the device is completely offline // This handles the case when the device is completely offline
// i.e. no network connection. // i.e. no network connection.

View File

@@ -8,7 +8,7 @@
// OFFLINE_VERSION is used as an update marker so that on subsequent installations // OFFLINE_VERSION is used as an update marker so that on subsequent installations
// the newer version of the file gets updated. // the newer version of the file gets updated.
// eslint-disable-next-line header/header, no-unused-vars // eslint-disable-next-line header/header, no-unused-vars
const OFFLINE_VERSION = 1; const OFFLINE_VERSION = 1.1;
const CACHE_NAME = 'offline'; const CACHE_NAME = 'offline';
const OFFLINE_URL = 'offline.html'; const OFFLINE_URL = 'offline.html';