π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add clear button and autofocus to all albums search field
anandbaburajan021d9c13f84c
diff --git a/web/apps/photos/src/components/Collections/AllAlbums.tsx b/web/apps/photos/src/components/Collections/AllAlbums.tsxindex 8ee2ca377f..30ed3903af 100644--- a/web/apps/photos/src/components/Collections/AllAlbums.tsx+++ b/web/apps/photos/src/components/Collections/AllAlbums.tsx@@ -192,6 +192,7 @@ const SearchField: React.FC<SearchFieldProps> = ({ value, onChange }) => (placeholder={t("albums_search_hint")}value={value}onChange={(e) => onChange(e.target.value)}+ autoFocusslotProps={{input: {startAdornment: (@@ -199,6 +200,22 @@ const SearchField: React.FC<SearchFieldProps> = ({ value, onChange }) => (<SearchIcon /></InputAdornment>),+ endAdornment: value && (+ <InputAdornment+ position="end"+ sx={{ marginRight: "0 !important" }}+ >+ <CloseIcon+ fontSize="small"+ onClick={() => onChange("")}+ sx={{+ color: "stroke.muted",+ cursor: "pointer",+ "&:hover": { color: "text.base" },+ }}+ />+ </InputAdornment>+ ),},}}sx={{@@ -215,8 +232,6 @@ const SearchField: React.FC<SearchFieldProps> = ({ value, onChange }) => (color: "text.base",paddingTop: "8.5px !important",paddingBottom: "8.5px !important",- paddingLeft: "0 !important",- paddingRight: "14px !important",},"& .MuiInputAdornment-root": {color: "stroke.muted",@@ -346,11 +361,7 @@ const AllAlbumsContent: React.FC<AllAlbumsContentProps> = ({// Show "no results" message if there's a search query but no resultsif (hasSearchQuery && collectionSummaries.length === 0) {return (- <DialogContent- sx={{- height: "80svh",- }}- >+ <DialogContent sx={{ height: "80svh" }}><Boxsx={{display: "flex",@@ -368,12 +379,7 @@ const AllAlbumsContent: React.FC<AllAlbumsContentProps> = ({}return (- <DialogContent- sx={{- "&&": { padding: 0 },- height: "80svh",- }}- >+ <DialogContent sx={{ "&&": { padding: 0 }, height: "80svh" }}><AutoSizer>{({ width, height }) => (<FixedSizeListdiff --git a/web/packages/base/locales/en-US/translation.json b/web/packages/base/locales/en-US/translation.jsonindex 06b585e0da..18d6107560 100644--- a/web/packages/base/locales/en-US/translation.json+++ b/web/packages/base/locales/en-US/translation.json@@ -235,7 +235,7 @@"search_results": "Search results","no_results": "No results found","search_hint": "Search for albums, dates, descriptions, ...",- "albums_search_hint": "Search for albums",+ "albums_search_hint": "Search for albums...","album": "Album","date": "Date","description": "Description",