From c251549f632caf9449f632743316c3cf728fffc8 Mon Sep 17 00:00:00 2001
From: Ricardo <230414@epvc.pt>
Date: Thu, 23 Apr 2026 10:40:57 +0100
Subject: [PATCH] =?UTF-8?q?adicionar=20cond=C3=B3minos?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.vscode/settings.json | 2 +-
firebase.js | 20 ++--
index.html | 8 +-
script.js | 256 ++++++++++++++++++++++++++----------------
4 files changed, 181 insertions(+), 105 deletions(-)
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 155422b..a0de46f 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,3 +1,3 @@
{
- "liveServer.settings.port": 5503
+ "liveServer.settings.port": 5504
}
\ No newline at end of file
diff --git a/firebase.js b/firebase.js
index 5211140..ea2dee2 100644
--- a/firebase.js
+++ b/firebase.js
@@ -1,16 +1,18 @@
import { initializeApp } from "https://www.gstatic.com/firebasejs/12.1.0/firebase-app.js";
-import { getFirestore } from "https://www.gstatic.com/firebasejs/12.1.0/firebase-firestore.js";
+import { getDatabase } from "https://www.gstatic.com/firebasejs/12.1.0/firebase-database.js";
const firebaseConfig = {
- apiKey: "SUA_API_KEY",
- authDomain: "SEU_PROJETO.firebaseapp.com",
- projectId: "SEU_PROJECT_ID",
- storageBucket: "SEU_PROJETO.appspot.com",
- messagingSenderId: "SEU_ID",
- appId: "SEU_APP_ID"
+ apiKey: "AQUI_TUA_API_KEY",
+ authDomain: "AQUI.firebaseapp.com",
+ databaseURL: "https://condomaster-pro-ed9af-default-rtdb.europe-west1.firebasedatabase.app",
+ projectId: "condomaster-pro-ed9af",
+ storageBucket: "condomaster-pro-ed9af.appspot.com",
+ messagingSenderId: "AQUI",
+ appId: "AQUI"
};
const app = initializeApp(firebaseConfig);
-const db = getFirestore(app);
+const db = getDatabase(app);
+
+export { app, db };
-export { db };
\ No newline at end of file
diff --git a/index.html b/index.html
index 8cb6ffc..d0ca0c1 100644
--- a/index.html
+++ b/index.html
@@ -98,6 +98,10 @@
Dumbbell, PartyPopper, Trophy, Map, Calendar, MapPin, Info,
MessageCircle, Paperclip, Send
} from 'lucide-react';
+ import { app } from './firebase.js';
+ import { getAuth, signInWithEmailAndPassword } from 'https://www.gstatic.com/firebasejs/12.1.0/firebase-auth.js';
+
+ const auth = getAuth(app);
const INITIAL_RESIDENTS = [
{ id: 1, unit: '1º Esq', name: 'Ana Silva', contact: '912 345 678', email: 'ana.silva@email.com', status: 'Pago', pending: 0, role: 'morador' },
@@ -1655,6 +1659,8 @@
root.render();
-
+
+
+