From fd4cf5e51f067a9e185aa52a4a7d524760e81fcf Mon Sep 17 00:00:00 2001 From: xarkam Date: Mon, 16 Mar 2026 11:51:46 +0100 Subject: [PATCH] Wip page auth discord --- src/ui/main_window.py | 5 + styles/styles.qss | 69 ++------- ui/mainwindow_vertical_pager.ui | 260 +++++++++++++++++++++++--------- 3 files changed, 203 insertions(+), 131 deletions(-) diff --git a/src/ui/main_window.py b/src/ui/main_window.py index 463705a..bb4c602 100644 --- a/src/ui/main_window.py +++ b/src/ui/main_window.py @@ -1,4 +1,6 @@ import webbrowser +from sys import platform +from os import environ from PySide6 import QtGui from PySide6.QtCore import Qt @@ -12,6 +14,9 @@ from controllers.glow_animator import GlowAnimator from controllers.window_dragger import WindowDragger from fake_patch_notes import patch_note +# For Linux Wayland to authorize moving window +if platform.startswith('linux'): + environ["QT_QPA_PLATFORM"] = "xcb" class MainWindow(QMainWindow): def __init__(self, bundle_dir): diff --git a/styles/styles.qss b/styles/styles.qss index 44912cc..405ddee 100644 --- a/styles/styles.qss +++ b/styles/styles.qss @@ -1,19 +1,12 @@ +QLabel { + color: rgb(255, 255, 255); +} + #main_container { border-radius: 30px; - /*background-image: url(:/assets/background.png); - background-repeat: no-repeat; - background-position: center; */ - /*background: qlineargradient(x1:0, y1:0, x2:0, y2:1, - stop: 0 #050a0f, - stop: 1 #0f172a);*/ background: qradialgradient(cx:0.5, cy:0.5, radius:0.8, fx:0.5, fy:0.5, stop: 0 #16213e, stop: 1 #0a0e14); - - /*background: qlineargradient(x1:0, y1:0, x2:1, y2:1, - stop: 0 #0d1117, - stop: 0.7 #0d1117, - stop: 1 #1e3a8a); /* Une pointe de bleu plus vif en bas à droite */ } QFrame#logo_frame { @@ -27,13 +20,16 @@ QFrame#frame_2 QLabel { } QFrame#frame_2 QLabel#discord_title_label { - color: rgb(255, 255, 255); - font-size: 24px; + font-size: 28px; + color: rgb(255, 255, 255) /* label enfant, obligé de définir la couleur car ne prend pas la général */ +} + +QFrame#frame_2 QLabel#label_2 { + /* font-family: 'sans serif'; */ } QLabel#maintitle_label { font-size: 38px; - color: rgb(255, 255, 255); } QLabel#subtitle_label { @@ -46,7 +42,7 @@ QLabel#queue_position { } QLabel#queue_lbl { - color: rgb(255, 255, 255); + } QPushButton#connexion_btn { @@ -75,48 +71,6 @@ QPushButton#connexionBtn:pressed { padding-top: 12px; /* Effet d'enfoncement */ } -/* État normal - Bleu Cyan */ -/* QPushButton#staff_btn { - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, - stop:0 #00d2ff, stop:1 #3a7bd5); - color: white; - border-radius: 12px; - border: 1px solid #2d5ea3; - padding: 5px 15px; -} - -QPushButton#staff_btn:hover { - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, - stop:0 #33dbff, stop:1 #528ce0); - border: 1px solid #3a7bd5; -} - -QPushButton#staff_btn:pressed { - background-color: #2d5ea3; - padding-top: 7px; -} */ - -/* État normal - Doré dégradé */ -/* QPushButton#staff_btn { - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, - stop:0 #f1c40f, stop:1 #e67e22); - color: white; - border-radius: 12px; - border: 1px solid #d35400; - padding: 5px 15px; -} - -QPushButton#staff_btn:hover { - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, - stop:0 #f39c12, stop:1 #f1c40f); - border: 1px solid #e67e22; -} - -QPushButton#staff_btn:pressed { - background-color: #d35400; - padding-top: 7px; -} */ - /* État normal - Rouge Corail Vibrant */ QPushButton#staff_btn { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, @@ -161,7 +115,6 @@ QPushButton#discord_auth_btn:hover } QPushButton#intranet_btn:hover { - /* background: rgb(68, 124, 143); */ background-color: rgba(0, 242, 255, 0.15); /* Teinte turquoise légère en fond */ border: 2px solid #00f2ff; /* Bordure turquoise vive et épaisse */ color: #ffffff; diff --git a/ui/mainwindow_vertical_pager.ui b/ui/mainwindow_vertical_pager.ui index a51613d..2bc6420 100644 --- a/ui/mainwindow_vertical_pager.ui +++ b/ui/mainwindow_vertical_pager.ui @@ -997,9 +997,15 @@ 10 10 700 - 480 + 482 + + + 700 + 16777215 + + QFrame::Shape::NoFrame @@ -1007,8 +1013,35 @@ QFrame::Shadow::Raised + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + - + + + + 0 + 80 + + + + + 16777215 + 80 + + QFrame::Shape::NoFrame @@ -1016,6 +1049,21 @@ QFrame::Shadow::Raised + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + @@ -1087,101 +1135,183 @@ - - - Qt::Orientation::Vertical - - + + - 20 - 40 + 700 + 16777215 - - - - - - Il semblerait que tu n'ai pas authentifié au moins une fois le launcher avec Discord - - - true - - - - - - - Qt::Orientation::Vertical - - - - 20 - 40 - - - - - - QFrame::Shape::NoFrame QFrame::Shadow::Raised - + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + - + - Qt::Orientation::Horizontal + Qt::Orientation::Vertical + + + QSizePolicy::Policy::Fixed - 40 + 0 20 - + - 380 + 0 50 - 250 + 16777215 50 - M'authentifer avec Discord + UNE PREMIÈRE AUTHENTIFICATION AVEC DISCORD EST NÉCESSAIRE. - - - :/assets/discord-icon.svg:/assets/discord-icon.svg - - - - 32 - 32 - + + Qt::AlignmentFlag::AlignCenter - + - Qt::Orientation::Horizontal + Qt::Orientation::Vertical + + + QSizePolicy::Policy::Fixed - 40 - 20 + 20 + 30 + + + + + + + + QFrame::Shape::NoFrame + + + QFrame::Shadow::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + 380 + 50 + + + + + 250 + 50 + + + + M'authentifer avec Discord + + + + :/assets/discord-icon.svg:/assets/discord-icon.svg + + + + 32 + 32 + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + + + Qt::Orientation::Vertical + + + QSizePolicy::Policy::Fixed + + + + 20 + 200 @@ -1189,22 +1319,6 @@ - - - - Qt::Orientation::Vertical - - - QSizePolicy::Policy::Fixed - - - - 20 - 171 - - - -