diff --git a/fonts/Ubuntu-Light.ttf b/fonts/Ubuntu-Light.ttf new file mode 100644 index 000000000..0e9f90d7c Binary files /dev/null and b/fonts/Ubuntu-Light.ttf differ diff --git a/fonts/Ubuntu-Regular.ttf b/fonts/Ubuntu-Regular.ttf new file mode 100644 index 000000000..dbb834a4d Binary files /dev/null and b/fonts/Ubuntu-Regular.ttf differ diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 98a252d61..362c7327e 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -27,6 +27,7 @@ PODS: - Flutter - fluttertoast (0.0.2): - Flutter + - Toast - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) @@ -62,6 +63,7 @@ PODS: - sqflite (0.0.1): - Flutter - FMDB (~> 2.7.2) + - Toast (4.0.0) - uni_links (0.0.1): - Flutter - url_launcher (0.0.1): @@ -105,6 +107,7 @@ SPEC REPOS: - Reachability - SDWebImage - SDWebImageWebPCoder + - Toast EXTERNAL SOURCES: connectivity: @@ -169,7 +172,7 @@ SPEC CHECKSUMS: flutter_sodium: c84426b4de738514b5b66cfdeb8a06634e72fe0b flutter_webview_plugin: ed9e8a6a96baf0c867e90e1bce2673913eeac694 fluttercontactpicker: 3a69f749dcc3fab94b816ad68fa838a6f0a1cf0f - fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b + fluttertoast: 6122fa75143e992b1d3470f61000f591a798cc58 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a libwebp: 946cb3063cea9236285f7e9a8505d806d30e07f3 Mantle: 35238ae6f2e2b2d474fa7b67fee82a59fea71915 @@ -183,6 +186,7 @@ SPEC CHECKSUMS: share_extend: b6748dc53695587891126a89533b862b92548c7b shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 + Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 uni_links: d97da20c7701486ba192624d99bffaaffcfc298a url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 555967df5..77690acf0 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -234,6 +234,7 @@ "${BUILT_PRODUCTS_DIR}/Reachability/Reachability.framework", "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", "${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework", + "${BUILT_PRODUCTS_DIR}/Toast/Toast.framework", "${BUILT_PRODUCTS_DIR}/connectivity/connectivity.framework", "${BUILT_PRODUCTS_DIR}/crisp/crisp.framework", "${BUILT_PRODUCTS_DIR}/device_info/device_info.framework", @@ -267,6 +268,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImageWebPCoder.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/crisp.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info.framework", diff --git a/lib/core/configuration.dart b/lib/core/configuration.dart index b50d01521..a314aede8 100644 --- a/lib/core/configuration.dart +++ b/lib/core/configuration.dart @@ -107,9 +107,9 @@ class Configuration { } String getHttpEndpoint() { - if (kDebugMode) { - return "http://192.168.1.111"; - } + // if (kDebugMode) { + // return "http://192.168.1.111"; + // } return "https://api.ente.io"; } diff --git a/lib/main.dart b/lib/main.dart index 5f2124182..10e2ee563 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -77,7 +77,7 @@ class MyApp extends StatelessWidget with WidgetsBindingObserver { return MaterialApp( title: _title, theme: ThemeData( - fontFamily: 'NunitoSans', + fontFamily: 'Ubuntu', brightness: Brightness.dark, hintColor: Colors.grey, accentColor: Colors.pink[400], diff --git a/lib/ui/collections_gallery_widget.dart b/lib/ui/collections_gallery_widget.dart index 21e61b87a..573a779c2 100644 --- a/lib/ui/collections_gallery_widget.dart +++ b/lib/ui/collections_gallery_widget.dart @@ -68,7 +68,10 @@ class _CollectionsGalleryWidgetState extends State return SingleChildScrollView( child: Column( children: [ - SectionTitle("DEVICE FOLDERS"), + SectionTitle("device folders"), + Padding( + padding: EdgeInsets.all(6), + ), Container( height: 160, child: Align( @@ -86,8 +89,8 @@ class _CollectionsGalleryWidgetState extends State ), ), Divider(height: 12), - SectionTitle("UPLOADED COLLECTIONS"), - Padding(padding: EdgeInsets.all(6)), + SectionTitle("uploaded collections"), + Padding(padding: EdgeInsets.all(16)), GridView.builder( shrinkWrap: true, padding: EdgeInsets.only(bottom: 12), @@ -141,12 +144,14 @@ class _CollectionsGalleryWidgetState extends State Widget _buildFolder(BuildContext context, DeviceFolder folder) { return GestureDetector( - child: Padding( + child: Container( + height: 110, + width: 140, padding: const EdgeInsets.all(8.0), child: Column( children: [ ClipRRect( - borderRadius: BorderRadius.circular(4.0), + borderRadius: BorderRadius.circular(32.0), child: Container( child: Hero( tag: @@ -161,7 +166,7 @@ class _CollectionsGalleryWidgetState extends State child: Text( folder.name, style: TextStyle( - fontSize: 14, + fontSize: 12, ), overflow: TextOverflow.ellipsis, ), @@ -187,6 +192,9 @@ class _CollectionsGalleryWidgetState extends State return Container( padding: EdgeInsets.fromLTRB(28, 12, 28, 46), child: OutlineButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(32.0), + ), child: Icon( Icons.add, ), @@ -205,7 +213,7 @@ class _CollectionsGalleryWidgetState extends State child: Column( children: [ ClipRRect( - borderRadius: BorderRadius.circular(4.0), + borderRadius: BorderRadius.circular(12.0), child: Container( child: Hero( tag: "collection" + c.thumbnail.tag(), @@ -260,7 +268,7 @@ class SectionTitle extends StatelessWidget { @override Widget build(BuildContext context) { return Container( - margin: EdgeInsets.fromLTRB(12, 12, 0, 0), + margin: EdgeInsets.fromLTRB(24, 12, 0, 0), child: Column(children: [ Align( alignment: Alignment.centerLeft, @@ -269,6 +277,9 @@ class SectionTitle extends StatelessWidget { style: TextStyle( fontWeight: FontWeight.bold, color: Theme.of(context).primaryColorLight, + fontSize: 20, + fontFamily: 'Montserrat', + letterSpacing: 1, ), ), ), diff --git a/lib/ui/common_elements.dart b/lib/ui/common_elements.dart index a1c84363f..b21eab0d3 100644 --- a/lib/ui/common_elements.dart +++ b/lib/ui/common_elements.dart @@ -15,6 +15,7 @@ RaisedButton button( fontWeight: FontWeight.bold, fontSize: fontSize, ), + textAlign: TextAlign.center, ), onPressed: onPressed, shape: RoundedRectangleBorder( diff --git a/lib/ui/email_entry_page.dart b/lib/ui/email_entry_page.dart index d74e39fde..7e6f06fae 100644 --- a/lib/ui/email_entry_page.dart +++ b/lib/ui/email_entry_page.dart @@ -1,6 +1,3 @@ -import 'dart:developer'; -import 'dart:io'; - import 'package:flutter/cupertino.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; @@ -35,7 +32,7 @@ class _EmailEntryPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text("Sign In"), + title: Text("sign in"), ), body: _getBody(), ); @@ -60,50 +57,97 @@ class _EmailEntryPageState extends State { padding: EdgeInsets.all(8), child: Column( children: [ - Image.asset( - "assets/welcome.png", - width: 300, - height: 200, + // Image.asset( + // "assets/welcome.png", + // width: 300, + // height: 200, + // ), + Padding( + padding: EdgeInsets.all(32), ), - Padding(padding: EdgeInsets.all(12)), - TextFormField( - decoration: InputDecoration( - hintText: 'your name', - contentPadding: EdgeInsets.all(12), + Padding( + padding: const EdgeInsets.fromLTRB(32, 0, 32, 0), + child: TextFormField( + decoration: InputDecoration( + hintText: 'your name', + hintStyle: TextStyle( + color: Colors.white30, + ), + contentPadding: EdgeInsets.all(12), + ), + onChanged: (value) { + setState(() { + _name = value; + }); + }, + autofocus: true, + autocorrect: false, + keyboardType: TextInputType.text, + textCapitalization: TextCapitalization.words, + initialValue: _name, ), - onChanged: (value) { - setState(() { - _name = value; - }); - }, - autofocus: true, - autocorrect: false, - keyboardType: TextInputType.text, - textCapitalization: TextCapitalization.words, - initialValue: _name, - ), - Padding(padding: EdgeInsets.all(8)), - TextFormField( - decoration: InputDecoration( - hintText: 'you@email.com', - contentPadding: EdgeInsets.all(12), - ), - onChanged: (value) { - setState(() { - _email = value; - }); - }, - autocorrect: false, - keyboardType: TextInputType.emailAddress, - initialValue: _email, ), Padding(padding: EdgeInsets.all(8)), Padding( - padding: const EdgeInsets.all(6), + padding: const EdgeInsets.fromLTRB(32, 0, 32, 0), + child: TextFormField( + decoration: InputDecoration( + hintText: 'you@email.com', + hintStyle: TextStyle( + color: Colors.white30, + ), + contentPadding: EdgeInsets.all(12), + ), + onChanged: (value) { + setState(() { + _email = value; + }); + }, + autocorrect: false, + keyboardType: TextInputType.emailAddress, + initialValue: _email, + ), + ), + Padding(padding: EdgeInsets.all(20)), + Padding( + padding: const EdgeInsets.all(8.0), + child: ClipRRect( + borderRadius: BorderRadius.circular(20), + child: Container( + color: Colors.grey[700], + padding: EdgeInsets.all(24), + child: Row( + // crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Icon(Icons.info), + ), + Padding( + padding: EdgeInsets.fromLTRB(12, 0, 0, 0), + ), + Expanded( + child: Text( + "ente will be free to use until we have launched a stable web client. After that it will cost $amount/100GB monthly. We'll make sure it's worth it.", + overflow: TextOverflow.visible, + style: TextStyle( + color: Colors.white70, + )), + ), + ], + ), + ), + ), + ), + Padding(padding: EdgeInsets.all(8)), + Padding( + padding: const EdgeInsets.all(12), child: RichText( text: TextSpan( children: [ - TextSpan(text: "By clicking Sign In, I agree to the "), + TextSpan( + text: "By clicking Sign In, I agree to the ", + ), TextSpan( text: "Terms of Service", style: TextStyle( @@ -129,7 +173,9 @@ class _EmailEntryPageState extends State { ], style: TextStyle( height: 1.25, - // color: Colors.grey, + fontSize: 14, + fontFamily: 'Ubuntu', + color: Colors.white70, ), ), textAlign: TextAlign.center, @@ -138,43 +184,25 @@ class _EmailEntryPageState extends State { Padding(padding: EdgeInsets.all(8)), Container( width: double.infinity, - height: 44, - child: button("Sign In", onPressed: () { - if (!isValidEmail(_email)) { - showErrorDialog(context, "Invalid email address", - "Please enter a valid email address."); - return; - } - _config.setEmail(_email); - _config.setName(_name); - UserService.instance.getOtt(context, _email); - }), - ), - Padding(padding: EdgeInsets.all(12)), - Container( - // width: double.infinity, - color: Colors.grey[900], - padding: EdgeInsets.all(16), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Text("ℹ️"), - ), - Padding( - padding: EdgeInsets.fromLTRB(8, 0, 0, 0), - ), - Expanded( - child: Text( - "ente will be free to use until we have launched a stable web client. After that it will cost $amount/100GB monthly.", - overflow: TextOverflow.visible, - ), - ), - ], + height: 64, + padding: const EdgeInsets.fromLTRB(80, 0, 80, 0), + child: button( + "sign in", + onPressed: _email != null && _name != null + ? () { + if (!isValidEmail(_email)) { + showErrorDialog(context, "Invalid email address", + "Please enter a valid email address."); + return; + } + _config.setEmail(_email); + _config.setName(_name); + UserService.instance.getOtt(context, _email); + } + : null, + fontSize: 18, ), - ) + ), ], ), ), diff --git a/lib/ui/gallery.dart b/lib/ui/gallery.dart index ca81cb58b..f7edf1c2f 100644 --- a/lib/ui/gallery.dart +++ b/lib/ui/gallery.dart @@ -257,7 +257,7 @@ class _GalleryState extends State { } return Container( - padding: const EdgeInsets.all(8.0), + padding: const EdgeInsets.fromLTRB(14, 8, 0, 8), alignment: Alignment.centerLeft, child: Text( title, diff --git a/lib/ui/gallery_app_bar_widget.dart b/lib/ui/gallery_app_bar_widget.dart index d3c3dd80c..d8cda2fcb 100644 --- a/lib/ui/gallery_app_bar_widget.dart +++ b/lib/ui/gallery_app_bar_widget.dart @@ -74,12 +74,17 @@ class _GalleryAppBarWidgetState extends State { Widget build(BuildContext context) { if (widget.selectedFiles.files.isEmpty) { return AppBar( + backgroundColor: Color(0x00000000), + elevation: 0, title: Text( widget.title, style: TextStyle( fontFamily: widget.type == GalleryAppBarType.homepage ? 'Montserrat' : 'NunitoSans', + color: widget.type == GalleryAppBarType.homepage + ? Colors.white.withOpacity(0.00) + : Colors.white.withOpacity(0.60), ), ), actions: _getDefaultActions(context), diff --git a/lib/ui/home_widget.dart b/lib/ui/home_widget.dart index 20fbe5b31..44ae1c97a 100644 --- a/lib/ui/home_widget.dart +++ b/lib/ui/home_widget.dart @@ -78,10 +78,13 @@ class _HomeWidgetState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: GalleryAppBarWidget( - GalleryAppBarType.homepage, - widget.title, - _selectedFiles, + appBar: PreferredSize( + preferredSize: Size.fromHeight(20.0), + child: GalleryAppBarWidget( + GalleryAppBarType.homepage, + widget.title, + _selectedFiles, + ), ), bottomNavigationBar: _buildBottomNavigationBar(), body: ExtentsPageView( @@ -177,15 +180,15 @@ class _HomeWidgetState extends State { items: [ TabItem( icon: Icons.photo_library, - title: "Photos", + title: "photos", ), TabItem( icon: Icons.folder_special, - title: "Collections", + title: "collections", ), TabItem( icon: Icons.folder_shared, - title: "Shared", + title: "shared", ), ], onTap: (index) { diff --git a/lib/ui/memories_widget.dart b/lib/ui/memories_widget.dart index 6299a674c..4a7f23a40 100644 --- a/lib/ui/memories_widget.dart +++ b/lib/ui/memories_widget.dart @@ -42,7 +42,10 @@ class _MemoriesWidgetState extends State snapshot.data.length == 0) { return Container(); } else { - return _buildMemories(snapshot.data); + return Padding( + padding: const EdgeInsets.all(8.0), + child: _buildMemories(snapshot.data), + ); } }, ); @@ -115,7 +118,7 @@ class MemoryWidget extends StatelessWidget { child: Column( children: [ _buildMemoryItem(context, index), - Padding(padding: EdgeInsets.all(2)), + Padding(padding: EdgeInsets.all(4)), Hero( tag: title, child: Material( @@ -124,6 +127,7 @@ class MemoryWidget extends StatelessWidget { title, style: TextStyle( fontSize: 12, + color: Colors.white60, ), ), ), diff --git a/lib/ui/ott_verification_page.dart b/lib/ui/ott_verification_page.dart index ce968bb6b..e8ba3bf16 100644 --- a/lib/ui/ott_verification_page.dart +++ b/lib/ui/ott_verification_page.dart @@ -21,7 +21,7 @@ class _OTTVerificationPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text("Verify Email"), + title: Text("verify email"), ), body: _getBody(), ); @@ -42,54 +42,73 @@ class _OTTVerificationPageState extends State { height: 220, ), Padding(padding: EdgeInsets.all(12)), - Text.rich( - TextSpan( - style: TextStyle(fontSize: 18), - children: [ - TextSpan(text: "We've sent a mail to "), - TextSpan( - text: Configuration.instance.getEmail(), - style: TextStyle( - color: Theme.of(context).accentColor, - )), - ], - ), - textAlign: TextAlign.center, - ), - Padding(padding: EdgeInsets.all(12)), Text( - "Please check your inbox (and spam) to complete verification.", - textAlign: TextAlign.center, + "we've sent a mail to", + style: TextStyle(fontSize: 18), ), - Padding(padding: EdgeInsets.all(12)), - TextFormField( - decoration: InputDecoration( - hintText: 'Tap to enter verification code', - contentPadding: EdgeInsets.all(20), + Padding(padding: EdgeInsets.all(2)), + Text( + Configuration.instance.getEmail(), + style: TextStyle( + color: Theme.of(context).accentColor, + fontSize: 18, + ), + ), + // Text.rich( + // TextSpan( + // style: TextStyle(fontSize: 18), + // children: [ + // TextSpan(text: "we've sent a mail to "), + // TextSpan( + // text: Configuration.instance.getEmail(), + // style: TextStyle( + // color: Theme.of(context).accentColor, + // )), + // ], + // ), + // textAlign: TextAlign.center, + // ), + Padding( + padding: const EdgeInsets.all(32), + child: Text( + "please check your inbox (and spam) to complete verification.", + textAlign: TextAlign.center, + style: TextStyle(fontSize: 12), + ), + ), + Padding( + padding: const EdgeInsets.fromLTRB(60, 0, 60, 32), + child: TextFormField( + decoration: InputDecoration( + hintText: 'tap to enter code', + contentPadding: EdgeInsets.all(12), + ), + controller: _verificationCodeController, + autofocus: false, + autocorrect: false, + keyboardType: TextInputType.visiblePassword, + textAlign: TextAlign.center, + onChanged: (_) { + setState(() {}); + }, ), - controller: _verificationCodeController, - autofocus: false, - autocorrect: false, - keyboardType: TextInputType.visiblePassword, - textAlign: TextAlign.center, - onChanged: (_) { - setState(() {}); - }, ), - Padding(padding: EdgeInsets.all(8)), Container( - width: double.infinity, - height: 44, - child: button( - "Verify", - onPressed: _verificationCodeController.text == null || - _verificationCodeController.text.isEmpty - ? null - : () { - UserService.instance.getCredentials( - context, _verificationCodeController.text); - }, - )), + padding: const EdgeInsets.fromLTRB(60, 0, 60, 0), + width: double.infinity, + height: 64, + child: button( + "verify", + onPressed: _verificationCodeController.text == null || + _verificationCodeController.text.isEmpty + ? null + : () { + UserService.instance.getCredentials( + context, _verificationCodeController.text); + }, + fontSize: 18, + ), + ), Padding(padding: EdgeInsets.all(8)), FlatButton( onPressed: () { @@ -102,7 +121,7 @@ class _OTTVerificationPageState extends State { ); }, child: Text( - "Did not get email?", + "did not get email?", style: TextStyle( decoration: TextDecoration.underline, fontSize: 12, diff --git a/lib/ui/passphrase_reentry_page.dart b/lib/ui/passphrase_reentry_page.dart index dadee90f6..47cb15808 100644 --- a/lib/ui/passphrase_reentry_page.dart +++ b/lib/ui/passphrase_reentry_page.dart @@ -54,6 +54,9 @@ class _PassphraseReentryPageState extends State { hintText: "that thing you promised to never forget", contentPadding: EdgeInsets.all(20), ), + style: TextStyle( + fontSize: 14, + ), controller: _passphraseController, autofocus: false, autocorrect: false, @@ -64,8 +67,9 @@ class _PassphraseReentryPageState extends State { ), Padding(padding: EdgeInsets.all(12)), Container( + padding: const EdgeInsets.fromLTRB(80, 0, 80, 0), width: double.infinity, - height: 44, + height: 64, child: button( "Verify Passphrase", onPressed: _passphraseController.text.isNotEmpty diff --git a/lib/ui/shared_collections_gallery.dart b/lib/ui/shared_collections_gallery.dart index 270f76ef2..86045b757 100644 --- a/lib/ui/shared_collections_gallery.dart +++ b/lib/ui/shared_collections_gallery.dart @@ -91,8 +91,8 @@ class _SharedCollectionGalleryState extends State return SingleChildScrollView( child: Column( children: [ - SectionTitle("INCOMING"), - Padding(padding: EdgeInsets.all(8)), + SectionTitle("incoming"), + Padding(padding: EdgeInsets.all(16)), collections.incoming.length > 0 ? GridView.builder( shrinkWrap: true, @@ -107,10 +107,11 @@ class _SharedCollectionGalleryState extends State ), ) : nothingToSeeHere, - Padding(padding: EdgeInsets.all(4)), - Divider(height: 4), - SectionTitle("OUTGOING"), - Padding(padding: EdgeInsets.all(8)), + Padding(padding: EdgeInsets.all(16)), + Divider(height: 0), + Padding(padding: EdgeInsets.all(14)), + SectionTitle("outgoing"), + Padding(padding: EdgeInsets.all(16)), collections.outgoing.length > 0 ? ListView.builder( shrinkWrap: true, diff --git a/lib/ui/sign_in_header_widget.dart b/lib/ui/sign_in_header_widget.dart index 016de4799..560801cb3 100644 --- a/lib/ui/sign_in_header_widget.dart +++ b/lib/ui/sign_in_header_widget.dart @@ -45,43 +45,48 @@ class _SignInHeaderState extends State { child: Column( children: [ Text( - "Preserve Your Memories", + "preserve your memories", style: TextStyle( fontSize: 16, ), ), - Container( - width: double.infinity, - height: 64, - padding: EdgeInsets.all(8), - child: button( - "Sign In", - fontSize: 18, - onPressed: () { - var page; - if (Configuration.instance.getToken() == null) { - page = EmailEntryPage(); - } else { - // No key - if (Configuration.instance.getKeyAttributes() != null) { - // Yet to set or decrypt the key - page = PassphraseReentryPage(); + Padding( + padding: EdgeInsets.all(10), + ), + Padding( + padding: const EdgeInsets.fromLTRB(60, 0, 60, 0), + child: Container( + width: double.infinity, + height: 64, + child: button( + "sign in", + fontSize: 18, + onPressed: () { + var page; + if (Configuration.instance.getToken() == null) { + page = EmailEntryPage(); } else { - // Never had a key - page = PassphraseEntryPage(); + // No key + if (Configuration.instance.getKeyAttributes() != null) { + // Yet to set or decrypt the key + page = PassphraseReentryPage(); + } else { + // Never had a key + page = PassphraseEntryPage(); + } } - } - Navigator.of(context).push( - MaterialPageRoute( - builder: (BuildContext context) { - return page; - }, - ), - ); - }, + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context) { + return page; + }, + ), + ); + }, + ), ), ), - Padding(padding: EdgeInsets.all(4)), + Padding(padding: EdgeInsets.all(10)), Divider( height: 2, ), diff --git a/lib/ui/thumbnail_widget.dart b/lib/ui/thumbnail_widget.dart index fe6b046e9..0926c2a04 100644 --- a/lib/ui/thumbnail_widget.dart +++ b/lib/ui/thumbnail_widget.dart @@ -59,7 +59,14 @@ class _ThumbnailWidgetState extends State { content = Stack( children: [ image, - Icon(Icons.play_circle_outline), + Container( + height: 64, + child: Icon( + Icons.play_circle_outline, + size: 40, + color: Colors.white70, + ), + ), ], fit: StackFit.expand, ); diff --git a/pubspec.yaml b/pubspec.yaml index 1a9d28152..ed81cdb12 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -92,6 +92,10 @@ flutter: fonts: - asset: fonts/NunitoSans-Regular.ttf - asset: fonts/NunitoSans-Bold.ttf + - family: Ubuntu + fonts: + - asset: fonts/Ubuntu-Regular.ttf + - asset: fonts/Ubuntu-Light.ttf - family: Montserrat fonts: - asset: fonts/Montserrat-Medium.ttf