mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	fixed delete dialog colors
This commit is contained in:
		
							parent
							
								
									edd1f49e57
								
							
						
					
					
						commit
						0f51a9794e
					
				@ -7,7 +7,6 @@ import 'package:flutter/services.dart';
 | 
				
			|||||||
import 'package:flutter_displaymode/flutter_displaymode.dart';
 | 
					import 'package:flutter_displaymode/flutter_displaymode.dart';
 | 
				
			||||||
import 'package:hive_flutter/hive_flutter.dart';
 | 
					import 'package:hive_flutter/hive_flutter.dart';
 | 
				
			||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
 | 
					import 'package:hooks_riverpod/hooks_riverpod.dart';
 | 
				
			||||||
import 'package:immich_mobile/constants/immich_colors.dart';
 | 
					 | 
				
			||||||
import 'package:immich_mobile/constants/locales.dart';
 | 
					import 'package:immich_mobile/constants/locales.dart';
 | 
				
			||||||
import 'package:immich_mobile/modules/backup/background_service/background.service.dart';
 | 
					import 'package:immich_mobile/modules/backup/background_service/background.service.dart';
 | 
				
			||||||
import 'package:immich_mobile/modules/backup/models/hive_backup_albums.model.dart';
 | 
					import 'package:immich_mobile/modules/backup/models/hive_backup_albums.model.dart';
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,6 @@ import 'package:easy_localization/easy_localization.dart';
 | 
				
			|||||||
import 'package:flutter/material.dart';
 | 
					import 'package:flutter/material.dart';
 | 
				
			||||||
import 'package:fluttertoast/fluttertoast.dart';
 | 
					import 'package:fluttertoast/fluttertoast.dart';
 | 
				
			||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
 | 
					import 'package:hooks_riverpod/hooks_riverpod.dart';
 | 
				
			||||||
import 'package:immich_mobile/constants/immich_colors.dart';
 | 
					 | 
				
			||||||
import 'package:immich_mobile/modules/album/providers/album.provider.dart';
 | 
					import 'package:immich_mobile/modules/album/providers/album.provider.dart';
 | 
				
			||||||
import 'package:immich_mobile/modules/album/providers/album_viewer.provider.dart';
 | 
					import 'package:immich_mobile/modules/album/providers/album_viewer.provider.dart';
 | 
				
			||||||
import 'package:immich_mobile/modules/album/providers/asset_selection.provider.dart';
 | 
					import 'package:immich_mobile/modules/album/providers/asset_selection.provider.dart';
 | 
				
			||||||
 | 
				
			|||||||
