Compare commits

..

2 Commits

Author SHA1 Message Date
vishnukvmd
265e74aff9 v2.0.6 2023-09-29 16:12:52 +05:30
vishnukvmd
75a41bc724 Update the banner 2023-09-29 16:12:07 +05:30
6 changed files with 37 additions and 74 deletions

View File

@@ -70,7 +70,7 @@
"incorrectPasswordTitle": "Incorrect password",
"welcomeBack": "Welcome back!",
"madeWithLoveAtPrefix": "made with ❤️ at ",
"supportDevs": "Subscribe to <bold-green>ente</bold-green> to support this project",
"supportDevs": "Subscribe to <bold-green>ente</bold-green> to support us",
"supportDiscount": "Use coupon code \"AUTH\" to get 10% off first year",
"changeEmail": "Change email",
"changePassword": "Change password",
@@ -330,6 +330,5 @@
"sigInBackupReminder": "Please export your codes to ensure that you have a backup you can restore from.",
"offlineModeWarning": "You have chosen to proceed without backups. Please take manual backups to make sure your codes are safe.",
"showLargeIcons": "Show large icons",
"shouldHideCode": "Hide codes",
"focusOnSearchBar": "Focus search on app start"
}

View File

@@ -11,7 +11,6 @@ class PreferenceService {
static const kHasShownCoachMarkKey = "has_shown_coach_mark";
static const kShouldShowLargeIconsKey = "should_show_large_icons";
static const kShouldHideCodesKey = "should_hide_codes";
static const kShouldAutoFocusOnSearchBar = "should_auto_focus_on_search_bar";
Future<void> init() async {
@@ -43,15 +42,6 @@ class PreferenceService {
Bus.instance.fire(IconsChangedEvent());
}
bool shouldHideCodes() {
return _prefs.getBool(kShouldHideCodesKey) ?? false;
}
Future<void> setHideCodes(bool value) async {
await _prefs.setBool(kShouldHideCodesKey, value);
Bus.instance.fire(IconsChangedEvent());
}
bool shouldAutoFocusOnSearchBar() {
if (_prefs.containsKey(kShouldAutoFocusOnSearchBar)) {
return _prefs.getBool(kShouldAutoFocusOnSearchBar)!;

View File

@@ -35,14 +35,11 @@ class _CodeWidgetState extends State<CodeWidget> {
bool _isInitialized = false;
late bool hasConfiguredAccount;
late bool _shouldShowLargeIcon;
late bool _hideCode;
bool isMaskingEnabled = false;
@override
void initState() {
super.initState();
isMaskingEnabled = PreferenceService.instance.shouldHideCodes();
_hideCode = isMaskingEnabled;
_everySecondTimer =
Timer.periodic(const Duration(milliseconds: 500), (Timer t) {
String newCode = _getCurrentOTP();
@@ -66,10 +63,6 @@ class _CodeWidgetState extends State<CodeWidget> {
@override
Widget build(BuildContext context) {
if (isMaskingEnabled != PreferenceService.instance.shouldHideCodes()) {
isMaskingEnabled = PreferenceService.instance.shouldHideCodes();
_hideCode = isMaskingEnabled;
}
_shouldShowLargeIcon = PreferenceService.instance.shouldShowLargeIcons();
if (!_isInitialized) {
_currentCode.value = _getCurrentOTP();
@@ -143,15 +136,6 @@ class _CodeWidgetState extends State<CodeWidget> {
onTap: () {
_copyToClipboard();
},
onDoubleTap: isMaskingEnabled
? () {
setState(
() {
_hideCode = !_hideCode;
},
);
}
: null,
onLongPress: () {
_copyToClipboard();
},
@@ -406,10 +390,6 @@ class _CodeWidgetState extends State<CodeWidget> {
}
String _getFormattedCode(String code) {
if (_hideCode) {
// replace all digits with •
code = code.replaceAll(RegExp(r'\d'), '');
}
if (code.length == 6) {
return code.substring(0, 3) + " " + code.substring(3, 6);
}

View File

@@ -74,21 +74,6 @@ class _AdvancedSectionWidgetState extends State<AdvancedSectionWidget> {
),
),
sectionOptionSpacing,
MenuItemWidget(
captionedTextWidget: CaptionedTextWidget(
title: l10n.shouldHideCode,
),
trailingWidget: ToggleSwitchWidget(
value: () => PreferenceService.instance.shouldHideCodes(),
onChanged: () async {
await PreferenceService.instance.setHideCodes(
!PreferenceService.instance.shouldHideCodes(),
);
setState(() {});
},
),
),
sectionOptionSpacing,
MenuItemWidget(
captionedTextWidget: CaptionedTextWidget(
title: l10n.focusOnSearchBar,

View File

@@ -1,5 +1,4 @@
import 'dart:io';
import 'package:dotted_border/dotted_border.dart';
import 'package:ente_auth/core/configuration.dart';
import 'package:ente_auth/l10n/l10n.dart';
import 'package:ente_auth/models/subscription.dart';
@@ -37,36 +36,46 @@ class SupportDevWidget extends StatelessWidget {
}
}
GestureDetector buildWidget(AppLocalizations l10n, BuildContext context) {
Widget buildWidget(AppLocalizations l10n, BuildContext context) {
return GestureDetector(
onTap: () {
launchUrl(Uri.parse("https://ente.io"));
},
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 12.0, horizontal: 6),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
StyledText(
text: l10n.supportDevs,
style: getEnteTextTheme(context).large,
tags: {
'bold-green': StyledTextTag(
style: TextStyle(
fontWeight: FontWeight.bold,
color: getEnteColorScheme(context).primaryGreen,
child: DottedBorder(
borderType: BorderType.RRect,
radius: const Radius.circular(12),
padding: const EdgeInsets.all(6),
dashPattern: const <double>[3, 3],
color: getEnteColorScheme(context).primaryGreen,
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(12)),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 12.0, horizontal: 6),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
StyledText(
text: l10n.supportDevs,
style: getEnteTextTheme(context).large,
tags: {
'bold-green': StyledTextTag(
style: TextStyle(
fontWeight: FontWeight.bold,
color: getEnteColorScheme(context).primaryGreen,
),
),
},
),
const Padding(padding: EdgeInsets.all(6)),
Text(
l10n.supportDiscount,
style: const TextStyle(
color: Colors.grey,
),
),
},
],
),
const Padding(padding: EdgeInsets.all(6)),
Text(
l10n.supportDiscount,
style: const TextStyle(
color: Colors.grey,
),
),
],
),
),
),
);

View File

@@ -1,6 +1,6 @@
name: ente_auth
description: ente two-factor authenticator
version: 2.0.5+205
version: 2.0.6+206
publish_to: none
environment: