WIP PWA support

This commit is contained in:
Pablo Ferreiro 2022-11-04 17:10:51 +01:00
parent c925ca2a41
commit cba59e66c7
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
11 changed files with 84 additions and 10 deletions

View file

@ -19,6 +19,7 @@ class SettingsController {
}
self::redirect();
}
static public function api() {
// TODO, ADD COUNT
if (isset($_POST['api-test_endpoints'])) {
@ -33,6 +34,14 @@ class SettingsController {
self::redirect();
}
static public function misc() {
if (isset($_POST['misc-sw'])) {
$sw = $_POST['misc-sw'];
Cookies::set("misc-sw", $sw);
}
self::redirect();
}
static private function redirect() {
$url = Misc::url('/settings');
header("Location: {$url}");