Merge branch 'redesign' of github.com:ente-io/frame into redesign
This commit is contained in:
commit
fb31444ce0
33 changed files with 215 additions and 123 deletions
|
@ -21,7 +21,6 @@ final lightThemeData = ThemeData(
|
|||
primaryColorLight: Colors.black54,
|
||||
iconTheme: IconThemeData(color: Colors.black),
|
||||
primaryIconTheme: IconThemeData(color: Colors.red, opacity: 1.0, size: 50.0),
|
||||
bottomAppBarColor: Color.fromRGBO(196, 196, 196, 0.6),
|
||||
colorScheme: ColorScheme.light(
|
||||
primary: Colors.black, secondary: Color.fromARGB(255, 163, 163, 163)),
|
||||
accentColor: Color.fromRGBO(0, 0, 0, 0.6),
|
||||
|
@ -89,15 +88,12 @@ final darkThemeData = ThemeData(
|
|||
iconTheme: IconThemeData(color: Colors.white),
|
||||
primaryIconTheme: IconThemeData(color: Colors.red, opacity: 1.0, size: 50.0),
|
||||
hintColor: Colors.grey,
|
||||
bottomAppBarColor: Color.fromRGBO(255, 255, 255, 0.7),
|
||||
|
||||
colorScheme: ColorScheme.dark(primary: Colors.white),
|
||||
accentColor: Color.fromRGBO(45, 194, 98, 0.2),
|
||||
buttonColor: Color.fromRGBO(45, 194, 98, 1.0),
|
||||
buttonTheme: ButtonThemeData().copyWith(
|
||||
buttonColor: Color.fromRGBO(45, 194, 98, 1.0),
|
||||
),
|
||||
// primaryColor: Colors.red,
|
||||
textTheme: _buildTextTheme(Colors.white),
|
||||
toggleableActiveColor: Colors.green[400],
|
||||
outlinedButtonTheme: buildOutlinedButtonThemeData(
|
||||
|
|
|
@ -45,7 +45,7 @@ extension CustomColorScheme on ColorScheme {
|
|||
|
||||
Color get cancelSelectedButtonColor => brightness == Brightness.light
|
||||
? Color.fromRGBO(0, 0, 0, 0.35)
|
||||
: Color.fromRGBO(16, 16, 16, 0.5);
|
||||
: Color.fromRGBO(48, 48, 48, 0.5);
|
||||
|
||||
Color get bgColorForQuestions => brightness == Brightness.light
|
||||
? Colors.white
|
||||
|
@ -66,6 +66,34 @@ extension CustomColorScheme on ColorScheme {
|
|||
backgroundColor: Colors.black,
|
||||
itemStyle: TextStyle(color: Colors.white),
|
||||
cancelStyle: TextStyle(color: Colors.white));
|
||||
|
||||
Color get stepProgressUnselectedColor => brightness == Brightness.light
|
||||
? Color.fromRGBO(196, 196, 196, 0.6)
|
||||
: Color.fromRGBO(255, 255, 255, 0.7);
|
||||
|
||||
Color get gNavBackgroundColor => brightness == Brightness.light
|
||||
? Color.fromRGBO(196, 196, 196, 0.6)
|
||||
: Color.fromRGBO(40, 40, 40, 0.6);
|
||||
|
||||
Color get gNavBarActiveColor => brightness == Brightness.light
|
||||
? Color.fromRGBO(255, 255, 255, 0.6)
|
||||
: Color.fromRGBO(255, 255, 255, 0.9);
|
||||
|
||||
Color get gNavIconColor => brightness == Brightness.light
|
||||
? Color.fromRGBO(0, 0, 0, 0.9)
|
||||
: Color.fromRGBO(255, 255, 255, 1);
|
||||
|
||||
Color get gNavActiveIconColor => brightness == Brightness.light
|
||||
? Color.fromRGBO(0, 0, 0, 0.9)
|
||||
: Color.fromRGBO(0, 0, 0, 1);
|
||||
|
||||
Color get galleryThumbBackgroundColor => brightness == Brightness.light
|
||||
? Color.fromRGBO(240, 240, 240, 1)
|
||||
: Color.fromRGBO(20, 20, 20, 1);
|
||||
|
||||
Color get galleryThumbDrawColor => brightness == Brightness.light
|
||||
? Colors.black.withOpacity(0.8)
|
||||
: Colors.white.withOpacity(0.5);
|
||||
}
|
||||
|
||||
OutlinedButtonThemeData buildOutlinedButtonThemeData(
|
||||
|
|
|
@ -49,7 +49,6 @@ class _AppUpdateDialogState extends State<AppUpdateDialog> {
|
|||
Container(
|
||||
width: double.infinity,
|
||||
height: 64,
|
||||
padding: const EdgeInsets.fromLTRB(50, 0, 50, 0),
|
||||
child: OutlinedButton(
|
||||
child: Text(
|
||||
"Update",
|
||||
|
|
|
@ -64,6 +64,7 @@ class _BackupFolderSelectionPageState extends State<BackupFolderSelectionPage> {
|
|||
appBar: widget.shouldSelectAll
|
||||
? null
|
||||
: AppBar(
|
||||
elevation: 0,
|
||||
title: Text(""),
|
||||
),
|
||||
body: Column(
|
||||
|
|
|
@ -6,7 +6,6 @@ import 'package:photos/events/files_updated_event.dart';
|
|||
import 'package:photos/models/collection_items.dart';
|
||||
import 'package:photos/models/galleryType.dart';
|
||||
import 'package:photos/models/selected_files.dart';
|
||||
import 'package:photos/ui/common/bottomShadow.dart';
|
||||
import 'package:photos/ui/gallery.dart';
|
||||
import 'package:photos/ui/gallery_app_bar_widget.dart';
|
||||
import 'package:photos/ui/gallery_overlay_widget.dart';
|
||||
|
@ -46,6 +45,7 @@ class CollectionPage extends StatelessWidget {
|
|||
initialFiles: initialFiles,
|
||||
smallerTodayFont: true,
|
||||
albumName: c.collection.name,
|
||||
footer: const SizedBox(height: 32),
|
||||
);
|
||||
return Scaffold(
|
||||
appBar: PreferredSize(
|
||||
|
@ -57,12 +57,10 @@ class CollectionPage extends StatelessWidget {
|
|||
collection: c.collection,
|
||||
),
|
||||
),
|
||||
// body: gallery,
|
||||
body: Stack(
|
||||
alignment: Alignment.bottomCenter,
|
||||
children: [
|
||||
gallery,
|
||||
BottomShadowWidget(),
|
||||
GalleryOverlayWidget(
|
||||
overlayType,
|
||||
_selectedFiles,
|
||||
|
|
|
@ -9,16 +9,17 @@ class DynamicFAB extends StatelessWidget {
|
|||
final String buttonText;
|
||||
final Function onPressedFunction;
|
||||
|
||||
const DynamicFAB(
|
||||
{this.isKeypadOpen,
|
||||
DynamicFAB(
|
||||
{Key key,
|
||||
this.isKeypadOpen,
|
||||
this.buttonText,
|
||||
this.isFormValid,
|
||||
this.onPressedFunction});
|
||||
this.onPressedFunction})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (isKeypadOpen) {
|
||||
//var here
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
boxShadow: [
|
||||
|
@ -41,7 +42,7 @@ class DynamicFAB extends StatelessWidget {
|
|||
foregroundColor:
|
||||
Theme.of(context).colorScheme.dynamicFABTextColor,
|
||||
child: Transform.rotate(
|
||||
angle: isFormValid ? 0 : math.pi / 2, //var here
|
||||
angle: isFormValid ? 0 : math.pi / 2,
|
||||
child: Icon(
|
||||
Icons.chevron_right,
|
||||
size: 36,
|
||||
|
|
|
@ -86,6 +86,7 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
|
|||
_sortDuplicates();
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
title: Hero(
|
||||
tag: "deduplicate",
|
||||
child: Material(
|
||||
|
|
|
@ -100,34 +100,31 @@ class _DetailPageState extends State<DetailPage> {
|
|||
" files .");
|
||||
_appBarKey = GlobalKey<FadingAppBarState>();
|
||||
_bottomBarKey = GlobalKey<FadingBottomBarState>();
|
||||
return SafeArea(
|
||||
bottom: false,
|
||||
child: Scaffold(
|
||||
appBar: FadingAppBar(
|
||||
_files[_selectedIndex],
|
||||
_onFileDeleted,
|
||||
Configuration.instance.getUserID(),
|
||||
100,
|
||||
widget.config.mode == DetailPageMode.full,
|
||||
key: _appBarKey,
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
body: Center(
|
||||
child: Stack(
|
||||
children: [
|
||||
_buildPageView(),
|
||||
FadingBottomBar(
|
||||
_files[_selectedIndex],
|
||||
_onEditFileRequested,
|
||||
widget.config.mode == DetailPageMode.minimalistic,
|
||||
key: _bottomBarKey,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// backgroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||
return Scaffold(
|
||||
appBar: FadingAppBar(
|
||||
_files[_selectedIndex],
|
||||
_onFileDeleted,
|
||||
Configuration.instance.getUserID(),
|
||||
100,
|
||||
widget.config.mode == DetailPageMode.full,
|
||||
key: _appBarKey,
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
body: Center(
|
||||
child: Stack(
|
||||
children: [
|
||||
_buildPageView(),
|
||||
FadingBottomBar(
|
||||
_files[_selectedIndex],
|
||||
_onEditFileRequested,
|
||||
widget.config.mode == DetailPageMode.minimalistic,
|
||||
key: _bottomBarKey,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// backgroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import 'package:flutter/services.dart';
|
|||
import 'package:flutter/widgets.dart';
|
||||
import 'package:password_strength/password_strength.dart';
|
||||
import 'package:photos/core/configuration.dart';
|
||||
import 'package:photos/ente_theme_data.dart';
|
||||
import 'package:photos/models/billing_plan.dart';
|
||||
import 'package:photos/services/billing_service.dart';
|
||||
import 'package:photos/services/user_service.dart';
|
||||
|
@ -67,7 +68,7 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom != 0;
|
||||
final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom > 125;
|
||||
|
||||
FloatingActionButtonLocation fabLocation() {
|
||||
if (isKeypadOpen) {
|
||||
|
@ -95,7 +96,8 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
|
|||
currentStep: 1,
|
||||
selectedColor: Theme.of(context).buttonColor,
|
||||
roundedEdges: Radius.circular(10),
|
||||
unselectedColor: Theme.of(context).bottomAppBarColor,
|
||||
unselectedColor:
|
||||
Theme.of(context).colorScheme.stepProgressUnselectedColor,
|
||||
)),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -68,7 +68,10 @@ class FadingAppBarState extends State<FadingAppBar> {
|
|||
stops: const [0, 0.2, 1],
|
||||
),
|
||||
),
|
||||
child: _buildAppBar(),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 10),
|
||||
child: _buildAppBar(),
|
||||
),
|
||||
),
|
||||
opacity: _shouldHide ? 0 : 1,
|
||||
duration: Duration(milliseconds: 150),
|
||||
|
@ -237,11 +240,15 @@ class FadingAppBarState extends State<FadingAppBar> {
|
|||
return hasError ? oldValue : isLiked;
|
||||
},
|
||||
likeBuilder: (isLiked) {
|
||||
return Icon(
|
||||
Icons.favorite_border,
|
||||
color:
|
||||
isLiked ? Colors.pinkAccent : Colors.white, //same for both themes
|
||||
size: 24,
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Icon(
|
||||
Icons.favorite_border,
|
||||
color: isLiked
|
||||
? Colors.pinkAccent
|
||||
: Colors.white, //same for both themes
|
||||
size: 24,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
|
@ -151,30 +151,32 @@ class FadingBottomBarState extends State<FadingBottomBar> {
|
|||
),
|
||||
);
|
||||
}
|
||||
return AnimatedOpacity(
|
||||
child: Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Colors.transparent,
|
||||
Colors.black.withOpacity(0.6),
|
||||
Colors.black.withOpacity(0.72),
|
||||
],
|
||||
stops: const [0, 0.8, 1],
|
||||
return SafeArea(
|
||||
child: AnimatedOpacity(
|
||||
child: Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Colors.transparent,
|
||||
Colors.black.withOpacity(0.6),
|
||||
Colors.black.withOpacity(0.72),
|
||||
],
|
||||
stops: const [0, 0.8, 1],
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: children,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: children,
|
||||
),
|
||||
),
|
||||
opacity: _shouldHide ? 0 : 1,
|
||||
duration: Duration(milliseconds: 150),
|
||||
),
|
||||
opacity: _shouldHide ? 0 : 1,
|
||||
duration: Duration(milliseconds: 150),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ class _FreeSpacePageState extends State<FreeSpacePage> {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
title: Hero(
|
||||
tag: "free_up_space",
|
||||
child: Material(
|
||||
|
|
|
@ -218,8 +218,9 @@ class _GalleryState extends State<Gallery> {
|
|||
return getMonthAndYear(DateTime.fromMicrosecondsSinceEpoch(
|
||||
_collatedFiles[index][0].creationTime));
|
||||
},
|
||||
thumbBackgroundColor: Color(0xFF151515),
|
||||
thumbDrawColor: Colors.white.withOpacity(0.5),
|
||||
thumbBackgroundColor:
|
||||
Theme.of(context).colorScheme.galleryThumbBackgroundColor,
|
||||
thumbDrawColor: Theme.of(context).colorScheme.galleryThumbDrawColor,
|
||||
firstShown: (int firstIndex) {
|
||||
Bus.instance
|
||||
.fire(GalleryIndexUpdatedEvent(widget.tagPrefix, firstIndex));
|
||||
|
|
|
@ -17,7 +17,6 @@ class GalleryFooterWidget extends StatelessWidget {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
//mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.cloud_upload_outlined,
|
||||
|
|
|
@ -15,6 +15,7 @@ import 'package:photos/models/galleryType.dart';
|
|||
import 'package:photos/models/magic_metadata.dart';
|
||||
import 'package:photos/models/selected_files.dart';
|
||||
import 'package:photos/services/collections_service.dart';
|
||||
import 'package:photos/ui/common/bottomShadow.dart';
|
||||
import 'package:photos/ui/common/onlyOuterShadow.dart';
|
||||
import 'package:photos/ui/create_collection_page.dart';
|
||||
import 'package:photos/utils/delete_file_util.dart';
|
||||
|
@ -219,6 +220,9 @@ class _OverlayWidgetState extends State<OverlayWidget> {
|
|||
),
|
||||
],
|
||||
),
|
||||
BottomShadowWidget(
|
||||
offsetDy: 40,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
@ -592,25 +592,33 @@ class _HomeBottomNavigationBarState extends State<HomeBottomNavigationBar> {
|
|||
filter: ImageFilter.blur(sigmaX: 20, sigmaY: 20),
|
||||
child: GNav(
|
||||
curve: Curves.easeOutExpo,
|
||||
// backgroundColor: Colors.white.withOpacity(0.6),
|
||||
backgroundColor:
|
||||
Theme.of(context).bottomAppBarColor,
|
||||
backgroundColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.gNavBackgroundColor,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
rippleColor: Colors.white.withOpacity(0.2),
|
||||
hoverColor: Colors.white.withOpacity(0.2),
|
||||
activeColor: Colors.black,
|
||||
rippleColor: Colors.white.withOpacity(0.1),
|
||||
activeColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.gNavBarActiveColor,
|
||||
iconSize: 24,
|
||||
padding: EdgeInsets.fromLTRB(16, 8, 16, 8),
|
||||
duration: Duration(milliseconds: 200),
|
||||
gap: 0,
|
||||
tabBorderRadius: 24,
|
||||
tabBackgroundColor: Colors.white,
|
||||
tabBackgroundColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.gNavBarActiveColor,
|
||||
haptic: false,
|
||||
tabs: [
|
||||
GButton(
|
||||
margin: EdgeInsets.fromLTRB(6, 6, 0, 6),
|
||||
icon: Icons.home,
|
||||
iconColor: Colors.black,
|
||||
iconColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.gNavIconColor,
|
||||
iconActiveColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.gNavActiveIconColor,
|
||||
text: '',
|
||||
onPressed: () {
|
||||
_onTabChange(
|
||||
|
@ -620,7 +628,12 @@ class _HomeBottomNavigationBarState extends State<HomeBottomNavigationBar> {
|
|||
GButton(
|
||||
margin: EdgeInsets.fromLTRB(0, 6, 0, 6),
|
||||
icon: Icons.photo_library,
|
||||
iconColor: Colors.black,
|
||||
iconColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.gNavIconColor,
|
||||
iconActiveColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.gNavActiveIconColor,
|
||||
text: '',
|
||||
onPressed: () {
|
||||
_onTabChange(
|
||||
|
@ -630,7 +643,12 @@ class _HomeBottomNavigationBarState extends State<HomeBottomNavigationBar> {
|
|||
GButton(
|
||||
margin: EdgeInsets.fromLTRB(0, 6, 0, 6),
|
||||
icon: Icons.folder_shared,
|
||||
iconColor: Colors.black,
|
||||
iconColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.gNavIconColor,
|
||||
iconActiveColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.gNavActiveIconColor,
|
||||
text: '',
|
||||
onPressed: () {
|
||||
_onTabChange(
|
||||
|
@ -640,7 +658,12 @@ class _HomeBottomNavigationBarState extends State<HomeBottomNavigationBar> {
|
|||
GButton(
|
||||
margin: EdgeInsets.fromLTRB(0, 6, 6, 6),
|
||||
icon: Icons.person,
|
||||
iconColor: Colors.black,
|
||||
iconColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.gNavIconColor,
|
||||
iconActiveColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.gNavActiveIconColor,
|
||||
text: '',
|
||||
onPressed: () {
|
||||
_onTabChange(
|
||||
|
|
|
@ -40,7 +40,7 @@ class ScrollBarThumb extends StatelessWidget {
|
|||
child: Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
color: drawColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
backgroundColor: Colors.transparent,
|
||||
fontSize: 14,
|
||||
|
|
|
@ -28,6 +28,7 @@ class _LogFileViewerState extends State<LogFileViewer> {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
title: Text("today's logs"),
|
||||
),
|
||||
body: _getBody(),
|
||||
|
|
|
@ -29,7 +29,7 @@ class _LoginPageState extends State<LoginPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom != 0;
|
||||
final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom > 125;
|
||||
|
||||
FloatingActionButtonLocation fabLocation() {
|
||||
if (isKeypadOpen) {
|
||||
|
|
|
@ -99,7 +99,7 @@ class _MemoryWidgetState extends State<MemoryWidget> {
|
|||
setState(() {});
|
||||
},
|
||||
child: SizedBox(
|
||||
width: 100,
|
||||
width: 92,
|
||||
height: 100,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:photos/ente_theme_data.dart';
|
||||
import 'package:photos/services/user_service.dart';
|
||||
import 'package:photos/ui/common/dynamicFAB.dart';
|
||||
import 'package:step_progress_indicator/step_progress_indicator.dart';
|
||||
|
@ -25,7 +26,7 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom != 0;
|
||||
final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom > 125;
|
||||
|
||||
FloatingActionButtonLocation fabLocation() {
|
||||
if (isKeypadOpen) {
|
||||
|
@ -49,14 +50,17 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
|
|||
? Hero(
|
||||
tag: "sign_up",
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
child: StepProgressIndicator(
|
||||
totalSteps: 4,
|
||||
currentStep: 2,
|
||||
selectedColor: Theme.of(context).buttonColor,
|
||||
roundedEdges: Radius.circular(10),
|
||||
unselectedColor: Theme.of(context).bottomAppBarColor,
|
||||
)),
|
||||
type: MaterialType.transparency,
|
||||
child: StepProgressIndicator(
|
||||
totalSteps: 4,
|
||||
currentStep: 2,
|
||||
selectedColor: Theme.of(context).buttonColor,
|
||||
roundedEdges: Radius.circular(10),
|
||||
unselectedColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.stepProgressUnselectedColor,
|
||||
),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
|
|
|
@ -75,7 +75,7 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom != 0;
|
||||
final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom > 125;
|
||||
|
||||
FloatingActionButtonLocation fabLocation() {
|
||||
if (isKeypadOpen) {
|
||||
|
|
|
@ -32,7 +32,7 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom != 0;
|
||||
final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom > 125;
|
||||
|
||||
FloatingActionButtonLocation fabLocation() {
|
||||
if (isKeypadOpen) {
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'dart:async';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:photos/ente_theme_data.dart';
|
||||
import 'package:photos/models/billing_plan.dart';
|
||||
import 'package:photos/models/subscription.dart';
|
||||
import 'package:photos/models/user_details.dart';
|
||||
|
@ -132,7 +133,9 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
|
|||
currentStep: 4,
|
||||
selectedColor: Theme.of(context).buttonColor,
|
||||
roundedEdges: Radius.circular(10),
|
||||
unselectedColor: Theme.of(context).bottomAppBarColor,
|
||||
unselectedColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.stepProgressUnselectedColor,
|
||||
)),
|
||||
)
|
||||
: AppBar(
|
||||
|
|
|
@ -61,12 +61,14 @@ class _RecoveryKeyPageState extends State<RecoveryKeyPage> {
|
|||
currentStep: 3,
|
||||
selectedColor: Theme.of(context).buttonColor,
|
||||
roundedEdges: Radius.circular(10),
|
||||
unselectedColor: Theme.of(context).bottomAppBarColor,
|
||||
unselectedColor:
|
||||
Theme.of(context).colorScheme.stepProgressUnselectedColor,
|
||||
),
|
||||
),
|
||||
)
|
||||
: widget.showAppBar
|
||||
? AppBar(
|
||||
elevation: 0,
|
||||
title: Text(widget.title ?? "Recovery key"),
|
||||
)
|
||||
: null,
|
||||
|
|
|
@ -30,6 +30,7 @@ class _SessionsPageState extends State<SessionsPage> {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
title: Text("Active sessions"),
|
||||
),
|
||||
body: _getBody(),
|
||||
|
|
|
@ -55,7 +55,7 @@ class BackupSectionWidgetState extends State<BackupSectionWidget> {
|
|||
),
|
||||
SectionOptionDivider,
|
||||
SizedBox(
|
||||
height: 36,
|
||||
height: 48,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
@ -75,7 +75,7 @@ class BackupSectionWidgetState extends State<BackupSectionWidget> {
|
|||
),
|
||||
SectionOptionDivider,
|
||||
SizedBox(
|
||||
height: 36,
|
||||
height: 48,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
|
|
@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_windowmanager/flutter_windowmanager.dart';
|
||||
import 'package:photos/core/configuration.dart';
|
||||
import 'package:photos/core/event_bus.dart';
|
||||
import 'package:photos/ente_theme_data.dart';
|
||||
import 'package:photos/events/two_factor_status_change_event.dart';
|
||||
import 'package:photos/services/user_service.dart';
|
||||
import 'package:photos/ui/app_lock.dart';
|
||||
|
@ -66,7 +67,7 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
|
|||
[
|
||||
Padding(padding: EdgeInsets.all(2)),
|
||||
SizedBox(
|
||||
height: 36,
|
||||
height: 48,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
@ -116,7 +117,7 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
|
|||
children.addAll([
|
||||
SectionOptionDivider,
|
||||
SizedBox(
|
||||
height: 36,
|
||||
height: 48,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
@ -149,7 +150,7 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
|
|||
[
|
||||
SectionOptionDivider,
|
||||
SizedBox(
|
||||
height: 36,
|
||||
height: 48,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
@ -167,14 +168,14 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: const [
|
||||
Text(
|
||||
"hiding from the task switcher will prevent you from taking screenshots in this app.",
|
||||
"Hiding from the task switcher will prevent you from taking screenshots in this app.",
|
||||
style: TextStyle(
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
Padding(padding: EdgeInsets.all(8)),
|
||||
Text(
|
||||
"are you sure?",
|
||||
"Are you sure?",
|
||||
style: TextStyle(
|
||||
height: 1.5,
|
||||
),
|
||||
|
@ -184,17 +185,27 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
|
|||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
child: Text("no",
|
||||
style: TextStyle(color: Colors.white)),
|
||||
child: Text(
|
||||
"No",
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.defaultTextColor),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context, rootNavigator: true)
|
||||
.pop('dialog');
|
||||
},
|
||||
),
|
||||
TextButton(
|
||||
child: Text("yes",
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.8))),
|
||||
child: Text(
|
||||
"Yes",
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.defaultTextColor,
|
||||
),
|
||||
),
|
||||
onPressed: () async {
|
||||
Navigator.of(context, rootNavigator: true)
|
||||
.pop('dialog');
|
||||
|
|
|
@ -50,7 +50,6 @@ class SocialSectionWidget extends StatelessWidget {
|
|||
!UpdateService.instance.isIndependent()
|
||||
? Column(
|
||||
children: [
|
||||
Divider(height: 4),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: () {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:photos/core/cache/thumbnail_cache.dart';
|
||||
import 'package:photos/core/constants.dart';
|
||||
|
@ -126,9 +125,14 @@ class _ThumbnailWidgetState extends State<ThumbnailWidget> {
|
|||
),
|
||||
);
|
||||
|
||||
static final Widget loadingWidget = Container(
|
||||
static final Widget lightLoadWidget = Container(
|
||||
alignment: Alignment.center,
|
||||
color: Colors.grey[900],
|
||||
color: Color.fromRGBO(240, 240, 240, 1),
|
||||
);
|
||||
|
||||
static final Widget darkLoadWidget = Container(
|
||||
alignment: Alignment.center,
|
||||
color: Color.fromRGBO(20, 20, 20, 1),
|
||||
);
|
||||
|
||||
bool _hasLoadedThumbnail = false;
|
||||
|
@ -201,7 +205,7 @@ class _ThumbnailWidgetState extends State<ThumbnailWidget> {
|
|||
}
|
||||
}
|
||||
List<Widget> viewChildrens = [
|
||||
loadingWidget,
|
||||
_getLoadingWidget(),
|
||||
AnimatedOpacity(
|
||||
opacity: content == null ? 0 : 1.0,
|
||||
duration: Duration(milliseconds: 200),
|
||||
|
@ -347,4 +351,10 @@ class _ThumbnailWidgetState extends State<ThumbnailWidget> {
|
|||
_errorLoadingRemoteThumbnail = false;
|
||||
_imageProvider = null;
|
||||
}
|
||||
|
||||
Widget _getLoadingWidget() {
|
||||
return Theme.of(context).brightness == Brightness.light
|
||||
? lightLoadWidget
|
||||
: darkLoadWidget;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ class _TwoFactorSetupPageState extends State<TwoFactorSetupPage>
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
title: Text(
|
||||
"Two-factor setup",
|
||||
),
|
||||
|
|
|
@ -166,7 +166,7 @@ bool isLeapYear(DateTime dateTime) {
|
|||
Widget getDayWidget(
|
||||
BuildContext context, int timestamp, bool smallerTodayFont) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.fromLTRB(12, 14, 0, 12),
|
||||
padding: const EdgeInsets.fromLTRB(4, 14, 0, 8),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
getDayTitle(timestamp),
|
||||
|
|
|
@ -4,11 +4,11 @@ import 'package:archive/archive_io.dart';
|
|||
import 'package:email_validator/email_validator.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_email_sender/flutter_email_sender.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:photos/core/error-reporting/super_logging.dart';
|
||||
import 'package:photos/ente_theme_data.dart';
|
||||
import 'package:photos/ui/common/dialogs.dart';
|
||||
import 'package:photos/ui/log_file_viewer.dart';
|
||||
import 'package:photos/utils/dialog_util.dart';
|
||||
|
@ -35,19 +35,20 @@ Future<void> sendLogs(
|
|||
children: [
|
||||
Icon(
|
||||
Icons.feed_outlined,
|
||||
color: Colors.white.withOpacity(0.85),
|
||||
color: Theme.of(context).iconTheme.color.withOpacity(0.85),
|
||||
),
|
||||
Padding(padding: EdgeInsets.all(4)),
|
||||
Text(
|
||||
"View logs",
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.85),
|
||||
),
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.defaultTextColor
|
||||
.withOpacity(0.85)),
|
||||
),
|
||||
],
|
||||
),
|
||||
onPressed: () async {
|
||||
// routeToPage(context, LogFileViewer(SuperLogging.logFile));
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
|
@ -81,7 +82,6 @@ Future<void> sendLogs(
|
|||
"This will send across logs and metrics that will help us debug your issue better",
|
||||
style: TextStyle(
|
||||
height: 1.5,
|
||||
fontFamily: 'Ubuntu',
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Add table
Reference in a new issue