mirror of
https://github.com/immich-app/immich.git
synced 2024-12-25 10:43:13 +02:00
Update some mobile UI with Material 3 theme
This commit is contained in:
parent
2edfc75c8a
commit
c19d26f4f3
@ -95,12 +95,12 @@ class SharingPage extends HookConsumerWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(left: 5.0, bottom: 5),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 5.0, bottom: 5),
|
||||
child: Icon(
|
||||
Icons.offline_share_outlined,
|
||||
size: 50,
|
||||
// color: Theme.of(context).primaryColor,
|
||||
color: Theme.of(context).primaryColor,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
|
@ -1,5 +1,3 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
@ -12,7 +10,7 @@ class TopControlAppBar extends ConsumerWidget with PreferredSizeWidget {
|
||||
required this.onMoreInfoPressed,
|
||||
required this.onDownloadPressed,
|
||||
required this.onSharePressed,
|
||||
this.loading = false
|
||||
this.loading = false,
|
||||
}) : super(key: key);
|
||||
|
||||
final AssetResponseDto asset;
|
||||
@ -26,6 +24,8 @@ class TopControlAppBar extends ConsumerWidget with PreferredSizeWidget {
|
||||
double iconSize = 18.0;
|
||||
|
||||
return AppBar(
|
||||
// iconTheme: IconThemeData(color: Colors.grey[100]),
|
||||
// actionsIconTheme: IconThemeData(color: Colors.grey[100]),
|
||||
foregroundColor: Colors.grey[100],
|
||||
toolbarHeight: 60,
|
||||
backgroundColor: Colors.black,
|
||||
@ -33,37 +33,32 @@ class TopControlAppBar extends ConsumerWidget with PreferredSizeWidget {
|
||||
onPressed: () {
|
||||
AutoRouter.of(context).pop();
|
||||
},
|
||||
icon: const Icon(
|
||||
icon: Icon(
|
||||
Icons.arrow_back_ios_new_rounded,
|
||||
size: 20.0,
|
||||
color: Colors.grey[200],
|
||||
),
|
||||
),
|
||||
actions: [
|
||||
if (loading) Center(
|
||||
child: Container(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 15.0),
|
||||
width: iconSize,
|
||||
height: iconSize,
|
||||
child: const CircularProgressIndicator(strokeWidth: 2.0),
|
||||
if (loading)
|
||||
Center(
|
||||
child: Container(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 15.0),
|
||||
width: iconSize,
|
||||
height: iconSize,
|
||||
child: const CircularProgressIndicator(strokeWidth: 2.0),
|
||||
),
|
||||
),
|
||||
) ,
|
||||
IconButton(
|
||||
iconSize: iconSize,
|
||||
splashRadius: iconSize,
|
||||
onPressed: () {
|
||||
onDownloadPressed();
|
||||
},
|
||||
icon: const Icon(Icons.cloud_download_rounded),
|
||||
),
|
||||
IconButton(
|
||||
iconSize: iconSize,
|
||||
splashRadius: iconSize,
|
||||
onPressed: () {
|
||||
log("favorite");
|
||||
},
|
||||
icon: asset.isFavorite
|
||||
? const Icon(Icons.favorite_rounded)
|
||||
: const Icon(Icons.favorite_border_rounded),
|
||||
icon: Icon(
|
||||
Icons.cloud_download_rounded,
|
||||
color: Colors.grey[200],
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
iconSize: iconSize,
|
||||
@ -71,7 +66,10 @@ class TopControlAppBar extends ConsumerWidget with PreferredSizeWidget {
|
||||
onPressed: () {
|
||||
onSharePressed();
|
||||
},
|
||||
icon: const Icon(Icons.share),
|
||||
icon: Icon(
|
||||
Icons.share,
|
||||
color: Colors.grey[200],
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
iconSize: iconSize,
|
||||
@ -79,7 +77,10 @@ class TopControlAppBar extends ConsumerWidget with PreferredSizeWidget {
|
||||
onPressed: () {
|
||||
onMoreInfoPressed();
|
||||
},
|
||||
icon: const Icon(Icons.more_horiz_rounded),
|
||||
icon: Icon(
|
||||
Icons.more_horiz_rounded,
|
||||
color: Colors.grey[200],
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
|
@ -108,13 +108,21 @@ class CacheSettings extends HookConsumerWidget {
|
||||
).tr(),
|
||||
),
|
||||
cacheStatisticsRow(
|
||||
"cache_settings_statistics_thumbnail".tr(), CacheType.thumbnail),
|
||||
"cache_settings_statistics_thumbnail".tr(),
|
||||
CacheType.thumbnail,
|
||||
),
|
||||
cacheStatisticsRow(
|
||||
"cache_settings_statistics_album".tr(), CacheType.albumThumbnail),
|
||||
cacheStatisticsRow("cache_settings_statistics_shared".tr(),
|
||||
CacheType.sharedAlbumThumbnail),
|
||||
"cache_settings_statistics_album".tr(),
|
||||
CacheType.albumThumbnail,
|
||||
),
|
||||
cacheStatisticsRow(
|
||||
"cache_settings_statistics_full".tr(), CacheType.imageViewerFull),
|
||||
"cache_settings_statistics_shared".tr(),
|
||||
CacheType.sharedAlbumThumbnail,
|
||||
),
|
||||
cacheStatisticsRow(
|
||||
"cache_settings_statistics_full".tr(),
|
||||
CacheType.imageViewerFull,
|
||||
),
|
||||
ListTile(
|
||||
title: const Text(
|
||||
"cache_settings_clear_cache_button_title",
|
||||
@ -126,12 +134,13 @@ class CacheSettings extends HookConsumerWidget {
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
child: TextButton(
|
||||
child: ElevatedButton(
|
||||
onPressed: clearCache,
|
||||
child: Text(
|
||||
child: const Text(
|
||||
"cache_settings_clear_cache_button",
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).primaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 12,
|
||||
),
|
||||
).tr(),
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user