mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-07 15:41:02 +08:00
Compare commits
4 Commits
feature/en
...
feature/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da1ad73cf6 | ||
|
|
ada6bfb5cf | ||
|
|
928dbd73b5 | ||
|
|
8c1a7afc6e |
@@ -22,7 +22,7 @@ public class Notification {
|
||||
private Long id;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(nullable = false)
|
||||
@Column(nullable = false, length = 50)
|
||||
private NotificationType type;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||
|
||||
@@ -75,7 +75,11 @@ const userMenu = ref(null)
|
||||
const menuBtn = ref(null)
|
||||
|
||||
const goToHome = async () => {
|
||||
await navigateTo('/', { replace: true })
|
||||
if (router.currentRoute.value.fullPath === '/') {
|
||||
window.dispatchEvent(new Event('refresh-home'))
|
||||
} else {
|
||||
await navigateTo('/', { replace: true })
|
||||
}
|
||||
}
|
||||
const search = () => {
|
||||
showSearch.value = true
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue'
|
||||
import { ref, watch, onMounted, onBeforeUnmount } from 'vue'
|
||||
import ArticleCategory from '~/components/ArticleCategory.vue'
|
||||
import ArticleTags from '~/components/ArticleTags.vue'
|
||||
import CategorySelect from '~/components/CategorySelect.vue'
|
||||
@@ -397,6 +397,18 @@ const fetchContent = async (reset = false) => {
|
||||
}
|
||||
}
|
||||
|
||||
const refreshHome = () => {
|
||||
fetchContent(true)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
window.addEventListener('refresh-home', refreshHome)
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener('refresh-home', refreshHome)
|
||||
})
|
||||
|
||||
useScrollLoadMore(fetchContent)
|
||||
|
||||
watch([selectedCategory, selectedTags], () => {
|
||||
|
||||
Reference in New Issue
Block a user