diff --git a/src/auth_service.cpp b/src/auth_service.cpp index dc8a61c..a64d27a 100644 --- a/src/auth_service.cpp +++ b/src/auth_service.cpp @@ -24,8 +24,8 @@ int main() { srv.Options("/(.*)", set_cors_headers); srv.set_mount_point("/auth/admin", "../src/web"); - srv.set_mount_point("/auth/admin/js", "../src/web/js"); - srv.set_mount_point("/auth/admin/css", "../src/web/css"); + srv.set_mount_point("/auth/js", "../src/web/js"); + srv.set_mount_point("/auth/css", "../src/web/css"); std::cout << GREEN << "Starting" << RESET << " server on [ " << YELLOW << "localhost" << RESET << ":" << CYAN << "43243" << RESET << " ]" << std::endl; diff --git a/src/web/index.html b/src/web/index.html index ef7205f..f7bc63d 100644 --- a/src/web/index.html +++ b/src/web/index.html @@ -3,11 +3,11 @@ - - - - - + + + + + admin diff --git a/src/web/js/login.js b/src/web/js/login.js index c762a0a..7b4a376 100644 --- a/src/web/js/login.js +++ b/src/web/js/login.js @@ -5,6 +5,10 @@ const loginforminputpassword = document.querySelector('#loginforminputpassword') const exitbutton = document.querySelector('.exitbutton') const usernameheader = document.querySelector('.usernameheader') +if (localStorage.getItem("token") === null) { + loginform.classList.add("active") +} + loginformbody.addEventListener('submit', (e) => { e.preventDefault() login(loginforminputusername.value, loginforminputpassword.value)