comments removed

This commit is contained in:
jubitjohn 2023-07-11 12:18:09 +05:30
parent 9f3ea9f459
commit d3ea510bc0
11 changed files with 3 additions and 68 deletions

View file

@ -101,7 +101,6 @@ export default function CollabEmailShare({ collection, onClose }) {
}}
disableAutoFocus
/>
{/* <CollectionShareSharees collection={collection} /> */}
</>
);
}

View file

@ -17,6 +17,7 @@ interface formValues {
inputValue: string;
selectedOptions: string[];
}
export interface CollabEmailShareOptionsProps {
callback: (
inputValue: string[],
@ -44,7 +45,6 @@ export default function CollabEmailShareOptions(
props: CollabEmailShareOptionsProps
) {
console.log('OptionList Intial', props.optionsList);
// const [selectedOptions, setSelectedOptions] = useState([]);
const { submitButtonProps } = props;
const { sx: buttonSx, ...restSubmitButtonProps } = submitButtonProps ?? {};
const [updatedOptionsList, setUpdatedOptionsList] = useState<string[]>(
@ -80,9 +80,7 @@ export default function CollabEmailShareOptions(
}
setDisableInput(false);
SetLoading(false);
props.onClose();
};
@ -136,7 +134,7 @@ export default function CollabEmailShareOptions(
: { label: props.placeholder })}
error={Boolean(errors.inputValue)}
helperText={errors.inputValue}
// value={values.inputValue}
value={values.inputValue}
disabled={loading || disableInput}
autoFocus={!props.disableAutoFocus}
autoComplete={props.autoComplete}
@ -151,11 +149,9 @@ export default function CollabEmailShareOptions(
{updatedOptionsList.map((item, index) => (
<>
<EnteMenuItem
//
fontWeight="normal"
key={item}
onClick={() => {
// handleEmailClick(item, setFieldValue)
if (
values.selectedOptions.includes(
item

View file

@ -1,10 +1,4 @@
import { Stack } from '@mui/material';
// import { GalleryContext } from 'pages/gallery';
// import React, { useContext, useState } from 'react';
// import {
// deleteShareableURL,
// updateShareableURL,
// } from 'services/collectionService';
import { Collection } from 'types/collection';
import { EnteDrawer } from 'components/EnteDrawer';
@ -12,7 +6,6 @@ import { t } from 'i18next';
import { DialogProps } from '@mui/material';
import Titlebar from 'components/Titlebar';
import MenuSectionTitle from 'components/Menu/MenuSectionTitle';
// import EmailShare from '../emailShare';
import WorkspacesIcon from '@mui/icons-material/Workspaces';
import CollabEmailShare from './CollabEmailShare';
@ -25,8 +18,6 @@ interface Iprops {
}
export default function ManageAddCollabOptions({
// publicShareProp,
// setPublicShareProp,
open,
collection,
onClose,
@ -39,9 +30,6 @@ export default function ManageAddCollabOptions({
onClose();
}
};
// const galleryContext = useContext(GalleryContext);
// const [sharableLinkError, setSharableLinkError] = useState(null);
return (
<>

View file

@ -1,17 +1,11 @@
import { Stack } from '@mui/material';
// import { GalleryContext } from 'pages/gallery';
// import React, { useContext, useState } from 'react';
// import {
// deleteShareableURL,
// updateShareableURL,
// } from 'services/collectionService';
import { Collection } from 'types/collection';
import { EnteDrawer } from 'components/EnteDrawer';
import { t } from 'i18next';
import { DialogProps } from '@mui/material';
import Titlebar from 'components/Titlebar';
import MenuSectionTitle from 'components/Menu/MenuSectionTitle';
// import EmailShare from '../emailShare';
import WorkspacesIcon from '@mui/icons-material/Workspaces';
import ViewerEmailShare from './ViewerEmailShare';
@ -23,8 +17,6 @@ interface Iprops {
}
export default function ManageAddViewerOptions({
// publicShareProp,
// setPublicShareProp,
open,
collection,
onClose,
@ -37,11 +29,6 @@ export default function ManageAddViewerOptions({
onClose();
}
};
// const galleryContext = useContext(GalleryContext);
// const [sharableLinkError, setSharableLinkError] = useState(null);
// Adding key-value pairs to the map
return (
<>

View file

@ -5,15 +5,11 @@ import { Collection } from 'types/collection';
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
import { useState } from 'react';
import { t } from 'i18next';
// import ManageAddViewerOptions from './ManageAddViewerOptions';
// import { CollectionShareSharees } from '../sharees';
import AvatarCollectionShare from '../AvatarCollectionShare';
// import ManageAddViewer from './ManageAddViewer';
import MenuItemDivider from 'components/Menu/MenuItemDivider';
import Avatar from '@mui/material/Avatar';
import ManageParticipantsOptions from './ManageParticipantsOptions';
import { Workspaces } from '@mui/icons-material';
// import { CollectionShareSharees } from '../sharees';
interface Iprops {
collection: Collection;
@ -51,7 +47,6 @@ export default function ManageParticipants({
const shareeCount = collection.sharees?.length || 0;
const extraShareeCount = Math.max(0, shareeCount - 6);
// console.log('Lenght for sharee list', collection.sharees[0].email);
return (
<>
<Stack>

View file

@ -1,6 +1,5 @@
import { Box } from '@mui/material';
import React, { useContext } from 'react';
// import { t } from 'i18next';
import { Collection } from 'types/collection';
import { OwnerParticipant } from './OwnerParticipant';
import { ViewerParticipants } from './ViewerParticipants';

View file

@ -1,21 +1,9 @@
import { Stack } from '@mui/material';
// import { GalleryContext } from 'pages/gallery';
// import React, { useContext, useState } from 'react';
// import {
// deleteShareableURL,
// updateShareableURL,
// } from 'services/collectionService';
import { Collection } from 'types/collection';
import { EnteDrawer } from 'components/EnteDrawer';
import { t } from 'i18next';
import { DialogProps } from '@mui/material';
import Titlebar from 'components/Titlebar';
// import MenuSectionTitle from 'components/Menu/MenuSectionTitle';
// import EmailShare from '../emailShare';
// import WorkspacesIcon from '@mui/icons-material/Workspaces';
// import ViewerEmailShare from './ViewerEmailShare';
// import { CollectionShareSharees } from '../sharees';
import { ManageParticipantsList } from './ManageParticipantsList';
interface Iprops {
@ -29,8 +17,6 @@ interface Iprops {
}
export default function ManageParticipantsOptions({
// publicShareProp,
// setPublicShareProp,
open,
collection,
onClose,
@ -44,11 +30,6 @@ export default function ManageParticipantsOptions({
onClose();
}
};
// const galleryContext = useContext(GalleryContext);
// const [sharableLinkError, setSharableLinkError] = useState(null);
// Adding key-value pairs to the map
return (
<>

View file

@ -128,7 +128,6 @@ export default function ManageParticipantsRole({
});
};
console.log('collection Clicked', collection, selectedEmail);
return (
<>
<EnteDrawer anchor="right" open={open} onClose={handleDrawerClose}>
@ -151,7 +150,6 @@ export default function ManageParticipantsRole({
<MenuItemGroup>
<EnteMenuItem
//
fontWeight="normal"
onClick={() =>
handleRoleChange('COLLABORATOR')
@ -212,7 +210,6 @@ export default function ManageParticipantsRole({
</Typography>
<EnteMenuItem
//
color="error"
fontWeight="normal"
onClick={removeParticipant}

View file

@ -2,9 +2,6 @@ import { Stack } from '@mui/material';
import { EnteMenuItem } from 'components/Menu/EnteMenuItem';
import { MenuItemGroup } from 'components/Menu/MenuItemGroup';
import { Collection } from 'types/collection';
// import ChevronRightIcon from '@mui/icons-material/ChevronRight';
// import LinkIcon from '@mui/icons-material/Link';
import AddIcon from '@mui/icons-material/Add';
import { useState } from 'react';
import { t } from 'i18next';

View file

@ -5,7 +5,6 @@ import { shareCollection } from 'services/collectionService';
import { User } from 'types/user';
import { handleSharingErrors } from 'utils/error/ui';
import { getData, LS_KEYS } from 'utils/storage/localStorage';
// import { CollectionShareSharees } from './sharees';
import { getLocalCollections } from 'services/collectionService';
import { getLocalFamilyData } from 'utils/user/family';
import ViewerEmailShareOptions, {
@ -101,7 +100,6 @@ export default function ViewerEmailShare({ collection, onClose }) {
}}
disableAutoFocus
/>
{/* <CollectionShareSharees collection={collection} /> */}
</>
);
}

View file

@ -50,7 +50,6 @@ export default function ViewerEmailShareOptions(
props.optionsList
);
const [disableInput, setDisableInput] = useState(false);
// console.log('updatedOptionsList list:', updatedOptionsList);
const [loading, SetLoading] = useState(false);
@ -153,7 +152,6 @@ export default function ViewerEmailShareOptions(
fontWeight="normal"
key={item}
onClick={() => {
// handleEmailClick(item, setFieldValue)
if (
values.selectedOptions.includes(
item