Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c194a99886 | |||
| 43699a210f | |||
| f78de6f2ff | |||
| 2a61d6a577 | |||
| 0436da7d97 | |||
| b5f180f16e |
@@ -48,7 +48,7 @@ async function cleanupHistory() {
|
||||
await chrome.storage.local.set({ history });
|
||||
}
|
||||
|
||||
// NEU: Funktion zum Senden einer Discord-Benachrichtigung
|
||||
// Funktion zum Senden einer Discord-Benachrichtigung
|
||||
async function sendDiscordNotification(service, status, responseTime = null) {
|
||||
const settings = await chrome.storage.sync.get({ discordWebhookUrl: '' });
|
||||
if (!settings.discordWebhookUrl) return; // Kein Webhook konfiguriert
|
||||
@@ -89,6 +89,42 @@ async function sendDiscordNotification(service, status, responseTime = null) {
|
||||
}
|
||||
}
|
||||
|
||||
// NEU: Funktion zum Senden einer Telegram-Benachrichtigung
|
||||
async function sendTelegramNotification(service, status, responseTime = null) {
|
||||
const settings = await chrome.storage.sync.get({ telegramBotToken: '', telegramChatId: '' });
|
||||
if (!settings.telegramBotToken || !settings.telegramChatId) return; // Nicht konfiguriert
|
||||
|
||||
const isOnline = status === 'online';
|
||||
const emoji = isOnline ? '✅' : '❌';
|
||||
let message = `${emoji} *${service.name}*\nStatus: ${status.toUpperCase()}\nAdresse: ${service.adresse}`;
|
||||
|
||||
if (isOnline && responseTime !== null) {
|
||||
message += `\nAntwortzeit: ${responseTime} ms`;
|
||||
}
|
||||
|
||||
const url = `https://api.telegram.org/bot${settings.telegramBotToken}/sendMessage`;
|
||||
|
||||
const payload = {
|
||||
chat_id: settings.telegramChatId,
|
||||
text: message,
|
||||
parse_mode: 'Markdown' // Für Markdown-Formatierung
|
||||
};
|
||||
|
||||
try {
|
||||
const response = await fetch(url, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(payload)
|
||||
});
|
||||
if (!response.ok) {
|
||||
const errorData = await response.json();
|
||||
console.error('Telegram-Bot API fehlgeschlagen:', response.statusText, errorData);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Fehler beim Senden der Telegram-Benachrichtigung:', error);
|
||||
}
|
||||
}
|
||||
|
||||
// MODIFIZIERT: Funktion, um alle Dienste zu prüfen und Benachrichtigungen zu senden
|
||||
async function checkAllServices() {
|
||||
const data = await chrome.storage.sync.get({ services: [], notifyOnline: false });
|
||||
@@ -108,25 +144,31 @@ async function checkAllServices() {
|
||||
// Benachrichtigung für Offline-Wechsel
|
||||
if (previousResult?.status === 'online' && currentResult.status === 'offline') {
|
||||
chrome.notifications.create({
|
||||
type: 'basic', iconUrl: 'icons/notification_warning.png',
|
||||
type: 'basic',
|
||||
iconUrl: 'icons/notification_warning.png',
|
||||
title: `Server "${service.name}" ist offline`,
|
||||
message: 'Der Dienst antwortet nicht mehr.', contextMessage: `Adresse: ${service.adresse}`,
|
||||
priority: 1, isClickable: true,
|
||||
buttons: [{ title: 'Anzeigen' }, { title: 'Ignorieren' }]
|
||||
message: 'Der Dienst antwortet nicht mehr.',
|
||||
contextMessage: `Adresse: ${service.adresse}`,
|
||||
priority: 1,
|
||||
isClickable: true
|
||||
});
|
||||
await sendDiscordNotification(service, 'offline'); // NEU
|
||||
await sendDiscordNotification(service, 'offline');
|
||||
await sendTelegramNotification(service, 'offline'); // NEU
|
||||
}
|
||||
|
||||
// Benachrichtigung für Online-Wechsel (wenn aktiviert)
|
||||
if (notifyOnline && previousResult?.status === 'offline' && currentResult.status === 'online') {
|
||||
chrome.notifications.create({
|
||||
type: 'basic', iconUrl: 'icons/notification_warning.png',
|
||||
type: 'basic',
|
||||
iconUrl: 'icons/notification_warning.png',
|
||||
title: `Server "${service.name}" ist wieder online!`,
|
||||
message: 'Der Dienst ist wieder erreichbar.', contextMessage: `Adresse: ${service.adresse}`,
|
||||
priority: 0, isClickable: true,
|
||||
buttons: [{ title: 'Anzeigen' }]
|
||||
message: 'Der Dienst ist wieder erreichbar.',
|
||||
contextMessage: `Adresse: ${service.adresse}`,
|
||||
priority: 0,
|
||||
isClickable: true
|
||||
});
|
||||
await sendDiscordNotification(service, 'online', currentResult.responseTime); // NEU
|
||||
await sendDiscordNotification(service, 'online', currentResult.responseTime);
|
||||
await sendTelegramNotification(service, 'online', currentResult.responseTime);
|
||||
}
|
||||
|
||||
// Verlaufsdaten aktualisieren
|
||||
@@ -155,10 +197,6 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
||||
});
|
||||
|
||||
// Benachrichtigungs-Listener
|
||||
chrome.notifications.onButtonClicked.addListener((notificationId, buttonIndex) => {
|
||||
if (buttonIndex === 0) chrome.action.openPopup();
|
||||
chrome.notifications.clear(notificationId);
|
||||
});
|
||||
chrome.notifications.onClicked.addListener((notificationId) => {
|
||||
chrome.action.openPopup();
|
||||
chrome.notifications.clear(notificationId);
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Uptime Monitor",
|
||||
"version": "1.0",
|
||||
"version": "1.1",
|
||||
"description": "Überwacht Dienste und benachrichtigt mich, wenn sie offline gehen.",
|
||||
"permissions": [
|
||||
"storage",
|
||||
"notifications",
|
||||
"alarms"
|
||||
"alarms",
|
||||
"tabs"
|
||||
],
|
||||
"host_permissions": [
|
||||
"<all_urls>"
|
||||
|
||||
46
options.html
46
options.html
@@ -25,7 +25,7 @@
|
||||
<li><strong>Hinzufügen:</strong> Nutze das Formular, um neue Dienste hinzuzufügen.</li>
|
||||
<li><strong>Überwachung:</strong> Passe die Intervalle und Benachrichtigungen an.</li>
|
||||
<li><strong>Popup-Auswahl:</strong> Wähle unten bis zu 8 Server aus, die schnell im Popup angezeigt werden sollen.</li>
|
||||
<li><strong>Discord:</strong> Aktiviere optionale Benachrichtigungen für deinen Discord-Server.</li>
|
||||
<li><strong>Benachrichtigungen:</strong> Aktiviere optionale Benachrichtigungen für Discord und Telegram.</li>
|
||||
<li><strong>Statistik:</strong> Wechsle zum Tab "Statistik & Übersicht" um die Liste zu sehen.</li>
|
||||
<li><strong>Backup:</strong> Nutze Import/Export, um Dienste zu sichern.</li>
|
||||
</ol>
|
||||
@@ -80,7 +80,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- NEU: Discord-Benachrichtigungen -->
|
||||
<!-- Discord-Benachrichtigungen -->
|
||||
<div class="card">
|
||||
<h2>Discord-Benachrichtigungen</h2>
|
||||
<p>Senden Sie Status-Updates an einen Discord-Kanal über einen Webhook. Dies ist optional.</p>
|
||||
@@ -91,6 +91,26 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- NEU: Telegram-Benachrichtigungen -->
|
||||
<div class="card">
|
||||
<h2>Telegram-Benachrichtigungen</h2>
|
||||
<p>Senden Sie Status-Updates an einen Telegram-Chat über einen Bot. Dies ist optional.</p>
|
||||
<div class="form-group">
|
||||
<label for="telegram-bot-token">Telegram Bot Token</label>
|
||||
<input type="text" id="telegram-bot-token" placeholder="1234567890:ABCdefGHIjklMNOpqrsTUVwxyz">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="telegram-chat-id">Telegram Chat ID</label>
|
||||
<input type="text" id="telegram-chat-id" placeholder="123456789">
|
||||
</div>
|
||||
<small>
|
||||
<strong>Anleitung:</strong><br>
|
||||
1. Spreche mit dem <a href="https://t.me/botfather" target="_blank">@BotFather</a> auf Telegram, um einen neuen Bot zu erstellen und den Token zu erhalten.<br>
|
||||
2. Spreche mit deinem neuen Bot und sende ihm eine Nachricht.<br>
|
||||
3. Rufe <code>https://api.telegram.org/bot<DEIN_TOKEN>/getUpdates</code> auf, um deine Chat ID zu finden.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h2>Daten-Management</h2>
|
||||
<div class="form-actions">
|
||||
@@ -106,8 +126,30 @@
|
||||
<h2>Changelog</h2>
|
||||
<ul>
|
||||
<li><strong>Version 1.0</strong> - Erstellung der Chrome Erweiterung.</li>
|
||||
<li><strong>Version 1.1</strong> - Verschiedene BUG-Fix, Telegram Benachrichtigung hinzugefügt</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- ANGEPASST: Widget für Gitea Repositories -->
|
||||
<div class="widget-card" id="gitea-repos-widget">
|
||||
<h2>Projekt-Repositories</h2>
|
||||
<div id="gitea-repos-loading">Lade Repositories...</div>
|
||||
<ul id="gitea-repos-list" style="display: none;"></ul>
|
||||
<div id="gitea-repos-error" style="display: none; color: var(--error-color, #d9534f);">Fehler beim Laden der Repositories.</div>
|
||||
</div>
|
||||
|
||||
<!-- NEU: Widget für Discord Support -->
|
||||
<div class="widget-card">
|
||||
<h2>Discord Support</h2>
|
||||
<p>Brauchst du Hilfe oder hast eine Frage? Tritt unserem Discord-Server bei und werde Teil der Community!</p>
|
||||
<a href="https://discord.com/invite/FdRs4BRd8D" target="_blank" class="discord-link">
|
||||
<!-- Discord SVG Icon -->
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.032.074c-.217.124-.456.214-.69.29-.023.015-.041.032-.064.05-.05.063-.09.11-.09.175v.002c-.004.09-.012.19-.025.293a17.433 17.433 0 0 0-2.513.339 19.792 19.792 0 0 0-8.315 0c-.833-.22-1.7-.339-2.513-.339a13.65 13.65 0 0 0-.025-.293v-.002c0-.064-.04-.112-.09-.175-.023-.018-.041-.035-.064-.05-.234-.076-.473-.166-.69-.29a.074.074 0 0 0-.032-.074 19.736 19.736 0 0 0-4.885 1.515A19.78 19.78 0 0 0 3.676 18.26c.124.265.224.541.299.823a.074.074 0 0 1 .04.087 19.724 19.724 0 0 0 5.897 3.027.074.074 0 0 1 .084.028c.03.012.064.012.094 0a19.832 19.832 0 0 0 5.896-3.027.074.074 0 0 1 .04-.087c.075-.282.175-.558.299-.823A19.724 19.724 0 0 0 20.317 4.37zM8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419 0-1.333.975-2.418 2.157-2.418 1.183 0 2.157 1.085 2.157 2.418 0 1.334-.975 2.419-2.157 2.419zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.975-2.418 2.157-2.418 1.183 0 2.157 1.085 2.157 2.418 0 1.334-.975 2.419-2.157 2.419z"/>
|
||||
</svg>
|
||||
<span>Jetzt beitreten</span>
|
||||
</a>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
157
options.js
157
options.js
@@ -13,6 +13,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// NEU: Discord Webhook Input
|
||||
const discordWebhookInput = document.getElementById('discord-webhook-url');
|
||||
// NEU: Telegram Inputs
|
||||
const telegramBotTokenInput = document.getElementById('telegram-bot-token');
|
||||
const telegramChatIdInput = document.getElementById('telegram-chat-id');
|
||||
|
||||
// --- Tab-Logik ---
|
||||
const tabButtons = document.querySelectorAll('.tab-btn');
|
||||
@@ -86,7 +89,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
// Verhindere, dass mehr als MAX_POPUP_SERVERS ausgewählt werden
|
||||
if (selectedServers.length >= MAX_POPUP_SERVERS) {
|
||||
alert(`Sie können maximal ${MAX_POPUP_SERVERS} Server auswählen.`);
|
||||
checkbox.checked = false; // Haken entfernen
|
||||
// Finde die Checkbox und setze den Haken zurück
|
||||
const checkboxId = `popup-server-${service.name.replace(/\s+/g, '-')}`;
|
||||
const checkbox = document.getElementById(checkboxId);
|
||||
if(checkbox) checkbox.checked = false;
|
||||
return;
|
||||
}
|
||||
selectedServers.push(service);
|
||||
@@ -259,11 +265,13 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// --- Settings load/save ---
|
||||
function loadSettings() {
|
||||
// NEU: discordWebhookUrl zu den abgerufenen Daten hinzufügen
|
||||
chrome.storage.sync.get({ checkInterval: 1, notifyOnline: false, discordWebhookUrl: '' }, function(data) {
|
||||
// NEU: discordWebhookUrl, telegramBotToken und telegramChatId zu den abgerufenen Daten hinzufügen
|
||||
chrome.storage.sync.get({ checkInterval: 1, notifyOnline: false, discordWebhookUrl: '', telegramBotToken: '', telegramChatId: '' }, function(data) {
|
||||
intervalSelect.value = data.checkInterval;
|
||||
notifyOnlineCheckbox.checked = data.notifyOnline;
|
||||
discordWebhookInput.value = data.discordWebhookUrl || ''; // NEU
|
||||
discordWebhookInput.value = data.discordWebhookUrl || '';
|
||||
telegramBotTokenInput.value = data.telegramBotToken || '';
|
||||
telegramChatIdInput.value = data.telegramChatId || '';
|
||||
});
|
||||
}
|
||||
intervalSelect.addEventListener('change', () => {
|
||||
@@ -277,35 +285,71 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
chrome.storage.sync.set({ discordWebhookUrl: discordWebhookInput.value.trim() });
|
||||
});
|
||||
|
||||
// --- Import/Export ---
|
||||
// NEU: Event Listener für Telegram
|
||||
telegramBotTokenInput.addEventListener('change', () => {
|
||||
chrome.storage.sync.set({ telegramBotToken: telegramBotTokenInput.value.trim() });
|
||||
});
|
||||
telegramChatIdInput.addEventListener('change', () => {
|
||||
chrome.storage.sync.set({ telegramChatId: telegramChatIdInput.value.trim() });
|
||||
});
|
||||
|
||||
|
||||
// --- ERWEITERTES Import/Export ---
|
||||
exportBtn.addEventListener('click', () => {
|
||||
chrome.storage.sync.get({ services: [] }, (data) => {
|
||||
const dataStr = JSON.stringify(data.services, null, 2);
|
||||
// Rufe alle relevanten Daten aus dem Speicher ab, inklusive der neuen Telegram-Einstellungen
|
||||
chrome.storage.sync.get({
|
||||
services: [],
|
||||
popupServers: [],
|
||||
checkInterval: 1,
|
||||
notifyOnline: false,
|
||||
discordWebhookUrl: '',
|
||||
telegramBotToken: '',
|
||||
telegramChatId: ''
|
||||
}, (data) => {
|
||||
// Erstelle einen String aus den Daten für die JSON-Datei
|
||||
const dataStr = JSON.stringify(data, null, 2);
|
||||
const blob = new Blob([dataStr], { type: 'application/json' });
|
||||
const url = URL.createObjectURL(blob); const a = document.createElement('a');
|
||||
a.href = url; a.download = 'uptime-services.json';
|
||||
document.body.appendChild(a); a.click();
|
||||
document.body.removeChild(a); URL.revokeObjectURL(url);
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = 'uptime-monitor-backup.json'; // Passenderer Dateiname
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
URL.revokeObjectURL(url);
|
||||
});
|
||||
});
|
||||
|
||||
importBtn.addEventListener('click', () => importFileInput.click());
|
||||
importFileInput.addEventListener('change', (event) => {
|
||||
const file = event.target.files[0]; if (!file) return;
|
||||
const file = event.target.files[0];
|
||||
if (!file) return;
|
||||
|
||||
const reader = new FileReader();
|
||||
reader.onload = (e) => {
|
||||
try { const importedServices = JSON.parse(e.target.result);
|
||||
if (Array.isArray(importedServices)) {
|
||||
chrome.storage.sync.set({ services: importedServices }, () => {
|
||||
renderServices(searchInput.value.trim());
|
||||
renderPopupServerSelection(importedServices); // Auch die Auswahl neu rendern
|
||||
try {
|
||||
const importedData = JSON.parse(e.target.result);
|
||||
|
||||
// Prüfe, ob die importierten Daten ein Objekt sind
|
||||
if (typeof importedData === 'object' && importedData !== null) {
|
||||
// Setze alle importierten Daten auf einmal
|
||||
chrome.storage.sync.set(importedData, () => {
|
||||
alert('Backup erfolgreich wiederhergestellt! Die Seite wird neu geladen, um alle Änderungen zu übernehmen.');
|
||||
// Nach dem Import ist es am sichersten, die Seite neu zu laden
|
||||
location.reload();
|
||||
});
|
||||
} else {
|
||||
alert('Ungültiges Dateiformat. Die Datei muss eine gültige Backup-Datei sein.');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Fehler beim Verarbeiten der Import-Datei:', error);
|
||||
alert('Fehler beim Lesen der Datei. Bitte stellen Sie sicher, dass es sich um eine gültige JSON-Datei handelt.');
|
||||
}
|
||||
else { alert('Ungültiges Dateiformat.'); }
|
||||
} catch (error) { alert('Fehler beim Lesen der Datei.'); }
|
||||
};
|
||||
reader.readAsText(file);
|
||||
});
|
||||
|
||||
|
||||
// --- Statistik-Anzeige ---
|
||||
function showStatsForService(service) {
|
||||
if (!service) return;
|
||||
@@ -379,4 +423,79 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
chrome.storage.sync.get({ services: [] }, (data) => {
|
||||
renderPopupServerSelection(data.services || []);
|
||||
});
|
||||
|
||||
// --- ROBUSTE: Gitea Repository Widget ---
|
||||
// Führt mehrere Suchen durch und kombiniert die Ergebnisse.
|
||||
function fetchAndDisplayGiteaRepos() {
|
||||
const list = document.getElementById('gitea-repos-list');
|
||||
const loadingIndicator = document.getElementById('gitea-repos-loading');
|
||||
const errorIndicator = document.getElementById('gitea-repos-error');
|
||||
|
||||
const searchKeywords = ["Gitea", "Themes", "Server", "Minecraft", "Webseite", "Wordpress", "Plugin", "chrome-erweiterung"];
|
||||
|
||||
loadingIndicator.style.display = 'block';
|
||||
list.style.display = 'none';
|
||||
errorIndicator.style.display = 'none';
|
||||
|
||||
// Erstelle eine Liste von Promises, eine für jede Suchanfrage
|
||||
const searchPromises = searchKeywords.map(keyword => {
|
||||
const apiUrl = `https://git.viper.ipv64.net/api/v1/repos/search?q=${encodeURIComponent(keyword)}&limit=50&sort=updated&order=desc`;
|
||||
return fetch(apiUrl).then(response => {
|
||||
if (!response.ok) {
|
||||
// Wenn eine Anfrage fehlschlägt, geben wir ein leeres Array zurück, um die anderen nicht zu blockieren
|
||||
console.warn(`Suche nach "${keyword}" fehlgeschlagen:`, response.status);
|
||||
return { data: [] }; // Gib eine leere Antwort-Struktur zurück
|
||||
}
|
||||
return response.json();
|
||||
});
|
||||
});
|
||||
|
||||
// Führe alle Suchanfragen parallel aus
|
||||
Promise.all(searchPromises)
|
||||
.then(results => {
|
||||
// Kombiniere alle Ergebnisse aus den einzelnen Suchen
|
||||
const allRepos = results.flatMap(result => result.data || []);
|
||||
|
||||
// Entferne Duplikate anhand der einzigartigen ID des Repositories
|
||||
const uniqueReposMap = new Map();
|
||||
allRepos.forEach(repo => {
|
||||
uniqueReposMap.set(repo.id, repo);
|
||||
});
|
||||
const uniqueRepos = Array.from(uniqueReposMap.values());
|
||||
|
||||
// Sortiere die kombinierten Repositories nach dem letzten Update-Datum
|
||||
uniqueRepos.sort((a, b) => new Date(b.updated_at) - new Date(a.updated_at));
|
||||
|
||||
// Begrenze die Ergebnisse auf die 5 neuesten
|
||||
const finalRepos = uniqueRepos.slice(0, 5);
|
||||
|
||||
loadingIndicator.style.display = 'none';
|
||||
list.innerHTML = '';
|
||||
|
||||
if (finalRepos.length > 0) {
|
||||
list.style.display = 'block';
|
||||
finalRepos.forEach(repo => {
|
||||
const li = document.createElement('li');
|
||||
const link = document.createElement('a');
|
||||
link.href = repo.html_url;
|
||||
link.textContent = repo.name;
|
||||
link.target = '_blank';
|
||||
link.rel = 'noopener noreferrer';
|
||||
li.appendChild(link);
|
||||
list.appendChild(li);
|
||||
});
|
||||
} else {
|
||||
list.style.display = 'block';
|
||||
list.innerHTML = '<li>Keine passenden Repositories gefunden.</li>';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Fehler beim Abrufen der Gitea Repositories:', error);
|
||||
loadingIndicator.style.display = 'none';
|
||||
errorIndicator.style.display = 'block';
|
||||
});
|
||||
}
|
||||
|
||||
// Rufe die neue Funktion auf, wenn die Seite geladen wird.
|
||||
fetchAndDisplayGiteaRepos();
|
||||
});
|
||||
11
popup.js
11
popup.js
@@ -61,6 +61,17 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
const card = document.createElement('div');
|
||||
card.className = 'service-card';
|
||||
|
||||
// === NEU ===
|
||||
// Macht die Karte klickbar und öffnet die URL
|
||||
card.style.cursor = 'pointer'; // Visueller Hinweis für den Benutzer
|
||||
card.addEventListener('click', () => {
|
||||
// Öffnet die URL des Dienstes in einem neuen Tab
|
||||
if (s.adresse) {
|
||||
chrome.tabs.create({ url: s.adresse });
|
||||
}
|
||||
});
|
||||
// === ENDE DER ÄNDERUNG ===
|
||||
|
||||
card.innerHTML = `
|
||||
<div class="service-info">
|
||||
<h2>${s.name}</h2>
|
||||
|
||||
145
style.css
145
style.css
@@ -53,11 +53,11 @@ body {
|
||||
background: var(--bg-color);
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 20px 50px rgba(0,0,0,0.25);
|
||||
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
position: relative;
|
||||
outline: 2px solid rgba(255,255,255,0.28);
|
||||
outline: 2px solid rgba(255, 255, 255, 0.28);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ body {
|
||||
inset: 0;
|
||||
border-radius: 20px;
|
||||
padding: 1px;
|
||||
background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.15) 40%, transparent);
|
||||
background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.15) 40%, transparent);
|
||||
-webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
|
||||
-webkit-mask-composite: destination-out;
|
||||
mask-composite: exclude;
|
||||
@@ -79,14 +79,14 @@ body {
|
||||
flex-shrink: 0; /* Verhindert, dass der Header schrumpft */
|
||||
padding: 20px 24px 16px;
|
||||
text-align: center;
|
||||
background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
|
||||
background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.header { background: linear-gradient(135deg, rgba(36,37,38,0.95), rgba(30,31,32,0.85)); }
|
||||
.header { background: linear-gradient(135deg, rgba(36, 37, 38, 0.95), rgba(30, 31, 32, 0.85)); }
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
@@ -137,7 +137,7 @@ body {
|
||||
}
|
||||
|
||||
.icon-btn#settings-btn:hover {
|
||||
background: rgba(24,119,242,0.08);
|
||||
background: rgba(24, 119, 242, 0.08);
|
||||
color: var(--accent-color);
|
||||
border-radius: 6px;
|
||||
}
|
||||
@@ -151,17 +151,17 @@ body {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.status-dot.small.online { background: var(--online-color); box-shadow: 0 0 6px rgba(49,162,76,0.25); }
|
||||
.status-dot.small.offline { background: var(--offline-color); box-shadow: 0 0 6px rgba(228,96,109,0.25); }
|
||||
.status-dot.small.unknown { background: var(--unknown-color); box-shadow: none; opacity:0.8; }
|
||||
.status-dot.small.online { background: var(--online-color); box-shadow: 0 0 6px rgba(49, 162, 76, 0.25); }
|
||||
.status-dot.small.offline { background: var(--offline-color); box-shadow: 0 0 6px rgba(228, 96, 109, 0.25); }
|
||||
.status-dot.small.unknown { background: var(--unknown-color); box-shadow: none; opacity: 0.8; }
|
||||
|
||||
.status-dot.green.pulse { background: #31a24c; animation: pulse-green 2s infinite; }
|
||||
.status-dot.orange { background: #ff9f0a; animation: pulse-orange 2.5s infinite; }
|
||||
.status-dot.red { background: #e4606d; animation: pulse-red 2s infinite; }
|
||||
|
||||
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(49,162,76,0.7); } 70% { box-shadow: 0 0 0 12px rgba(49,162,76,0); } 100% { box-shadow: 0 0 0 0 rgba(49,162,76,0); } }
|
||||
@keyframes pulse-orange { 0% { box-shadow: 0 0 0 0 rgba(255,159,10,0.7); } 70% { box-shadow: 0 0 0 12px rgba(255,159,10,0); } 100% { box-shadow: 0 0 0 0 rgba(255,159,10,0); } }
|
||||
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(228,96,109,0.7); } 70% { box-shadow: 0 0 0 12px rgba(228,96,109,0); } 100% { box-shadow: 0 0 0 0 rgba(228,96,109,0); } }
|
||||
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(49, 162, 76, 0.7); } 70% { box-shadow: 0 0 0 12px rgba(49, 162, 76, 0); } 100% { box-shadow: 0 0 0 0 rgba(49, 162, 76, 0); } }
|
||||
@keyframes pulse-orange { 0% { box-shadow: 0 0 0 0 rgba(255, 159, 10, 0.7); } 70% { box-shadow: 0 0 0 12px rgba(255, 159, 10, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 159, 10, 0); } }
|
||||
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(228, 96, 109, 0.7); } 70% { box-shadow: 0 0 0 12px rgba(228, 96, 109, 0); } 100% { box-shadow: 0 0 0 0 rgba(228, 96, 109, 0); } }
|
||||
|
||||
/* ==================== POPUP-SERVICE-LISTE – GRID ==================== */
|
||||
.services {
|
||||
@@ -192,7 +192,7 @@ body {
|
||||
|
||||
.service-card:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 10px 25px rgba(0,0,0,0.15);
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
@@ -210,9 +210,9 @@ body {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.status-badge.online { background: rgba(49,162,76,0.15); color: #31a24c; }
|
||||
.status-badge.offline { background: rgba(228,96,109,0.15); color: #e4606d; }
|
||||
.status-badge.unknown { background: rgba(142,142,147,0.15); color: #8e8e93; }
|
||||
.status-badge.online { background: rgba(49, 162, 76, 0.15); color: #31a24c; }
|
||||
.status-badge.offline { background: rgba(228, 96, 109, 0.15); color: #e4606d; }
|
||||
.status-badge.unknown { background: rgba(142, 142, 147, 0.15); color: #8e8e93; }
|
||||
|
||||
/* Mini Response-Time */
|
||||
.service-card .response-time { font-size: 11px; opacity: 0.65; }
|
||||
@@ -243,7 +243,8 @@ body {
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 10px;
|
||||
margin-top: 15px;
|
||||
max-height: 300px;
|
||||
/* ANGEPASST: Feste Höhe für eigenen Scrollbalk */
|
||||
height: 300px;
|
||||
overflow-y: auto;
|
||||
padding-right: 5px;
|
||||
}
|
||||
@@ -259,7 +260,7 @@ body {
|
||||
}
|
||||
|
||||
.popup-server-item:hover {
|
||||
background: rgba(24,119,242,0.05);
|
||||
background: rgba(24, 119, 242, 0.05);
|
||||
border-color: var(--accent-color);
|
||||
}
|
||||
|
||||
@@ -294,7 +295,7 @@ body {
|
||||
|
||||
.selection-info {
|
||||
padding: 8px 12px;
|
||||
background: rgba(24,119,242,0.1);
|
||||
background: rgba(24, 119, 242, 0.1);
|
||||
border-radius: 8px;
|
||||
margin-bottom: 10px;
|
||||
font-weight: 500;
|
||||
@@ -317,7 +318,7 @@ body {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.footer a:hover { background: rgba(24,119,242,0.1); }
|
||||
.footer a:hover { background: rgba(24, 119, 242, 0.1); }
|
||||
|
||||
/* ==================== OPTIONS PAGE ==================== */
|
||||
.options-page { background: var(--bg-color); color: var(--text-color); padding: 20px; min-height: 100vh; }
|
||||
@@ -347,17 +348,42 @@ body {
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.tab-btn { flex: 1; padding: 12px 20px; background: none; color: var(--text-secondary); border: none; border-radius: 8px; cursor: pointer;}
|
||||
.tab-btn { flex: 1; padding: 12px 20px; background: none; color: var(--text-secondary); border: none; border-radius: 8px; cursor: pointer; }
|
||||
.tab-btn.active { background: var(--accent-color); color: white; }
|
||||
|
||||
.tab-panel { display: none; }
|
||||
.tab-panel.active { display: block; }
|
||||
|
||||
#manage-panel .manage-grid { display: grid; grid-template-columns: 1fr 3.8fr 1fr; gap: 28px; }
|
||||
|
||||
#manage-panel .manage-grid { display: grid; grid-template-columns: 1fr 3.5fr 1.2fr; gap: 28px; }
|
||||
@media (max-width: 1100px) { #manage-panel .manage-grid { grid-template-columns: 1fr; } }
|
||||
|
||||
.stats-grid { display: grid; grid-template-columns: 1fr 1.9fr; gap: 28px; }
|
||||
@media (max-width: 900px) { .stats-grid { grid-template-columns: 1fr; } }
|
||||
|
||||
.stats-grid {
|
||||
display: grid;
|
||||
|
||||
grid-template-columns: 1fr 800px;
|
||||
gap: 28px;
|
||||
}
|
||||
@media (max-width: 800px) {
|
||||
.stats-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
/* ANGEPASST: Feste Größe für Chart-Karte */
|
||||
.stats-chart-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 16px;
|
||||
border-radius: 10px;
|
||||
background: var(--card-bg);
|
||||
width: 800px;
|
||||
height: 500px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#uptimeChart { width: 100% !important; height: 100% !important; display: block; }
|
||||
|
||||
.form-section { display: flex; flex-direction: column; gap: 20px; }
|
||||
.form-group { margin-bottom: 16px; }
|
||||
@@ -368,7 +394,7 @@ input, select { width: 100%; padding: 12px 16px; border: 1px solid var(--border-
|
||||
.input-group { display: flex; gap: 8px; }
|
||||
#service-protocol { width: 130px; }
|
||||
|
||||
.btn { padding: 12px 20px; border-radius: 8px; font-size: 15px; cursor: pointer; border: none;}
|
||||
.btn { padding: 12px 20px; border-radius: 8px; font-size: 15px; cursor: pointer; border: none; }
|
||||
.btn-primary { background: var(--accent-color); color: white; }
|
||||
.btn-primary:hover { background: #166fe5; }
|
||||
.btn-secondary { background: #eee; color: #333; }
|
||||
@@ -399,8 +425,8 @@ input, select { width: 100%; padding: 12px 16px; border: 1px solid var(--border-
|
||||
transition: box-shadow .12s, transform .12s;
|
||||
}
|
||||
|
||||
.service-stat-item:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
|
||||
.service-stat-item.selected { outline: 2px solid rgba(24,119,242,0.12); box-shadow: 0 8px 22px rgba(24,119,242,0.06); }
|
||||
.service-stat-item:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06); }
|
||||
.service-stat-item.selected { outline: 2px solid rgba(24, 119, 242, 0.12); box-shadow: 0 8px 22px rgba(24, 119, 242, 0.06); }
|
||||
|
||||
.service-left { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
|
||||
.service-name { font-weight: 600; font-size: 14px; color: var(--text-color); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
@@ -408,22 +434,61 @@ input, select { width: 100%; padding: 12px 16px; border: 1px solid var(--border-
|
||||
|
||||
.service-right { display: flex; align-items: center; gap: 12px; }
|
||||
|
||||
.service-meta { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--text-secondary); }
|
||||
.service-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary); }
|
||||
|
||||
/* icon buttons */
|
||||
.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding:6px; border-radius:8px; border: none; background: transparent; cursor: pointer; transition: background .12s, color .12s; color: var(--text-secondary); }
|
||||
.icon-btn:hover { background: rgba(24,119,242,0.06); color: var(--accent-color); }
|
||||
.icon-btn.delete:hover { background: rgba(228,96,109,0.06); color: var(--offline-color); }
|
||||
.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 6px; border-radius: 8px; border: none; background: transparent; cursor: pointer; transition: background .12s, color .12s; color: var(--text-secondary); }
|
||||
.icon-btn:hover { background: rgba(24, 119, 242, 0.06); color: var(--accent-color); }
|
||||
.icon-btn.delete:hover { background: rgba(228, 96, 109, 0.06); color: var(--offline-color); }
|
||||
|
||||
/* edit inline */
|
||||
.service-stat-item.editing { padding: 8px; }
|
||||
.edit-left { display:flex; flex-direction:column; gap:8px; width:100%; }
|
||||
.edit-left input { padding:8px 10px; border-radius:8px; border:1px solid var(--border-color); background:var(--card-bg); }
|
||||
.edit-actions { display:flex; gap:8px; align-items:center; }
|
||||
.btn-save, .btn-cancel { padding:6px 10px; border-radius:8px; border:none; cursor:pointer; font-weight:600; }
|
||||
.btn-save { background:var(--accent-color); color:white; }
|
||||
.btn-cancel { background:#eee; color:#333; }
|
||||
.edit-left { display: flex; flex-direction: column; gap: 8px; width: 100%; }
|
||||
.edit-left input { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--card-bg); }
|
||||
.edit-actions { display: flex; gap: 8px; align-items: center; }
|
||||
.btn-save, .btn-cancel { padding: 6px 10px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; }
|
||||
.btn-save { background: var(--accent-color); color: white; }
|
||||
.btn-cancel { background: #eee; color: #333; }
|
||||
|
||||
/* Stats-Tab: Chart größer */
|
||||
.stats-chart-card { display: flex; flex-direction: column; padding: 16px; border-radius: 12px; background: var(--card-bg); flex: 2; min-height: 500px; }
|
||||
#uptimeChart { width: 100% !important; height: 100% !important; display: block; }
|
||||
|
||||
|
||||
/* ============================================= */
|
||||
/* ABSTAND FÜR WIDGETS IN DER SEITENLEISTE */
|
||||
/* ============================================= */
|
||||
|
||||
/* Fügt einen Abstand zwischen den Widgets in der rechten Seitenleiste hinzu */
|
||||
.widget-area-right .widget-card + .widget-card {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* ============================================= */
|
||||
/* GITEA REPOSITORY WIDGET LINKS */
|
||||
/* ============================================= */
|
||||
|
||||
#gitea-repos-list a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* ============================================= */
|
||||
/* DISCORD SUPPORT WIDGET BUTTON */
|
||||
/* ============================================= */
|
||||
|
||||
.discord-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
padding: 12px 16px;
|
||||
margin-top: 16px;
|
||||
background-color: #5865F2;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
border-radius: 8px;
|
||||
font-weight: 600;
|
||||
transition: background-color 0.2s ease;
|
||||
}
|
||||
|
||||
.discord-link:hover {
|
||||
background-color: #4752C4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user