mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-02-04 07:20:39 +00:00
Fix some typos
This commit is contained in:
parent
914d56ff87
commit
e925a1897a
|
@ -113,6 +113,16 @@
|
|||
"dmarc": "DMARC record",
|
||||
"spf": "SPF record",
|
||||
"dkim": "DKIM key"
|
||||
},
|
||||
"cards": {
|
||||
"services": {
|
||||
"title": "Services",
|
||||
"subtitle": "Type “A” records required for each service."
|
||||
},
|
||||
"email": {
|
||||
"title": "Email",
|
||||
"subtitle": "Records necessary for secure email exchange."
|
||||
}
|
||||
}
|
||||
},
|
||||
"backup": {
|
||||
|
@ -226,7 +236,7 @@
|
|||
"delete_confirm_question": "Are you sure?",
|
||||
"reset_password": "Reset password",
|
||||
"account": "Account",
|
||||
"send_regisration_data": "Share login credentials"
|
||||
"send_registration_data": "Share login credentials"
|
||||
},
|
||||
"initializing": {
|
||||
"_comment": "initializing page",
|
||||
|
@ -298,7 +308,7 @@
|
|||
"invalid_format": "Invalid format",
|
||||
"root_name": "User name cannot be 'root'",
|
||||
"key_format": "Invalid key format",
|
||||
"length": "Length is [] shoud be {}",
|
||||
"user_alredy_exist": "Already exists"
|
||||
"length": "Length is [] should be {}",
|
||||
"user_already_exist": "Already exists"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -237,7 +237,7 @@
|
|||
"delete_confirm_question": "Вы действительно хотите удалить учетную запись?",
|
||||
"reset_password": "Сбросить пароль",
|
||||
"account": "Учетная запись",
|
||||
"send_regisration_data": "Поделиться реквизитами"
|
||||
"send_registration_data": "Поделиться реквизитами"
|
||||
},
|
||||
"initializing": {
|
||||
"_comment": "initializing page",
|
||||
|
@ -310,6 +310,6 @@
|
|||
"root_name": "Имя пользователя не может быть'root'.",
|
||||
"key_format": "Неверный формат.",
|
||||
"length": "Длина строки [] должна быть {}.",
|
||||
"user_alredy_exist": "Имя уже используется."
|
||||
"user_already_exist": "Имя уже используется."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import 'package:selfprivacy/config/text_themes.dart';
|
|||
|
||||
import 'brand_colors.dart';
|
||||
|
||||
final ligtTheme = ThemeData(
|
||||
final lightTheme = ThemeData(
|
||||
primaryColor: BrandColors.primary,
|
||||
fontFamily: 'Inter',
|
||||
brightness: Brightness.light,
|
||||
|
@ -51,7 +51,7 @@ final ligtTheme = ThemeData(
|
|||
),
|
||||
);
|
||||
|
||||
var darkTheme = ligtTheme.copyWith(
|
||||
var darkTheme = lightTheme.copyWith(
|
||||
brightness: Brightness.dark,
|
||||
scaffoldBackgroundColor: Color(0xFF202120),
|
||||
iconTheme: IconThemeData(color: BrandColors.gray3),
|
||||
|
|
|
@ -12,7 +12,7 @@ import 'package:selfprivacy/logic/models/message.dart';
|
|||
abstract class ApiMap {
|
||||
Future<Dio> getClient() async {
|
||||
var dio = Dio(await options);
|
||||
if (hasLoger) {
|
||||
if (hasLogger) {
|
||||
dio.interceptors.add(PrettyDioLogger());
|
||||
}
|
||||
dio.interceptors.add(ConsoleInterceptor());
|
||||
|
@ -38,7 +38,7 @@ abstract class ApiMap {
|
|||
FutureOr<BaseOptions> get options;
|
||||
|
||||
abstract final String rootAddress;
|
||||
abstract final bool hasLoger;
|
||||
abstract final bool hasLogger;
|
||||
abstract final bool isWithToken;
|
||||
|
||||
ValidateStatus? validateStatus;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:selfprivacy/config/get_it_config.dart';
|
||||
import 'package:selfprivacy/logic/api_maps/api_map.dart';
|
||||
|
@ -20,7 +21,7 @@ class BackblazeApplicationKey {
|
|||
}
|
||||
|
||||
class BackblazeApi extends ApiMap {
|
||||
BackblazeApi({this.hasLoger = false, this.isWithToken = true});
|
||||
BackblazeApi({this.hasLogger = false, this.isWithToken = true});
|
||||
|
||||
BaseOptions get options {
|
||||
var options = BaseOptions(baseUrl: rootAddress);
|
||||
|
@ -142,7 +143,7 @@ class BackblazeApi extends ApiMap {
|
|||
}
|
||||
|
||||
@override
|
||||
bool hasLoger;
|
||||
bool hasLogger;
|
||||
|
||||
@override
|
||||
bool isWithToken;
|
||||
|
|
|
@ -7,7 +7,7 @@ import 'package:selfprivacy/logic/models/cloudflare_domain.dart';
|
|||
import 'package:selfprivacy/logic/models/dns_records.dart';
|
||||
|
||||
class CloudflareApi extends ApiMap {
|
||||
CloudflareApi({this.hasLoger = false, this.isWithToken = true});
|
||||
CloudflareApi({this.hasLogger = false, this.isWithToken = true});
|
||||
|
||||
BaseOptions get options {
|
||||
var options = BaseOptions(baseUrl: rootAddress);
|
||||
|
@ -222,7 +222,7 @@ class CloudflareApi extends ApiMap {
|
|||
}
|
||||
|
||||
@override
|
||||
final bool hasLoger;
|
||||
final bool hasLogger;
|
||||
|
||||
@override
|
||||
final bool isWithToken;
|
||||
|
|
|
@ -9,10 +9,10 @@ import 'package:selfprivacy/logic/models/user.dart';
|
|||
import 'package:selfprivacy/utils/password_generator.dart';
|
||||
|
||||
class HetznerApi extends ApiMap {
|
||||
bool hasLoger;
|
||||
bool hasLogger;
|
||||
bool isWithToken;
|
||||
|
||||
HetznerApi({this.hasLoger = false, this.isWithToken = true});
|
||||
HetznerApi({this.hasLogger = false, this.isWithToken = true});
|
||||
|
||||
BaseOptions get options {
|
||||
var options = BaseOptions(baseUrl: rootAddress);
|
||||
|
|
|
@ -12,10 +12,10 @@ import 'package:selfprivacy/logic/models/user.dart';
|
|||
import 'api_map.dart';
|
||||
|
||||
class ServerApi extends ApiMap {
|
||||
bool hasLoger;
|
||||
bool hasLogger;
|
||||
bool isWithToken;
|
||||
|
||||
ServerApi({this.hasLoger = false, this.isWithToken = true});
|
||||
ServerApi({this.hasLogger = false, this.isWithToken = true});
|
||||
|
||||
BaseOptions get options {
|
||||
var options = BaseOptions();
|
||||
|
@ -262,11 +262,11 @@ extension UrlServerExt on ServiceTypes {
|
|||
String get url {
|
||||
switch (this) {
|
||||
// case ServiceTypes.mail:
|
||||
// return ''; // cannot be swithch off
|
||||
// return ''; // cannot be switch off
|
||||
// case ServiceTypes.messenger:
|
||||
// return ''; // external service
|
||||
// case ServiceTypes.video:
|
||||
// return ''; // jeetsu meet not working
|
||||
// return ''; // jitsi meet not working
|
||||
case ServiceTypes.passwordManager:
|
||||
return 'bitwarden';
|
||||
case ServiceTypes.cloud:
|
||||
|
|
|
@ -4,7 +4,7 @@ import 'package:ionicons/ionicons.dart';
|
|||
import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart';
|
||||
|
||||
enum InitializingSteps {
|
||||
setHeznerKey,
|
||||
setHetznerKey,
|
||||
setCloudFlareKey,
|
||||
setDomainName,
|
||||
setRootUser,
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:cubit_form/cubit_form.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:selfprivacy/logic/api_maps/cloudflare.dart';
|
||||
import 'package:selfprivacy/logic/cubit/app_config/app_config_cubit.dart';
|
||||
import 'package:selfprivacy/logic/cubit/forms/validations/validations.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
import '../validations/validations.dart';
|
||||
|
||||
class CloudFlareFormCubit extends FormCubit {
|
||||
CloudFlareFormCubit(this.initializingCubit) {
|
||||
|
@ -15,7 +16,7 @@ class CloudFlareFormCubit extends FormCubit {
|
|||
RequiredStringValidation('validations.required'.tr()),
|
||||
ValidationModel<String>(
|
||||
(s) => regExp.hasMatch(s), 'validations.key_format'.tr()),
|
||||
LegnthStringValidationWithLenghShowing(
|
||||
LengthStringValidationWithLengthShowing(
|
||||
40, 'validations.length'.tr(args: ["40"]))
|
||||
],
|
||||
);
|
||||
|
|
|
@ -42,7 +42,7 @@ class DomainSetupCubit extends Cubit<DomainSetupState> {
|
|||
);
|
||||
|
||||
initializingCubit.setDomain(domain);
|
||||
emit(DomainSetted());
|
||||
emit(DomainSet());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,4 +67,4 @@ class Loaded extends DomainSetupState {
|
|||
Loaded(this.domain);
|
||||
}
|
||||
|
||||
class DomainSetted extends DomainSetupState {}
|
||||
class DomainSet extends DomainSetupState {}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:cubit_form/cubit_form.dart';
|
||||
import 'package:selfprivacy/logic/api_maps/hetzner.dart';
|
||||
import 'package:selfprivacy/logic/cubit/forms/validations/validations.dart';
|
||||
import 'package:selfprivacy/logic/cubit/app_config/app_config_cubit.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:selfprivacy/logic/api_maps/hetzner.dart';
|
||||
import 'package:selfprivacy/logic/cubit/app_config/app_config_cubit.dart';
|
||||
|
||||
import '../validations/validations.dart';
|
||||
|
||||
class HetznerFormCubit extends FormCubit {
|
||||
HetznerFormCubit(this.initializingCubit) {
|
||||
|
@ -15,7 +16,7 @@ class HetznerFormCubit extends FormCubit {
|
|||
RequiredStringValidation('validations.required'.tr()),
|
||||
ValidationModel<String>(
|
||||
(s) => regExp.hasMatch(s), 'validations.key_format'.tr()),
|
||||
LegnthStringValidationWithLenghShowing(
|
||||
LengthStringValidationWithLengthShowing(
|
||||
64, 'validations.length'.tr(args: ["64"]))
|
||||
],
|
||||
);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:cubit_form/cubit_form.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart';
|
||||
import 'package:selfprivacy/logic/models/job.dart';
|
||||
import 'package:selfprivacy/logic/models/user.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:selfprivacy/utils/password_generator.dart';
|
||||
|
||||
class UserFormCubit extends FormCubit {
|
||||
|
@ -25,7 +25,7 @@ class UserFormCubit extends FormCubit {
|
|||
(s) => s.toLowerCase() == 'root', 'validations.root_name'.tr()),
|
||||
ValidationModel(
|
||||
(login) => users.any((user) => user.login == login),
|
||||
'validations.user_alredy_exist'.tr(),
|
||||
'validations.user_already_exist'.tr(),
|
||||
),
|
||||
RequiredStringValidation('validations.required'.tr()),
|
||||
ValidationModel<String>(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:cubit_form/cubit_form.dart';
|
||||
|
||||
class LegnthStringValidationWithLenghShowing extends ValidationModel<String> {
|
||||
LegnthStringValidationWithLenghShowing(int length, String errorText)
|
||||
class LengthStringValidationWithLengthShowing extends ValidationModel<String> {
|
||||
LengthStringValidationWithLengthShowing(int length, String errorText)
|
||||
: super((n) => n.length != length, errorText);
|
||||
|
||||
@override
|
||||
|
|
|
@ -21,7 +21,7 @@ class HetznerMetricsRepository {
|
|||
break;
|
||||
}
|
||||
|
||||
var api = HetznerApi(hasLoger: true);
|
||||
var api = HetznerApi(hasLogger: true);
|
||||
|
||||
var results = await Future.wait([
|
||||
api.getMetrics(start, end, 'cpu'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:intl/intl.dart';
|
||||
|
||||
final formater = new DateFormat('hh:mm');
|
||||
final formatter = new DateFormat('hh:mm');
|
||||
|
||||
class Message {
|
||||
Message({this.text, this.type = MessageType.normal}) : time = DateTime.now();
|
||||
|
@ -8,7 +8,7 @@ class Message {
|
|||
final String? text;
|
||||
final DateTime time;
|
||||
final MessageType type;
|
||||
String get timeString => formater.format(time);
|
||||
String get timeString => formatter.format(time);
|
||||
|
||||
static Message warn({String? text}) => Message(
|
||||
text: text,
|
||||
|
|
|
@ -46,7 +46,7 @@ class MyApp extends StatelessWidget {
|
|||
locale: context.locale,
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'SelfPrivacy',
|
||||
theme: appSettings.isDarkModeOn ? darkTheme : ligtTheme,
|
||||
theme: appSettings.isDarkModeOn ? darkTheme : lightTheme,
|
||||
home: appSettings.isOnbordingShowing
|
||||
? OnboardingPage(nextPage: InitializingPage())
|
||||
: RootPage(),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:selfprivacy/config/brand_colors.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
final _kBottomTabBarHeight = 51;
|
||||
|
||||
|
@ -62,12 +62,12 @@ class _BrandTabBarState extends State<BrandTabBar> {
|
|||
}
|
||||
|
||||
_getIconButton(String label, IconData iconData, int index) {
|
||||
var acitivColor = Theme.of(context).brightness == Brightness.dark
|
||||
var activeColor = Theme.of(context).brightness == Brightness.dark
|
||||
? BrandColors.white
|
||||
: BrandColors.black;
|
||||
|
||||
var isActive = currentIndex == index;
|
||||
var color = isActive ? acitivColor : BrandColors.inactive;
|
||||
var color = isActive ? activeColor : BrandColors.inactive;
|
||||
return InkWell(
|
||||
onTap: () => widget.controller!.animateTo(index),
|
||||
child: Padding(
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_text/brand_text.dart';
|
||||
import 'package:selfprivacy/utils/named_font_weight.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
class BrandTimer extends StatefulWidget {
|
||||
const BrandTimer({
|
||||
|
@ -30,7 +30,7 @@ class _BrandTimerState extends State<BrandTimer> {
|
|||
}
|
||||
|
||||
_timerStart() {
|
||||
_timeString = diffenceFromStart;
|
||||
_timeString = differenceFromStart;
|
||||
timer = Timer.periodic(Duration(seconds: 1), (Timer t) {
|
||||
var timePassed = DateTime.now().difference(widget.startDateTime);
|
||||
if (timePassed > widget.duration) {
|
||||
|
@ -62,11 +62,11 @@ class _BrandTimerState extends State<BrandTimer> {
|
|||
|
||||
void _getTime() {
|
||||
setState(() {
|
||||
_timeString = diffenceFromStart;
|
||||
_timeString = differenceFromStart;
|
||||
});
|
||||
}
|
||||
|
||||
String get diffenceFromStart =>
|
||||
String get differenceFromStart =>
|
||||
_durationToString(DateTime.now().difference(widget.startDateTime));
|
||||
|
||||
String _durationToString(Duration duration) {
|
||||
|
|
|
@ -438,7 +438,7 @@ class InitializingPage extends StatelessWidget {
|
|||
}
|
||||
|
||||
Widget _stepCheck(AppConfigCubit appConfigCubit) {
|
||||
assert(appConfigCubit.state is AppConfigNotFinished, 'wronge state');
|
||||
assert(appConfigCubit.state is AppConfigNotFinished, 'wrong state');
|
||||
var state = appConfigCubit.state as TimerState;
|
||||
late int doneCount;
|
||||
late String? text;
|
||||
|
|
|
@ -28,7 +28,7 @@ class _TextDetails extends StatelessWidget {
|
|||
TableRow(
|
||||
children: [
|
||||
getRowTitle('Last check:'),
|
||||
getRowValue(formater.format(checkTime)),
|
||||
getRowValue(formatter.format(checkTime)),
|
||||
],
|
||||
),
|
||||
TableRow(
|
||||
|
@ -168,4 +168,4 @@ class _TempMessage extends StatelessWidget {
|
|||
}
|
||||
}
|
||||
|
||||
final DateFormat formater = DateFormat('HH:mm:ss');
|
||||
final DateFormat formatter = DateFormat('HH:mm:ss');
|
||||
|
|
|
@ -101,13 +101,13 @@ class _Card extends StatelessWidget {
|
|||
var jobsCubit = context.watch<JobsCubit>();
|
||||
var jobState = jobsCubit.state;
|
||||
|
||||
var switchebleService = switchableServices.contains(serviceType);
|
||||
var hasSwitchJob = switchebleService &&
|
||||
var switchableService = switchableServices.contains(serviceType);
|
||||
var hasSwitchJob = switchableService &&
|
||||
jobState is JobsStateWithJobs &&
|
||||
jobState.jobList
|
||||
.any((el) => el is ServiceToggleJob && el.type == serviceType);
|
||||
|
||||
var isSwithOn = isReady &&
|
||||
var isSwitchOn = isReady &&
|
||||
(!switchableServices.contains(serviceType) ||
|
||||
serviceState.isEnableByType(serviceType));
|
||||
|
||||
|
@ -115,7 +115,7 @@ class _Card extends StatelessWidget {
|
|||
var domainName = UiHelpers.getDomainName(config);
|
||||
|
||||
return GestureDetector(
|
||||
onTap: isSwithOn
|
||||
onTap: isSwitchOn
|
||||
? () => showDialog<void>(
|
||||
context: context,
|
||||
// isScrollControlled: true,
|
||||
|
@ -124,7 +124,7 @@ class _Card extends StatelessWidget {
|
|||
return _ServiceDetails(
|
||||
serviceType: serviceType,
|
||||
status:
|
||||
isSwithOn ? StateType.stable : StateType.uninitialized,
|
||||
isSwitchOn ? StateType.stable : StateType.uninitialized,
|
||||
title: serviceType.title,
|
||||
icon: serviceType.icon,
|
||||
changeTab: changeTab,
|
||||
|
@ -140,10 +140,10 @@ class _Card extends StatelessWidget {
|
|||
children: [
|
||||
IconStatusMask(
|
||||
status:
|
||||
isSwithOn ? StateType.stable : StateType.uninitialized,
|
||||
isSwitchOn ? StateType.stable : StateType.uninitialized,
|
||||
child: Icon(serviceType.icon, size: 30, color: Colors.white),
|
||||
),
|
||||
if (isReady && switchebleService) ...[
|
||||
if (isReady && switchableService) ...[
|
||||
Spacer(),
|
||||
Builder(
|
||||
builder: (context) {
|
||||
|
|
|
@ -152,7 +152,7 @@ class _UserDetails extends StatelessWidget {
|
|||
BrandDivider(),
|
||||
SizedBox(height: 20),
|
||||
BrandButton.emptyWithIconText(
|
||||
title: 'users.send_regisration_data'.tr(),
|
||||
title: 'users.send_registration_data'.tr(),
|
||||
icon: Icon(BrandIcons.share),
|
||||
onPressed: () {
|
||||
Share.share(
|
||||
|
|
|
@ -2,13 +2,13 @@ import 'package:flutter/material.dart';
|
|||
|
||||
Color stringToColor(String string) {
|
||||
var number = string.codeUnits.reduce((a, b) => a + b);
|
||||
var index = number % colorPallete.length;
|
||||
return colorPallete[index];
|
||||
var index = number % colorPalette.length;
|
||||
return colorPalette[index];
|
||||
}
|
||||
|
||||
var originalColor = Color(0xFFDBD8BD);
|
||||
var count = 40;
|
||||
var colorPallete = List.generate(
|
||||
var colorPalette = List.generate(
|
||||
count,
|
||||
(index) => HSLColor.fromColor(originalColor)
|
||||
.withHue((index) * 360.0 / count)
|
||||
|
|
Loading…
Reference in a new issue