Merge branch 'main' into bot-token-fix
This commit is contained in:
commit
89fb45d0e0
26 changed files with 751 additions and 257 deletions
5
.github/workflows/integrate.yaml
vendored
5
.github/workflows/integrate.yaml
vendored
|
|
@ -10,7 +10,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
||||
- run: echo "$WEB_APP_ENV" > .env
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
|
|
@ -31,7 +30,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
||||
- run: echo "$WEB_APP_ENV" > .env
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: ${{ env.JAVA_VERSION }}
|
||||
|
|
@ -47,7 +45,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
||||
- run: echo "$WEB_APP_ENV" > .env
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
|
|
@ -62,7 +59,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
||||
- run: echo "$WEB_APP_ENV" > .env
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
|
|
@ -77,7 +73,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
||||
- run: echo "$WEB_APP_ENV" > .env
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
|
|
|
|||
15
.github/workflows/main_deploy.yaml
vendored
15
.github/workflows/main_deploy.yaml
vendored
|
|
@ -4,15 +4,18 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
- pangea-merge
|
||||
|
||||
env:
|
||||
# Setting an environment variable with the value of a configuration variable
|
||||
WEB_APP_ENV: ${{ vars.WEB_APP_ENV }}
|
||||
|
||||
jobs:
|
||||
deploy_web:
|
||||
runs-on: ubuntu-latest
|
||||
environment: staging
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
||||
- run: echo "$WEB_APP_ENV" > .env
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
|
|
@ -23,18 +26,20 @@ jobs:
|
|||
- name: Prepare web
|
||||
run: ./scripts/prepare-web.sh
|
||||
- name: Build Release Web
|
||||
run: flutter build web --dart-define=FLUTTER_WEB_CANVASKIT_URL=canvaskit/ --release --source-maps --base-href "/client/"
|
||||
run: ./scripts/build-web.sh
|
||||
- name: Build Website
|
||||
run: |
|
||||
mv build/web public
|
||||
mv .env public/.env
|
||||
touch public/.env
|
||||
echo "$WEB_APP_ENV" >> public/.env
|
||||
cp public/.env public/assets/.env
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
personal_token: ${{ secrets.PAGES_DEPLOY_TOKEN }}
|
||||
publish_dir: ./public
|
||||
publish_branch: gh-pages
|
||||
# cname: app.staging.pangea.chat.im
|
||||
# cname: app.staging.pangea.chat
|
||||
|
||||
update_sentry:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
3
.github/workflows/old.yml
vendored
3
.github/workflows/old.yml
vendored
|
|
@ -3,8 +3,7 @@ name: Old Release Workflow
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- pangea-merge
|
||||
- master-unused
|
||||
|
||||
concurrency:
|
||||
group: release_workflow
|
||||
|
|
|
|||
8
.github/workflows/release.yaml
vendored
8
.github/workflows/release.yaml
vendored
|
|
@ -27,20 +27,20 @@ jobs:
|
|||
- name: Build Release Web
|
||||
run: flutter build web --dart-define=FLUTTER_WEB_CANVASKIT_URL=canvaskit/ --release --source-maps
|
||||
- name: Create archive
|
||||
run: tar -czf fluffychat-web.tar.gz build/web/
|
||||
run: tar -czf pangeachat-web.tar.gz build/web/
|
||||
- name: Upload Web Build
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Web Build
|
||||
path: fluffychat-web.tar.gz
|
||||
path: pangeachat-web.tar.gz
|
||||
- name: Upload to release
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PAGES_DEPLOY_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: fluffychat-web.tar.gz
|
||||
asset_name: fluffychat-web.tar.gz
|
||||
asset_path: pangeachat-web.tar.gz
|
||||
asset_name: pangeachat-web.tar.gz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
build_apk:
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -12,6 +12,7 @@
|
|||
.svn/
|
||||
prime
|
||||
*.env
|
||||
!/public/.env
|
||||
|
||||
# libolm package
|
||||
/assets/js/package
|
||||
|
|
|
|||
|
|
@ -3339,7 +3339,12 @@
|
|||
"downloadTxtFile": "Download Text File",
|
||||
"downloadCSVFile": "Download CSV File",
|
||||
"promotionalSubscriptionDesc": "You currently have a lifetime promotional subscription. Message support@pangea.chat for help changing your subscription.",
|
||||
"originalSubscriptionPlatform": "Subscription purchased through",
|
||||
"originalSubscriptionPlatform": "Subscription purchased through {purchasePlatform}",
|
||||
"@originalSubscriptionPlatform": {
|
||||
"placeholders": {
|
||||
"purchasePlatform": {}
|
||||
}
|
||||
},
|
||||
"oneWeekTrial": "One Week Trial",
|
||||
"creatingSpacePleaseWait": "Creating space. Please wait...",
|
||||
"downloadXLSXFile": "Download Excel File",
|
||||
|
|
@ -3938,5 +3943,15 @@
|
|||
"groupName": "Group name",
|
||||
"createGroupAndInviteUsers": "Create a group and invite users",
|
||||
"groupCanBeFoundViaSearch": "Group can be found via search",
|
||||
"inNoSpaces": "You are not a member of any classes or exchanges"
|
||||
"trialExpiration": "Your free trial expires on {expiration}",
|
||||
"@trialExpiration": {
|
||||
"placeholders": {
|
||||
"expiration": {}
|
||||
}
|
||||
},
|
||||
"freeTrialDesc": "New users recieve a one week free trial of Pangea Chat",
|
||||
"activateTrial": "Activate Trial",
|
||||
"inNoSpaces": "You are not a member of any classes or exchanges",
|
||||
"successfullySubscribed": "You have successfully subscribed!",
|
||||
"clickToManageSubscription": "Click here to manage your subscription."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"application_name": "FluffyChat",
|
||||
"application_name": "PangeaChat",
|
||||
"application_welcome_message": null,
|
||||
"default_homeserver": "matrix.org",
|
||||
"web_base_url": "https://fluffychat.im/web",
|
||||
"privacy_url": "https://fluffychat.im/en/privacy.html",
|
||||
"default_homeserver": "matrix.pangea.chat",
|
||||
"web_base_url": "https://web.pangea.chat",
|
||||
"privacy_url": "https://pangea.chat/privacy",
|
||||
"render_html": false,
|
||||
"hide_redacted_events": false,
|
||||
"hide_unknown_events": false
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import 'dart:ui';
|
||||
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/pangea/config/environment.dart';
|
||||
// Project imports:
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
abstract class AppConfig {
|
||||
// #Pangea
|
||||
|
|
@ -121,6 +121,7 @@ abstract class AppConfig {
|
|||
"https://buy.stripe.com/test_bIY6ssd8z5Uz8ec8ww";
|
||||
static String iosPromoCode =
|
||||
"https://apps.apple.com/redeem?ctx=offercodes&id=1445118630&code=";
|
||||
static String trialSubscriptionId = "pangea_new_user_trial";
|
||||
// Pangea#
|
||||
|
||||
static void loadFromJson(Map<String, dynamic> json) {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pages/chat_details/chat_details.dart';
|
||||
import 'package:fluffychat/pages/chat_details/participant_list_item.dart';
|
||||
|
|
@ -26,6 +19,11 @@ import 'package:fluffychat/widgets/avatar.dart';
|
|||
import 'package:fluffychat/widgets/chat_settings_popup_menu.dart';
|
||||
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
class ChatDetailsView extends StatelessWidget {
|
||||
final ChatDetailsController controller;
|
||||
|
|
@ -546,8 +544,10 @@ class ChatDetailsView extends StatelessWidget {
|
|||
backgroundColor:
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
foregroundColor: iconColor,
|
||||
child: const Icon(
|
||||
Icons.lock_outlined,
|
||||
child: Icon(
|
||||
room.locked
|
||||
? Icons.lock_outlined
|
||||
: Icons.no_encryption_outlined,
|
||||
),
|
||||
),
|
||||
value: room.locked,
|
||||
|
|
|
|||
|
|
@ -1,19 +1,9 @@
|
|||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
import 'package:receive_sharing_intent/receive_sharing_intent.dart';
|
||||
import 'package:uni_links/uni_links.dart';
|
||||
|
||||
// Project imports:
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/pages/chat_list/chat_list_view.dart';
|
||||
|
|
@ -24,10 +14,23 @@ import 'package:fluffychat/pangea/utils/add_to_space.dart';
|
|||
import 'package:fluffychat/pangea/utils/chat_list_handle_space_tap.dart';
|
||||
import 'package:fluffychat/pangea/utils/error_handler.dart';
|
||||
import 'package:fluffychat/pangea/utils/firebase_analytics.dart';
|
||||
import 'package:fluffychat/pangea/widgets/subscription/subscription_snackbar.dart';
|
||||
import 'package:fluffychat/utils/localized_exception_extension.dart';
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions/client_stories_extension.dart';
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
import 'package:fluffychat/utils/tor_stub.dart'
|
||||
if (dart.library.html) 'package:tor_detector_web/tor_detector_web.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
import 'package:receive_sharing_intent/receive_sharing_intent.dart';
|
||||
import 'package:uni_links/uni_links.dart';
|
||||
|
||||
import '../../../utils/account_bundles.dart';
|
||||
import '../../utils/matrix_sdk_extensions/matrix_file_extension.dart';
|
||||
import '../../utils/url_launcher.dart';
|
||||
|
|
@ -35,9 +38,6 @@ import '../../utils/voip/callkeep_manager.dart';
|
|||
import '../../widgets/fluffy_chat_app.dart';
|
||||
import '../../widgets/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/utils/tor_stub.dart'
|
||||
if (dart.library.html) 'package:tor_detector_web/tor_detector_web.dart';
|
||||
|
||||
enum SelectMode {
|
||||
normal,
|
||||
share,
|
||||
|
|
@ -445,6 +445,7 @@ class ChatListController extends State<ChatList>
|
|||
//#Pangea
|
||||
StreamSubscription? classStream;
|
||||
StreamSubscription? _invitedSpaceSubscription;
|
||||
StreamSubscription? _subscriptionStatusStream;
|
||||
//Pangea#
|
||||
|
||||
@override
|
||||
|
|
@ -502,6 +503,14 @@ class ChatListController extends State<ChatList>
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
_subscriptionStatusStream = pangeaController
|
||||
.subscriptionController.subscriptionStream.stream
|
||||
.listen((event) {
|
||||
if (mounted) {
|
||||
showSubscribedSnackbar(context);
|
||||
}
|
||||
});
|
||||
//Pangea#
|
||||
|
||||
super.initState();
|
||||
|
|
@ -515,6 +524,7 @@ class ChatListController extends State<ChatList>
|
|||
//#Pangea
|
||||
classStream?.cancel();
|
||||
_invitedSpaceSubscription?.cancel();
|
||||
_subscriptionStatusStream?.cancel();
|
||||
//Pangea#
|
||||
scrollController.removeListener(_onScroll);
|
||||
super.dispose();
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
// Flutter imports:
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
||||
import 'package:fluffychat/pangea/utils/password_forgotten.dart';
|
||||
import 'package:fluffychat/widgets/layouts/login_scaffold.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
||||
import 'login.dart';
|
||||
|
||||
class LoginView extends StatelessWidget {
|
||||
|
|
@ -20,7 +19,30 @@ class LoginView extends StatelessWidget {
|
|||
// enforceMobileMode: Matrix.of(context).client.isLogged(),
|
||||
// Pangea#
|
||||
appBar: AppBar(
|
||||
leading: controller.loading ? null : const BackButton(),
|
||||
// #Pangea
|
||||
// leading: controller.loading ? null : const BackButton(),
|
||||
leading: controller.loading
|
||||
? null
|
||||
: Padding(
|
||||
padding: const EdgeInsets.only(left: 10),
|
||||
child: ElevatedButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
style: ButtonStyle(
|
||||
padding: MaterialStateProperty.all(EdgeInsets.zero),
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
Theme.of(context)
|
||||
.colorScheme
|
||||
.background
|
||||
.withOpacity(0.75),
|
||||
),
|
||||
shape: MaterialStateProperty.all<OutlinedBorder>(
|
||||
const CircleBorder(),
|
||||
),
|
||||
),
|
||||
child: const Icon(Icons.arrow_back),
|
||||
),
|
||||
),
|
||||
// Pangea#
|
||||
automaticallyImplyLeading: !controller.loading,
|
||||
centerTitle: true,
|
||||
// #Pangea
|
||||
|
|
|
|||
|
|
@ -4,4 +4,8 @@ class PLocalKey {
|
|||
static const String classes = 'classes';
|
||||
|
||||
static const String cachedClassCodeToJoin = "cachedclasscodetojoin";
|
||||
static const String beganWebPayment = "beganWebPayment";
|
||||
|
||||
// making this a random string so that it's harder to guess
|
||||
static const String activatedTrialKey = '7C4EuKIsph';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,9 @@
|
|||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:http/http.dart';
|
||||
import 'package:purchases_flutter/purchases_flutter.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pangea/constants/local.key.dart';
|
||||
import 'package:fluffychat/pangea/controllers/base_controller.dart';
|
||||
import 'package:fluffychat/pangea/controllers/pangea_controller.dart';
|
||||
import 'package:fluffychat/pangea/models/base_subscription_info.dart';
|
||||
|
|
@ -22,6 +15,12 @@ import 'package:fluffychat/pangea/utils/error_handler.dart';
|
|||
import 'package:fluffychat/pangea/utils/firebase_analytics.dart';
|
||||
import 'package:fluffychat/pangea/widgets/subscription/subscription_paywall.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:http/http.dart';
|
||||
import 'package:purchases_flutter/purchases_flutter.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
class SubscriptionController extends BaseController {
|
||||
late PangeaController _pangeaController;
|
||||
|
|
@ -29,6 +28,7 @@ class SubscriptionController extends BaseController {
|
|||
|
||||
//convert this logic to use completer
|
||||
bool initialized = false;
|
||||
final StreamController subscriptionStream = StreamController.broadcast();
|
||||
|
||||
SubscriptionController(PangeaController pangeaController) : super() {
|
||||
_pangeaController = pangeaController;
|
||||
|
|
@ -59,13 +59,32 @@ class SubscriptionController extends BaseController {
|
|||
: MobileSubscriptionInfo(pangeaController: _pangeaController);
|
||||
|
||||
await subscription!.configure();
|
||||
if (activatedNewUserTrial) {
|
||||
setNewUserTrial();
|
||||
}
|
||||
|
||||
initialized = true;
|
||||
|
||||
if (!kIsWeb) {
|
||||
Purchases.addCustomerInfoUpdateListener(
|
||||
(CustomerInfo info) => updateCustomerInfo(),
|
||||
(CustomerInfo info) async {
|
||||
final bool wasSubscribed = isSubscribed;
|
||||
await updateCustomerInfo();
|
||||
if (!wasSubscribed && isSubscribed) {
|
||||
subscriptionStream.add(true);
|
||||
}
|
||||
},
|
||||
);
|
||||
} else {
|
||||
final bool? beganWebPayment = _pangeaController.pStoreService.read(
|
||||
PLocalKey.beganWebPayment,
|
||||
);
|
||||
if (beganWebPayment ?? false) {
|
||||
_pangeaController.pStoreService.delete(PLocalKey.beganWebPayment);
|
||||
if (_pangeaController.subscriptionController.isSubscribed) {
|
||||
subscriptionStream.add(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
setState();
|
||||
} catch (e, s) {
|
||||
|
|
@ -74,6 +93,26 @@ class SubscriptionController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
bool get activatedNewUserTrial =>
|
||||
_pangeaController.userController.inTrialWindow &&
|
||||
(_pangeaController.pStoreService.read(PLocalKey.activatedTrialKey) ??
|
||||
false);
|
||||
|
||||
void activateNewUserTrial() {
|
||||
_pangeaController.pStoreService.save(PLocalKey.activatedTrialKey, true);
|
||||
setNewUserTrial();
|
||||
}
|
||||
|
||||
void setNewUserTrial() {
|
||||
final String profileCreatedAt =
|
||||
_pangeaController.userController.userModel!.profile!.createdAt;
|
||||
final DateTime creationTimestamp = DateTime.parse(profileCreatedAt);
|
||||
final DateTime expirationDate = creationTimestamp.add(
|
||||
const Duration(days: 7),
|
||||
);
|
||||
subscription?.setTrial(expirationDate);
|
||||
}
|
||||
|
||||
Future<void> updateCustomerInfo() async {
|
||||
if (subscription == null) {
|
||||
ErrorHandler.logError(
|
||||
|
|
@ -175,6 +214,10 @@ class SubscriptionController extends BaseController {
|
|||
selectedSubscription.duration!,
|
||||
isPromo: isPromo,
|
||||
);
|
||||
_pangeaController.pStoreService.save(
|
||||
PLocalKey.beganWebPayment,
|
||||
true,
|
||||
);
|
||||
setState();
|
||||
launchUrlString(
|
||||
paymentLink,
|
||||
|
|
|
|||
|
|
@ -2,14 +2,15 @@ import 'dart:async';
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:jwt_decode/jwt_decode.dart';
|
||||
import 'package:matrix/matrix.dart' as matrix;
|
||||
|
||||
import 'package:fluffychat/pangea/constants/language_keys.dart';
|
||||
import 'package:fluffychat/pangea/constants/model_keys.dart';
|
||||
import 'package:fluffychat/pangea/controllers/base_controller.dart';
|
||||
import 'package:fluffychat/pangea/controllers/pangea_controller.dart';
|
||||
import 'package:fluffychat/widgets/fluffy_chat_app.dart';
|
||||
// Project imports:
|
||||
import 'package:jwt_decode/jwt_decode.dart';
|
||||
import 'package:matrix/matrix.dart' as matrix;
|
||||
|
||||
import '../constants/local.key.dart';
|
||||
import '../models/user_model.dart';
|
||||
import '../repo/user_repo.dart';
|
||||
|
|
@ -109,6 +110,16 @@ class UserController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
bool get inTrialWindow {
|
||||
final String? createdAt = userModel?.profile?.createdAt;
|
||||
if (createdAt == null) {
|
||||
return false;
|
||||
}
|
||||
return DateTime.parse(createdAt).isAfter(
|
||||
DateTime.now().subtract(const Duration(days: 7)),
|
||||
);
|
||||
}
|
||||
|
||||
Future<bool> get areUserLanguagesSet async {
|
||||
try {
|
||||
final PUserModel? toCheck = userModel ?? (await fetchUserModel());
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// Project imports:
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pangea/controllers/pangea_controller.dart';
|
||||
import 'package:fluffychat/pangea/controllers/subscription_controller.dart';
|
||||
import 'package:fluffychat/pangea/repo/subscription_repo.dart';
|
||||
|
|
@ -44,6 +46,9 @@ class SubscriptionInfo {
|
|||
allProducts = await SubscriptionRepo.getAllProducts();
|
||||
}
|
||||
|
||||
bool get isNewUserTrial =>
|
||||
currentSubscriptionId == AppConfig.trialSubscriptionId;
|
||||
|
||||
bool get currentSubscriptionIsPromotional =>
|
||||
currentSubscriptionId?.startsWith("rc_promo") ?? false;
|
||||
|
||||
|
|
@ -70,5 +75,16 @@ class SubscriptionInfo {
|
|||
currentSubscriptionId = null;
|
||||
}
|
||||
|
||||
void setTrial(DateTime expiration) {
|
||||
if (currentSubscription != null) return;
|
||||
expirationDate = expiration;
|
||||
currentSubscriptionId = AppConfig.trialSubscriptionId;
|
||||
currentSubscription = SubscriptionDetails(
|
||||
price: 0,
|
||||
id: AppConfig.trialSubscriptionId,
|
||||
periodType: 'trial',
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> setCustomerInfo() async {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// Package imports:
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:purchases_flutter/purchases_flutter.dart';
|
||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
|
||||
import 'package:fluffychat/pangea/config/environment.dart';
|
||||
import 'package:fluffychat/pangea/controllers/subscription_controller.dart';
|
||||
import 'package:fluffychat/pangea/models/base_subscription_info.dart';
|
||||
import 'package:fluffychat/pangea/utils/error_handler.dart';
|
||||
// Project imports:
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:purchases_flutter/purchases_flutter.dart';
|
||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
|
||||
class MobileSubscriptionInfo extends SubscriptionInfo {
|
||||
MobileSubscriptionInfo({required super.pangeaController}) : super();
|
||||
|
|
@ -182,7 +182,9 @@ class MobileSubscriptionInfo extends SubscriptionInfo {
|
|||
);
|
||||
} else if (activeEntitlements.isEmpty) {
|
||||
debugPrint("User has no active entitlements");
|
||||
resetSubscription();
|
||||
if (!isNewUserTrial) {
|
||||
resetSubscription();
|
||||
}
|
||||
return;
|
||||
}
|
||||
final EntitlementInfo activeEntitlement = activeEntitlements[0];
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/pangea/pages/analytics/bar_chart_placeholder_data.dart';
|
||||
import 'package:fluffychat/pangea/utils/error_handler.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import '../../enum/time_span.dart';
|
||||
import '../../enum/use_type.dart';
|
||||
import '../../models/chart_analytics_model.dart';
|
||||
|
|
@ -102,39 +102,73 @@ class MessagesBarChartState extends State<MessagesBarChart> {
|
|||
);
|
||||
}
|
||||
|
||||
bool showLabelBasedOnTimeSpan(
|
||||
TimeSpan timeSpan,
|
||||
TimeSeriesInterval current,
|
||||
TimeSeriesInterval? last,
|
||||
int labelIndex,
|
||||
) {
|
||||
switch (timeSpan) {
|
||||
case TimeSpan.day:
|
||||
return current.end.hour % 3 == 0;
|
||||
case TimeSpan.month:
|
||||
if (current.end.month != last?.end.month) {
|
||||
return true;
|
||||
}
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
if (FluffyThemes.isColumnMode(context)) {
|
||||
width = width - FluffyThemes.navRailWidth - FluffyThemes.columnWidth;
|
||||
}
|
||||
const int numDays = 28;
|
||||
const int minSpacePerDay = 20;
|
||||
final int availableSpaces = width ~/ minSpacePerDay;
|
||||
final int showAtInterval = (numDays / availableSpaces).floor() + 1;
|
||||
|
||||
final int lastDayOfCurrentMonth =
|
||||
DateTime(current.end.year, current.end.month + 1, 0).day;
|
||||
final bool isNextToMonth = labelIndex == 1 ||
|
||||
current.end.day == 2 ||
|
||||
current.end.day == lastDayOfCurrentMonth;
|
||||
final bool shouldShowNextToMonth = showAtInterval <= 1;
|
||||
return (current.end.day % showAtInterval == 0) &&
|
||||
(!isNextToMonth || shouldShowNextToMonth);
|
||||
case TimeSpan.week:
|
||||
case TimeSpan.sixmonths:
|
||||
case TimeSpan.year:
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
String getLabelBasedOnTimeSpan(
|
||||
TimeSpan timeSpan,
|
||||
TimeSeriesInterval current,
|
||||
TimeSeriesInterval? last,
|
||||
int labelIndex,
|
||||
) {
|
||||
if (widget.chartAnalytics == null) {
|
||||
final bool showLabel = showLabelBasedOnTimeSpan(
|
||||
timeSpan,
|
||||
current,
|
||||
last,
|
||||
labelIndex,
|
||||
);
|
||||
|
||||
if (widget.chartAnalytics == null || !showLabel) {
|
||||
return "";
|
||||
}
|
||||
if (isInSameGroup(last, current, timeSpan)) {
|
||||
return "-";
|
||||
}
|
||||
|
||||
switch (widget.chartAnalytics?.timeSpan ?? TimeSpan.month) {
|
||||
case TimeSpan.day:
|
||||
return current.end.hour % 3 == 0
|
||||
? DateFormat(DateFormat.HOUR).format(current.end)
|
||||
: "";
|
||||
// return current.end.hour.toString();
|
||||
return DateFormat(DateFormat.HOUR).format(current.end);
|
||||
case TimeSpan.week:
|
||||
return DateFormat(DateFormat.ABBR_WEEKDAY).format(current.end);
|
||||
case TimeSpan.month:
|
||||
// return current.end.month != last?.end.month
|
||||
// ? DateFormat(DateFormat.ABBR_MONTH_DAY).format(current.end)
|
||||
// : current.end.day % 5 == 0 &&
|
||||
// labelIndex != 1 &&
|
||||
// current.end.day != 30
|
||||
// ? DateFormat(DateFormat.DAY).format(current.end)
|
||||
// : "'";
|
||||
return current.end.month != last?.end.month
|
||||
? DateFormat(DateFormat.ABBR_MONTH).format(current.end)
|
||||
: DateFormat(DateFormat.DAY).format(current.end);
|
||||
// return current.end.day.toString();
|
||||
// text = DateFormat('DAY').format(timeSeriesIntervalStart);
|
||||
case TimeSpan.sixmonths:
|
||||
case TimeSpan.year:
|
||||
return DateFormat(DateFormat.ABBR_STANDALONE_MONTH).format(current.end);
|
||||
|
|
|
|||
|
|
@ -1,16 +1,19 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
// Project imports:
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pangea/config/environment.dart';
|
||||
import 'package:fluffychat/pangea/controllers/pangea_controller.dart';
|
||||
import 'package:fluffychat/pangea/controllers/subscription_controller.dart';
|
||||
import 'package:fluffychat/pangea/pages/settings_subscription/settings_subscription_view.dart';
|
||||
import 'package:fluffychat/pangea/utils/subscription_app_id.dart';
|
||||
import 'package:fluffychat/pangea/widgets/subscription/subscription_snackbar.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
// Project imports:
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
// Package imports:
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
class SubscriptionManagement extends StatefulWidget {
|
||||
const SubscriptionManagement({super.key});
|
||||
|
|
@ -24,6 +27,7 @@ class SubscriptionManagementController extends State<SubscriptionManagement> {
|
|||
final PangeaController pangeaController = MatrixState.pangeaController;
|
||||
SubscriptionDetails? selectedSubscription;
|
||||
late StreamSubscription _settingsSubscription;
|
||||
StreamSubscription? _subscriptionStatusStream;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
@ -40,6 +44,7 @@ class SubscriptionManagementController extends State<SubscriptionManagement> {
|
|||
void dispose() {
|
||||
super.dispose();
|
||||
_settingsSubscription.cancel();
|
||||
_subscriptionStatusStream?.cancel();
|
||||
}
|
||||
|
||||
bool get currentSubscriptionAvailable =>
|
||||
|
|
@ -53,6 +58,10 @@ class SubscriptionManagementController extends State<SubscriptionManagement> {
|
|||
?.currentSubscriptionIsPromotional ??
|
||||
false;
|
||||
|
||||
bool get isNewUserTrial =>
|
||||
pangeaController.subscriptionController.subscription?.isNewUserTrial ??
|
||||
false;
|
||||
|
||||
bool get showManagementOptions {
|
||||
if (!currentSubscriptionAvailable) {
|
||||
return false;
|
||||
|
|
@ -116,6 +125,12 @@ class SubscriptionManagementController extends State<SubscriptionManagement> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
_subscriptionStatusStream ??= pangeaController
|
||||
.subscriptionController.subscriptionStream.stream
|
||||
.listen((_) {
|
||||
showSubscribedSnackbar(context);
|
||||
context.go('/rooms');
|
||||
});
|
||||
return SettingsSubscriptionView(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
// Flutter imports:
|
||||
// Project imports:
|
||||
import 'package:fluffychat/pangea/controllers/pangea_controller.dart';
|
||||
import 'package:fluffychat/pangea/controllers/subscription_controller.dart';
|
||||
import 'package:fluffychat/pangea/pages/settings_subscription/change_subscription.dart';
|
||||
import 'package:fluffychat/pangea/pages/settings_subscription/settings_subscription.dart';
|
||||
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class SettingsSubscriptionView extends StatelessWidget {
|
||||
final SubscriptionManagementController controller;
|
||||
|
|
@ -105,45 +105,44 @@ class ManagementNotAvailableWarning extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final bool currentSubscriptionAvailable =
|
||||
controller.currentSubscriptionAvailable;
|
||||
final bool currentSubscriptionIsPromotional =
|
||||
controller.currentSubscriptionIsPromotional;
|
||||
final String? purchasePlatformDisplayName =
|
||||
controller.purchasePlatformDisplayName;
|
||||
final bool isLifetimeSubscription =
|
||||
subscriptionController.subscription?.isLifetimeSubscription ?? false;
|
||||
final DateTime? expirationDate =
|
||||
subscriptionController.subscription?.expirationDate;
|
||||
|
||||
String warningText = L10n.of(context)!.subscriptionManagementUnavailable;
|
||||
final DateFormat formatter = DateFormat('yyyy-MM-dd');
|
||||
|
||||
if (currentSubscriptionAvailable) {
|
||||
warningText = L10n.of(context)!.subsciptionPlatformTooltip;
|
||||
} else if (currentSubscriptionIsPromotional) {
|
||||
if (isLifetimeSubscription) {
|
||||
warningText = L10n.of(context)!.promotionalSubscriptionDesc;
|
||||
} else {
|
||||
warningText = L10n.of(context)!.promoSubscriptionExpirationDesc(
|
||||
formatter.format(expirationDate!),
|
||||
String getWarningText() {
|
||||
final DateFormat formatter = DateFormat('yyyy-MM-dd');
|
||||
if (controller.isNewUserTrial) {
|
||||
return L10n.of(context)!.trialExpiration(
|
||||
formatter.format(
|
||||
subscriptionController.subscription!.expirationDate!,
|
||||
),
|
||||
);
|
||||
}
|
||||
if (controller.currentSubscriptionAvailable) {
|
||||
String warningText = L10n.of(context)!.subsciptionPlatformTooltip;
|
||||
if (controller.purchasePlatformDisplayName != null) {
|
||||
warningText +=
|
||||
"\n${L10n.of(context)!.originalSubscriptionPlatform(controller.purchasePlatformDisplayName!)}";
|
||||
}
|
||||
return warningText;
|
||||
}
|
||||
if (controller.currentSubscriptionIsPromotional) {
|
||||
if (subscriptionController.subscription?.isLifetimeSubscription ??
|
||||
false) {
|
||||
return L10n.of(context)!.promotionalSubscriptionDesc;
|
||||
}
|
||||
return L10n.of(context)!.promoSubscriptionExpirationDesc(
|
||||
formatter.format(
|
||||
subscriptionController.subscription!.expirationDate!,
|
||||
),
|
||||
);
|
||||
}
|
||||
return L10n.of(context)!.subscriptionManagementUnavailable;
|
||||
}
|
||||
|
||||
return Center(
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
warningText,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
if (purchasePlatformDisplayName != null)
|
||||
Text(
|
||||
"${L10n.of(context)!.originalSubscriptionPlatform} $purchasePlatformDisplayName",
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Text(
|
||||
getWarningText(),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,12 @@
|
|||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pangea/extensions/pangea_room_extension.dart';
|
||||
import 'package:fluffychat/pangea/utils/error_handler.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pangea/extensions/pangea_room_extension.dart';
|
||||
import 'package:fluffychat/pangea/utils/error_handler.dart';
|
||||
import '../../../widgets/matrix.dart';
|
||||
import '../../utils/firebase_analytics.dart';
|
||||
import 'add_class_and_invite.dart';
|
||||
|
|
@ -192,24 +189,49 @@ class AddToSpaceState extends State<AddToSpaceToggles> {
|
|||
),
|
||||
),
|
||||
),
|
||||
if (parents.any((r) => r.room.id == possibleParent.id))
|
||||
SwitchListTile.adaptive(
|
||||
title: Text(
|
||||
L10n.of(context)!.suggestTo(possibleParentName),
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
widget.mode == AddToClassMode.chat
|
||||
? L10n.of(context)!.suggestChatDesc(possibleParentName)
|
||||
: L10n.of(context)!.suggestExchangeDesc(possibleParentName),
|
||||
),
|
||||
activeColor: AppConfig.activeToggleColor,
|
||||
value: isSuggestedInSpace(possibleParent),
|
||||
onChanged: (bool suggest) =>
|
||||
setSuggested(suggest, possibleParent),
|
||||
),
|
||||
AnimatedSize(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
child: parents.any((r) => r.room.id == possibleParent.id)
|
||||
? SwitchListTile.adaptive(
|
||||
title: Row(
|
||||
children: [
|
||||
const SizedBox(width: 32),
|
||||
Text(
|
||||
L10n.of(context)!.suggestTo(possibleParentName),
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
subtitle: Row(
|
||||
children: [
|
||||
const SizedBox(width: 32),
|
||||
Expanded(
|
||||
child: Text(
|
||||
widget.mode == AddToClassMode.chat
|
||||
? L10n.of(context)!
|
||||
.suggestChatDesc(possibleParentName)
|
||||
: L10n.of(context)!.suggestExchangeDesc(
|
||||
possibleParentName,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
activeColor: AppConfig.activeToggleColor,
|
||||
value: isSuggestedInSpace(possibleParent),
|
||||
onChanged: (bool suggest) =>
|
||||
setSuggested(suggest, possibleParent),
|
||||
)
|
||||
: Container(),
|
||||
),
|
||||
Divider(
|
||||
height: 0.5,
|
||||
color: Theme.of(context).colorScheme.secondary.withAlpha(25),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
@ -223,7 +245,6 @@ class AddToSpaceState extends State<AddToSpaceToggles> {
|
|||
final String subtitle = widget.mode == AddToClassMode.exchange
|
||||
? L10n.of(context)!.addToClassDesc
|
||||
: L10n.of(context)!.addToClassOrExchangeDesc;
|
||||
final scrollController = ScrollController();
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
|
|
@ -253,27 +274,10 @@ class AddToSpaceState extends State<AddToSpaceToggles> {
|
|||
if (isOpen) ...[
|
||||
const Divider(height: 1),
|
||||
possibleParents.isNotEmpty
|
||||
? Scrollbar(
|
||||
controller: scrollController,
|
||||
thumbVisibility: true,
|
||||
child: SingleChildScrollView(
|
||||
controller: scrollController,
|
||||
child: Column(
|
||||
children: [
|
||||
const Divider(height: 1),
|
||||
SizedBox(
|
||||
height: min(possibleParents.length * 55, 500),
|
||||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: possibleParents.length,
|
||||
itemBuilder: (BuildContext context, int i) {
|
||||
return getAddToSpaceToggleItem(i);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
? Column(
|
||||
children: possibleParents
|
||||
.mapIndexed((index, _) => getAddToSpaceToggleItem(index))
|
||||
.toList(),
|
||||
)
|
||||
: Center(
|
||||
child: Padding(
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
||||
// Flutter imports:
|
||||
// Project imports:
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pangea/controllers/pangea_controller.dart';
|
||||
import 'package:fluffychat/pangea/controllers/subscription_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
// Package imports:
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
||||
class SubscriptionOptions extends StatelessWidget {
|
||||
final PangeaController pangeaController;
|
||||
|
|
@ -16,23 +17,18 @@ class SubscriptionOptions extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
child: ListView(
|
||||
children: [
|
||||
const SizedBox(height: 20),
|
||||
Wrap(
|
||||
alignment: WrapAlignment.center,
|
||||
direction: Axis.horizontal,
|
||||
children: pangeaController
|
||||
.subscriptionController.subscription!.availableSubscriptions
|
||||
.map(
|
||||
(subscription) => SubscriptionCard(
|
||||
subscription: subscription,
|
||||
pangeaController: pangeaController,
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
],
|
||||
child: Wrap(
|
||||
alignment: WrapAlignment.center,
|
||||
direction: Axis.horizontal,
|
||||
children: pangeaController
|
||||
.subscriptionController.subscription!.availableSubscriptions
|
||||
.map(
|
||||
(subscription) => SubscriptionCard(
|
||||
subscription: subscription,
|
||||
pangeaController: pangeaController,
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -80,7 +76,11 @@ class SubscriptionCard extends StatelessWidget {
|
|||
OutlinedButton(
|
||||
onPressed: () {
|
||||
pangeaController.subscriptionController
|
||||
.submitSubscriptionChange(subscription, context);
|
||||
.submitSubscriptionChange(
|
||||
subscription,
|
||||
context,
|
||||
);
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(L10n.of(context)!.subscribe),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
||||
// Flutter imports:
|
||||
// Project imports:
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pangea/controllers/pangea_controller.dart';
|
||||
import 'package:fluffychat/pangea/widgets/subscription/subscription_options.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
||||
class SubscriptionPaywall extends StatelessWidget {
|
||||
final PangeaController pangeaController;
|
||||
|
|
@ -28,7 +29,7 @@ class SubscriptionPaywall extends StatelessWidget {
|
|||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
child: ListView(
|
||||
children: [
|
||||
if (pangeaController.matrixState.client.rooms.length > 1) ...[
|
||||
Text(
|
||||
|
|
@ -44,12 +45,65 @@ class SubscriptionPaywall extends StatelessWidget {
|
|||
style: const TextStyle(fontSize: 16),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
SubscriptionOptions(
|
||||
pangeaController: pangeaController,
|
||||
),
|
||||
pangeaController.userController.inTrialWindow
|
||||
? FreeTrialCard(
|
||||
pangeaController: pangeaController,
|
||||
)
|
||||
: SubscriptionOptions(
|
||||
pangeaController: pangeaController,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class FreeTrialCard extends StatelessWidget {
|
||||
final PangeaController pangeaController;
|
||||
const FreeTrialCard({super.key, required this.pangeaController});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Align(
|
||||
child: Card(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
color: AppConfig.primaryColorLight.withAlpha(64),
|
||||
),
|
||||
borderRadius: const BorderRadius.all(Radius.zero),
|
||||
),
|
||||
child: SizedBox(
|
||||
height: 250,
|
||||
width: AppConfig.columnWidth * 0.75,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(25),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
L10n.of(context)!.freeTrial,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(fontSize: 24),
|
||||
),
|
||||
Text(
|
||||
L10n.of(context)!.freeTrialDesc,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
OutlinedButton(
|
||||
onPressed: () {
|
||||
pangeaController.subscriptionController
|
||||
.activateNewUserTrial();
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(L10n.of(context)!.activateTrial),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
34
lib/pangea/widgets/subscription/subscription_snackbar.dart
Normal file
34
lib/pangea/widgets/subscription/subscription_snackbar.dart
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
void showSubscribedSnackbar(BuildContext context) {
|
||||
final Widget text = RichText(
|
||||
text: TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: L10n.of(context)!.successfullySubscribed,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).brightness == Brightness.light
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
),
|
||||
),
|
||||
const TextSpan(text: " "),
|
||||
TextSpan(
|
||||
text: L10n.of(context)!.clickToManageSubscription,
|
||||
style: const TextStyle(color: AppConfig.primaryColor),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () => context.go('/rooms/settings/subscription'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: text,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -756,7 +756,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"bn": [
|
||||
|
|
@ -1521,7 +1526,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"bo": [
|
||||
|
|
@ -2286,7 +2296,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"ca": [
|
||||
|
|
@ -3046,7 +3061,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"cs": [
|
||||
|
|
@ -3806,7 +3826,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"de": [
|
||||
|
|
@ -4566,7 +4591,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"el": [
|
||||
|
|
@ -5331,7 +5361,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"eo": [
|
||||
|
|
@ -6091,7 +6126,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"es": [
|
||||
|
|
@ -6115,7 +6155,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"et": [
|
||||
|
|
@ -6875,7 +6920,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"eu": [
|
||||
|
|
@ -7635,7 +7685,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"fa": [
|
||||
|
|
@ -8395,7 +8450,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"fi": [
|
||||
|
|
@ -9155,7 +9215,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"fr": [
|
||||
|
|
@ -9915,7 +9980,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"ga": [
|
||||
|
|
@ -10675,7 +10745,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"gl": [
|
||||
|
|
@ -11435,7 +11510,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"he": [
|
||||
|
|
@ -12195,7 +12275,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"hi": [
|
||||
|
|
@ -12960,7 +13045,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"hr": [
|
||||
|
|
@ -13720,7 +13810,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"hu": [
|
||||
|
|
@ -14480,7 +14575,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"id": [
|
||||
|
|
@ -15240,7 +15340,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"ie": [
|
||||
|
|
@ -16002,7 +16107,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"it": [
|
||||
|
|
@ -16762,7 +16872,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"ja": [
|
||||
|
|
@ -17522,7 +17637,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"ko": [
|
||||
|
|
@ -18282,7 +18402,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"lt": [
|
||||
|
|
@ -19042,7 +19167,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"lv": [
|
||||
|
|
@ -19807,7 +19937,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"nb": [
|
||||
|
|
@ -20567,7 +20702,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"nl": [
|
||||
|
|
@ -21327,7 +21467,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"pl": [
|
||||
|
|
@ -22087,7 +22232,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"pt": [
|
||||
|
|
@ -22852,7 +23002,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"pt_BR": [
|
||||
|
|
@ -23612,7 +23767,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"pt_PT": [
|
||||
|
|
@ -24372,7 +24532,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"ro": [
|
||||
|
|
@ -25132,7 +25297,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"ru": [
|
||||
|
|
@ -25892,7 +26062,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"sk": [
|
||||
|
|
@ -26653,7 +26828,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"sl": [
|
||||
|
|
@ -27416,7 +27596,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"sr": [
|
||||
|
|
@ -28176,7 +28361,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"sv": [
|
||||
|
|
@ -28936,7 +29126,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"ta": [
|
||||
|
|
@ -29701,7 +29896,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"th": [
|
||||
|
|
@ -30466,7 +30666,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"tr": [
|
||||
|
|
@ -31226,7 +31431,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"uk": [
|
||||
|
|
@ -31986,7 +32196,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"vi": [
|
||||
|
|
@ -32749,7 +32964,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"zh": [
|
||||
|
|
@ -33509,7 +33729,12 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
],
|
||||
|
||||
"zh_Hant": [
|
||||
|
|
@ -34269,6 +34494,11 @@
|
|||
"groupName",
|
||||
"createGroupAndInviteUsers",
|
||||
"groupCanBeFoundViaSearch",
|
||||
"inNoSpaces"
|
||||
"trialExpiration",
|
||||
"freeTrialDesc",
|
||||
"activateTrial",
|
||||
"inNoSpaces",
|
||||
"successfullySubscribed",
|
||||
"clickToManageSubscription"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,6 @@ flutter:
|
|||
generate: true
|
||||
uses-material-design: true
|
||||
assets:
|
||||
- .env
|
||||
- assets/
|
||||
- assets/pangea/
|
||||
- assets/pangea/bot_faces/
|
||||
|
|
|
|||
|
|
@ -2,4 +2,5 @@
|
|||
flutter config --enable-web
|
||||
flutter clean
|
||||
flutter pub get
|
||||
flutter build web --release --verbose --source-maps --dart-define=SENTRY_RELEASE=$CI_COMMIT_SHA
|
||||
flutter build web --dart-define=FLUTTER_WEB_CANVASKIT_URL=canvaskit/ --profile --source-maps --base-href "/client/"
|
||||
# flutter build web --release --verbose --source-maps --dart-define=SENTRY_RELEASE=$CI_COMMIT_SHA
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue