Refacto constants
This commit is contained in:
@@ -8,6 +8,21 @@ from PySide6.QtGui import QColor
|
||||
|
||||
NO_STAFF = True
|
||||
|
||||
REDIRECT_URI = "http://localhost:5000/callback"
|
||||
SCOPES = ["identify"]
|
||||
CLIENT_ID = "1240007913175781508"
|
||||
AUTENTICATION_SUCCESS_MESSAGE = """
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
|
||||
<meta content="utf-8" http-equiv="encoding">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Authentication réussie</h1>
|
||||
<p>Vous pouvez maintenant fermer cette fenêtre et revenir au launcher de La Tanière.</p>
|
||||
</body>
|
||||
</html>
|
||||
""".encode('utf-8')
|
||||
# ---------------------------------------------------------------------------
|
||||
# ENUMS
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -3,7 +3,7 @@ from PySide6.QtMultimedia import QMediaPlayer, QAudioOutput
|
||||
|
||||
from config.config_manager import ConfigManager, VOLUME_KEY
|
||||
|
||||
from tools.constants import Resources
|
||||
from config.constants import Resources
|
||||
|
||||
class AudioController:
|
||||
# Encapsule toute la logique audio : lecture, volume, mute.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from PySide6.QtCore import QPropertyAnimation, QEasingCurve
|
||||
from PySide6.QtWidgets import QGraphicsDropShadowEffect
|
||||
|
||||
from tools.constants import Glow
|
||||
from config.constants import Glow
|
||||
|
||||
|
||||
class GlowAnimator:
|
||||
|
||||
@@ -16,7 +16,7 @@ from tools.custom_message_box import CustomMessageBox
|
||||
import resources # noqa: F401 - required to register Qt resources
|
||||
|
||||
from ui.main_window import MainWindow
|
||||
from tools.constants import Resources
|
||||
from config.constants import Resources
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Bundle path resolution
|
||||
|
||||
@@ -4,26 +4,11 @@ import os
|
||||
from urllib.parse import urlencode
|
||||
from http.server import HTTPServer, BaseHTTPRequestHandler
|
||||
from tools.get_server_token import GetServerTokenForDiscord
|
||||
from config.constants import CLIENT_ID, REDIRECT_URI, SCOPES, AUTENTICATION_SUCCESS_MESSAGE
|
||||
|
||||
# Disable stderr output
|
||||
os.environ['PYTHONWARNINGS'] = 'ignore'
|
||||
|
||||
REDIRECT_URI = "http://localhost:5000/callback"
|
||||
SCOPES = ["identify"]
|
||||
CLIENT_ID = "1240007913175781508"
|
||||
AUTENTICATION_SUCCESS_MESSAGE = """
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
|
||||
<meta content="utf-8" http-equiv="encoding">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Authentication réussie</h1>
|
||||
<p>Vous pouvez maintenant fermer cette fenêtre et revenir au launcher de La Tanière.</p>
|
||||
</body>
|
||||
</html>
|
||||
""".encode('utf-8')
|
||||
|
||||
class OAuthCallbackHandler(BaseHTTPRequestHandler):
|
||||
code: str | None = None
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import psutil
|
||||
|
||||
from pypresence import Presence
|
||||
from tools.get_server_token import GetServerTokenForDiscord
|
||||
from tools.constants import Urls
|
||||
from config.constants import Urls
|
||||
from tools.discord_oauth import CLIENT_ID
|
||||
|
||||
class DiscordToken:
|
||||
|
||||
@@ -12,7 +12,7 @@ from controllers.audio_controller import AudioController
|
||||
from controllers.glow_animator import GlowAnimator
|
||||
from controllers.window_dragger import WindowDragger
|
||||
from tools import discord_oauth
|
||||
from tools.constants import NO_STAFF, Urls
|
||||
from config.constants import NO_STAFF, Urls
|
||||
|
||||
from fake_patch_notes import patch_note
|
||||
|
||||
|
||||
Reference in New Issue
Block a user