diff --git a/frontend_nuxt/app.vue b/frontend_nuxt/app.vue index eb6479661..cd3406e17 100644 --- a/frontend_nuxt/app.vue +++ b/frontend_nuxt/app.vue @@ -24,13 +24,10 @@ import GlobalPopups from '~/components/GlobalPopups.vue' export default { name: 'App', components: { HeaderComponent, MenuComponent, GlobalPopups }, - data() { - return { - menuVisible: true - } - }, - computed: { - hideMenu() { + setup() { + const isMobile = useIsMobile() + const menuVisible = ref(!isMobile.value) + const hideMenu = computed(() => { return [ '/login', '/signup', @@ -41,15 +38,17 @@ export default { '/discord-callback', '/forgot-password', '/google-callback' - ].includes(this.$route.path) - } + ].includes(useRoute().path) + }) + + onMounted(() => { + if (typeof window !== 'undefined') { + menuVisible.value = window.innerWidth > 768 + } + }) + + return { menuVisible, hideMenu } }, - async mounted() { - if (typeof window !== 'undefined') { - this.menuVisible = window.innerWidth > 768 - } - }, - methods: {} } diff --git a/frontend_nuxt/pages/index.vue b/frontend_nuxt/pages/index.vue index 04eb5f030..59e73be79 100644 --- a/frontend_nuxt/pages/index.vue +++ b/frontend_nuxt/pages/index.vue @@ -71,7 +71,7 @@
diff --git a/frontend_nuxt/pages/posts/[id]/index.vue b/frontend_nuxt/pages/posts/[id]/index.vue index 3bc8bb7f5..174ddf450 100644 --- a/frontend_nuxt/pages/posts/[id]/index.vue +++ b/frontend_nuxt/pages/posts/[id]/index.vue @@ -78,7 +78,7 @@
+ :show-login-overlay="!loggedIn" :parent-user-name="author.username" />
@@ -387,7 +387,7 @@ export default { } } - const postComment = async (text, clear) => { + const postComment = async (parentUserName, text, clear) => { if (!text.trim()) return console.debug('Posting comment', { postId, text }) isWaitingPostingComment.value = true