mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	wip
This commit is contained in:
		
							parent
							
								
									90f893df66
								
							
						
					
					
						commit
						5645f9982d
					
				@ -42,6 +42,9 @@ class OnboardingPage extends HookConsumerWidget {
 | 
				
			|||||||
            OnboardingGalleryPermission(
 | 
					            OnboardingGalleryPermission(
 | 
				
			||||||
              onNextPage: () => toNextPage(),
 | 
					              onNextPage: () => toNextPage(),
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
 | 
					            OnboardingLocationPermission(
 | 
				
			||||||
 | 
					              onNextPage: () => toNextPage(),
 | 
				
			||||||
 | 
					            ),
 | 
				
			||||||
          ],
 | 
					          ],
 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
      ),
 | 
					      ),
 | 
				
			||||||
@ -225,57 +228,111 @@ class OnboardingGalleryPermission extends StatelessWidget {
 | 
				
			|||||||
  Widget build(BuildContext context) {
 | 
					  Widget build(BuildContext context) {
 | 
				
			||||||
    return Padding(
 | 
					    return Padding(
 | 
				
			||||||
      padding: const EdgeInsets.all(24.0),
 | 
					      padding: const EdgeInsets.all(24.0),
 | 
				
			||||||
      child: Column(
 | 
					      child: PermissionInfoTemplate(
 | 
				
			||||||
        children: [
 | 
					        icon: Icons.perm_media_outlined,
 | 
				
			||||||
          Row(
 | 
					        title: "Gallery Permission",
 | 
				
			||||||
            mainAxisAlignment: MainAxisAlignment.start,
 | 
					        subtitle:
 | 
				
			||||||
            children: [
 | 
					 | 
				
			||||||
              Icon(
 | 
					 | 
				
			||||||
                Icons.perm_media_outlined,
 | 
					 | 
				
			||||||
                size: 24,
 | 
					 | 
				
			||||||
                color: context.primaryColor.withAlpha(250),
 | 
					 | 
				
			||||||
              ),
 | 
					 | 
				
			||||||
              const SizedBox(width: 16),
 | 
					 | 
				
			||||||
              Text(
 | 
					 | 
				
			||||||
                "Gallery Permission",
 | 
					 | 
				
			||||||
                style: context.textTheme.headlineSmall?.copyWith(
 | 
					 | 
				
			||||||
                  fontWeight: FontWeight.w600,
 | 
					 | 
				
			||||||
                  color: context.primaryColor,
 | 
					 | 
				
			||||||
                ),
 | 
					 | 
				
			||||||
              ),
 | 
					 | 
				
			||||||
            ],
 | 
					 | 
				
			||||||
          ),
 | 
					 | 
				
			||||||
          const SizedBox(height: 16),
 | 
					 | 
				
			||||||
          Text(
 | 
					 | 
				
			||||||
            "We use the read and write permission of the media gallery for the following actions",
 | 
					            "We use the read and write permission of the media gallery for the following actions",
 | 
				
			||||||
            style: context.textTheme.headlineSmall?.copyWith(
 | 
					        descriptionList: [
 | 
				
			||||||
              fontWeight: FontWeight.w400,
 | 
					          'Display the local videos and images',
 | 
				
			||||||
              color: context.colorScheme.onSurface.withAlpha(220),
 | 
					          'Read the file content to upload to your Immich instance',
 | 
				
			||||||
 | 
					          'Remove media from the device on your request',
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					        onConfirm: onNextPage,
 | 
				
			||||||
 | 
					      ),
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class OnboardingLocationPermission extends StatelessWidget {
 | 
				
			||||||
 | 
					  final VoidCallback onNextPage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  const OnboardingLocationPermission({super.key, required this.onNextPage});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  @override
 | 
				
			||||||
 | 
					  Widget build(BuildContext context) {
 | 
				
			||||||
 | 
					    return Padding(
 | 
				
			||||||
 | 
					      padding: const EdgeInsets.all(24.0),
 | 
				
			||||||
 | 
					      child: PermissionInfoTemplate(
 | 
				
			||||||
 | 
					        icon: Icons.location_on_outlined,
 | 
				
			||||||
 | 
					        title: "Location Permission",
 | 
				
			||||||
 | 
					        subtitle:
 | 
				
			||||||
 | 
					            "We use the always on, precise location access for the following actions",
 | 
				
			||||||
 | 
					        descriptionList: [
 | 
				
			||||||
 | 
					          'Display the local videos and images',
 | 
				
			||||||
 | 
					          'Read the file content to upload to your Immich instance',
 | 
				
			||||||
 | 
					          'Remove media from the device on your request',
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					        onConfirm: onNextPage,
 | 
				
			||||||
 | 
					      ),
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class PermissionInfoTemplate extends StatelessWidget {
 | 
				
			||||||
 | 
					  final String title;
 | 
				
			||||||
 | 
					  final String subtitle;
 | 
				
			||||||
 | 
					  final List<String> descriptionList;
 | 
				
			||||||
 | 
					  final VoidCallback onConfirm;
 | 
				
			||||||
 | 
					  final IconData icon;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  const PermissionInfoTemplate({
 | 
				
			||||||
 | 
					    super.key,
 | 
				
			||||||
 | 
					    required this.title,
 | 
				
			||||||
 | 
					    required this.subtitle,
 | 
				
			||||||
 | 
					    required this.descriptionList,
 | 
				
			||||||
 | 
					    required this.onConfirm,
 | 
				
			||||||
 | 
					    required this.icon,
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  @override
 | 
				
			||||||
 | 
					  Widget build(BuildContext context) {
 | 
				
			||||||
 | 
					    return Column(
 | 
				
			||||||
 | 
					      children: [
 | 
				
			||||||
 | 
					        Row(
 | 
				
			||||||
 | 
					          mainAxisAlignment: MainAxisAlignment.start,
 | 
				
			||||||
 | 
					          children: [
 | 
				
			||||||
 | 
					            Icon(
 | 
				
			||||||
 | 
					              icon,
 | 
				
			||||||
 | 
					              size: 32,
 | 
				
			||||||
 | 
					              color: context.primaryColor.withAlpha(250),
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
 | 
					            const SizedBox(width: 16),
 | 
				
			||||||
 | 
					            Text(
 | 
				
			||||||
 | 
					              title,
 | 
				
			||||||
 | 
					              style: context.textTheme.headlineSmall?.copyWith(
 | 
				
			||||||
 | 
					                fontWeight: FontWeight.w600,
 | 
				
			||||||
 | 
					                color: context.primaryColor,
 | 
				
			||||||
 | 
					              ),
 | 
				
			||||||
 | 
					            ),
 | 
				
			||||||
 | 
					          ],
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					        const SizedBox(height: 16),
 | 
				
			||||||
 | 
					        Text(
 | 
				
			||||||
 | 
					          subtitle,
 | 
				
			||||||
 | 
					          style: context.textTheme.headlineSmall?.copyWith(
 | 
				
			||||||
 | 
					            fontWeight: FontWeight.w400,
 | 
				
			||||||
 | 
					            color: context.colorScheme.onSurface.withAlpha(220),
 | 
				
			||||||
          ),
 | 
					          ),
 | 
				
			||||||
          const SizedBox(height: 40),
 | 
					        ),
 | 
				
			||||||
          const BulletList([
 | 
					        const SizedBox(height: 40),
 | 
				
			||||||
            'Display the local videos and images',
 | 
					        BulletList(descriptionList),
 | 
				
			||||||
            'Read the file content to upload to your Immich instance',
 | 
					        const Spacer(),
 | 
				
			||||||
            'Remove media from the device on your request',
 | 
					        SizedBox(
 | 
				
			||||||
          ]),
 | 
					          height: 48,
 | 
				
			||||||
          const Spacer(),
 | 
					          width: double.infinity,
 | 
				
			||||||
          SizedBox(
 | 
					          child: ElevatedButton(
 | 
				
			||||||
            height: 48,
 | 
					            onPressed: onConfirm,
 | 
				
			||||||
            width: double.infinity,
 | 
					            child: const Text(
 | 
				
			||||||
            child: ElevatedButton(
 | 
					              'OK',
 | 
				
			||||||
              onPressed: onNextPage,
 | 
					              style: TextStyle(
 | 
				
			||||||
              child: const Text(
 | 
					                fontSize: 18,
 | 
				
			||||||
                'OK',
 | 
					                fontWeight: FontWeight.w600,
 | 
				
			||||||
                style: TextStyle(
 | 
					 | 
				
			||||||
                  fontSize: 18,
 | 
					 | 
				
			||||||
                  fontWeight: FontWeight.w600,
 | 
					 | 
				
			||||||
                ),
 | 
					 | 
				
			||||||
              ),
 | 
					              ),
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
          ),
 | 
					          ),
 | 
				
			||||||
        ],
 | 
					        ),
 | 
				
			||||||
      ),
 | 
					      ],
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user