mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 19:29:32 -05:00 
			
		
		
		
	* feat(mobile): map page - add map view * map: add map-markers * feat(map): add relative date filter * fix: do not let users scroll past map bounds * fix: fetch relative date from store to state on init * feat(mobile):re-fetch markers only on filter change * feat(mobile) - asset bottom sheet in map page * feat(mobile): display markers based on bottom sheet scroll * fix: exif-bottom-sheet - rebase conflict * feat(mobile): map-view - strongly typed map page events * feat(map): zoom to asset * chore: dart analyzer fixes * map-page move attribution to top-right * feat(mobile): map view - asset selection handling * feat(mobile): map-view display map in places row * fix: make asset marker icon responsive * optimise map page rebuilds * refactor(mobile): map page * feat(mobile): map-view: Go to location * map-view(mobile): minor refactor * fix(mobile): Handle invalid coords gracefully * small styling --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
		
			
				
	
	
		
			55 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Dart
		
	
	
	
	
	
import 'package:easy_localization/easy_localization.dart';
 | 
						|
import 'package:flutter/material.dart';
 | 
						|
import 'package:hooks_riverpod/hooks_riverpod.dart';
 | 
						|
 | 
						|
class ConfirmDialog extends ConsumerWidget {
 | 
						|
  final Function onOk;
 | 
						|
  final String title;
 | 
						|
  final String content;
 | 
						|
  final String cancel;
 | 
						|
  final String ok;
 | 
						|
 | 
						|
  const ConfirmDialog({
 | 
						|
    Key? key,
 | 
						|
    required this.onOk,
 | 
						|
    required this.title,
 | 
						|
    required this.content,
 | 
						|
    this.cancel = "delete_dialog_cancel",
 | 
						|
    this.ok = "backup_controller_page_background_battery_info_ok",
 | 
						|
  }) : super(key: key);
 | 
						|
 | 
						|
  @override
 | 
						|
  Widget build(BuildContext context, WidgetRef ref) {
 | 
						|
    return AlertDialog(
 | 
						|
      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
 | 
						|
      title: Text(title).tr(),
 | 
						|
      content: Text(content).tr(),
 | 
						|
      actions: [
 | 
						|
        TextButton(
 | 
						|
          onPressed: () => Navigator.of(context).pop(false),
 | 
						|
          child: Text(
 | 
						|
            cancel,
 | 
						|
            style: TextStyle(
 | 
						|
              color: Theme.of(context).primaryColor,
 | 
						|
              fontWeight: FontWeight.bold,
 | 
						|
            ),
 | 
						|
          ).tr(),
 | 
						|
        ),
 | 
						|
        TextButton(
 | 
						|
          onPressed: () {
 | 
						|
            onOk();
 | 
						|
            Navigator.of(context).pop(true);
 | 
						|
          },
 | 
						|
          child: Text(
 | 
						|
            ok,
 | 
						|
            style: TextStyle(
 | 
						|
              color: Colors.red[400],
 | 
						|
              fontWeight: FontWeight.bold,
 | 
						|
            ),
 | 
						|
          ).tr(),
 | 
						|
        ),
 | 
						|
      ],
 | 
						|
    );
 | 
						|
  }
 | 
						|
}
 |