Unbreak the login page

This commit is contained in:
Herbert Wolverson
2023-08-09 16:13:23 +00:00
parent 5b3fef2d92
commit b69e0b4699
8 changed files with 167 additions and 138 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -339,7 +339,7 @@
<li class="nav-item text-nowrap">
<form class="d-flex" role="search">
<input id="txtSearch" class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<input id="txtSearch" class="form-control me-2" type="search" placeholder="Search" aria-label="Search" autocomplete="off">
<div id="searchResults"
style="position: fixed; display: none; color: black; background-color: #eee; top:55px; left: 0x; width: 300px; height: auto; z-index: 2000;">
Blah</div>

View File

@@ -16,6 +16,12 @@ export class Bus {
let indicator = document.getElementById("connStatus");
if (indicator && is_wasm_connected()) {
indicator.style.color = "green";
// Clear the loader
let loader = document.getElementById('SpinLoad');
if (loader) {
loader.style.display = "none";
}
} else if (indicator) {
indicator.style.color = "red";
}

View File

@@ -1,14 +1,14 @@
//import html from './template.html';
import html from './template.html';
import { Page } from '../page'
import { getValueFromForm } from '../helpers';
import { send_login } from '../../wasm/wasm_pipe';
export class LoginPage implements Page {
constructor() {
/*let container = document.getElementById('main');
let container = document.getElementById('mainContent');
if (container) {
container.innerHTML = html;
}*/
}
}
wireup() {

View File

@@ -1,8 +1,8 @@
<div id="container" class="pad4">
<div id="container" class="pad4" style="width: 100%">
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-4">
<div class="card bg-light">
<div class="card">
<div class="card-body">
<h5 class="card-title">Login</h5>
<p>Please your license code, a username and password to access LibreQoS Long-Term Statistics.</p>

View File

@@ -339,7 +339,7 @@
<li class="nav-item text-nowrap">
<form class="d-flex" role="search">
<input id="txtSearch" class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<input id="txtSearch" class="form-control me-2" type="search" placeholder="Search" aria-label="Search" autocomplete="off">
<div id="searchResults"
style="position: fixed; display: none; color: black; background-color: #eee; top:55px; left: 0x; width: 300px; height: auto; z-index: 2000;">
Blah</div>

View File

@@ -12,12 +12,7 @@ export class MenuPage implements Page {
constructor(activeElement: string) {
let container = document.getElementById('mainContent');
if (container) {
//container.innerHTML = html;
let loader = document.getElementById('SpinLoad');
if (loader) {
loader.style.display = "none";
}
//container.innerHTML = html;
menuElements.forEach(element => {
let e = document.getElementById(element);