Everywhere: Add config and cache page

Add config database table and enable crud page.
Also add cache controller, model and view and routes for these pages.

Make the JavaScript display a message when changing the state of
development mode.
This commit is contained in:
Riyyi
2021-08-27 16:15:03 +02:00
parent 2dee309279
commit 077e4c434c
8 changed files with 261 additions and 39 deletions
+18 -2
View File
@@ -232,15 +232,31 @@ $(document).ready(function() {
// Developer mode
$('#development-mode').on('click', function(e)
{
e.preventDefault();
if (!confirm('Are you sure you want to continue?')) {
return;
}
$.get('/admin/toggle-development-mode').done(function(data)
{
const response = JSON.parse(data);
if (response.success == true) {
alert("Development mode has been turned: " + response.result.value);
if (response.result.value == 'on') {
e.target.checked = true;
$('#develop-enabled').css('visibility', 'visible');
$('#develop-remaining').text('03:00:00');
}
else {
e.target.checked = false;
$('#develop-enabled').css('visibility', 'hidden');
}
alert("Development mode has been set to: '" + response.result.value + "'");
}
else {
alert("Development mode could not be enabled!")
console.log(data);
alert("Development mode could not be enabled!")
}
});
});