π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][locker] Clean up Locker search and link color usage
aman-pilot4e806e12f897
diff --git a/mobile/apps/locker/lib/ui/mixins/search_mixin.dart b/mobile/apps/locker/lib/ui/mixins/search_mixin.dartindex ace085b11c..472ff8a976 100644--- a/mobile/apps/locker/lib/ui/mixins/search_mixin.dart+++ b/mobile/apps/locker/lib/ui/mixins/search_mixin.dart@@ -1,10 +1,8 @@import 'dart:async';-import 'package:ente_components/ente_components.dart';import 'package:flutter/material.dart';import 'package:flutter/services.dart';import 'package:locker/extensions/collection_extension.dart';-import 'package:locker/l10n/l10n.dart';import 'package:locker/services/collections/collections_service.dart';import 'package:locker/services/collections/models/collection.dart';import 'package:locker/services/files/sync/models/file.dart';@@ -47,76 +45,6 @@ mixin SearchMixin<T extends StatefulWidget> on State<T> {super.dispose();}- Widget buildSearchAction() {- final colors = context.componentColors;- if (_isSearchActive) {- return Flexible(- child: Container(- margin: const EdgeInsets.fromLTRB(8.0, 8.0, 8.0, 8.0),- constraints: const BoxConstraints(- minWidth: 200,- maxWidth: double.infinity,- ),- child: TextField(- controller: _searchController,- focusNode: _searchFocusNode,- autofocus: true,- onChanged: _onSearchChanged,- decoration: InputDecoration(- hintText: context.l10n.searchHint,- hintStyle: TextStyles.body.copyWith(color: colors.textLight),- border: OutlineInputBorder(- borderRadius: BorderRadius.circular(20.0),- borderSide: BorderSide.none,- ),- filled: true,- fillColor: context.componentColors.fillLight,- contentPadding: const EdgeInsets.symmetric(- horizontal: 16.0,- vertical: 8.0,- ),- prefixIcon: _isSearching- ? Container(- width: 20,- height: 20,- padding: const EdgeInsets.all(8.0),- child: CircularProgressIndicator(- strokeWidth: 2,- valueColor: AlwaysStoppedAnimation<Color>(- colors.textLight,- ),- ),- )- : Icon(Icons.search, size: 20, color: colors.textLight),- ),- style: TextStyles.body,- ),- ),- );- } else {- return IconButton(- icon: const Icon(Icons.search),- onPressed: _activateSearch,- );- }- }-- List<Widget> buildSearchActions() {- if (_isSearchActive) {- return [- IconButton(icon: const Icon(Icons.close), onPressed: _deactivateSearch),- ];- }- return [];- }-- Widget? buildSearchLeading({Widget? defaultLeading}) {- if (_isSearchActive) {- return null;- }- return defaultLeading;- }-void _activateSearch() {setState(() {_isSearchActive = true;diff --git a/mobile/apps/locker/lib/ui/sharing/manage_links_widget.dart b/mobile/apps/locker/lib/ui/sharing/manage_links_widget.dartindex df3e37b4e1..e4e0d2403a 100644--- a/mobile/apps/locker/lib/ui/sharing/manage_links_widget.dart+++ b/mobile/apps/locker/lib/ui/sharing/manage_links_widget.dart@@ -134,7 +134,7 @@ class _ManageSharedLinkWidgetState extends State<ManageSharedLinkWidget> {),alignCaptionedTextToLeft: true,isTopBorderRadiusRemoved: true,- menuItemColor: context.componentColors.fillLight,+ menuItemColor: colors.fillLight,trailingWidget: ToggleSwitchWidget(value: () => url.passwordEnabled,onChanged: () async {@@ -174,11 +174,11 @@ class _ManageSharedLinkWidgetState extends State<ManageSharedLinkWidget> {MenuItemWidgetV2(captionedTextWidget: CaptionedTextWidgetV2(title: context.l10n.linkExpired,- textColor: context.componentColors.warning,+ textColor: colors.warning,),leadingIcon: Icons.error_outline,- leadingIconColor: context.componentColors.warning,- menuItemColor: context.componentColors.fillLight,+ leadingIconColor: colors.warning,+ menuItemColor: colors.fillLight,),if (!url.isExpired)MenuItemWidgetV2(@@ -191,7 +191,7 @@ class _ManageSharedLinkWidgetState extends State<ManageSharedLinkWidget> {color: colors.textBase,size: 20,),- menuItemColor: context.componentColors.fillLight,+ menuItemColor: colors.fillLight,showOnlyLoadingState: true,onTap: () async {await Clipboard.setData(ClipboardData(text: urlValue));@@ -205,7 +205,7 @@ class _ManageSharedLinkWidgetState extends State<ManageSharedLinkWidget> {if (!url.isExpired)DividerWidget(dividerType: DividerType.menu,- bgColor: context.componentColors.fillLight,+ bgColor: colors.fillLight,),if (!url.isExpired)MenuItemWidgetV2(@@ -219,7 +219,7 @@ class _ManageSharedLinkWidgetState extends State<ManageSharedLinkWidget> {color: colors.textBase,size: 20,),- menuItemColor: context.componentColors.fillLight,+ menuItemColor: colors.fillLight,onTap: () async {unawaited(shareText(urlValue, context: context));},@@ -237,7 +237,7 @@ class _ManageSharedLinkWidgetState extends State<ManageSharedLinkWidget> {color: colors.warning,size: 20,),- menuItemColor: context.componentColors.fillLight,+ menuItemColor: colors.fillLight,surfaceExecutionStates: false,onTap: () async {final bool result = await CollectionActions.disableUrl(