enable bulk date edit for all
This commit is contained in:
parent
8bbd09a742
commit
1568ff2731
|
@ -1,5 +1,5 @@
|
||||||
import { SetDialogMessage } from 'components/MessageDialog';
|
import { SetDialogMessage } from 'components/MessageDialog';
|
||||||
import React, { useEffect, useState } from 'react';
|
import React from 'react';
|
||||||
import { SetCollectionSelectorAttributes } from '../CollectionSelector';
|
import { SetCollectionSelectorAttributes } from '../CollectionSelector';
|
||||||
import DeleteIcon from 'components/icons/DeleteIcon';
|
import DeleteIcon from 'components/icons/DeleteIcon';
|
||||||
import CloseIcon from 'components/icons/CloseIcon';
|
import CloseIcon from 'components/icons/CloseIcon';
|
||||||
|
@ -19,10 +19,7 @@ import { Collection } from 'types/collection';
|
||||||
import RemoveIcon from 'components/icons/RemoveIcon';
|
import RemoveIcon from 'components/icons/RemoveIcon';
|
||||||
import RestoreIcon from 'components/icons/RestoreIcon';
|
import RestoreIcon from 'components/icons/RestoreIcon';
|
||||||
import ClockIcon from 'components/icons/ClockIcon';
|
import ClockIcon from 'components/icons/ClockIcon';
|
||||||
import { getData, LS_KEYS } from 'utils/storage/localStorage';
|
|
||||||
import { FIX_CREATION_TIME_VISIBLE_TO_USER_IDS } from 'constants/user';
|
|
||||||
import DownloadIcon from 'components/icons/DownloadIcon';
|
import DownloadIcon from 'components/icons/DownloadIcon';
|
||||||
import { User } from 'types/user';
|
|
||||||
import { IconWithMessage } from 'components/IconWithMessage';
|
import { IconWithMessage } from 'components/IconWithMessage';
|
||||||
import { SelectionBar, SelectionContainer } from '.';
|
import { SelectionBar, SelectionContainer } from '.';
|
||||||
|
|
||||||
|
@ -63,14 +60,6 @@ const SelectedFileOptions = ({
|
||||||
activeCollection,
|
activeCollection,
|
||||||
isFavoriteCollection,
|
isFavoriteCollection,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const [showFixCreationTime, setShowFixCreationTime] = useState(false);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const user: User = getData(LS_KEYS.USER);
|
|
||||||
const showFixCreationTime =
|
|
||||||
FIX_CREATION_TIME_VISIBLE_TO_USER_IDS.includes(user?.id);
|
|
||||||
setShowFixCreationTime(showFixCreationTime);
|
|
||||||
}, []);
|
|
||||||
const addToCollection = () =>
|
const addToCollection = () =>
|
||||||
setCollectionSelectorAttributes({
|
setCollectionSelectorAttributes({
|
||||||
callback: addToCollectionHelper,
|
callback: addToCollectionHelper,
|
||||||
|
@ -161,13 +150,12 @@ const SelectedFileOptions = ({
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
{showFixCreationTime && (
|
<IconWithMessage message={constants.FIX_CREATION_TIME}>
|
||||||
<IconWithMessage message={constants.FIX_CREATION_TIME}>
|
<IconButton onClick={fixTimeHelper}>
|
||||||
<IconButton onClick={fixTimeHelper}>
|
<ClockIcon />
|
||||||
<ClockIcon />
|
</IconButton>
|
||||||
</IconButton>
|
</IconWithMessage>
|
||||||
</IconWithMessage>
|
|
||||||
)}
|
|
||||||
<IconWithMessage message={constants.DOWNLOAD}>
|
<IconWithMessage message={constants.DOWNLOAD}>
|
||||||
<IconButton onClick={downloadHelper}>
|
<IconButton onClick={downloadHelper}>
|
||||||
<DownloadIcon />
|
<DownloadIcon />
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
export const FIX_CREATION_TIME_VISIBLE_TO_USER_IDS = [
|
|
||||||
1, 125, 243, 341, 1071, 1580559962387273, 1580559962388564,
|
|
||||||
];
|
|
Loading…
Reference in a new issue