renamed archive collection to archive section

This commit is contained in:
abhinav-grd 2021-09-22 11:39:22 +05:30
parent e067b7260b
commit b45b6af9e1
3 changed files with 7 additions and 10 deletions

View file

@ -29,7 +29,7 @@ import {
SPACE_BTW_DATES, SPACE_BTW_DATES,
} from 'types'; } from 'types';
import { fileIsArchived } from 'utils/file'; import { fileIsArchived } from 'utils/file';
import { ARCHIVE_COLLECTION } from './pages/gallery/Collections'; import { ARCHIVE_SECTION } from './pages/gallery/Collections';
const NO_OF_PAGES = 2; const NO_OF_PAGES = 2;
const A_DAY = 24 * 60 * 60 * 1000; const A_DAY = 24 * 60 * 60 * 1000;
@ -407,10 +407,7 @@ const PhotoFrame = ({
if (activeCollection === 0 && fileIsArchived(item)) { if (activeCollection === 0 && fileIsArchived(item)) {
return false; return false;
} }
if ( if (activeCollection === ARCHIVE_SECTION && !fileIsArchived(item)) {
activeCollection === ARCHIVE_COLLECTION &&
!fileIsArchived(item)
) {
return false; return false;
} }

View file

@ -32,7 +32,7 @@ import InProgressIcon from './icons/InProgressIcon';
import exportService from 'services/exportService'; import exportService from 'services/exportService';
import { Subscription } from 'services/billingService'; import { Subscription } from 'services/billingService';
import { PAGES } from 'types'; import { PAGES } from 'types';
import { ARCHIVE_COLLECTION } from 'components/pages/gallery/Collections'; import { ARCHIVE_SECTION } from 'components/pages/gallery/Collections';
interface Props { interface Props {
collections: Collection[]; collections: Collection[];
setDialogMessage: SetDialogMessage; setDialogMessage: SetDialogMessage;
@ -285,7 +285,7 @@ export default function Sidebar(props: Props) {
<LinkButton <LinkButton
style={{ marginTop: '30px' }} style={{ marginTop: '30px' }}
onClick={() => { onClick={() => {
galleryContext.setActiveCollection(ARCHIVE_COLLECTION); galleryContext.setActiveCollection(ARCHIVE_SECTION);
setIsOpen(false); setIsOpen(false);
}}> }}>
{constants.ARCHIVE} {constants.ARCHIVE}

View file

@ -16,7 +16,7 @@ import { SetCollectionNamerAttributes } from './CollectionNamer';
import CollectionOptions from './CollectionOptions'; import CollectionOptions from './CollectionOptions';
import OptionIcon, { OptionIconWrapper } from './OptionIcon'; import OptionIcon, { OptionIconWrapper } from './OptionIcon';
export const ARCHIVE_COLLECTION = -1; export const ARCHIVE_SECTION = -1;
export const ALL_SECTION = 0; export const ALL_SECTION = 0;
interface CollectionProps { interface CollectionProps {
@ -221,8 +221,8 @@ export default function Collections(props: CollectionProps) {
</OverlayTrigger> </OverlayTrigger>
))} ))}
<Chip <Chip
active={activeCollection === ARCHIVE_COLLECTION} active={activeCollection === ARCHIVE_SECTION}
onClick={clickHandler(ARCHIVE_COLLECTION)}> onClick={clickHandler(ARCHIVE_SECTION)}>
{constants.ARCHIVE} {constants.ARCHIVE}
<div <div
style={{ style={{