This commit is contained in:
2026-02-28 11:49:23 +01:00
parent 08bbaab94b
commit 02fec72c43
18 changed files with 180 additions and 25 deletions

87
Makefile Normal file
View File

@@ -0,0 +1,87 @@
# Variables
BINARY_NAME=ShackMaster.exe
FRONTEND_DIR=web
BACKEND_DIR=cmd/server
DIST_DIR=$(FRONTEND_DIR)/dist
GO_FILES=$(shell find . -name '*.go' -not -path "./$(FRONTEND_DIR)/*")
CGO_ENABLED ?= 1
GOFLAGS = CGO_ENABLED=$(CGO_ENABLED)
.PHONY: all build frontend backend run clean dev help install-deps
# Commande par défaut
all: build
## help: Affiche cette aide
help:
@echo "ShackMaster - Makefile"
@echo ""
@echo "Commandes disponibles:"
@echo " make build - Build complet (frontend + backend)"
@echo " make frontend - Build uniquement le frontend"
@echo " make backend - Build uniquement le backend Go"
@echo " make run - Build et lance l'application"
@echo " make dev - Lance le frontend en mode dev"
@echo " make clean - Nettoie les fichiers générés"
@echo " make install-deps - Installe toutes les dépendances"
@echo " make help - Affiche cette aide"
## install-deps: Installe les dépendances npm
install-deps:
@echo "[1/2] Installation des dependances npm..."
cd $(FRONTEND_DIR) && npm install
@echo "Dependances installees"
@echo ""
@echo "[2/2] Verification de Go..."
@go version
@echo "Go est installe"
## frontend: Build le frontend Svelte
frontend:
@echo "Building frontend..."
cd $(FRONTEND_DIR) && npm run build
xcopy /E /I /Y web\dist cmd\server\web\dist
@echo "Frontend built successfully"
## backend: Build le backend Go
backend: frontend
@echo "Building Go binary..."
cd $(BACKEND_DIR) && go build -ldflags -H=windowsgui .
@echo "Backend built successfully"
## build: Build complet (frontend + backend)
build: install-deps frontend backend
@echo ""
@echo "====================================="
@echo " BUILD COMPLETE!"
@echo "====================================="
@echo ""
@echo "Run: ./$(BINARY_NAME)"
@echo ""
## run: Build et lance l'application
run: build
@echo "Starting ShackMaster..."
@echo ""
./$(BINARY_NAME)
## dev: Lance le frontend en mode développement (hot reload)
dev:
@echo "Starting frontend dev server..."
@echo "Frontend: http://localhost:3000"
@echo "Backend: http://localhost:8080"
@echo ""
cd $(FRONTEND_DIR) && npm run dev
## clean: Nettoie les fichiers générés
clean:
@echo "Cleaning build files..."
@if exist $(BINARY_NAME) del /f /q $(BINARY_NAME)
@if exist $(DIST_DIR) rmdir /s /q $(DIST_DIR)
@echo "Clean complete"
## watch: Build auto lors des changements (nécessite watchexec)
watch:
@echo "Watching for changes..."
@echo "Install watchexec: choco install watchexec"
watchexec -w . -e go -- make build

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -7,8 +7,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
<script type="module" crossorigin src="/assets/index-Drom3Zfz.js"></script> <script type="module" crossorigin src="/assets/index-Ci4y1GIJ.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-pnuRxXpy.css"> <link rel="stylesheet" crossorigin href="/assets/index-B1UmG2DI.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@@ -282,6 +282,7 @@
display: flex; display: flex;
gap: 24px; gap: 24px;
flex-wrap: wrap; flex-wrap: wrap;
align-items: stretch;
} }
.row > :global(*) { .row > :global(*) {

View File

@@ -148,6 +148,9 @@
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
height: 100%;
display: flex;
flex-direction: column;
} }
.card-header { .card-header {
@@ -185,6 +188,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12px; gap: 12px;
flex: 1;
} }
/* Sources */ /* Sources */

View File

@@ -151,6 +151,9 @@
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
height: 100%;
display: flex;
flex-direction: column;
} }
.card-header { .card-header {
@@ -222,6 +225,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10px; gap: 10px;
flex: 1;
} }
/* Power Display */ /* Power Display */

View File

@@ -368,6 +368,9 @@
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
height: 100%;
display: flex;
flex-direction: column;
} }
.card-header { .card-header {
@@ -405,6 +408,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10px; gap: 10px;
flex: 1;
} }
.heading-controls-row { .heading-controls-row {

View File

@@ -508,11 +508,6 @@
50% { opacity: 0.6; } 50% { opacity: 0.6; }
} }
.slice-waiting {
color: #fbbf24; /* Jaune pour "en attente" */
animation: pulse 1.5s infinite;
}
/* Radio status indicators */ /* Radio status indicators */
.radio-status { .radio-status {
display: flex; display: flex;

View File

@@ -140,6 +140,9 @@
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
height: 100%;
display: flex;
flex-direction: column;
} }
.card-header { .card-header {
@@ -205,6 +208,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10px; gap: 10px;
flex: 1;
} }
/* Power Display */ /* Power Display */
@@ -377,6 +381,7 @@
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
gap: 8px; gap: 8px;
flex: 1;
} }
.control-btn { .control-btn {

View File

@@ -163,10 +163,8 @@
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<h2>Ultrabeam VL2.3</h2> <h2>Ultrabeam VL2.3</h2>
<div class="header-right">
<span class="status-dot" class:disconnected={!connected}></span> <span class="status-dot" class:disconnected={!connected}></span>
</div> </div>
</div>
<div class="metrics"> <div class="metrics">
<!-- Current Status --> <!-- Current Status -->
@@ -323,20 +321,24 @@
<style> <style>
.card { .card {
background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%); background: linear-gradient(135deg, #1a2332 0%, #0f1923 100%);
border-radius: 16px; border: 1px solid #2d3748;
padding: 16px; border-radius: 8px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); padding: 0;
border: 1px solid rgba(79, 195, 247, 0.2); overflow: hidden;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
height: 100%;
display: flex;
flex-direction: column;
} }
.card-header { .card-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 24px; padding: 12px 16px;
padding-bottom: 16px; background: rgba(79, 195, 247, 0.05);
border-bottom: 2px solid rgba(79, 195, 247, 0.3); border-bottom: 1px solid #2d3748;
} }
.header-right { .header-right {
@@ -347,12 +349,10 @@
h2 { h2 {
margin: 0; margin: 0;
font-size: 20px; font-size: 14px;
font-weight: 600; font-weight: 600;
background: linear-gradient(135deg, #4fc3f7 0%, #03a9f4 100%); color: #4fc3f7;
-webkit-background-clip: text; letter-spacing: 0.5px;
-webkit-text-fill-color: transparent;
text-shadow: 0 0 20px rgba(79, 195, 247, 0.5);
} }
h3 { h3 {
@@ -386,6 +386,8 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12px; gap: 12px;
padding: 16px;
flex: 1;
} }
/* Status Grid */ /* Status Grid */

View File

@@ -106,6 +106,9 @@
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
height: 100%;
display: flex;
flex-direction: column;
} }
.card-header { .card-header {
@@ -143,6 +146,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12px; gap: 12px;
flex: 1;
} }
/* Relays */ /* Relays */
@@ -253,6 +257,7 @@
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
gap: 8px; gap: 8px;
margin-top: 8px; margin-top: 8px;
flex: 1;
} }
.control-btn { .control-btn {