@ -151,7 +151,7 @@ class SelectUserForSharingPage extends HookConsumerWidget {
 | 
				
			|||||||
        actions: [
 | 
					        actions: [
 | 
				
			||||||
          TextButton(
 | 
					          TextButton(
 | 
				
			||||||
            style: TextButton.styleFrom(
 | 
					            style: TextButton.styleFrom(
 | 
				
			||||||
              primary: Theme.of(context).primaryColor,
 | 
					              foregroundColor: Theme.of(context).primaryColor,
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
            onPressed:
 | 
					            onPressed:
 | 
				
			||||||
                sharedUsersList.value.isEmpty ? null : _createSharedAlbum,
 | 
					                sharedUsersList.value.isEmpty ? null : _createSharedAlbum,
 | 
				
			||||||
 | 
				
			|||||||
@ -21,7 +21,9 @@ Future<bool> loadTranslations() async {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  await controller.loadTranslations();
 | 
					  await controller.loadTranslations();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return Localization.load(controller.locale,
 | 
					  return Localization.load(
 | 
				
			||||||
      translations: controller.translations,
 | 
					    controller.locale,
 | 
				
			||||||
      fallbackTranslations: controller.fallbackTranslations);
 | 
					    translations: controller.translations,
 | 
				
			||||||
 | 
					    fallbackTranslations: controller.fallbackTranslations,
 | 
				
			||||||
 | 
					  );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -16,8 +16,8 @@ class AlbumPreviewPage extends HookConsumerWidget {
 | 
				
			|||||||
    final assets = useState<List<AssetEntity>>([]);
 | 
					    final assets = useState<List<AssetEntity>>([]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    _getAssetsInAlbum() async {
 | 
					    _getAssetsInAlbum() async {
 | 
				
			||||||
      assets.value =
 | 
					      assets.value = await album.getAssetListRange(
 | 
				
			||||||
          await album.getAssetListRange(start: 0, end: album.assetCount);
 | 
					          start: 0, end: await album.assetCountAsync);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    useEffect(
 | 
					    useEffect(
 | 
				
			||||||
@ -34,7 +34,7 @@ class AlbumPreviewPage extends HookConsumerWidget {
 | 
				
			|||||||
        title: Column(
 | 
					        title: Column(
 | 
				
			||||||
          children: [
 | 
					          children: [
 | 
				
			||||||
            Text(
 | 
					            Text(
 | 
				
			||||||
              "${album.name} (${album.assetCount})",
 | 
					              "${album.name} (${album.assetCountAsync})",
 | 
				
			||||||
              style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
 | 
					              style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
            Padding(
 | 
					            Padding(
 | 
				
			||||||
 | 
				
			|||||||
@ -158,7 +158,6 @@ class BackupControllerPage extends HookConsumerWidget {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void _showBatteryOptimizationInfoToUser() {
 | 
					    void _showBatteryOptimizationInfoToUser() {
 | 
				
			||||||
      final buttonTextColor = Theme.of(context).primaryColor;
 | 
					 | 
				
			||||||
      showDialog<void>(
 | 
					      showDialog<void>(
 | 
				
			||||||
        context: context,
 | 
					        context: context,
 | 
				
			||||||
        barrierDismissible: false,
 | 
					        barrierDismissible: false,
 | 
				
			||||||
@ -173,13 +172,14 @@ class BackupControllerPage extends HookConsumerWidget {
 | 
				
			|||||||
              ).tr(),
 | 
					              ).tr(),
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
            actions: [
 | 
					            actions: [
 | 
				
			||||||
              OutlinedButton(
 | 
					              ElevatedButton(
 | 
				
			||||||
                onPressed: () => launchUrl(
 | 
					                onPressed: () => launchUrl(
 | 
				
			||||||
                  Uri.parse('https://dontkillmyapp.com'),
 | 
					                  Uri.parse('https://dontkillmyapp.com'),
 | 
				
			||||||
                  mode: LaunchMode.externalApplication,
 | 
					                  mode: LaunchMode.externalApplication,
 | 
				
			||||||
                ),
 | 
					                ),
 | 
				
			||||||
                child: const Text(
 | 
					                child: const Text(
 | 
				
			||||||
                  "backup_controller_page_background_battery_info_link",
 | 
					                  "backup_controller_page_background_battery_info_link",
 | 
				
			||||||
 | 
					                  style: TextStyle(fontWeight: FontWeight.bold, fontSize: 12),
 | 
				
			||||||
                ).tr(),
 | 
					                ).tr(),
 | 
				
			||||||
              ),
 | 
					              ),
 | 
				
			||||||
              ElevatedButton(
 | 
					              ElevatedButton(
 | 
				
			||||||
@ -220,7 +220,12 @@ class BackupControllerPage extends HookConsumerWidget {
 | 
				
			|||||||
          crossAxisAlignment: CrossAxisAlignment.start,
 | 
					          crossAxisAlignment: CrossAxisAlignment.start,
 | 
				
			||||||
          children: [
 | 
					          children: [
 | 
				
			||||||
            if (!isBackgroundEnabled)
 | 
					            if (!isBackgroundEnabled)
 | 
				
			||||||
              const Text("backup_controller_page_background_description").tr(),
 | 
					              Padding(
 | 
				
			||||||
 | 
					                padding: const EdgeInsets.symmetric(vertical: 8.0),
 | 
				
			||||||
 | 
					                child:
 | 
				
			||||||
 | 
					                    const Text("backup_controller_page_background_description")
 | 
				
			||||||
 | 
					                        .tr(),
 | 
				
			||||||
 | 
					              ),
 | 
				
			||||||
            if (isBackgroundEnabled)
 | 
					            if (isBackgroundEnabled)
 | 
				
			||||||
              SwitchListTile(
 | 
					              SwitchListTile(
 | 
				
			||||||
                title:
 | 
					                title:
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,3 @@
 | 
				
			|||||||
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';
 | 
				
			||||||
import 'package:immich_mobile/modules/home/models/home_page_state.model.dart';
 | 
					import 'package:immich_mobile/modules/home/models/home_page_state.model.dart';
 | 
				
			||||||
@ -7,7 +6,6 @@ import 'package:immich_mobile/shared/ui/share_dialog.dart';
 | 
				
			|||||||
import 'package:openapi/api.dart';
 | 
					import 'package:openapi/api.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class HomePageStateNotifier extends StateNotifier<HomePageState> {
 | 
					class HomePageStateNotifier extends StateNotifier<HomePageState> {
 | 
				
			||||||
 | 
					 | 
				
			||||||
  final ShareService _shareService;
 | 
					  final ShareService _shareService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  HomePageStateNotifier(this._shareService)
 | 
					  HomePageStateNotifier(this._shareService)
 | 
				
			||||||
 | 
				
			|||||||
@ -1,10 +1,6 @@
 | 
				
			|||||||
import 'dart:math';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:collection/collection.dart';
 | 
					import 'package:collection/collection.dart';
 | 
				
			||||||
import 'package:easy_localization/easy_localization.dart';
 | 
					import 'package:easy_localization/easy_localization.dart';
 | 
				
			||||||
import 'package:flutter/cupertino.dart';
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					import 'package:flutter/material.dart';
 | 
				
			||||||
import 'package:flutter/src/widgets/framework.dart';
 | 
					 | 
				
			||||||
import 'package:flutter_hooks/flutter_hooks.dart';
 | 
					import 'package:flutter_hooks/flutter_hooks.dart';
 | 
				
			||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
 | 
					import 'package:hooks_riverpod/hooks_riverpod.dart';
 | 
				
			||||||
import 'package:immich_mobile/modules/home/providers/home_page_render_list_provider.dart';
 | 
					import 'package:immich_mobile/modules/home/providers/home_page_render_list_provider.dart';
 | 
				
			||||||
@ -52,7 +48,9 @@ class ImmichAssetGrid extends HookConsumerWidget {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Widget _buildThumbnailOrPlaceholder(
 | 
					  Widget _buildThumbnailOrPlaceholder(
 | 
				
			||||||
      AssetResponseDto asset, bool placeholder) {
 | 
					    AssetResponseDto asset,
 | 
				
			||||||
 | 
					    bool placeholder,
 | 
				
			||||||
 | 
					  ) {
 | 
				
			||||||
    if (placeholder) {
 | 
					    if (placeholder) {
 | 
				
			||||||
      return const DecoratedBox(
 | 
					      return const DecoratedBox(
 | 
				
			||||||
        decoration: BoxDecoration(color: Colors.grey),
 | 
					        decoration: BoxDecoration(color: Colors.grey),
 | 
				
			||||||
@ -67,7 +65,10 @@ class ImmichAssetGrid extends HookConsumerWidget {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Widget _buildAssetRow(
 | 
					  Widget _buildAssetRow(
 | 
				
			||||||
      BuildContext context, RenderAssetGridRow row, bool scrolling) {
 | 
					    BuildContext context,
 | 
				
			||||||
 | 
					    RenderAssetGridRow row,
 | 
				
			||||||
 | 
					    bool scrolling,
 | 
				
			||||||
 | 
					  ) {
 | 
				
			||||||
    double size = _getItemSize(context);
 | 
					    double size = _getItemSize(context);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return Row(
 | 
					    return Row(
 | 
				
			||||||
@ -87,7 +88,10 @@ class ImmichAssetGrid extends HookConsumerWidget {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Widget _buildTitle(
 | 
					  Widget _buildTitle(
 | 
				
			||||||
      BuildContext context, String title, List<AssetResponseDto> assets) {
 | 
					    BuildContext context,
 | 
				
			||||||
 | 
					    String title,
 | 
				
			||||||
 | 
					    List<AssetResponseDto> assets,
 | 
				
			||||||
 | 
					  ) {
 | 
				
			||||||
    return DailyTitleText(
 | 
					    return DailyTitleText(
 | 
				
			||||||
      isoDate: title,
 | 
					      isoDate: title,
 | 
				
			||||||
      assetGroup: assets,
 | 
					      assetGroup: assets,
 | 
				
			||||||
@ -128,7 +132,8 @@ class ImmichAssetGrid extends HookConsumerWidget {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  Text _labelBuilder(int pos) {
 | 
					  Text _labelBuilder(int pos) {
 | 
				
			||||||
    final date = renderList[pos].date;
 | 
					    final date = renderList[pos].date;
 | 
				
			||||||
    return Text(DateFormat.yMMMd().format(date),
 | 
					    return Text(
 | 
				
			||||||
 | 
					      DateFormat.yMMMd().format(date),
 | 
				
			||||||
      style: const TextStyle(
 | 
					      style: const TextStyle(
 | 
				
			||||||
        color: Colors.white,
 | 
					        color: Colors.white,
 | 
				
			||||||
        fontWeight: FontWeight.bold,
 | 
					        fontWeight: FontWeight.bold,
 | 
				
			||||||
@ -149,19 +154,20 @@ class ImmichAssetGrid extends HookConsumerWidget {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return DraggableScrollbar.semicircle(
 | 
					    return DraggableScrollbar.semicircle(
 | 
				
			||||||
        scrollStateListener: dragScrolling,
 | 
					      scrollStateListener: dragScrolling,
 | 
				
			||||||
 | 
					      itemPositionsListener: _itemPositionsListener,
 | 
				
			||||||
 | 
					      controller: _itemScrollController,
 | 
				
			||||||
 | 
					      backgroundColor: Theme.of(context).hintColor,
 | 
				
			||||||
 | 
					      labelTextBuilder: _labelBuilder,
 | 
				
			||||||
 | 
					      labelConstraints: const BoxConstraints(maxHeight: 28),
 | 
				
			||||||
 | 
					      scrollbarAnimationDuration: const Duration(seconds: 1),
 | 
				
			||||||
 | 
					      scrollbarTimeToFade: const Duration(seconds: 4),
 | 
				
			||||||
 | 
					      child: ScrollablePositionedList.builder(
 | 
				
			||||||
 | 
					        itemBuilder: itemBuilder,
 | 
				
			||||||
        itemPositionsListener: _itemPositionsListener,
 | 
					        itemPositionsListener: _itemPositionsListener,
 | 
				
			||||||
        controller: _itemScrollController,
 | 
					        itemScrollController: _itemScrollController,
 | 
				
			||||||
        backgroundColor: Theme.of(context).hintColor,
 | 
					        itemCount: renderList.length,
 | 
				
			||||||
        labelTextBuilder: _labelBuilder,
 | 
					      ),
 | 
				
			||||||
        labelConstraints: const BoxConstraints(maxHeight: 28),
 | 
					    );
 | 
				
			||||||
        scrollbarAnimationDuration: const Duration(seconds: 1),
 | 
					 | 
				
			||||||
        scrollbarTimeToFade: const Duration(seconds: 4),
 | 
					 | 
				
			||||||
        child: ScrollablePositionedList.builder(
 | 
					 | 
				
			||||||
          itemBuilder: itemBuilder,
 | 
					 | 
				
			||||||
          itemPositionsListener: _itemPositionsListener,
 | 
					 | 
				
			||||||
          itemScrollController: _itemScrollController,
 | 
					 | 
				
			||||||
          itemCount: renderList.length,
 | 
					 | 
				
			||||||
        ));
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -12,7 +12,7 @@ class DeleteDialog extends ConsumerWidget {
 | 
				
			|||||||
    final homePageState = ref.watch(homePageStateProvider);
 | 
					    final homePageState = ref.watch(homePageStateProvider);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return AlertDialog(
 | 
					    return AlertDialog(
 | 
				
			||||||
      backgroundColor: Colors.grey[200],
 | 
					      // backgroundColor: Colors.grey[200],
 | 
				
			||||||
      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
 | 
					      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
 | 
				
			||||||
      title: const Text("delete_dialog_title").tr(),
 | 
					      title: const Text("delete_dialog_title").tr(),
 | 
				
			||||||
      content: const Text("delete_dialog_alert").tr(),
 | 
					      content: const Text("delete_dialog_alert").tr(),
 | 
				
			||||||
@ -21,9 +21,12 @@ class DeleteDialog extends ConsumerWidget {
 | 
				
			|||||||
          onPressed: () {
 | 
					          onPressed: () {
 | 
				
			||||||
            Navigator.of(context).pop();
 | 
					            Navigator.of(context).pop();
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          child: const Text(
 | 
					          child: Text(
 | 
				
			||||||
            "delete_dialog_cancel",
 | 
					            "delete_dialog_cancel",
 | 
				
			||||||
            style: TextStyle(color: Colors.blueGrey),
 | 
					            style: TextStyle(
 | 
				
			||||||
 | 
					              color: Theme.of(context).primaryColor,
 | 
				
			||||||
 | 
					              fontWeight: FontWeight.bold,
 | 
				
			||||||
 | 
					            ),
 | 
				
			||||||
          ).tr(),
 | 
					          ).tr(),
 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
        TextButton(
 | 
					        TextButton(
 | 
				
			||||||
@ -37,7 +40,10 @@ class DeleteDialog extends ConsumerWidget {
 | 
				
			|||||||
          },
 | 
					          },
 | 
				
			||||||
          child: Text(
 | 
					          child: Text(
 | 
				
			||||||
            "delete_dialog_ok",
 | 
					            "delete_dialog_ok",
 | 
				
			||||||
            style: TextStyle(color: Colors.red[400]),
 | 
					            style: TextStyle(
 | 
				
			||||||
 | 
					              color: Colors.red[400],
 | 
				
			||||||
 | 
					              fontWeight: FontWeight.bold,
 | 
				
			||||||
 | 
					            ),
 | 
				
			||||||
          ).tr(),
 | 
					          ).tr(),
 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
 | 
				
			|||||||
@ -30,7 +30,6 @@ class ImageGrid extends ConsumerWidget {
 | 
				
			|||||||
      ),
 | 
					      ),
 | 
				
			||||||
      delegate: SliverChildBuilderDelegate(
 | 
					      delegate: SliverChildBuilderDelegate(
 | 
				
			||||||
        (BuildContext context, int index) {
 | 
					        (BuildContext context, int index) {
 | 
				
			||||||
          var assetType = assetGroup[index].type;
 | 
					 | 
				
			||||||
          return GestureDetector(
 | 
					          return GestureDetector(
 | 
				
			||||||
            onTap: () {},
 | 
					            onTap: () {},
 | 
				
			||||||
            child: ThumbnailImage(
 | 
					            child: ThumbnailImage(
 | 
				
			||||||
 | 
				
			|||||||
@ -142,8 +142,8 @@ class ChangePasswordButton extends ConsumerWidget {
 | 
				
			|||||||
    return ElevatedButton(
 | 
					    return ElevatedButton(
 | 
				
			||||||
      style: ElevatedButton.styleFrom(
 | 
					      style: ElevatedButton.styleFrom(
 | 
				
			||||||
        visualDensity: VisualDensity.standard,
 | 
					        visualDensity: VisualDensity.standard,
 | 
				
			||||||
        primary: Theme.of(context).primaryColor,
 | 
					        backgroundColor: Theme.of(context).primaryColor,
 | 
				
			||||||
        onPrimary: Colors.grey[50],
 | 
					        foregroundColor: Colors.grey[50],
 | 
				
			||||||
        elevation: 2,
 | 
					        elevation: 2,
 | 
				
			||||||
        padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 25),
 | 
					        padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 25),
 | 
				
			||||||
      ),
 | 
					      ),
 | 
				
			||||||
 | 
				
			|||||||
@ -203,8 +203,8 @@ class LoginButton extends ConsumerWidget {
 | 
				
			|||||||
    return ElevatedButton(
 | 
					    return ElevatedButton(
 | 
				
			||||||
      style: ElevatedButton.styleFrom(
 | 
					      style: ElevatedButton.styleFrom(
 | 
				
			||||||
        visualDensity: VisualDensity.standard,
 | 
					        visualDensity: VisualDensity.standard,
 | 
				
			||||||
        primary: Theme.of(context).primaryColor,
 | 
					        backgroundColor: Theme.of(context).primaryColor,
 | 
				
			||||||
        onPrimary: Colors.grey[50],
 | 
					        foregroundColor: Colors.grey[50],
 | 
				
			||||||
        elevation: 2,
 | 
					        elevation: 2,
 | 
				
			||||||
        padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 25),
 | 
					        padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 25),
 | 
				
			||||||
      ),
 | 
					      ),
 | 
				
			||||||
 | 
				
			|||||||
@ -103,8 +103,8 @@ class VersionAnnouncementOverlay extends HookConsumerWidget {
 | 
				
			|||||||
                                style: ElevatedButton.styleFrom(
 | 
					                                style: ElevatedButton.styleFrom(
 | 
				
			||||||
                                  shape: const StadiumBorder(),
 | 
					                                  shape: const StadiumBorder(),
 | 
				
			||||||
                                  visualDensity: VisualDensity.standard,
 | 
					                                  visualDensity: VisualDensity.standard,
 | 
				
			||||||
                                  primary: Colors.indigo,
 | 
					                                  backgroundColor: Colors.indigo,
 | 
				
			||||||
                                  onPrimary: Colors.grey[50],
 | 
					                                  foregroundColor: Colors.grey[50],
 | 
				
			||||||
                                  elevation: 2,
 | 
					                                  elevation: 2,
 | 
				
			||||||
                                  padding: const EdgeInsets.symmetric(
 | 
					                                  padding: const EdgeInsets.symmetric(
 | 
				
			||||||
                                    vertical: 10,
 | 
					                                    vertical: 10,
 | 
				
			||||||
 | 
				
			|||||||
@ -25,9 +25,11 @@ String getImageUrl(final AssetResponseDto asset) {
 | 
				
			|||||||
  return '${box.get(serverEndpointKey)}/asset/file?aid=${asset.deviceAssetId}&did=${asset.deviceId}&isThumb=false';
 | 
					  return '${box.get(serverEndpointKey)}/asset/file?aid=${asset.deviceAssetId}&did=${asset.deviceId}&isThumb=false';
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
String _getThumbnailUrl(final String id,
 | 
					String _getThumbnailUrl(
 | 
				
			||||||
    {ThumbnailFormat type = ThumbnailFormat.WEBP}) {
 | 
					  final String id, {
 | 
				
			||||||
 | 
					  ThumbnailFormat type = ThumbnailFormat.WEBP,
 | 
				
			||||||
 | 
					}) {
 | 
				
			||||||
  final box = Hive.box(userInfoBox);
 | 
					  final box = Hive.box(userInfoBox);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return '${box.get(serverEndpointKey)}/asset/thumbnail/${id}?format=${type.value}';
 | 
					  return '${box.get(serverEndpointKey)}/asset/thumbnail/$id?format=${type.value}';
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -72,8 +72,8 @@ ThemeData immichDarkTheme = ThemeData(
 | 
				
			|||||||
  cardColor: Colors.grey[900],
 | 
					  cardColor: Colors.grey[900],
 | 
				
			||||||
  elevatedButtonTheme: ElevatedButtonThemeData(
 | 
					  elevatedButtonTheme: ElevatedButtonThemeData(
 | 
				
			||||||
    style: ElevatedButton.styleFrom(
 | 
					    style: ElevatedButton.styleFrom(
 | 
				
			||||||
      onPrimary: Colors.black87,
 | 
					      foregroundColor: Colors.black87,
 | 
				
			||||||
      primary: immichDarkThemePrimaryColor,
 | 
					      backgroundColor: immichDarkThemePrimaryColor,
 | 
				
			||||||
    ),
 | 
					    ),
 | 
				
			||||||
  ),
 | 
					  ),
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
@ -126,8 +126,8 @@ ThemeData immichLightTheme = ThemeData(
 | 
				
			|||||||
  ),
 | 
					  ),
 | 
				
			||||||
  elevatedButtonTheme: ElevatedButtonThemeData(
 | 
					  elevatedButtonTheme: ElevatedButtonThemeData(
 | 
				
			||||||
    style: ElevatedButton.styleFrom(
 | 
					    style: ElevatedButton.styleFrom(
 | 
				
			||||||
      primary: Colors.indigo,
 | 
					      backgroundColor: Colors.indigo,
 | 
				
			||||||
      onPrimary: Colors.white,
 | 
					      foregroundColor: Colors.white,
 | 
				
			||||||
    ),
 | 
					    ),
 | 
				
			||||||
  ),
 | 
					  ),
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
 | 
				
			|||||||
@ -112,8 +112,10 @@ class ImmichCacheInfoRepository extends ImmichCacheRepository {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  Future<CacheObject> insert(CacheObject cacheObject,
 | 
					  Future<CacheObject> insert(
 | 
				
			||||||
      {bool setTouchedToNow = true}) async {
 | 
					    CacheObject cacheObject, {
 | 
				
			||||||
 | 
					    bool setTouchedToNow = true,
 | 
				
			||||||
 | 
					  }) async {
 | 
				
			||||||
    int newId = keyLookupHiveBox.length == 0
 | 
					    int newId = keyLookupHiveBox.length == 0
 | 
				
			||||||
        ? 0
 | 
					        ? 0
 | 
				
			||||||
        : keyLookupHiveBox.values.reduce(max) + 1;
 | 
					        : keyLookupHiveBox.values.reduce(max) + 1;
 | 
				
			||||||
@ -144,8 +146,10 @@ class ImmichCacheInfoRepository extends ImmichCacheRepository {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  Future<int> update(CacheObject cacheObject,
 | 
					  Future<int> update(
 | 
				
			||||||
      {bool setTouchedToNow = true}) async {
 | 
					    CacheObject cacheObject, {
 | 
				
			||||||
 | 
					    bool setTouchedToNow = true,
 | 
				
			||||||
 | 
					  }) async {
 | 
				
			||||||
    if (cacheObject.id != null) {
 | 
					    if (cacheObject.id != null) {
 | 
				
			||||||
      cacheObjectLookupBox.put(cacheObject.id, cacheObject.toMap());
 | 
					      cacheObjectLookupBox.put(cacheObject.id, cacheObject.toMap());
 | 
				
			||||||
      return 1;
 | 
					      return 1;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user