Serveur upload Flask + page web mobile + intégration PyQt
- Serveur Flask en thread daemon (port 80 ou 8080 avec --no-root) - Page upload responsive : drag&drop, multi-fichiers, prévisualisations - Barre de progression, feedback succès/erreur - Photos stockées dans data/photos/ - Signal photos_received → notify_qr_photos() sur l'écran d'accueil - Ajout flask aux requirements Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
10
src/main.py
10
src/main.py
@@ -5,6 +5,7 @@ import sys
|
||||
from PyQt6.QtWidgets import QApplication
|
||||
from PyQt6.QtCore import Qt
|
||||
from ui.main_window import MainWindow
|
||||
from services.upload_server import UploadServer
|
||||
|
||||
|
||||
def main():
|
||||
@@ -14,8 +15,15 @@ def main():
|
||||
window = MainWindow()
|
||||
window.setWindowFlags(Qt.WindowType.FramelessWindowHint)
|
||||
|
||||
# Serveur upload (WiFi / QR Code)
|
||||
port = 8080 if "--no-root" in sys.argv else 80
|
||||
upload_server = UploadServer(port=port)
|
||||
upload_server.signals.photos_received.connect(
|
||||
window.home_screen.notify_qr_photos
|
||||
)
|
||||
upload_server.start()
|
||||
|
||||
if "--kiosk" in sys.argv:
|
||||
# Plein écran : prend toute la résolution de l'écran
|
||||
screen = app.primaryScreen().geometry()
|
||||
window.setGeometry(screen)
|
||||
window.showFullScreen()
|
||||
|
||||
Reference in New Issue
Block a user