Ripristina scelta visibilità con due pulsanti segmentati in app.
Pubblico (default) e privato/non in elenco, stessa logica di prima. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -30,7 +30,7 @@ class StepTransmission extends ConsumerStatefulWidget {
|
||||
|
||||
class _StepTransmissionState extends ConsumerState<StepTransmission> {
|
||||
String _platform = 'matchlivetv';
|
||||
bool _linkOnly = false;
|
||||
String _privacy = 'public';
|
||||
String? _youtubeChannel;
|
||||
bool _creating = false;
|
||||
|
||||
@@ -60,7 +60,7 @@ class _StepTransmissionState extends ConsumerState<StepTransmission> {
|
||||
widget.match.id,
|
||||
platform: _platform,
|
||||
youtubeChannel: _platform == 'youtube' ? _youtubeChannel : null,
|
||||
privacyStatus: _linkOnly ? 'unlisted' : 'public',
|
||||
privacyStatus: _privacy,
|
||||
qualityPreset: '720p_30_2.5mbps',
|
||||
targetBitrate: 2500000,
|
||||
targetFps: 30,
|
||||
@@ -216,23 +216,32 @@ class _StepTransmissionState extends ConsumerState<StepTransmission> {
|
||||
Text('Visibilità', style: theme.textTheme.titleLarge),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'Vale per Match Live TV e YouTube (canale nostro o della società). '
|
||||
'Di default la diretta è pubblica.',
|
||||
'Match Live TV e YouTube (canale nostro o società).',
|
||||
style: theme.textTheme.bodySmall,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
SegmentedButton<String>(
|
||||
segments: const [
|
||||
ButtonSegment(
|
||||
value: 'public',
|
||||
label: Text('Pubblico'),
|
||||
icon: Icon(Icons.public),
|
||||
),
|
||||
ButtonSegment(
|
||||
value: 'unlisted',
|
||||
label: Text('Privato / non in elenco'),
|
||||
icon: Icon(Icons.link),
|
||||
),
|
||||
],
|
||||
selected: {_privacy},
|
||||
onSelectionChanged: (s) => setState(() => _privacy = s.first),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
SwitchListTile(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
value: _linkOnly,
|
||||
onChanged: (v) => setState(() => _linkOnly = v),
|
||||
title: const Text('Privato / non in elenco'),
|
||||
subtitle: Text(
|
||||
_platform == 'matchlivetv'
|
||||
? 'Non compare nell\'elenco dirette del sito. Solo chi ha il link.'
|
||||
: _platform == 'youtube'
|
||||
? 'Non compare su YouTube in ricerca o nel canale. Solo chi ha il link.'
|
||||
: 'Visibile solo a chi ha il link, non in elenco pubblico.',
|
||||
),
|
||||
Text(
|
||||
_privacy == 'public'
|
||||
? 'Compare nell\'elenco dirette e sul canale YouTube scelto.'
|
||||
: 'Solo chi ha il link. Non in elenco pubblico né nelle ricerche.',
|
||||
style: theme.textTheme.bodySmall?.copyWith(color: AppTheme.textSecondary),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Text('Qualità', style: theme.textTheme.titleLarge),
|
||||
|
||||
Reference in New Issue
Block a user