Skip to content

Commit

Permalink
fix: potential-pwa-fix-3 (#1992)
Browse files Browse the repository at this point in the history
  • Loading branch information
hay-kot authored Jan 6, 2023
1 parent 4d98d21 commit 5dab70f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions frontend/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ export default {
ogSiteName: "Mealie",
},
manifest: {
start_url: "",
lang: "en",
name: "Mealie",
title: "Mealie",
Expand Down
13 changes: 11 additions & 2 deletions frontend/pages/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@
</template>

<script lang="ts">
import { defineComponent, ref, useContext, computed, reactive } from "@nuxtjs/composition-api";
import { useDark } from "@vueuse/core";
import { defineComponent, ref, useContext, computed, reactive, useRouter } from "@nuxtjs/composition-api";
import { useDark, whenever } from "@vueuse/core";
import { useAppInfo } from "~/composables/api";
import { usePasswordField } from "~/composables/use-passwords";
import { alert } from "~/composables/use-toast";
Expand All @@ -122,8 +122,17 @@ export default defineComponent({
const toggleDark = useToggleDarkMode();
const isDark = useDark();
const router = useRouter();
const { $auth } = useContext();
whenever(
() => $auth.loggedIn,
() => {
router.push("/");
},
{ immediate: true },
);
const form = reactive({
email: "",
password: "",
Expand Down

0 comments on commit 5dab70f

Please sign in to comment.