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 disableAutoFocus
/> />
{/* <CollectionShareSharees collection={collection} /> */}
</> </>
); );
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,21 +1,9 @@
import { Stack } from '@mui/material'; 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 { Collection } from 'types/collection';
import { EnteDrawer } from 'components/EnteDrawer'; import { EnteDrawer } from 'components/EnteDrawer';
import { t } from 'i18next'; import { t } from 'i18next';
import { DialogProps } from '@mui/material'; import { DialogProps } from '@mui/material';
import Titlebar from 'components/Titlebar'; 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'; import { ManageParticipantsList } from './ManageParticipantsList';
interface Iprops { interface Iprops {
@ -29,8 +17,6 @@ interface Iprops {
} }
export default function ManageParticipantsOptions({ export default function ManageParticipantsOptions({
// publicShareProp,
// setPublicShareProp,
open, open,
collection, collection,
onClose, onClose,
@ -44,11 +30,6 @@ export default function ManageParticipantsOptions({
onClose(); onClose();
} }
}; };
// const galleryContext = useContext(GalleryContext);
// const [sharableLinkError, setSharableLinkError] = useState(null);
// Adding key-value pairs to the map
return ( return (
<> <>

View file

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

View file

@ -2,9 +2,6 @@ import { Stack } from '@mui/material';
import { EnteMenuItem } from 'components/Menu/EnteMenuItem'; import { EnteMenuItem } from 'components/Menu/EnteMenuItem';
import { MenuItemGroup } from 'components/Menu/MenuItemGroup'; import { MenuItemGroup } from 'components/Menu/MenuItemGroup';
import { Collection } from 'types/collection'; 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 AddIcon from '@mui/icons-material/Add';
import { useState } from 'react'; import { useState } from 'react';
import { t } from 'i18next'; import { t } from 'i18next';

View file

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

View file

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