mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-22 22:21:09 +08:00
Merge remote-tracking branch 'origin/main' into codex/add-lottery-post-type-and-api
This commit is contained in:
@@ -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: {}
|
||||
}
|
||||
</script>
|
||||
<style src="~/assets/global.css"></style>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<div class="article-member-avatars-container">
|
||||
<NuxtLink
|
||||
v-for="member in article.members"
|
||||
:key="member.id"
|
||||
:key="`${article.id}-${member.id}`"
|
||||
class="article-member-avatar-item"
|
||||
:to="`/users/${member.id}`"
|
||||
>
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</div>
|
||||
|
||||
<CommentEditor @submit="postComment" :loading="isWaitingPostingComment" :disabled="!loggedIn"
|
||||
:show-login-overlay="!loggedIn" />
|
||||
:show-login-overlay="!loggedIn" :parent-user-name="author.username" />
|
||||
|
||||
<div class="comment-config-container">
|
||||
<div class="comment-sort-container">
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user