mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 10:13:32 -04:00 
			
		
		
		
	fix: potential-pwa-fix-3 (#1992)
* force redirect when authenticated * set start_url to empty string per - https://stackoverflow.com/questions/64608408/workbox-is-precaching-urls-without-revision-info-standalone-true-this-is-gene
This commit is contained in:
		| @@ -312,6 +312,7 @@ export default { | |||||||
|       ogSiteName: "Mealie", |       ogSiteName: "Mealie", | ||||||
|     }, |     }, | ||||||
|     manifest: { |     manifest: { | ||||||
|  |       start_url: "", | ||||||
|       lang: "en", |       lang: "en", | ||||||
|       name: "Mealie", |       name: "Mealie", | ||||||
|       title: "Mealie", |       title: "Mealie", | ||||||
|   | |||||||
| @@ -109,8 +109,8 @@ | |||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script lang="ts"> | <script lang="ts"> | ||||||
| import { defineComponent, ref, useContext, computed, reactive } from "@nuxtjs/composition-api"; | import { defineComponent, ref, useContext, computed, reactive, useRouter } from "@nuxtjs/composition-api"; | ||||||
| import { useDark } from "@vueuse/core"; | import { useDark, whenever } from "@vueuse/core"; | ||||||
| import { useAppInfo } from "~/composables/api"; | import { useAppInfo } from "~/composables/api"; | ||||||
| import { usePasswordField } from "~/composables/use-passwords"; | import { usePasswordField } from "~/composables/use-passwords"; | ||||||
| import { alert } from "~/composables/use-toast"; | import { alert } from "~/composables/use-toast"; | ||||||
| @@ -122,8 +122,17 @@ export default defineComponent({ | |||||||
|     const toggleDark = useToggleDarkMode(); |     const toggleDark = useToggleDarkMode(); | ||||||
|     const isDark = useDark(); |     const isDark = useDark(); | ||||||
|  |  | ||||||
|  |     const router = useRouter(); | ||||||
|     const { $auth } = useContext(); |     const { $auth } = useContext(); | ||||||
|  |  | ||||||
|  |     whenever( | ||||||
|  |       () => $auth.loggedIn, | ||||||
|  |       () => { | ||||||
|  |         router.push("/"); | ||||||
|  |       }, | ||||||
|  |       { immediate: true }, | ||||||
|  |     ); | ||||||
|  |  | ||||||
|     const form = reactive({ |     const form = reactive({ | ||||||
|       email: "", |       email: "", | ||||||
|       password: "", |       password: "", | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user