Add Remote DNS

This commit is contained in:
2026-09-04 08:55:35 +02:00
parent 910c04f845
commit 902c177330
9 changed files with 876 additions and 599 deletions
+48 -4
View File
@@ -13,11 +13,13 @@ BG_SUNKEN = "#17202a" # zones en creux : configurations, blocs de code
BG_RAISED = "#253545" # éléments posés sur le fond : listes, en-têtes secondaires
BORDER = "rgba(255,255,255,0.18)"
BORDER_SOFT = "rgba(255,255,255,0.10)"
INPUT_BG = "rgba(255,255,255,0.10)" # fond des champs de saisie et listes
# ── Textes ───────────────────────────────────────────────────────────────────
TEXT = "white"
TEXT_MUTED = "rgba(255,255,255,0.70)"
TEXT_FAINT = "rgba(255,255,255,0.50)"
TEXT_CODE = "#a8d8ea" # texte à chasse fixe (aperçus de config, rapports)
# ── Accent ───────────────────────────────────────────────────────────────────
ACCENT = "#2471a3"
@@ -32,6 +34,12 @@ WARN_TEXT, WARN_BG, WARN_SOLID = "#f7dc6f", "rgba(241,196,15,0.15)", "#b7950b"
FAIL_TEXT, FAIL_BG, FAIL_SOLID = "#f1948a", "rgba(231,76,60,0.18)", "#c0392b"
SKIP_TEXT, SKIP_BG = "rgba(255,255,255,0.45)", "rgba(255,255,255,0.05)"
# Teintes de survol des boutons pleins ok/fail — reprises telles quelles à
# plusieurs endroits (panneau admin, fenêtre principale) : un seul nom leur
# évite de dériver l'une de l'autre au fil des modifications.
OK_HOVER = "#27ae60"
FAIL_HOVER = "#e74c3c"
_STATE = {
"ok": (OK_TEXT, OK_BG),
"warn": (WARN_TEXT, WARN_BG),
@@ -40,6 +48,22 @@ _STATE = {
"idle": (TEXT_MUTED, "transparent"),
}
# ── Badge de ping (fenêtre principale) ──────────────────────────────────────
PING_CSS = {
"good": "background:#1e8449; color:white;",
"medium": "background:#d4ac0d; color:black;",
"bad": "background:#922b21; color:white;",
"offline": f"background:{BG_RAISED}; color:{TEXT_FAINT};",
}
# ── Entrées de journal (fenêtre principale) ─────────────────────────────────
LOG_COLORS = {
"success": OK_TEXT,
"error": FAIL_TEXT,
"warning": WARN_TEXT,
"info": ACCENT_LIGHT,
}
# ── Bandeaux d'onglets ───────────────────────────────────────────────────────
# Cinq teintes calées sur la même luminosité et la même saturation : les
# onglets restent distinguables sans que l'un paraisse plus clair ou plus
@@ -118,7 +142,7 @@ TAB_CSS = f"""
color: {TEXT};
}}
QLineEdit {{
background: rgba(255,255,255,0.10);
background: {INPUT_BG};
color: {TEXT};
border: 1px solid {BORDER};
border-radius: 4px;
@@ -128,7 +152,7 @@ TAB_CSS = f"""
QLineEdit:disabled {{ background: rgba(255,255,255,0.04);
color: {TEXT_FAINT}; }}
QSpinBox {{
background: rgba(255,255,255,0.10);
background: {INPUT_BG};
color: {TEXT};
border: 1px solid {BORDER};
border-radius: 4px;
@@ -137,9 +161,22 @@ TAB_CSS = f"""
QSpinBox::up-button, QSpinBox::down-button {{
background: rgba(255,255,255,0.15);
}}
QComboBox {{
background: {INPUT_BG};
color: {TEXT};
border: 1px solid {BORDER};
border-radius: 4px;
padding: 3px 8px;
}}
QComboBox::drop-down {{ border: none; }}
QComboBox QAbstractItemView {{
background: {BG_RAISED};
color: {TEXT};
selection-background-color: {ACCENT};
}}
QTextEdit {{
background: {BG_SUNKEN};
color: #a8d8ea;
color: {TEXT_CODE};
border: 1px solid {BORDER};
border-radius: 4px;
}}
@@ -171,13 +208,20 @@ TABBAR_CSS = f"""
"""
def primary_button_style(solid: str = OK_SOLID, hover: str = "#27ae60") -> str:
def primary_button_style(solid: str = OK_SOLID, hover: str = OK_HOVER) -> str:
"""Bouton d'action principale d'une page (lancer un test, par exemple)."""
return (f"QPushButton {{ padding: 9px; background: {solid}; color: {TEXT};"
f" border-radius: 5px; font-weight: bold; border: none; }}"
f"QPushButton:hover {{ background: {hover}; }}")
def secondary_button_style() -> str:
"""Bouton d'action secondaire d'une page (à côté d'une action principale)."""
return (f"QPushButton {{ padding: 9px; background: {BG_RAISED}; color: {TEXT};"
f" border-radius: 5px; border: none; }}"
f"QPushButton:hover {{ background: {ACCENT_HOVER}; }}")
def hint_style() -> str:
"""Encart d'introduction posé en tête de chaque onglet.