Skip to content

armgit / ente

Public Imported from GitHub
0

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

Scaffold differently

Manav Rathib87b68e9d479
diff --git a/web/apps/photos/src/components/PhotoFrame.tsx b/web/apps/photos/src/components/PhotoFrame.tsx
index f197512807..af3b5aa8e7 100644
--- a/web/apps/photos/src/components/PhotoFrame.tsx
+++ b/web/apps/photos/src/components/PhotoFrame.tsx
@@ -7,6 +7,7 @@ import {
} from "@/gallery/services/download";
import { EnteFile } from "@/media/file";
import { FileType } from "@/media/file-type";
+import { FileViewer } from "@/new/photos/components/FileViewer";
import type { GalleryBarMode } from "@/new/photos/components/gallery/reducer";
import { TRASH_SECTION } from "@/new/photos/services/collection";
import { styled } from "@mui/material";
@@ -517,6 +518,7 @@ const PhotoFrame = ({
/>
)}
</AutoSizer>
+ {process.env.NEXT_ENTE_WIP_PS5 && <FileViewer />}
<PhotoViewer
isOpen={open}
items={displayFiles}
diff --git a/web/apps/photos/src/pages/g2.tsx b/web/apps/photos/src/pages/g2.tsx
deleted file mode 100644
index 4a7e2042f1..0000000000
--- a/web/apps/photos/src/pages/g2.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from "@/new/photos/pages/g2";
diff --git a/web/packages/new/photos/components/FileViewer5.tsx b/web/packages/new/photos/components/FileViewer5.tsx
new file mode 100644
index 0000000000..fbd9959dbb
--- /dev/null
+++ b/web/packages/new/photos/components/FileViewer5.tsx
@@ -0,0 +1,13 @@
+// TODO(PS): WIP gallery using upstream photoswipe
+//
+// Needs yarn workspace gallery add photoswipe@^5.4.4 (not committed yet).
+
+import { Button } from "@mui/material";
+
+export const FileViewer: React.FC = () => {
+ return (
+ <div>
+ Hello<Button>Test</Button>
+ </div>
+ );
+};
diff --git a/web/packages/new/photos/components/PhotoViewer.tsx b/web/packages/new/photos/components/PhotoViewer.tsx
index 6734d9d900..82dd388e7b 100644
--- a/web/packages/new/photos/components/PhotoViewer.tsx
+++ b/web/packages/new/photos/components/PhotoViewer.tsx
@@ -9,6 +9,17 @@ import { t } from "i18next";
import { useState } from "react";
import { aboveGalleryContentZ } from "./utils/z-index";
+// TODO(PS)
+import dynamic from "next/dynamic";
+// eslint-disable-next-line @typescript-eslint/ban-ts-comment
+// @ts-ignore
+const FV5 = dynamic(() => import("./FileViewer5"));
+const FVD = () => <></>;
+
+export const FileViewer: React.FC = (props) => {
+ return process.env.NEXT_ENTE_WIP_PS5 ? <FV5 {...props} /> : <FVD />;
+};
+
type ConfirmDeleteFileDialogProps = ModalVisibilityProps & {
/**
* Called when the user confirms the deletion.
diff --git a/web/packages/new/photos/pages/g2.tsx b/web/packages/new/photos/pages/g2.tsx
deleted file mode 100644
index f19704a60c..0000000000
--- a/web/packages/new/photos/pages/g2.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-// TODO(PS): WIP gallery using upstream photoswipe
-//
-// Needs yarn workspace gallery add photoswipe@^5.4.4 (not committed yet).
-
-export const Page: React.FC = () => {
- return <div>Hello</div>;
-};