diff --git a/app/Controllers/SettingsController.php b/app/Controllers/SettingsController.php index 68707d9..f3fb979 100644 --- a/app/Controllers/SettingsController.php +++ b/app/Controllers/SettingsController.php @@ -34,14 +34,6 @@ 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}"); diff --git a/components/head.latte b/components/head.latte index cce56a1..020ef33 100644 --- a/components/head.latte +++ b/components/head.latte @@ -16,8 +16,4 @@ {$title} - ProxiTok - {*/ Handles optional Service Worker /*} - {if \App\Helpers\Cookies::check('misc-sw', 'yes')} - - {/if} diff --git a/components/sw.latte b/components/sw.latte deleted file mode 100644 index 43eaa3a..0000000 --- a/components/sw.latte +++ /dev/null @@ -1,3 +0,0 @@ -{if \App\Helpers\Cookies::check('misc-sw', 'yes')} - -{/if} diff --git a/scripts/setup_sw.js b/scripts/setup_sw.js deleted file mode 100644 index 1185d62..0000000 --- a/scripts/setup_sw.js +++ /dev/null @@ -1,9 +0,0 @@ -window.addEventListener("load", () => { - if (navigator.serviceWorker) { - navigator.serviceWorker.register('/sw.js').then(function (reg) { - console.log('Service worker registration was successful, scope: ', reg.scope); - }).catch(function (error) { - console.log('Service worker failed:', error); - }); - } -}) diff --git a/sw.js b/sw.js deleted file mode 100644 index 43232a6..0000000 --- a/sw.js +++ /dev/null @@ -1,17 +0,0 @@ -const PWA_PRELOAD = { - pages: ['/', '/about', '/settings'], - scripts: ['/scripts/navbar.js', '/scripts/themes/card.js'], - styles: ['/styles/vendor/bulma.min.css', '/styles/vendor/cssgg.min.css', '/styles/themes/card.css'] -} - -self.addEventListener("install", function(e) { - e.waitUntil( - caches.open("pwa").then(function(cache) { - return cache.addAll([ - ...PWA_PRELOAD.pages, - ...PWA_PRELOAD.scripts, - ...PWA_PRELOAD.styles - ]); - }) - ); -}); diff --git a/views/settings.latte b/views/settings.latte index b6e1c01..c578cd0 100644 --- a/views/settings.latte +++ b/views/settings.latte @@ -14,9 +14,4 @@

Api

{include '../components/settings/api.latte'} -
-
-

Misc

- {include '../components/settings/misc.latte'} -
{/block}