Настройки, авторизация
This commit is contained in:
@@ -20,11 +20,13 @@ class ServerConfig with _$ServerConfig {
|
||||
_$ServerConfigFromJson(json);
|
||||
}
|
||||
|
||||
@Freezed(toJson: true)
|
||||
@freezed
|
||||
class SystemConfig with _$SystemConfig {
|
||||
const factory SystemConfig({
|
||||
required String domainUrl,
|
||||
required bool enableRegistration,
|
||||
@Default('UTC') String serverTimezone,
|
||||
@Default('admin') String adminRoute,
|
||||
}) = _SystemConfig;
|
||||
|
||||
factory SystemConfig.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -54,6 +56,7 @@ class ChatsModuleConfig with _$ChatsModuleConfig {
|
||||
required int maxGroupParticipants,
|
||||
required bool allowChatToGroupConversion,
|
||||
required bool enableFolders,
|
||||
@Default(false) bool enableAutoClean,
|
||||
}) = _ChatsModuleConfig;
|
||||
|
||||
factory ChatsModuleConfig.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -78,6 +81,7 @@ class MessagesConfig with _$MessagesConfig {
|
||||
required bool allowLinks,
|
||||
required bool allowPolls,
|
||||
required bool allowPinning,
|
||||
@Default(0) int maxFileSize,
|
||||
}) = _MessagesConfig;
|
||||
|
||||
factory MessagesConfig.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -93,6 +97,8 @@ class WebRtcConfig with _$WebRtcConfig {
|
||||
required bool enableScreenSharing,
|
||||
required String turnHost,
|
||||
required int turnPort,
|
||||
@Default('') String turnUser,
|
||||
@Default('') String turnSecret,
|
||||
}) = _WebRtcConfig;
|
||||
|
||||
factory WebRtcConfig.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -104,6 +110,7 @@ class KlipyConfig with _$KlipyConfig {
|
||||
const factory KlipyConfig({
|
||||
required bool enabled,
|
||||
required String appName,
|
||||
@Default('') String apiKey,
|
||||
}) = _KlipyConfig;
|
||||
|
||||
factory KlipyConfig.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -113,7 +120,7 @@ class KlipyConfig with _$KlipyConfig {
|
||||
@Freezed(toJson: true)
|
||||
class ImportConfig with _$ImportConfig {
|
||||
const factory ImportConfig({
|
||||
required bool enabled,
|
||||
@Default(false) bool enableTelegramImport,
|
||||
}) = _ImportConfig;
|
||||
|
||||
factory ImportConfig.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
Reference in New Issue
Block a user