Billing Stripe, link regia mobile e staff solo trasmissione.
Aggiunge fatturazione club, pagina regia condivisibile senza account, roster squadre e rimuove la modalità controller dall'app (v1.1.0). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -15,6 +15,7 @@ import '../../shared/models/match.dart';
|
||||
import '../../shared/models/score_state.dart';
|
||||
import '../../shared/models/stream_session.dart';
|
||||
import '../../shared/websocket_service.dart';
|
||||
import '../../shared/regia_share.dart';
|
||||
import '../../shared/widgets/metric_card.dart';
|
||||
import '../../shared/widgets/primary_cta.dart';
|
||||
import '../../shared/widgets/screen_insets.dart';
|
||||
@@ -111,29 +112,16 @@ class _StepNetworkTestState extends ConsumerState<StepNetworkTest> {
|
||||
ref.read(scoreProvider.notifier).reset(const ScoreState());
|
||||
}
|
||||
|
||||
final role = sessionState.deviceRole;
|
||||
final path = role == DeviceRole.camera
|
||||
? '/session/${started.id}/camera'
|
||||
: '/session/${started.id}/controller';
|
||||
|
||||
if (!mounted) return;
|
||||
context.go(path);
|
||||
context.go('/session/${started.id}/camera');
|
||||
|
||||
// WebSocket in background: non bloccare apertura camera/regia
|
||||
try {
|
||||
final ws = ref.read(websocketServiceProvider);
|
||||
await ws.connect(
|
||||
sessionId: started.id,
|
||||
deviceRole: role == DeviceRole.camera ? 'camera' : 'controller',
|
||||
);
|
||||
await ws.connect(sessionId: started.id, deviceRole: 'camera');
|
||||
} catch (e) {
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
'Diretta avviata ma sync regia limitata: $e',
|
||||
),
|
||||
),
|
||||
SnackBar(content: Text('Diretta avviata ma sync limitata: $e')),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -262,6 +250,20 @@ class _StepNetworkTestState extends ConsumerState<StepNetworkTest> {
|
||||
style: theme.textTheme.bodyMedium,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
OutlinedButton.icon(
|
||||
onPressed: ref.read(sessionProvider).session == null
|
||||
? null
|
||||
: () => shareRegiaLink(
|
||||
context,
|
||||
ref,
|
||||
sessionId: ref.read(sessionProvider).session!.id,
|
||||
shareSubject:
|
||||
'Regia — ${widget.match.teamName} vs ${widget.match.opponentName}',
|
||||
),
|
||||
icon: const Icon(Icons.share),
|
||||
label: const Text('Condividi link regia (punteggio)'),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
OutlinedButton(
|
||||
onPressed: _testing ? null : _runTest,
|
||||
|
||||
Reference in New Issue
Block a user