Remove no longer needed index.web.dev.html
Summary: This is a duplicate, is not needed, causes confusion. Reviewed By: aigoncharov Differential Revision: D51307091 fbshipit-source-id: 4d55d727ea5f20100ecd15ad6e23aa0c01722524
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f1b35ca592
commit
6b54bd3173
@@ -143,7 +143,7 @@ async function getFlipperServer(
|
|||||||
const {readyForIncomingConnections} = await startServer(
|
const {readyForIncomingConnections} = await startServer(
|
||||||
{
|
{
|
||||||
staticPath,
|
staticPath,
|
||||||
entry: 'index.web.dev.html',
|
entry: 'index.web.html',
|
||||||
port,
|
port,
|
||||||
},
|
},
|
||||||
environmentInfo,
|
environmentInfo,
|
||||||
|
|||||||
@@ -185,7 +185,6 @@ async function startHTTPServer(
|
|||||||
};
|
};
|
||||||
app.get('/', serveRoot);
|
app.get('/', serveRoot);
|
||||||
app.get('/index.web.html', serveRoot);
|
app.get('/index.web.html', serveRoot);
|
||||||
app.get('/index.web.dev.html', serveRoot);
|
|
||||||
|
|
||||||
app.get('/ready', (_req, res) => {
|
app.get('/ready', (_req, res) => {
|
||||||
tracker.track('server-endpoint-hit', {name: 'ready'});
|
tracker.track('server-endpoint-hit', {name: 'ready'});
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ async function start() {
|
|||||||
const {app, server, socket, readyForIncomingConnections} = await startServer(
|
const {app, server, socket, readyForIncomingConnections} = await startServer(
|
||||||
{
|
{
|
||||||
staticPath,
|
staticPath,
|
||||||
entry: `index.web${argv.bundler ? '.dev' : ''}.html`,
|
entry: `index.web.html`,
|
||||||
port: argv.port,
|
port: argv.port,
|
||||||
},
|
},
|
||||||
environmentInfo,
|
environmentInfo,
|
||||||
|
|||||||
@@ -244,7 +244,6 @@ async function copyStaticResources(outDir: string, versionNumber: string) {
|
|||||||
'icon.png',
|
'icon.png',
|
||||||
'icon_grey.png',
|
'icon_grey.png',
|
||||||
'icons.json',
|
'icons.json',
|
||||||
'index.web.dev.html',
|
|
||||||
'index.web.html',
|
'index.web.html',
|
||||||
'install_desktop.svg',
|
'install_desktop.svg',
|
||||||
'loading.html',
|
'loading.html',
|
||||||
|
|||||||
@@ -1,142 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
|
|
||||||
<link rel="icon" href="icon.png">
|
|
||||||
<link rel="apple-touch-icon" href="/icon.png">
|
|
||||||
<link rel="stylesheet" href="style.css">
|
|
||||||
<link rel="manifest" href="manifest.json">
|
|
||||||
|
|
||||||
<link id="flipper-theme-import" rel="stylesheet">
|
|
||||||
|
|
||||||
<title>Flipper</title>
|
|
||||||
<script>
|
|
||||||
window.flipperConfig = FLIPPER_CONFIG_PLACEHOLDER;
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
.message {
|
|
||||||
-webkit-app-region: drag;
|
|
||||||
z-index: 999999;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
padding: 50px;
|
|
||||||
overflow: auto;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: 20px;
|
|
||||||
color: #525252;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.message p {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#troubleshoot {
|
|
||||||
display: none;
|
|
||||||
background-color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="troubleshoot" class="message">
|
|
||||||
<h1 id="tourbleshoot_title"></h1>
|
|
||||||
<p id="tourbleshoot_details"></p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="root">
|
|
||||||
<div id="loading" class="message">
|
|
||||||
Loading...
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
(function () {
|
|
||||||
// Line below needed to make Metro work. Alternatives could be considered.
|
|
||||||
window.global = window;
|
|
||||||
|
|
||||||
// Listen to changes in the network state, reload when online.
|
|
||||||
// This handles the case when the device is completely offline
|
|
||||||
// i.e. no network connection.
|
|
||||||
window.addEventListener('online', () => {
|
|
||||||
window.location.reload();
|
|
||||||
});
|
|
||||||
|
|
||||||
const root = document.getElementById('root');
|
|
||||||
const troubleshootBox = document.getElementById('troubleshoot');
|
|
||||||
const troubleshootBoxTitle = document.getElementById('tourbleshoot_title');
|
|
||||||
const troubleshootBoxDetails = document.getElementById('tourbleshoot_details');
|
|
||||||
|
|
||||||
function showMessage({ title, detail }) {
|
|
||||||
if (title) {
|
|
||||||
troubleshootBoxTitle.innerText = title
|
|
||||||
}
|
|
||||||
if (detail) {
|
|
||||||
const newMessage = document.createElement('p')
|
|
||||||
newMessage.innerText = detail;
|
|
||||||
troubleshootBoxDetails.appendChild(newMessage)
|
|
||||||
}
|
|
||||||
|
|
||||||
root.style.display = 'none';
|
|
||||||
troubleshootBox.style.display = 'flex';
|
|
||||||
}
|
|
||||||
|
|
||||||
function hideMessage() {
|
|
||||||
root.style.display = 'block';
|
|
||||||
troubleshootBox.style.display = 'none';
|
|
||||||
troubleshootBoxTitle.innerHTML = ''
|
|
||||||
troubleshootBoxDetails.innerHTML = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
window.flipperShowMessage = showMessage;
|
|
||||||
window.flipperHideMessage = hideMessage;
|
|
||||||
|
|
||||||
// load correct theme (n.b. this doesn't handle system value specifically, will assume light in such cases)
|
|
||||||
try {
|
|
||||||
if (window.flipperConfig.theme === 'dark') {
|
|
||||||
document.getElementById('flipper-theme-import').href = "themes/dark.css";
|
|
||||||
} else {
|
|
||||||
document.getElementById('flipper-theme-import').href = "themes/light.css";
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
console.error("Failed to initialize theme", e);
|
|
||||||
document.getElementById('flipper-theme-import').href = "themes/light.css";
|
|
||||||
}
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
const script = document.createElement('script');
|
|
||||||
script.src = window.flipperConfig.entryPoint;
|
|
||||||
script.onerror = (e) => {
|
|
||||||
const retry = (retries) => {
|
|
||||||
showMessage(`Failed to load entry point. Check Chrome Dev Tools console for more info. Retrying in: ${retries}`);
|
|
||||||
retries -= 1;
|
|
||||||
if (retries < 0) {
|
|
||||||
window.location.reload();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
setTimeout(() => retry(retries), 1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
retry(3);
|
|
||||||
};
|
|
||||||
|
|
||||||
document.body.appendChild(script);
|
|
||||||
}
|
|
||||||
|
|
||||||
init();
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
Reference in New Issue
Block a user