updates
This commit is contained in:
parent
fc22d11df1
commit
27a8a62475
32 changed files with 354 additions and 335 deletions
|
|
@ -29,7 +29,7 @@ class DownloadsScreen extends ConsumerWidget {
|
|||
TextButton(
|
||||
onPressed: () => _confirmClear(context, controller),
|
||||
child: const Text('Clear all',
|
||||
style: TextStyle(color: RatuneColors.dimmed)),
|
||||
style: TextStyle(color: TimbreColors.dimmed)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -37,24 +37,24 @@ class DownloadsScreen extends ConsumerWidget {
|
|||
child: (active.isEmpty && completed.isEmpty)
|
||||
? const Center(
|
||||
child: Text('No downloads yet.',
|
||||
style: TextStyle(color: RatuneColors.dimmed)),
|
||||
style: TextStyle(color: TimbreColors.dimmed)),
|
||||
)
|
||||
: ListView(
|
||||
padding: const EdgeInsets.all(RatuneSpacing.lg),
|
||||
padding: const EdgeInsets.all(TimbreSpacing.lg),
|
||||
children: [
|
||||
if (active.isNotEmpty) ...[
|
||||
HairlinePanel(
|
||||
title: 'Downloading',
|
||||
trailing: '(${active.length})',
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: RatuneSpacing.md),
|
||||
vertical: TimbreSpacing.md),
|
||||
child: Column(
|
||||
children: [
|
||||
for (final d in active) _ActiveRow(info: d),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: RatuneSpacing.xl),
|
||||
const SizedBox(height: TimbreSpacing.xl),
|
||||
],
|
||||
HairlinePanel(
|
||||
title: 'Saved',
|
||||
|
|
@ -63,12 +63,12 @@ class DownloadsScreen extends ConsumerWidget {
|
|||
? null
|
||||
: '${completed.length} · ${_fmtBytes(downloads.totalBytes)}',
|
||||
padding:
|
||||
const EdgeInsets.symmetric(vertical: RatuneSpacing.md),
|
||||
const EdgeInsets.symmetric(vertical: TimbreSpacing.md),
|
||||
child: completed.isEmpty
|
||||
? const Padding(
|
||||
padding: EdgeInsets.all(RatuneSpacing.lg),
|
||||
padding: EdgeInsets.all(TimbreSpacing.lg),
|
||||
child: Text('Nothing saved for offline yet.',
|
||||
style: TextStyle(color: RatuneColors.dimmed)),
|
||||
style: TextStyle(color: TimbreColors.dimmed)),
|
||||
)
|
||||
: Column(
|
||||
children: [
|
||||
|
|
@ -93,7 +93,7 @@ class DownloadsScreen extends ConsumerWidget {
|
|||
final ok = await showDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: RatuneColors.surface,
|
||||
backgroundColor: TimbreColors.surface,
|
||||
title: const Text('Remove all downloads?'),
|
||||
content: const Text(
|
||||
'This deletes every saved file for this server. It cannot be undone.'),
|
||||
|
|
@ -121,7 +121,7 @@ class _ActiveRow extends StatelessWidget {
|
|||
final failed = info.status == DownloadStatus.failed;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: RatuneSpacing.lg, vertical: RatuneSpacing.xs),
|
||||
horizontal: TimbreSpacing.lg, vertical: TimbreSpacing.xs),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
|
|
@ -131,8 +131,8 @@ class _ActiveRow extends StatelessWidget {
|
|||
Text(info.song.title ?? 'Untitled',
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(color: RatuneColors.foreground)),
|
||||
const SizedBox(height: RatuneSpacing.xs),
|
||||
style: const TextStyle(color: TimbreColors.foreground)),
|
||||
const SizedBox(height: TimbreSpacing.xs),
|
||||
if (failed)
|
||||
const Text('Failed',
|
||||
style: TextStyle(color: Color(0xFFE06C75), fontSize: 12))
|
||||
|
|
@ -140,18 +140,18 @@ class _ActiveRow extends StatelessWidget {
|
|||
LinearProgressIndicator(
|
||||
value: info.progress > 0 ? info.progress : null,
|
||||
minHeight: 3,
|
||||
backgroundColor: RatuneColors.border,
|
||||
backgroundColor: TimbreColors.border,
|
||||
color: accent,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: RatuneSpacing.md),
|
||||
const SizedBox(width: TimbreSpacing.md),
|
||||
Text(
|
||||
failed
|
||||
? '—'
|
||||
: (info.status == DownloadStatus.queued ? 'Queued' : ''),
|
||||
style: const TextStyle(color: RatuneColors.dimmed, fontSize: 12),
|
||||
style: const TextStyle(color: TimbreColors.dimmed, fontSize: 12),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -178,8 +178,8 @@ class _SavedRow extends StatelessWidget {
|
|||
onTap: onPlay,
|
||||
child: Container(
|
||||
constraints:
|
||||
const BoxConstraints(minHeight: RatuneSpacing.minTouchTarget),
|
||||
padding: const EdgeInsets.only(left: RatuneSpacing.lg),
|
||||
const BoxConstraints(minHeight: TimbreSpacing.minTouchTarget),
|
||||
padding: const EdgeInsets.only(left: TimbreSpacing.lg),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
|
|
@ -190,7 +190,7 @@ class _SavedRow extends StatelessWidget {
|
|||
Text(info.song.title ?? 'Untitled',
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(color: RatuneColors.foreground)),
|
||||
style: const TextStyle(color: TimbreColors.foreground)),
|
||||
Text(
|
||||
[
|
||||
info.song.artist,
|
||||
|
|
@ -199,7 +199,7 @@ class _SavedRow extends StatelessWidget {
|
|||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style:
|
||||
const TextStyle(color: RatuneColors.dimmed, fontSize: 12),
|
||||
const TextStyle(color: TimbreColors.dimmed, fontSize: 12),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -208,10 +208,10 @@ class _SavedRow extends StatelessWidget {
|
|||
onTap: onRemove,
|
||||
customBorder: const CircleBorder(),
|
||||
child: const SizedBox(
|
||||
width: RatuneSpacing.minTouchTarget,
|
||||
height: RatuneSpacing.minTouchTarget,
|
||||
width: TimbreSpacing.minTouchTarget,
|
||||
height: TimbreSpacing.minTouchTarget,
|
||||
child: Icon(Icons.delete_outline,
|
||||
size: 20, color: RatuneColors.dimmed),
|
||||
size: 20, color: TimbreColors.dimmed),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue