Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

lint fix

Apalepexd976c066e107
diff --git a/web/apps/photos/src/components/pages/gallery/PreviewCard.tsx b/web/apps/photos/src/components/pages/gallery/PreviewCard.tsx
index 241d15d0db..d4486afadc 100644
--- a/web/apps/photos/src/components/pages/gallery/PreviewCard.tsx
+++ b/web/apps/photos/src/components/pages/gallery/PreviewCard.tsx
@@ -14,6 +14,7 @@ import { Overlay } from "@ente/shared/components/Container";
import { CustomError } from "@ente/shared/error";
import useLongPress from "@ente/shared/hooks/useLongPress";
import AlbumOutlined from "@mui/icons-material/AlbumOutlined";
+import Favorite from "@mui/icons-material/FavoriteRounded";
import PlayCircleOutlineOutlinedIcon from "@mui/icons-material/PlayCircleOutlineOutlined";
import { Tooltip, styled } from "@mui/material";
import i18n from "i18next";
@@ -23,7 +24,6 @@ import React, { useContext, useEffect, useRef, useState } from "react";
import { TRASH_SECTION } from "utils/collection";
import { shouldShowAvatar } from "utils/file";
import Avatar from "./Avatar";
-import Favorite from "@mui/icons-material/FavoriteRounded";
interface IProps {
file: EnteFile;
@@ -363,7 +363,7 @@ export default function PreviewCard(props: IProps) {
)}
{props.isFav && (
<FavOverlay>
- <Favorite/>
+ <Favorite />
</FavOverlay>
)}
diff --git a/web/apps/photos/src/components/pages/gallery/SelectedFileOptions.tsx b/web/apps/photos/src/components/pages/gallery/SelectedFileOptions.tsx
index 2d6e8769f9..398ecc5f1b 100644
--- a/web/apps/photos/src/components/pages/gallery/SelectedFileOptions.tsx
+++ b/web/apps/photos/src/components/pages/gallery/SelectedFileOptions.tsx
@@ -10,12 +10,12 @@ import MoveIcon from "@mui/icons-material/ArrowForward";
import CloseIcon from "@mui/icons-material/Close";
import DeleteIcon from "@mui/icons-material/Delete";
import DownloadIcon from "@mui/icons-material/Download";
+import FavoriteBorderIcon from "@mui/icons-material/FavoriteBorderRounded";
import RemoveIcon from "@mui/icons-material/RemoveCircleOutline";
import RestoreIcon from "@mui/icons-material/Restore";
import UnArchiveIcon from "@mui/icons-material/Unarchive";
import VisibilityOffOutlined from "@mui/icons-material/VisibilityOffOutlined";
import VisibilityOutlined from "@mui/icons-material/VisibilityOutlined";
-import FavoriteBorderIcon from "@mui/icons-material/FavoriteBorderRounded";
import { Box, IconButton, Stack, Tooltip } from "@mui/material";
import { t } from "i18next";
import { AppContext } from "pages/_app";
@@ -336,7 +336,9 @@ const SelectedFileOptions = ({
{!isFavoriteCollection && (
<Tooltip title={t("favorites")}>
<IconButton
- onClick={handleFileOps(FILE_OPS_TYPE.SET_FAVORITE)}
+ onClick={handleFileOps(
+ FILE_OPS_TYPE.SET_FAVORITE,
+ )}
>
<FavoriteBorderIcon />
</IconButton>
diff --git a/web/apps/photos/src/services/collectionService.ts b/web/apps/photos/src/services/collectionService.ts
index 289d8be917..727addaabb 100644
--- a/web/apps/photos/src/services/collectionService.ts
+++ b/web/apps/photos/src/services/collectionService.ts
@@ -487,7 +487,7 @@ export const createFavoritesCollection = () => {
export const addToFavorites = async (file: EnteFile) => {
await addMultipleToFavorites([file]);
-}
+};
export const addMultipleToFavorites = async (files: EnteFile[]) => {
try {
diff --git a/web/apps/photos/src/utils/file/index.ts b/web/apps/photos/src/utils/file/index.ts
index fa50ad8092..916bccc836 100644
--- a/web/apps/photos/src/utils/file/index.ts
+++ b/web/apps/photos/src/utils/file/index.ts
@@ -24,7 +24,10 @@ import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
import type { User } from "@ente/shared/user/types";
import { downloadUsingAnchor } from "@ente/shared/utils";
import { t } from "i18next";
-import { addMultipleToFavorites, moveToHiddenCollection } from "services/collectionService";
+import {
+ addMultipleToFavorites,
+ moveToHiddenCollection,
+} from "services/collectionService";
import {
deleteFromTrash,
trashFiles,
@@ -46,7 +49,7 @@ export enum FILE_OPS_TYPE {
HIDE,
TRASH,
DELETE_PERMANENTLY,
- SET_FAVORITE
+ SET_FAVORITE,
}
export async function downloadFile(file: EnteFile) {
@@ -633,7 +636,7 @@ export const handleFileOps = async (
break;
case FILE_OPS_TYPE.SET_FAVORITE:
await setBulkFavorite(files);
- updateFavItemIds(new Set(files.map(f=>f.id)))
+ updateFavItemIds(new Set(files.map((f) => f.id)));
break;
}
};
@@ -688,10 +691,10 @@ const fixTimeHelper = async (
setFixCreationTimeAttributes({ files: selectedFiles });
};
-const setBulkFavorite = async (files: EnteFile []) => {
+const setBulkFavorite = async (files: EnteFile[]) => {
try {
await addMultipleToFavorites(files);
} catch (e) {
log.error("Could not add to favorites", e);
}
-}
+};