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