Wip page auth discord

This commit is contained in:
2026-03-16 11:51:46 +01:00
parent 5cfecdf856
commit fd4cf5e51f
3 changed files with 203 additions and 131 deletions

View File

@@ -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):

View File

@@ -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;

View File

@@ -997,9 +997,15 @@
<x>10</x>
<y>10</y>
<width>700</width>
<height>480</height>
<height>482</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>700</width>
<height>16777215</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Shape::NoFrame</enum>
</property>
@@ -1007,8 +1013,35 @@
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="frame_6">
<widget class="QFrame" name="auth_discord_page_title">
<property name="minimumSize">
<size>
<width>0</width>
<height>80</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>80</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Shape::NoFrame</enum>
</property>
@@ -1016,6 +1049,21 @@
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
@@ -1087,101 +1135,183 @@
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<widget class="QFrame" name="frame_7">
<property name="maximumSize">
<size>
<width>20</width>
<height>40</height>
<width>700</width>
<height>16777215</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="info_discord_label">
<property name="text">
<string>Il semblerait que tu n'ai pas authentifié au moins une fois le launcher avec Discord</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QFrame" name="frame_8">
<property name="frameShape">
<enum>QFrame::Shape::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer_7">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Policy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="discord_auth_btn">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>380</width>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>250</width>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="text">
<string> M'authentifer avec Discord</string>
<string>UNE PREMIÈRE AUTHENTIFICATION AVEC DISCORD EST NÉCESSAIRE.</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/assets/discord-icon.svg</normaloff>:/assets/discord-icon.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_8">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Policy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
<width>20</width>
<height>30</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QFrame" name="frame_8">
<property name="frameShape">
<enum>QFrame::Shape::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="discord_auth_btn">
<property name="minimumSize">
<size>
<width>380</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>250</width>
<height>50</height>
</size>
</property>
<property name="text">
<string> M'authentifer avec Discord</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/assets/discord-icon.svg</normaloff>:/assets/discord-icon.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Policy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>200</height>
</size>
</property>
</spacer>
@@ -1189,22 +1319,6 @@
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Policy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>171</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>