mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-06-29 02:03:10 -04:00
* chore: enable AI seach * chore: remove unused code * fix: replace the old web base url with the new one
54 lines
1.6 KiB
Dart
54 lines
1.6 KiB
Dart
// lib/env/env.dart
|
|
import 'package:appflowy/env/cloud_env.dart';
|
|
import 'package:appflowy/plugins/shared/share/constants.dart';
|
|
import 'package:envied/envied.dart';
|
|
|
|
part 'env.g.dart';
|
|
|
|
@Envied(path: '.env')
|
|
abstract class Env {
|
|
// This flag is used to decide if users can dynamically configure cloud settings. It turns true when a .env file exists containing the APPFLOWY_CLOUD_URL variable. By default, this is set to false.
|
|
static bool get enableCustomCloud {
|
|
return Env.authenticatorType ==
|
|
AuthenticatorType.appflowyCloudSelfHost.value ||
|
|
Env.authenticatorType == AuthenticatorType.appflowyCloud.value ||
|
|
Env.authenticatorType == AuthenticatorType.appflowyCloudDevelop.value &&
|
|
_Env.afCloudUrl.isEmpty;
|
|
}
|
|
|
|
@EnviedField(
|
|
obfuscate: false,
|
|
varName: 'AUTHENTICATOR_TYPE',
|
|
defaultValue: 2,
|
|
)
|
|
static const int authenticatorType = _Env.authenticatorType;
|
|
|
|
/// AppFlowy Cloud Configuration
|
|
@EnviedField(
|
|
obfuscate: false,
|
|
varName: 'APPFLOWY_CLOUD_URL',
|
|
defaultValue: '',
|
|
)
|
|
static const String afCloudUrl = _Env.afCloudUrl;
|
|
|
|
@EnviedField(
|
|
obfuscate: false,
|
|
varName: 'INTERNAL_BUILD',
|
|
defaultValue: '',
|
|
)
|
|
static const String internalBuild = _Env.internalBuild;
|
|
|
|
@EnviedField(
|
|
obfuscate: false,
|
|
varName: 'SENTRY_DSN',
|
|
defaultValue: '',
|
|
)
|
|
static const String sentryDsn = _Env.sentryDsn;
|
|
|
|
@EnviedField(
|
|
obfuscate: false,
|
|
varName: 'BASE_WEB_DOMAIN',
|
|
defaultValue: ShareConstants.defaultBaseWebDomain,
|
|
)
|
|
static const String baseWebDomain = _Env.baseWebDomain;
|
|
}
|