firebase implementation
Gitea Actions / Deploy (push) Successful in 1m14s

This commit is contained in:
vadim committed 2026-10-16 16:56:34 +03:00
1 parent a0c557f9b2
commit 2d4b8ea9cf
17 files changed
+1542 -12

No files matched your search

+16
View File
@@ -6,11 +6,17 @@ import { useRoute } from 'vue-router'
import { useStatusStore } from '@/stores/status.ts'
import { useIssueStore } from '@/stores/issue.ts'
import { useProjectStore } from '@/stores/project.ts'
import { authClient } from '@/lib/auth-client.ts'
import { usePushNotifications } from '@/composables/usePushNotifications.ts'
import SnackbarQueue from '@/components/SnackbarQueue.vue'
const route = useRoute()
const issueStore = useIssueStore()
const statusStore = useStatusStore()
const projectStore = useProjectStore()
const session = authClient.useSession()
const push = usePushNotifications()
const { currentProjectId } = storeToRefs(projectStore)
interface IssueSseEvent {
@@ -39,6 +45,15 @@ watch(event, () => {
}
})
// FID сохраняется на бэкенде под текущим пользователем, поэтому стартуем только с сессией
watch(
() => session.value.data?.user.id,
(userId) => {
if (userId) push.autoStart().catch((e) => console.error('Failed to start push', e))
},
{ immediate: true },
)
const layout = computed(() => {
const layout = route?.meta?.layout
return layout ? `${layout}Layout` : 'DefaultLayout'
@@ -58,6 +73,7 @@ onMounted(async () => {
</div>
</router-view>
</component>
<snackbar-queue />
</template>
<style scoped></style>