Skip to content

armgit / ente

Public Imported from GitHub
0

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

Lint fix

Manav Rathi05e99e78ecc5
diff --git a/web/packages/gallery/components/viewer/icons.tsx b/web/packages/gallery/components/viewer/icons.tsx
index 253817cfdd..4b604612ed 100644
--- a/web/packages/gallery/components/viewer/icons.tsx
+++ b/web/packages/gallery/components/viewer/icons.tsx
@@ -38,12 +38,17 @@ const paths = {
// "@mui/icons-material/MoreHoriz"
more: '<path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" transform="translate(0, 4.5)"',
// "@mui/icons-material/FullscreenOutlined"
- fullscreen: '<path d="M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" transform="translate(0, 4.5)"',
+ fullscreen:
+ '<path d="M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" transform="translate(0, 4.5)"',
// "@mui/icons-material/FullscreenExitOutlined"
- "fullscreen-exit": '<path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" transform="translate(0, 4.5)"',
+ "fullscreen-exit":
+ '<path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" transform="translate(0, 4.5)"',
};
-type IconKeys = Exclude<keyof typeof paths, "favorite-fill" | "fullscreen-exit">;
+type IconKeys = Exclude<
+ keyof typeof paths,
+ "favorite-fill" | "fullscreen-exit"
+>;
/**
* Return an object that can be passed verbatim to the "html" option expected by
@@ -67,8 +72,8 @@ export const createPSRegisterElementIconHTML = (name: IconKeys) => ({
name == "favorite"
? favoriteInner()
: name == "fullscreen"
- ? fullscreenInner()
- : `${paths[name]} id="pswp__icn-${name}" />`,
+ ? fullscreenInner()
+ : `${paths[name]} id="pswp__icn-${name}" />`,
outlineID: `pswp__icn-${name}`,
});
diff --git a/web/packages/gallery/components/viewer/photoswipe.ts b/web/packages/gallery/components/viewer/photoswipe.ts
index 2e09b04ea0..8457cac408 100644
--- a/web/packages/gallery/components/viewer/photoswipe.ts
+++ b/web/packages/gallery/components/viewer/photoswipe.ts
@@ -90,7 +90,10 @@ export interface FileViewerPhotoSwipeDelegate {
) => void;
}
-type FileViewerPhotoSwipeOptions = Pick<FileViewerProps, "initialIndex" | "showFullscreenButton"> & {
+type FileViewerPhotoSwipeOptions = Pick<
+ FileViewerProps,
+ "initialIndex" | "showFullscreenButton"
+> & {
/**
* `true` if we're running in the context of a logged in user, and so
* various actions that modify the file should be shown.
@@ -1263,18 +1266,31 @@ export class FileViewerPhotoSwipe {
onInit: (buttonElement, pswp) => {
const updateIcon = () => {
const isFullscreen = !!document.fullscreenElement;
- const fullscreenIcon = buttonElement.querySelector("#pswp__icn-fullscreen");
- const exitIcon = buttonElement.querySelector("#pswp__icn-fullscreen-exit");
+ const fullscreenIcon = buttonElement.querySelector(
+ "#pswp__icn-fullscreen",
+ );
+ const exitIcon = buttonElement.querySelector(
+ "#pswp__icn-fullscreen-exit",
+ );
if (fullscreenIcon && exitIcon) {
- showIf(fullscreenIcon as HTMLElement, !isFullscreen);
+ showIf(
+ fullscreenIcon as HTMLElement,
+ !isFullscreen,
+ );
showIf(exitIcon as HTMLElement, isFullscreen);
}
};
// Update icon on fullscreen changes
- document.addEventListener("fullscreenchange", updateIcon);
+ document.addEventListener(
+ "fullscreenchange",
+ updateIcon,
+ );
pswp.on("destroy", () => {
- document.removeEventListener("fullscreenchange", updateIcon);
+ document.removeEventListener(
+ "fullscreenchange",
+ updateIcon,
+ );
});
// Initialize icon state