π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Remove unused code
Manav Rathie84b9894842c
diff --git a/web/apps/photos/src/components/pages/sharedAlbum/ReportAbuse.tsx b/web/apps/photos/src/components/pages/sharedAlbum/ReportAbuse.tsxdeleted file mode 100644index ba6b0418f6..0000000000--- a/web/apps/photos/src/components/pages/sharedAlbum/ReportAbuse.tsx+++ /dev/null@@ -1,20 +0,0 @@-import { styled } from "@mui/material";-import { Button } from "react-bootstrap";-const Container = styled("div")`- position: fixed;- bottom: 7%;- right: 2%;- align-self: flex-end;-`;--interface Iprops {- onClick: () => void;-}--export default function ReportAbuse(props: Iprops) {- return (- <Container>- <Button onClick={props.onClick}>report abuse?</Button>- </Container>- );-}diff --git a/web/apps/photos/src/constants/publicCollection.ts b/web/apps/photos/src/constants/publicCollection.tsdeleted file mode 100644index 5a1faad755..0000000000--- a/web/apps/photos/src/constants/publicCollection.ts+++ /dev/null@@ -1,4 +0,0 @@-export enum REPORT_REASON {- COPYRIGHT = "COPYRIGHT",- MALICIOUS_CONTENT = "MALICIOUS_CONTENT",-}diff --git a/web/apps/photos/src/services/publicCollectionService.ts b/web/apps/photos/src/services/publicCollectionService.tsindex 353281f662..580382dc4d 100644--- a/web/apps/photos/src/services/publicCollectionService.ts+++ b/web/apps/photos/src/services/publicCollectionService.ts@@ -4,14 +4,9 @@ import HTTPService from "@ente/shared/network/HTTPService";import { getEndpoint } from "@ente/shared/network/api";import { logError } from "@ente/shared/sentry";import localForage from "@ente/shared/storage/localForage";-import { REPORT_REASON } from "constants/publicCollection";import { Collection, CollectionPublicMagicMetadata } from "types/collection";import { EncryptedEnteFile, EnteFile } from "types/file";-import {- AbuseReportDetails,- AbuseReportRequest,- LocalSavedPublicCollectionFiles,-} from "types/publicCollection";+import { LocalSavedPublicCollectionFiles } from "types/publicCollection";import { decryptFile, mergeMetadata, sortFiles } from "utils/file";const ENDPOINT = getEndpoint();@@ -376,30 +371,6 @@ export const verifyPublicCollectionPassword = async (}};-export const reportAbuse = async (- token: string,- url: string,- reason: REPORT_REASON,- details: AbuseReportDetails,-) => {- try {- if (!token) {- return;- }- const abuseReportRequest: AbuseReportRequest = { url, reason, details };-- await HTTPService.post(- `${ENDPOINT}/public-collection/report-abuse`,- abuseReportRequest,- null,- { "X-Auth-Access-Token": token },- );- } catch (e) {- logError(e, "failed to post abuse report");- throw e;- }-};-export const removePublicCollectionWithFiles = async (collectionUID: string,collectionKey: string,diff --git a/web/apps/photos/src/types/publicCollection/index.ts b/web/apps/photos/src/types/publicCollection/index.tsindex 7e3203e774..11ee4a2d12 100644--- a/web/apps/photos/src/types/publicCollection/index.ts+++ b/web/apps/photos/src/types/publicCollection/index.ts@@ -1,5 +1,4 @@import { TimeStampListItem } from "components/PhotoList";-import { REPORT_REASON } from "constants/publicCollection";import { PublicURL } from "types/collection";import { EnteFile } from "types/file";@@ -17,31 +16,6 @@ export interface LocalSavedPublicCollectionFiles {files: EnteFile[];}-export interface AbuseReportRequest {- url: string;- reason: REPORT_REASON;- details: AbuseReportDetails;-}--export interface AbuseReportDetails {- fullName: string;- email: string;- comment: string;- signature: string;- onBehalfOf: string;- jobTitle: string;- address: Address;-}--export interface Address {- street: string;- city: string;- state: string;- country: string;- postalCode: string;- phone: string;-}-export type SetPublicShareProp = React.Dispatch<React.SetStateAction<PublicURL>>;