Better name for showing troubleshooting steps

Summary: Better name for toggling troubleshoot/main UI

Reviewed By: antonk52

Differential Revision: D49411916

fbshipit-source-id: 1e5bd4e3e5742abef1fca41349bc8b16cf1229bf
This commit is contained in:
Lorenzo Blasa
2023-09-20 04:10:39 -07:00
committed by Facebook GitHub Bot
parent a32f5e7544
commit f897203a32
2 changed files with 14 additions and 14 deletions

View File

@@ -143,16 +143,16 @@
window.location.reload();
});
function toggleUI(main) {
function toggleTroubleshoot(troubleshootOn) {
const root = document.getElementById('root');
const troubleshoot = document.getElementById('troubleshoot');
if (main) {
root.style.display = 'block';
troubleshoot.style.display = 'none';
} else {
if (troubleshootOn) {
root.style.display = 'none';
troubleshoot.style.display = 'flex';
} else {
root.style.display = 'block';
troubleshoot.style.display = 'none';
}
}
@@ -216,10 +216,10 @@
window.flipperShowMessage = showMessage;
window.flipperShowNoConnection = () => {
toggleUI(false);
toggleTroubleshoot(true);
};
window.flipperHideMessage = () => {
toggleUI(true);
toggleTroubleshoot(false);
}
// load correct theme (n.b. this doesn't handle system value specifically, will assume light in such cases)

View File

@@ -153,16 +153,16 @@
window.location.reload();
});
function toggleUI(main) {
function toggleTroubleshoot(troubleshootOn) {
const root = document.getElementById('root');
const troubleshoot = document.getElementById('troubleshoot');
if (main) {
root.style.display = 'block';
troubleshoot.style.display = 'none';
} else {
if (troubleshootOn) {
root.style.display = 'none';
troubleshoot.style.display = 'flex';
} else {
root.style.display = 'block';
troubleshoot.style.display = 'none';
}
}
@@ -184,13 +184,13 @@
}
window.flipperShowMessage = showMessage;
window.flipperShowNoConnection = () => {
toggleUI(false);
toggleTroubleshoot(true);
};
window.flipperHideMessage = () => {
const box = document.querySelector('.__infinity-dev-box-error');
box.setAttribute('hidden', true);
toggleUI(true);
toggleTroubleshoot(false);
}
const closeButton = document.createElement('button');