Merge branch 'master' into new-schema

This commit is contained in:
Scott Lamb
2020-05-08 16:33:49 -07:00
5 changed files with 58 additions and 40 deletions

View File

@@ -227,7 +227,7 @@ function updateSession(session) {
return;
}
sessionBar.append($('<span id="session-username" />').text(session.username));
const logout = $('<a>logout</a>');
const logout = $('<a id="logout">logout</a>');
logout.click(() => {
api
.logout(session.csrf)
@@ -384,6 +384,11 @@ export default class NVRApplication {
* Start the application.
*/
start() {
let nav = $('#nav');
$('#toggle-nav').click(() => {
nav.toggle('slide');
});
loginDialog = $('#login').dialog({
autoOpen: false,
modal: true,

View File

@@ -1,54 +1,72 @@
@media only screen and (max-width: 720px) {
#nav {
float: none;
display: none;
}
}
body {
font-family: Arial, Helvetica, sans-serif;
font-family: Arial, Helvetica, sans-serif;
}
#top {
width: 100%;
padding-bottom: 2ex;
}
#toggle-nav {
font-size: 1.25em;
cursor: pointer;
}
#nav {
float: left;
float: left;
}
#session {
float: right;
float: right;
}
#logout {
cursor: pointer;
}
#datetime .ui-datepicker {
width: 100%;
width: 100%;
}
#videos {
display: inline-block;
padding-top: 0.5em;
padding-left: 1em;
padding-right: 1em;
display: inline-block;
padding-top: 0.5em;
padding-left: 1em;
padding-right: 1em;
}
#videos tbody:after {
content: "";
display: block;
height: 3ex;
content: "";
display: block;
height: 3ex;
}
table.videos {
border-collapse: collapse;
border-collapse: collapse;
}
tbody tr.name {
font-size: 110%;
background-color: #eee;
font-size: 110%;
background-color: #eee;
}
tbody tr.name th {
border-bottom: 1px solid #666;
}
tbody tr.hdr {
color: #555;
font-size: 90%;
font-size: 90%;
}
tr.r:hover {
background-color: #ddd;
background-color: #ddd;
}
tr.r td {
font-size: 80%;
cursor: pointer;
font-size: 80%;
cursor: pointer;
}
tr.r th,
tr.r td {
border: 0;
padding: 0.5ex 1.5em;
text-align: right;
padding: 0.5ex 1.5em;
text-align: right;
}
fieldset {
@@ -60,21 +78,21 @@ fieldset legend {
}
#from, #to {
padding-right: 0.75em;
padding-right: 0.75em;
}
#st {
width: 100%;
width: 100%;
}
#range {
padding: 0.5em 0;
padding: 0.5em 0;
}
.ui-dialog .ui-dialog-content {
overflow: visible; /* remove stupid scroll bars when resizing. */
padding: 0;
overflow: visible; /* remove stupid scroll bars when resizing. */
padding: 0;
}
video {
width: 100%;
height: 100%;
width: 100%;
height: 100%;
}

View File

@@ -5,7 +5,9 @@
<title>Moonfire NVR</title>
</head>
<body>
<div id="session">
<div id="top">
<a id="toggle-nav">&#x2630;</a>
<span id="session"></div>
</div>
<div id="nav">
<form action="#">