various visual fixes

pull/2/head
gorhill 7 years ago
parent 0a43c6fedd
commit 1825b65d4c

@ -135,6 +135,10 @@
"message": "Go to dashboard",
"description": "A menu entry in the matrix popup"
},
"matrixNoTabFound" : {
"message": "No web page found",
"description": "Displays in place of matrix when no data is found for the current page"
},
"statsPageTitle" : {
"message": "uMatrix – Statistics",

@ -2,6 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>uMatrix — Asset viewer</title>
<style>
#content {

@ -623,6 +623,21 @@ body.colorblind .rw .matCell.t2 #blacklist:hover {
opacity: 1;
}
/* No data was found for the tab */
body.noTabFound .paneHead,
body.noTabFound .paneContent {
display: none;
}
body.noTabFound #noTabFound {
align-items: center;
color: gray;
display: flex;
font-size: xx-large;
height: 100vh;
justify-content: center;
}
/* Mobile-friendly rules */
body.hConstrained {

@ -2,6 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/png" href="img/icon_16.png">
<title data-i18n="dashboardPageName"></title>
<style>

@ -288,7 +288,7 @@ var matrixSnapshotFromTabId = function(details, callback) {
// Fall back to currently active tab
var onTabReady = function(tab) {
if ( typeof tab !== 'object' ) {
if ( tab instanceof Object === false ) {
callback('ENOTFOUND');
return;
}

@ -1078,9 +1078,15 @@ var makeMenu = function() {
// Do all the stuff that needs to be done before building menu et al.
function initMenuEnvironment() {
uDom('body').css('font-size', getUserSetting('displayTextSize'));
uDom('body').toggleClass('colorblind', getUserSetting('colorBlindFriendly') === true);
uDom('#version').text(matrixSnapshot.appVersion || '');
document.body.style.setProperty(
'font-size',
getUserSetting('displayTextSize')
);
document.body.classList.toggle(
'font-size',
getUserSetting('colorBlindFriendly')
);
uDom.nodeFromId('version').textContent = matrixSnapshot.appVersion || '';
var prettyNames = matrixHeaderPrettyNames;
var keys = Object.keys(prettyNames);
@ -1330,6 +1336,13 @@ function dropDownMenuHide() {
/******************************************************************************/
var onMatrixSnapshotReady = function(response) {
if ( response === 'ENOTFOUND' ) {
uDom.nodeFromId('noTabFound').textContent =
vAPI.i18n('matrixNoTabFound');
document.body.classList.add('noTabFound');
return;
}
// Now that tabId and pageURL are set, we can build our menu
initMenuEnvironment();
makeMenu();
@ -1443,7 +1456,7 @@ var matrixSnapshotPoller = (function() {
if ( typeof response === 'object' ) {
matrixSnapshot = response;
}
onMatrixSnapshotReady();
onMatrixSnapshotReady(response);
pollAsync();
};

@ -2,6 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/common.css">
<link rel="stylesheet" type="text/css" href="css/logger-ui.css">
<link rel="shortcut icon" type="image/png" href="img/icon_16.png">

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<link rel="stylesheet" href="css/common.css" type="text/css">
<style>

@ -78,6 +78,8 @@
<div id="noNetTrafficPrompt" style="display:none;text-align:center;font-size:large"></div>
</div>
<div id="noTabFound"></div>
<!-- Convenient to auto-fetch locale strings used in scripts -->
<div style="display: none;">
<span data-i18n="matrixBlacklistedHostnames"></span>

Loading…
Cancel
Save