up
This commit is contained in:
87
Makefile
Normal file
87
Makefile
Normal 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
|
||||
1
cmd/server/web/dist/assets/index-B1UmG2DI.css
vendored
Normal file
1
cmd/server/web/dist/assets/index-B1UmG2DI.css
vendored
Normal file
File diff suppressed because one or more lines are too long
11
cmd/server/web/dist/assets/index-C9xq6o2j.js
vendored
Normal file
11
cmd/server/web/dist/assets/index-C9xq6o2j.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
cmd/server/web/dist/assets/index-CQokRXS2.css
vendored
Normal file
1
cmd/server/web/dist/assets/index-CQokRXS2.css
vendored
Normal file
File diff suppressed because one or more lines are too long
11
cmd/server/web/dist/assets/index-CZJHCP4k.js
vendored
Normal file
11
cmd/server/web/dist/assets/index-CZJHCP4k.js
vendored
Normal file
File diff suppressed because one or more lines are too long
11
cmd/server/web/dist/assets/index-Ci4y1GIJ.js
vendored
Normal file
11
cmd/server/web/dist/assets/index-Ci4y1GIJ.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
cmd/server/web/dist/assets/index-DhJaCyoq.css
vendored
Normal file
1
cmd/server/web/dist/assets/index-DhJaCyoq.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
cmd/server/web/dist/assets/index-bMbhvRow.css
vendored
Normal file
1
cmd/server/web/dist/assets/index-bMbhvRow.css
vendored
Normal file
File diff suppressed because one or more lines are too long
11
cmd/server/web/dist/assets/index-iLwnoiIw.js
vendored
Normal file
11
cmd/server/web/dist/assets/index-iLwnoiIw.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
cmd/server/web/dist/index.html
vendored
4
cmd/server/web/dist/index.html
vendored
@@ -7,8 +7,8 @@
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<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">
|
||||
<script type="module" crossorigin src="/assets/index-Drom3Zfz.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-pnuRxXpy.css">
|
||||
<script type="module" crossorigin src="/assets/index-Ci4y1GIJ.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-B1UmG2DI.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -282,6 +282,7 @@
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
flex-wrap: wrap;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.row > :global(*) {
|
||||
|
||||
@@ -148,6 +148,9 @@
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
@@ -185,6 +188,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* Sources */
|
||||
|
||||
@@ -151,6 +151,9 @@
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
@@ -222,6 +225,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* Power Display */
|
||||
|
||||
@@ -368,6 +368,9 @@
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
@@ -405,6 +408,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.heading-controls-row {
|
||||
|
||||
@@ -508,11 +508,6 @@
|
||||
50% { opacity: 0.6; }
|
||||
}
|
||||
|
||||
.slice-waiting {
|
||||
color: #fbbf24; /* Jaune pour "en attente" */
|
||||
animation: pulse 1.5s infinite;
|
||||
}
|
||||
|
||||
/* Radio status indicators */
|
||||
.radio-status {
|
||||
display: flex;
|
||||
|
||||
@@ -140,6 +140,9 @@
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
@@ -205,6 +208,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* Power Display */
|
||||
@@ -377,6 +381,7 @@
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 8px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.control-btn {
|
||||
|
||||
@@ -163,10 +163,8 @@
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Ultrabeam VL2.3</h2>
|
||||
<div class="header-right">
|
||||
<span class="status-dot" class:disconnected={!connected}></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="metrics">
|
||||
<!-- Current Status -->
|
||||
@@ -323,20 +321,24 @@
|
||||
|
||||
<style>
|
||||
.card {
|
||||
background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
|
||||
border-radius: 16px;
|
||||
padding: 16px;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
||||
border: 1px solid rgba(79, 195, 247, 0.2);
|
||||
background: linear-gradient(135deg, #1a2332 0%, #0f1923 100%);
|
||||
border: 1px solid #2d3748;
|
||||
border-radius: 8px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 24px;
|
||||
padding-bottom: 16px;
|
||||
border-bottom: 2px solid rgba(79, 195, 247, 0.3);
|
||||
padding: 12px 16px;
|
||||
background: rgba(79, 195, 247, 0.05);
|
||||
border-bottom: 1px solid #2d3748;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
@@ -347,12 +349,10 @@
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
font-size: 20px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
background: linear-gradient(135deg, #4fc3f7 0%, #03a9f4 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
text-shadow: 0 0 20px rgba(79, 195, 247, 0.5);
|
||||
color: #4fc3f7;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
@@ -386,6 +386,8 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding: 16px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* Status Grid */
|
||||
|
||||
@@ -106,6 +106,9 @@
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
@@ -143,6 +146,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* Relays */
|
||||
@@ -253,6 +257,7 @@
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 8px;
|
||||
margin-top: 8px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.control-btn {
|
||||
|
||||
Reference in New Issue
Block a user