chore: Update Firebase SDK to 10.14.1 and clarify initial focus person selection logic.

This commit is contained in:
Eivind Røsstad Skeie 2025-11-25 11:41:28 +01:00
parent f88286c720
commit c9870f0a0b
2 changed files with 10 additions and 10 deletions

View file

@ -1,6 +1,6 @@
import { initializeApp } from "https://www.gstatic.com/firebasejs/12.6.0/firebase-app.js";
import { getAuth, onAuthStateChanged, signOut } from "https://www.gstatic.com/firebasejs/12.6.0/firebase-auth.js";
import { getFirestore, collection, addDoc, updateDoc, doc, onSnapshot, query } from "https://www.gstatic.com/firebasejs/12.6.0/firebase-firestore.js";
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.14.1/firebase-app.js";
import { getAuth, onAuthStateChanged, signOut } from "https://www.gstatic.com/firebasejs/10.14.1/firebase-auth.js";
import { getFirestore, collection, addDoc, updateDoc, doc, onSnapshot, query } from "https://www.gstatic.com/firebasejs/10.14.1/firebase-firestore.js";
import { firebaseConfig } from "./config.js";
// --- INIT ---
@ -48,7 +48,7 @@ function startDataListener() {
// Hvis vi ikke har valgt en person å fokusere på ennå:
if (!focusPersonId && people.length > 0) {
// Prøv å finne "Eivind" eller "Meg" som startperson
// Prøv å finne "Eivind" eller "Meg" som startperson, ellers ta den første
const me = people.find(p => p.name && (p.name.toLowerCase().includes('eivind') || p.name.toLowerCase() === 'meg'));
focusPersonId = me ? me.id : people[0].id;
}

View file

@ -1,5 +1,5 @@
import { initializeApp } from "https://www.gstatic.com/firebasejs/12.6.0/firebase-app.js";
import { getAuth, signInWithEmailAndPassword } from "https://www.gstatic.com/firebasejs/12.6.0/firebase-auth.js";
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.14.1/firebase-app.js";
import { getAuth, signInWithEmailAndPassword } from "https://www.gstatic.com/firebasejs/10.14.1/firebase-auth.js";
import { firebaseConfig } from "./config.js";
// Init