mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Merge branch 'master' into feat/plugin-manager
This commit is contained in:
@@ -10,6 +10,7 @@ License: GNU General Public License v3.0
|
||||
--raspap-content-main: #495057;
|
||||
--raspap-text-muted: #858796;
|
||||
--raspap-brand-color: #2b8080;
|
||||
--raspap-offwhite: #faf9f6;
|
||||
}
|
||||
|
||||
a {
|
||||
@@ -306,16 +307,16 @@ button > i.fas {
|
||||
|
||||
/* Font Awesome 5 brands */
|
||||
.fa-reddit {
|
||||
color: #ff4500;
|
||||
color: #ff4500;
|
||||
}
|
||||
.fa-twitter {
|
||||
color: #55acee
|
||||
color: #55acee
|
||||
}
|
||||
.fa-discord {
|
||||
color: #7289da
|
||||
color: #7289da
|
||||
}
|
||||
.fa-github {
|
||||
color: #151b23
|
||||
color: #151b23
|
||||
}
|
||||
|
||||
@keyframes heart {
|
||||
@@ -332,15 +333,58 @@ button > i.fas {
|
||||
animation: heart 1000ms infinite;
|
||||
}
|
||||
|
||||
textarea.plugin-log {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
resize: none;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.5rem;
|
||||
background-color: #f8f9fa;
|
||||
font-family: monospace;
|
||||
font-size: 0.9rem;
|
||||
#modal-admin-login .modal-content {
|
||||
background: radial-gradient(circle at 120% -20%, #032626, #052c2c, #073232, #0a3838, #0d3f3f, #114545, #144c4c);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#modal-admin-login .modal-body {
|
||||
min-width: 330px;
|
||||
}
|
||||
|
||||
.login-brand {
|
||||
color: var(--raspap-theme-color);
|
||||
filter: brightness(150%);
|
||||
}
|
||||
|
||||
.admin-login {
|
||||
color: var(--raspap-offwhite);
|
||||
font-size: 1.2em
|
||||
}
|
||||
|
||||
.btn-admin-login {
|
||||
color: var(--raspap-offwhite);
|
||||
background-color: var(--raspap-theme-color);
|
||||
}
|
||||
|
||||
.btn-admin-login:hover {
|
||||
color: var(--raspap-offwhite);
|
||||
background-color: #236969;
|
||||
}
|
||||
|
||||
.no-right-radius {
|
||||
border-top-right-radius: 0 !important;
|
||||
border-bottom-right-radius: 0 !important;
|
||||
}
|
||||
|
||||
.btn-passwd-append {
|
||||
border: 1px solid #ced4da;
|
||||
}
|
||||
|
||||
#passwd-toggle:active,
|
||||
#passwd-toggle:hover,
|
||||
#passwd-toggle:focus {
|
||||
border: 1px solid #ced4da;
|
||||
}
|
||||
|
||||
textarea.plugin-log {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
resize: none;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.5rem;
|
||||
background-color: #f8f9fa;
|
||||
font-family: monospace;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
0
app/img/raspAP-logo.php
Normal file → Executable file
0
app/img/raspAP-logo.php
Normal file → Executable file
0
app/img/wg-qr-code.php
Normal file → Executable file
0
app/img/wg-qr-code.php
Normal file → Executable file
0
app/img/wifi-qr-code.php
Normal file → Executable file
0
app/img/wifi-qr-code.php
Normal file → Executable file
@@ -736,18 +736,18 @@ function clearBlocklistStatus() {
|
||||
$('#cbxblocklist-status').removeClass('check-updated').addClass('check-hidden');
|
||||
}
|
||||
|
||||
// Handler for the wireguard generate key button
|
||||
// Handler for the WireGuard generate key button
|
||||
$('.wg-keygen').click(function(){
|
||||
var entity_pub = $(this).parent('div').prev('input[type="text"]');
|
||||
var entity_priv = $(this).parent('div').next('input[type="hidden"]');
|
||||
var parentGroup = $(this).closest('.input-group');
|
||||
var entity_pub = parentGroup.find('input[type="text"]');
|
||||
var updated = entity_pub.attr('name')+"-pubkey-status";
|
||||
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||
var csrfToken = $('meta[name="csrf_token"]').attr('content');
|
||||
$.post('ajax/networking/get_wgkey.php',{'entity':entity_pub.attr('name'), 'csrf_token': csrfToken},function(data){
|
||||
var jsonData = JSON.parse(data);
|
||||
entity_pub.val(jsonData.pubkey);
|
||||
$('#' + updated).removeClass('check-hidden').addClass('check-updated').delay(500).animate({ opacity: 1 }, 700);
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
// Handler for wireguard client.conf download
|
||||
$('.wg-client-dl').click(function(){
|
||||
@@ -784,6 +784,44 @@ window.addEventListener('load', function() {
|
||||
});
|
||||
}, false);
|
||||
|
||||
let sessionCheckInterval = setInterval(checkSession, 5000);
|
||||
|
||||
function checkSession() {
|
||||
// skip session check if on login page
|
||||
if (window.location.pathname === '/login') {
|
||||
return;
|
||||
}
|
||||
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||
$.post('ajax/session/do_check_session.php',{'csrf_token': csrfToken},function (data) {
|
||||
if (data.status === 'session_expired') {
|
||||
clearInterval(sessionCheckInterval);
|
||||
showSessionExpiredModal();
|
||||
}
|
||||
}).fail(function (jqXHR, status, err) {
|
||||
console.error("Error checking session status:", status, err);
|
||||
});
|
||||
}
|
||||
|
||||
function showSessionExpiredModal() {
|
||||
$('#sessionTimeoutModal').modal('show');
|
||||
}
|
||||
|
||||
$(document).on("click", "#js-session-expired-login", function(e) {
|
||||
const loginModal = $('#modal-admin-login');
|
||||
const redirectUrl = window.location.pathname;
|
||||
window.location.href = `/login?action=${encodeURIComponent(redirectUrl)}`;
|
||||
});
|
||||
|
||||
// show modal login on page load
|
||||
$(document).ready(function () {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const redirectUrl = $('#redirect-url').val() || params.get('action') || '/';
|
||||
$('#modal-admin-login').modal('show');
|
||||
$('#redirect-url').val(redirectUrl);
|
||||
$('#username').focus();
|
||||
$('#username').addClass("focusedInput");
|
||||
});
|
||||
|
||||
// DHCP or Static IP option group
|
||||
$('#chkstatic').on('change', function() {
|
||||
if (this.checked) {
|
||||
|
Reference in New Issue
Block a user