diff --git a/backend/config/example-env b/backend/config/.env.development.example similarity index 100% rename from backend/config/example-env rename to backend/config/.env.development.example diff --git a/backend/config/.env.production.example b/backend/config/.env.production.example new file mode 100644 index 0000000..c3ef179 --- /dev/null +++ b/backend/config/.env.production.example @@ -0,0 +1,23 @@ +MONGODB_URL= +DB_TYPE= +HTTP_PORT= +HTTPS_PORT= +PASSWORD_ACCESS= +PASSWORD_REFRESH= +PASSWORD_COOKIE= +_SECURE_COOKIES= +FS_DIRECTORY= +KEY= +EMAIL_VERIFICATION= +EMAIL_DOMAIN= +EMAIL_ADDRESS= +EMAIL_API_KEY= +EMAIL_HOST= +REMOTE_URL= +S3_ID= +S3_KEY= +S3_BUCKET= +URL= +TEMP_DIRECTORY= +VIDEO_THUMBNAILS_ENABLED= +TEMP_VIDEO_THUMBNAIL_LIMIT= \ No newline at end of file diff --git a/src/components/Dataform/Dataform.tsx b/src/components/Dataform/Dataform.tsx index 7490112..cffa3c5 100644 --- a/src/components/Dataform/Dataform.tsx +++ b/src/components/Dataform/Dataform.tsx @@ -11,6 +11,7 @@ import classNames from "classnames"; import { useDragAndDrop } from "../../hooks/utils"; import MultiSelectBar from "../MultiSelectBar/MultiSelectBar"; import { useFolders } from "../../hooks/folders"; +import { removeNavigationMap } from "../../reducers/selected"; const DataForm = memo( ({ scrollDivRef }: { scrollDivRef: React.RefObject }) => { @@ -47,9 +48,10 @@ const DataForm = memo( useEffect(() => { if (!isLoading && navigationMap) { - scrollDivRef.current?.scrollTo(0, navigationMap.scrollTop); - } else if (!isLoading) { - scrollDivRef.current?.scrollTo(0, 0); + const scrollTop = navigationMap.scrollTop; + scrollDivRef.current?.scrollTo(0, scrollTop); + console.log("navigation map", navigationMap, scrollTop); + dispatch(removeNavigationMap(window.location.pathname)); } }, [isLoading, navigationMap]); @@ -105,7 +107,6 @@ const DataForm = memo( {/* @ts-ignore */}
- {/* TODO: Change this spinner name */} {isFetchingNextPage && (
diff --git a/src/components/Medias/Medias.tsx b/src/components/Medias/Medias.tsx index 06f8a61..169dc13 100644 --- a/src/components/Medias/Medias.tsx +++ b/src/components/Medias/Medias.tsx @@ -6,6 +6,8 @@ import MultiSelectBar from "../MultiSelectBar/MultiSelectBar"; import { useInfiniteScroll } from "../../hooks/infiniteScroll"; import { useAppDispatch, useAppSelector } from "../../hooks/store"; import { setMediaFilter, setSortBy } from "../../reducers/filter"; +import Spinner from "../Spinner/Spinner"; +import { removeNavigationMap } from "../../reducers/selected"; const Medias = memo( ({ scrollDivRef }: { scrollDivRef: React.RefObject }) => { @@ -40,8 +42,7 @@ const Medias = memo( useEffect(() => { if (!initialLoad && navigationMap) { scrollDivRef.current?.scrollTo(0, navigationMap.scrollTop); - } else if (!initialLoad) { - scrollDivRef.current?.scrollTo(0, 0); + dispatch(removeNavigationMap(window.location.pathname)); } }, [initialLoad, navigationMap, window.location.pathname]); @@ -131,22 +132,34 @@ const Medias = memo(
-
-
- + {!isLoadingFiles && ( +
+
+ +
+ {files?.pages.map((filePage, index) => ( + + {filePage.map((file) => ( + + ))} + + ))}
- {files?.pages.map((filePage, index) => ( - - {filePage.map((file) => ( - - ))} - - ))} -
+ )} + {isLoadingFiles && ( +
+ +
+ )} + {isFetchingNextPage && ( +
+ +
+ )} {/* @ts-ignore */}
diff --git a/src/components/SettingsPage/SettingsAccountSection.tsx b/src/components/SettingsPage/SettingsAccountSection.tsx index 80dfb8e..11e53ef 100644 --- a/src/components/SettingsPage/SettingsAccountSection.tsx +++ b/src/components/SettingsPage/SettingsAccountSection.tsx @@ -150,7 +150,7 @@ const SettingsPageAccount: React.FC = ({
-

Logout all accounts

+

Logout all sessions