feat(mobile): new mobile UI (#12582)

This commit is contained in:
Alex
2024-10-10 15:44:14 +07:00
committed by GitHub
parent b59abdff3d
commit e9813315e7
56 changed files with 1960 additions and 1274 deletions

View File

@@ -12,12 +12,14 @@ class AlbumThumbnailCard extends StatelessWidget {
/// Whether or not to show the owner of the album (or "Owned")
/// in the subtitle of the album
final bool showOwner;
final bool showTitle;
const AlbumThumbnailCard({
super.key,
required this.album,
this.onTap,
this.showOwner = false,
this.showTitle = true,
});
final Album album;
@@ -76,7 +78,7 @@ class AlbumThumbnailCard extends StatelessWidget {
: 'album_thumbnail_card_items'
.tr(args: ['${album.assetCount}']),
),
if (owner != null) const TextSpan(text: ' · '),
if (owner != null) const TextSpan(text: ' '),
if (owner != null) TextSpan(text: owner),
],
),
@@ -102,21 +104,23 @@ class AlbumThumbnailCard extends StatelessWidget {
: buildAlbumThumbnail(),
),
),
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: SizedBox(
width: cardSize,
child: Text(
album.name,
overflow: TextOverflow.ellipsis,
style: context.textTheme.bodyMedium?.copyWith(
color: context.colorScheme.onSurface,
fontWeight: FontWeight.w500,
if (showTitle) ...[
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: SizedBox(
width: cardSize,
child: Text(
album.name,
overflow: TextOverflow.ellipsis,
style: context.textTheme.titleSmall?.copyWith(
color: context.colorScheme.onSurface,
fontWeight: FontWeight.w500,
),
),
),
),
),
buildAlbumTextRow(),
buildAlbumTextRow(),
],
],
),
),