From 858cc1d055563165abc287e8e64142386612cc52 Mon Sep 17 00:00:00 2001 From: Gabriel Massadas Date: Fri, 8 Dec 2023 10:21:52 +0000 Subject: [PATCH] Disable service worker --- packages/dashboard/src/main.js | 1 - .../dashboard/src/registerServiceWorker.js | 33 ----------------- packages/dashboard/vue.config.js | 37 +------------------ 3 files changed, 1 insertion(+), 70 deletions(-) delete mode 100644 packages/dashboard/src/registerServiceWorker.js diff --git a/packages/dashboard/src/main.js b/packages/dashboard/src/main.js index 40b421b..a7967aa 100644 --- a/packages/dashboard/src/main.js +++ b/packages/dashboard/src/main.js @@ -12,7 +12,6 @@ import VueToast from 'vue-toast-notification' import 'vue-toast-notification/dist/theme-sugar.css' import 'sweetalert2/src/sweetalert2.scss' import axios from 'axios' -import './registerServiceWorker' require('bootstrap/js/dist/dropdown') require('bootstrap/js/dist/modal') diff --git a/packages/dashboard/src/registerServiceWorker.js b/packages/dashboard/src/registerServiceWorker.js deleted file mode 100644 index 93ec9d7..0000000 --- a/packages/dashboard/src/registerServiceWorker.js +++ /dev/null @@ -1,33 +0,0 @@ -/* eslint-disable no-console */ - -import { register } from 'register-service-worker' - -if (process.env.NODE_ENV === 'production') { - register(`${process.env.BASE_URL}service-worker.js`, { - ready () { - console.log( - 'App is being served from cache by a service worker.\n' + - 'For more details, visit https://goo.gl/AFskqB' - ) - }, - registered () { - console.log('Service worker has been registered.') - }, - cached () { - console.log('Content has been cached for offline use.') - }, - updatefound () { - console.log('New content is downloading.') - }, - updated () { - console.log('New content is available; refreshing...') - window.location.reload(true) - }, - offline () { - console.log('No internet connection found. App is running in offline mode.') - }, - error (error) { - console.error('Error during service worker registration:', error) - } - }) -} diff --git a/packages/dashboard/vue.config.js b/packages/dashboard/vue.config.js index 8637ad6..4ba52ba 100644 --- a/packages/dashboard/vue.config.js +++ b/packages/dashboard/vue.config.js @@ -1,36 +1 @@ -module.exports = { - pwa: { - name: 'R2 Explorer', - themeColor: '#4DBA87', - background_color: '#ffffff', - display: 'standalone', - msTileColor: '#ffffff', - appleMobileWebAppCapable: 'yes', - appleMobileWebAppStatusBarStyle: 'white', - shortcuts: [ - { - name: 'Email Explorer', - description: 'Navigate your R2 Explorer Emails', - url: '/emails/', - icons: [{ src: '/img/icons/android-chrome-192x192.png', sizes: '192x192' }] - }, - { - name: 'R2 Explorer', - description: 'Navigate your R2 Explorer Files', - url: '/storage', - icons: [{ src: '/img/icons/android-chrome-192x192.png', sizes: '192x192' }] - } - ], - workboxOptions: { - skipWaiting: true - } - - // configure the workbox plugin - // workboxPluginMode: "InjectManifest", - // workboxOptions: { - // swSrc is required in InjectManifest mode. - // swSrc: "dev/sw.js" - // ...other Workbox options... - // } - } -} +module.exports = {}