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> {
|
class _StepTransmissionState extends ConsumerState<StepTransmission> {
|
||||||
String _platform = 'matchlivetv';
|
String _platform = 'matchlivetv';
|
||||||
bool _linkOnly = false;
|
String _privacy = 'public';
|
||||||
String? _youtubeChannel;
|
String? _youtubeChannel;
|
||||||
bool _creating = false;
|
bool _creating = false;
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ class _StepTransmissionState extends ConsumerState<StepTransmission> {
|
|||||||
widget.match.id,
|
widget.match.id,
|
||||||
platform: _platform,
|
platform: _platform,
|
||||||
youtubeChannel: _platform == 'youtube' ? _youtubeChannel : null,
|
youtubeChannel: _platform == 'youtube' ? _youtubeChannel : null,
|
||||||
privacyStatus: _linkOnly ? 'unlisted' : 'public',
|
privacyStatus: _privacy,
|
||||||
qualityPreset: '720p_30_2.5mbps',
|
qualityPreset: '720p_30_2.5mbps',
|
||||||
targetBitrate: 2500000,
|
targetBitrate: 2500000,
|
||||||
targetFps: 30,
|
targetFps: 30,
|
||||||
@@ -216,23 +216,32 @@ class _StepTransmissionState extends ConsumerState<StepTransmission> {
|
|||||||
Text('Visibilità', style: theme.textTheme.titleLarge),
|
Text('Visibilità', style: theme.textTheme.titleLarge),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Text(
|
Text(
|
||||||
'Vale per Match Live TV e YouTube (canale nostro o della società). '
|
'Match Live TV e YouTube (canale nostro o società).',
|
||||||
'Di default la diretta è pubblica.',
|
|
||||||
style: theme.textTheme.bodySmall,
|
style: theme.textTheme.bodySmall,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 12),
|
||||||
SwitchListTile(
|
SegmentedButton<String>(
|
||||||
contentPadding: EdgeInsets.zero,
|
segments: const [
|
||||||
value: _linkOnly,
|
ButtonSegment(
|
||||||
onChanged: (v) => setState(() => _linkOnly = v),
|
value: 'public',
|
||||||
title: const Text('Privato / non in elenco'),
|
label: Text('Pubblico'),
|
||||||
subtitle: Text(
|
icon: Icon(Icons.public),
|
||||||
_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.',
|
|
||||||
),
|
),
|
||||||
|
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),
|
||||||
|
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),
|
const SizedBox(height: 24),
|
||||||
Text('Qualità', style: theme.textTheme.titleLarge),
|
Text('Qualità', style: theme.textTheme.titleLarge),
|
||||||
|
|||||||
Reference in New Issue
Block a user