Skip to content

Commit

Permalink
Update admin.js
Browse files Browse the repository at this point in the history
  • Loading branch information
CardosoGuiVi authored Dec 31, 2024
1 parent f57b8cf commit c8590d6
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions js/admin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { db } from "./firebase-config.js";
import { ref, set } from "https://www.gstatic.com/firebasejs/11.1.0/firebase-database.js";


document.getElementById('blackout').addEventListener('click', () => {
set(ref(db, 'settings'), {
animation: "blackout",
Expand Down Expand Up @@ -34,3 +35,40 @@ document.getElementById('blink').addEventListener('click', () => {
blinkTime
});
});

document.getElementById('blink-default').addEventListener('click', () => {
set(ref(db, 'settings'), {
animation: "blink",
color1: "#000000",
color2: "#ffffff",
blinkTime: "4"
});
});

document.getElementById('blink-60-seconds').addEventListener('click', () => {
set(ref(db, 'settings'), {
animation: "blink",
color1: "#000000",
color2: "#ffffff",
blinkTime: "2"
});
});

document.getElementById('blink-10-seconds').addEventListener('click', () => {
set(ref(db, 'settings'), {
animation: "blink",
color1: "#000000",
color2: "#ffffff",
blinkTime: "1"
});
});

document.getElementById('happy-new-year').addEventListener('click', () => {
set(ref(db, 'settings'), {
animation: "blink",
color1: "#000000",
color2: "#ffffff",
blinkTime: "0.1",
message: "Feliz Ano Novo!"
});
});

0 comments on commit c8590d6

Please sign in to comment.