feat: allow navigating to notification settings

This commit is contained in:
Tim
2025-08-12 16:29:04 +08:00
parent 210d3dfa6f
commit 6ca1862034
3 changed files with 106 additions and 4 deletions

View File

@@ -480,7 +480,7 @@
<script>
import { ref, onMounted, computed } from 'vue'
import { useRouter } from 'vue-router'
import { useRouter, useRoute } from 'vue-router'
import { API_BASE_URL } from '../main'
import BaseTimeline from '../components/BaseTimeline.vue'
import BasePlaceholder from '../components/BasePlaceholder.vue'
@@ -503,9 +503,12 @@ export default {
components: { BaseTimeline, BasePlaceholder, NotificationContainer },
setup() {
const router = useRouter()
const route = useRoute()
const notifications = ref([])
const isLoadingMessage = ref(false)
const selectedTab = ref('unread')
const selectedTab = ref(
['all', 'unread', 'control'].includes(route.query.tab) ? route.query.tab : 'unread',
)
const notificationPrefs = ref([])
const filteredNotifications = computed(() =>
selectedTab.value === 'all'