alert and chatwidget fixes

This commit is contained in:
2025-08-26 16:19:22 +02:00
parent ad10d53077
commit 9760df2947
4 changed files with 35 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
import { grenadeExplosionAlert } from "web/alerts/types"; import { grenadeExplosionAlert } from "web/alerts/types";
import { AlertRunner } from "./index"; import { AlertRunner } from "./index";
const duration = 500; const duration = 1000;
export default async function execute(alert: grenadeExplosionAlert): Promise<AlertRunner> { export default async function execute(alert: grenadeExplosionAlert): Promise<AlertRunner> {
const audio = new Audio("/alerts/public/explosion2.ogg"); const audio = new Audio("/alerts/public/explosion2.ogg");
@@ -23,6 +23,7 @@ export default async function execute(alert: grenadeExplosionAlert): Promise<Ale
justify-content: center; justify-content: center;
align-content: center; align-content: center;
text-align: center; text-align: center;
color: white;
img { img {
width: 100%; width: 100%;
@@ -30,16 +31,20 @@ export default async function execute(alert: grenadeExplosionAlert): Promise<Ale
} }
.thrower { .thrower {
top: 50%; top: 55%;
left: 55%; left: 69%;
position: absolute; position: absolute;
color: white; mix-blend-mode: exclusion;
transform: translateX(-50%);
} }
.target { .target {
top: 30%; top: 30%;
left: 18%; left: 25%;
position: absolute; position: absolute;
mix-blend-mode: exclusion;
transform: translateX(-50%);
}
} }
} }
</style> </style>

View File

@@ -1,7 +1,7 @@
import { userBlastAlert } from "web/alerts/types"; import { userBlastAlert } from "web/alerts/types";
import { AlertRunner } from "./index"; import { AlertRunner } from "./index";
const duration = 500; const duration = 1000;
export default async function execute(alert: userBlastAlert): Promise<AlertRunner> { export default async function execute(alert: userBlastAlert): Promise<AlertRunner> {
const audio = new Audio("/alerts/public/explosion1.ogg"); const audio = new Audio("/alerts/public/explosion1.ogg");
@@ -23,6 +23,8 @@ export default async function execute(alert: userBlastAlert): Promise<AlertRunne
justify-content: center; justify-content: center;
align-content: center; align-content: center;
text-align: center; text-align: center;
color: white;
font-size: 20px;
img { img {
width: 100%; width: 100%;
@@ -30,16 +32,21 @@ export default async function execute(alert: userBlastAlert): Promise<AlertRunne
} }
.shooter { .shooter {
top: 50%; top: 55%;
left: 55%; left: 69%;
position: absolute; position: absolute;
color: white; font-size: 20px;
mix-blend-mode: exclusion;
transform: translateX(-50%);
} }
.target { .target {
top: 30%; top: 30%;
left: 18%; left: 25%;
position: absolute; position: absolute;
font-size: 20px;
mix-blend-mode: exclusion;
transform: translateX(-50%);
} }
} }
</style> </style>

View File

@@ -7,7 +7,7 @@ export default async function execute(alert: userExecutionAlert): Promise<AlertR
const parentDiv = document.createElement('div'); const parentDiv = document.createElement('div');
parentDiv.className = 'userExecutionAlert'; parentDiv.className = 'userExecutionAlert';
parentDiv.innerHTML = ` parentDiv.innerHTML = `
<img src="/alerts/public/getrekt.jpg" height="800" width="800"> <img src="/alerts/public/getrekt.jpg">
<span class="shooter"> <span class="shooter">
${alert.user} ${alert.user}
</span> </span>
@@ -21,6 +21,10 @@ export default async function execute(alert: userExecutionAlert): Promise<AlertR
justify-content: center; justify-content: center;
align-content: center; align-content: center;
text-align: center; text-align: center;
height: 800px;
width: 800px;
font-size: 50px;
color: white;
img { img {
width: 100%; width: 100%;
@@ -28,16 +32,19 @@ export default async function execute(alert: userExecutionAlert): Promise<AlertR
} }
.shooter { .shooter {
top: 50%; top: 55%;
left: 55%; left: 69%;
position: absolute; position: absolute;
color: white; mix-blend-mode: exclusion;
transform: translateX(-50%);
} }
.target { .target {
top: 30%; top: 30%;
left: 18%; left: 25%;
position: absolute; position: absolute;
mix-blend-mode: exclusion;
transform: translateX(-50%);
} }
} }
</style> </style>

View File

@@ -32,8 +32,7 @@ body {
} }
.replyMessage { .replyMessage {
color: grey; display: none;
font-size: 2px;
} }
padding: 2px; padding: 2px;