Preserve previous error messages
Reviewed By: passy Differential Revision: D51197113 fbshipit-source-id: 237c6f1f894cb4d758150ff2bddf14c104d3b381
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8348d617d0
commit
4b3f572205
@@ -32,6 +32,7 @@
|
||||
padding: 50px;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
@@ -39,6 +40,10 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.message p {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.console {
|
||||
font-family: 'Fira Mono';
|
||||
width: 600px;
|
||||
@@ -98,6 +103,8 @@
|
||||
|
||||
<body>
|
||||
<div id="troubleshoot" class="message">
|
||||
<h1 id="tourbleshoot_title"></h1>
|
||||
<p id="tourbleshoot_details"></p>
|
||||
</div>
|
||||
|
||||
<div id="root">
|
||||
@@ -121,9 +128,18 @@
|
||||
|
||||
const root = document.getElementById('root');
|
||||
const troubleshootBox = document.getElementById('troubleshoot');
|
||||
const troubleshootBoxTitle = document.getElementById('tourbleshoot_title');
|
||||
const troubleshootBoxDetails = document.getElementById('tourbleshoot_details');
|
||||
|
||||
function showMessage(text, centered) {
|
||||
troubleshootBox.innerText = text;
|
||||
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';
|
||||
@@ -132,6 +148,8 @@
|
||||
function hideMessage() {
|
||||
root.style.display = 'block';
|
||||
troubleshootBox.style.display = 'none';
|
||||
troubleshootBoxTitle.innerHTML = ''
|
||||
troubleshootBoxDetails.innerHTML = ''
|
||||
}
|
||||
|
||||
window.flipperShowMessage = showMessage;
|
||||
|
||||
@@ -32,12 +32,16 @@
|
||||
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;
|
||||
@@ -48,6 +52,8 @@
|
||||
|
||||
<body>
|
||||
<div id="troubleshoot" class="message">
|
||||
<h1 id="tourbleshoot_title"></h1>
|
||||
<p id="tourbleshoot_details"></p>
|
||||
</div>
|
||||
|
||||
<div id="root">
|
||||
@@ -70,9 +76,18 @@
|
||||
|
||||
const root = document.getElementById('root');
|
||||
const troubleshootBox = document.getElementById('troubleshoot');
|
||||
const troubleshootBoxTitle = document.getElementById('tourbleshoot_title');
|
||||
const troubleshootBoxDetails = document.getElementById('tourbleshoot_details');
|
||||
|
||||
function showMessage(text) {
|
||||
troubleshootBox.innerText = text;
|
||||
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';
|
||||
@@ -81,6 +96,8 @@
|
||||
function hideMessage() {
|
||||
root.style.display = 'block';
|
||||
troubleshootBox.style.display = 'none';
|
||||
troubleshootBoxTitle.innerHTML = ''
|
||||
troubleshootBoxDetails.innerHTML = ''
|
||||
}
|
||||
|
||||
window.flipperShowMessage = showMessage;
|
||||
|
||||
Reference in New Issue
Block a user