mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: update privacy policy and add version code (#4343)
This commit is contained in:
parent
190fae196f
commit
36b88c602c
@ -1,3 +1,2 @@
|
|||||||
export 'about_setting_group.dart';
|
export 'about_setting_group.dart';
|
||||||
export 'privacy_policy_page.dart';
|
|
||||||
export 'user_agreement_page.dart';
|
export 'user_agreement_page.dart';
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
|
import 'package:appflowy/startup/tasks/device_info_task.dart';
|
||||||
|
import 'package:appflowy_editor/appflowy_editor.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
|
||||||
|
|
||||||
import '../widgets/widgets.dart';
|
import '../widgets/widgets.dart';
|
||||||
import 'about.dart';
|
|
||||||
|
|
||||||
class AboutSettingGroup extends StatelessWidget {
|
class AboutSettingGroup extends StatelessWidget {
|
||||||
const AboutSettingGroup({
|
const AboutSettingGroup({
|
||||||
@ -21,18 +22,21 @@ class AboutSettingGroup extends StatelessWidget {
|
|||||||
trailing: const Icon(
|
trailing: const Icon(
|
||||||
Icons.chevron_right,
|
Icons.chevron_right,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () => safeLaunchUrl('https://appflowy.io/privacy/mobile'),
|
||||||
context.push(PrivacyPolicyPage.routeName);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
MobileSettingItem(
|
MobileSettingItem(
|
||||||
name: LocaleKeys.settings_mobile_userAgreement.tr(),
|
name: LocaleKeys.settings_mobile_termsAndConditions.tr(),
|
||||||
trailing: const Icon(
|
trailing: const Icon(
|
||||||
Icons.chevron_right,
|
Icons.chevron_right,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () => safeLaunchUrl('https://appflowy.io/terms'),
|
||||||
context.push(UserAgreementPage.routeName);
|
),
|
||||||
},
|
MobileSettingItem(
|
||||||
|
name: LocaleKeys.settings_mobile_version.tr(),
|
||||||
|
trailing: FlowyText(
|
||||||
|
'${DeviceOrApplicationInfoTask.applicationVersion} (${DeviceOrApplicationInfoTask.buildNumber})',
|
||||||
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
showDivider: false,
|
showDivider: false,
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class PrivacyPolicyPage extends StatelessWidget {
|
|
||||||
const PrivacyPolicyPage({super.key});
|
|
||||||
|
|
||||||
static const routeName = '/PrivacyPolicyPage';
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
// TODO(yijing): implement page
|
|
||||||
return Scaffold(
|
|
||||||
appBar: AppBar(
|
|
||||||
title: Text(LocaleKeys.settings_mobile_privacyPolicy.tr()),
|
|
||||||
),
|
|
||||||
body: const Center(
|
|
||||||
child: Text('🪜 Under construction'),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -34,7 +34,7 @@ class KeyboardHeightObserver {
|
|||||||
|
|
||||||
void notify(double height) {
|
void notify(double height) {
|
||||||
// the keyboard height will notify twice with the same value on Android 14
|
// the keyboard height will notify twice with the same value on Android 14
|
||||||
if (DeviceInfoTask.androidSDKVersion == 34) {
|
if (DeviceOrApplicationInfoTask.androidSDKVersion == 34) {
|
||||||
if (height == 0 && currentKeyboardHeight == 0) {
|
if (height == 0 && currentKeyboardHeight == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ class FlowyRunner {
|
|||||||
// there's a flag named _enable in memory_leak_detector.dart. If it's false, the task will be ignored.
|
// there's a flag named _enable in memory_leak_detector.dart. If it's false, the task will be ignored.
|
||||||
MemoryLeakDetectorTask(),
|
MemoryLeakDetectorTask(),
|
||||||
const DebugTask(),
|
const DebugTask(),
|
||||||
const DeviceInfoTask(),
|
const DeviceOrApplicationInfoTask(),
|
||||||
// localization
|
// localization
|
||||||
const InitLocalizationTask(),
|
const InitLocalizationTask(),
|
||||||
// init the app window
|
// init the app window
|
||||||
|
@ -1,21 +1,31 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:device_info_plus/device_info_plus.dart';
|
import 'package:device_info_plus/device_info_plus.dart';
|
||||||
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
|
|
||||||
import '../startup.dart';
|
import '../startup.dart';
|
||||||
|
|
||||||
class DeviceInfoTask extends LaunchTask {
|
class DeviceOrApplicationInfoTask extends LaunchTask {
|
||||||
const DeviceInfoTask();
|
const DeviceOrApplicationInfoTask();
|
||||||
|
|
||||||
static int androidSDKVersion = -1;
|
static int androidSDKVersion = -1;
|
||||||
|
static String applicationVersion = '';
|
||||||
|
static String buildNumber = '';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> initialize(LaunchContext context) async {
|
Future<void> initialize(LaunchContext context) async {
|
||||||
final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
|
final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
|
||||||
|
final PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
||||||
|
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
final androidInfo = await deviceInfoPlugin.androidInfo;
|
final androidInfo = await deviceInfoPlugin.androidInfo;
|
||||||
androidSDKVersion = androidInfo.version.sdkInt;
|
androidSDKVersion = androidInfo.version.sdkInt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Platform.isAndroid || Platform.isIOS) {
|
||||||
|
applicationVersion = packageInfo.version;
|
||||||
|
buildNumber = packageInfo.buildNumber;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -47,7 +47,6 @@ GoRouter generateRouter(Widget child) {
|
|||||||
if (PlatformExtension.isMobile) ...[
|
if (PlatformExtension.isMobile) ...[
|
||||||
// settings
|
// settings
|
||||||
_mobileHomeSettingPageRoute(),
|
_mobileHomeSettingPageRoute(),
|
||||||
_mobileSettingPrivacyPolicyPageRoute(),
|
|
||||||
_mobileSettingUserAgreementPageRoute(),
|
_mobileSettingUserAgreementPageRoute(),
|
||||||
_mobileCloudSettingAppFlowyCloudPageRoute(),
|
_mobileCloudSettingAppFlowyCloudPageRoute(),
|
||||||
|
|
||||||
@ -196,16 +195,6 @@ GoRoute _mobileHomeSettingPageRoute() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
GoRoute _mobileSettingPrivacyPolicyPageRoute() {
|
|
||||||
return GoRoute(
|
|
||||||
parentNavigatorKey: AppGlobals.rootNavKey,
|
|
||||||
path: PrivacyPolicyPage.routeName,
|
|
||||||
pageBuilder: (context, state) {
|
|
||||||
return const MaterialPage(child: PrivacyPolicyPage());
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
GoRoute _mobileCloudSettingAppFlowyCloudPageRoute() {
|
GoRoute _mobileCloudSettingAppFlowyCloudPageRoute() {
|
||||||
return GoRoute(
|
return GoRoute(
|
||||||
parentNavigatorKey: AppGlobals.rootNavKey,
|
parentNavigatorKey: AppGlobals.rootNavKey,
|
||||||
|
@ -447,10 +447,12 @@
|
|||||||
"joinDiscord": "Join us in Discord",
|
"joinDiscord": "Join us in Discord",
|
||||||
"privacyPolicy": "Privacy Policy",
|
"privacyPolicy": "Privacy Policy",
|
||||||
"userAgreement": "User Agreement",
|
"userAgreement": "User Agreement",
|
||||||
|
"termsAndConditions": "Terms and Conditions",
|
||||||
"userprofileError": "Failed to load user profile",
|
"userprofileError": "Failed to load user profile",
|
||||||
"userprofileErrorDescription": "Please try to log out and log back in to check if the issue still persists.",
|
"userprofileErrorDescription": "Please try to log out and log back in to check if the issue still persists.",
|
||||||
"selectLayout": "Select layout",
|
"selectLayout": "Select layout",
|
||||||
"selectStartingDay": "Select starting day"
|
"selectStartingDay": "Select starting day",
|
||||||
|
"version": "Version"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"grid": {
|
"grid": {
|
||||||
|
Loading…
Reference in New Issue
Block a user