Angepasste namne und Nachrichten
This commit is contained in:
1 parent
279f910b3e
commit
22779120b3
2 files changed
+7
-7
No files matched your search
+1
-1
@@ -66,7 +66,7 @@ function setBackgroundAndImage(person, animate = true) {
|
|||||||
const file = person === "A" ? "img/a.png" : "img/b.png";
|
const file = person === "A" ? "img/a.png" : "img/b.png";
|
||||||
const label = person === "A" ? "Lumpia" : "Pierogi";
|
const label = person === "A" ? "Lumpia" : "Pierogi";
|
||||||
const bgImage = person === "A" ? "url('img/bgA.jpg')" : "url('img/bgB.jpg')";
|
const bgImage = person === "A" ? "url('img/bgA.jpg')" : "url('img/bgB.jpg')";
|
||||||
const nameColor = person === "A" ? "#2ecc71" : "#e74c3c"; // Grün für A, Rot für B
|
const nameColor = person === "A" ? "#4B0082" : "#DAA520";
|
||||||
|
|
||||||
// Set background immediately (smooth transition via CSS)
|
// Set background immediately (smooth transition via CSS)
|
||||||
document.body.style.backgroundImage = bgImage;
|
document.body.style.backgroundImage = bgImage;
|
||||||
|
|||||||
@@ -107,12 +107,12 @@ async function sendDiscordEmbed(previousKey, currentKey, reason) {
|
|||||||
|
|
||||||
const fields = [
|
const fields = [
|
||||||
{
|
{
|
||||||
name: "Von",
|
name: "Payed",
|
||||||
value: previous.name,
|
value: previous.name,
|
||||||
inline: true
|
inline: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Zu",
|
name: "Nows turn",
|
||||||
value: current.name,
|
value: current.name,
|
||||||
inline: true
|
inline: true
|
||||||
}
|
}
|
||||||
@@ -127,8 +127,8 @@ async function sendDiscordEmbed(previousKey, currentKey, reason) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const embed = {
|
const embed = {
|
||||||
title: "💸 Zahl-Wechsel",
|
title: "💸 Pay-Switch",
|
||||||
description: `**${current.name}** ist jetzt dran zu zahlen`,
|
description: `*${current.name}** turn`,
|
||||||
color: current.color,
|
color: current.color,
|
||||||
thumbnail: {
|
thumbnail: {
|
||||||
url: `${PUBLIC_BASE_URL}/img/${current.icon}`
|
url: `${PUBLIC_BASE_URL}/img/${current.icon}`
|
||||||
@@ -175,8 +175,8 @@ app.post("/toggle", async (req, res) => {
|
|||||||
setState(state);
|
setState(state);
|
||||||
|
|
||||||
const logMessage = reason
|
const logMessage = reason
|
||||||
? `Zahl-Wechsel: ${CONFIG[previousKey].name} → ${CONFIG[state.current].name} (Grund: ${reason})`
|
? `Pay-Switch: ${CONFIG[previousKey].name} → ${CONFIG[state.current].name} (Grund: ${reason})`
|
||||||
: `Zahl-Wechsel: ${CONFIG[previousKey].name} → ${CONFIG[state.current].name}`;
|
: `Pay-Switch: ${CONFIG[previousKey].name} → ${CONFIG[state.current].name}`;
|
||||||
|
|
||||||
console.log(logMessage);
|
console.log(logMessage);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user