Skip to content

Commit

Permalink
[mob][photos] Subscription screen redesign (#2576)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashilkn authored Jul 29, 2024
2 parents cf6336d + 142a4dd commit 27ae4b8
Show file tree
Hide file tree
Showing 16 changed files with 725 additions and 504 deletions.
Binary file added mobile/assets/2.0x/active_subscription.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mobile/assets/2.0x/popular_subscription.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mobile/assets/3.0x/active_subscription.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mobile/assets/3.0x/popular_subscription.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mobile/assets/active_subscription.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mobile/assets/popular_subscription.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions mobile/lib/models/subscription.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:convert';

const freeProductID = "free";
const popularProductIDs = ["200gb_yearly", "200gb_monthly"];
const stripe = "stripe";
const appStore = "appstore";
const playStore = "playstore";
Expand Down Expand Up @@ -47,6 +48,10 @@ class Subscription {
return 'year' == period;
}

bool isFreePlan() {
return productID == freeProductID;
}

static fromMap(Map<String, dynamic>? map) {
if (map == null) return null;
return Subscription(
Expand Down
7 changes: 6 additions & 1 deletion mobile/lib/theme/colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class EnteColorScheme {
final Color fillMuted;
final Color fillFaint;
final Color fillFaintPressed;
final Color fillBaseGrey;

// Stroke Colors
final Color strokeBase;
Expand Down Expand Up @@ -74,6 +75,7 @@ class EnteColorScheme {
this.fillMuted,
this.fillFaint,
this.fillFaintPressed,
this.fillBaseGrey,
this.strokeBase,
this.strokeMuted,
this.strokeFaint,
Expand Down Expand Up @@ -114,6 +116,7 @@ const EnteColorScheme lightScheme = EnteColorScheme(
fillMutedLight,
fillFaintLight,
fillFaintPressedLight,
fillBaseGreyLight,
strokeBaseLight,
strokeMutedLight,
strokeFaintLight,
Expand Down Expand Up @@ -142,6 +145,7 @@ const EnteColorScheme darkScheme = EnteColorScheme(
fillMutedDark,
fillFaintDark,
fillFaintPressedDark,
fillBaseGreyDark,
strokeBaseDark,
strokeMutedDark,
strokeFaintDark,
Expand Down Expand Up @@ -189,13 +193,15 @@ const Color fillStrongLight = Color.fromRGBO(0, 0, 0, 0.24);
const Color fillMutedLight = Color.fromRGBO(0, 0, 0, 0.12);
const Color fillFaintLight = Color.fromRGBO(0, 0, 0, 0.04);
const Color fillFaintPressedLight = Color.fromRGBO(0, 0, 0, 0.08);
const Color fillBaseGreyLight = Color.fromRGBO(242, 242, 242, 1);

const Color fillBaseDark = Color.fromRGBO(255, 255, 255, 1);
const Color fillBasePressedDark = Color.fromRGBO(255, 255, 255, 0.9);
const Color fillStrongDark = Color.fromRGBO(255, 255, 255, 0.32);
const Color fillMutedDark = Color.fromRGBO(255, 255, 255, 0.16);
const Color fillFaintDark = Color.fromRGBO(255, 255, 255, 0.12);
const Color fillFaintPressedDark = Color.fromRGBO(255, 255, 255, 0.06);
const Color fillBaseGreyDark = Color.fromRGBO(66, 66, 66, 1);

// Stroke Colors
const Color strokeBaseLight = Color.fromRGBO(0, 0, 0, 1);
Expand All @@ -216,7 +222,6 @@ const Color blurStrokePressedDark = Color.fromRGBO(255, 255, 255, 0.50);

// Other colors
const Color tabIconLight = Color.fromRGBO(0, 0, 0, 0.85);

const Color tabIconDark = Color.fromRGBO(255, 255, 255, 0.80);

// Fixed Colors
Expand Down
55 changes: 0 additions & 55 deletions mobile/lib/ui/payment/skip_subscription_widget.dart

This file was deleted.

Loading

0 comments on commit 27ae4b8

Please sign in to comment.