@mohamed-karawia/library 0.1.20 → 0.1.23
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +27 -27
- package/dist/stories/Chat/Chat.js +24 -31
- package/dist/stories/Community/Community.js +54 -34
- package/dist/stories/Events/Event/Event.js +13 -6
- package/dist/stories/Events/EventsList/EventsList.js +14 -11
- package/dist/stories/Forms/AddPhoto/AddPhoto.js +8 -7
- package/dist/stories/Forms/CreateEvent/CreateEvent.js +115 -0
- package/dist/stories/Forms/CreateFolder/CreateFolder.js +87 -0
- package/dist/stories/Forms/CreateSong/CreateSong.js +98 -0
- package/dist/stories/Library/Folders/Folders.js +27 -21
- package/dist/stories/Library/Notes/Notes.js +29 -18
- package/dist/stories/Modals/AddPhotoAlbum/AddPhotoAlbum.js +38 -0
- package/dist/stories/Modals/AddPhotoModal/AddPhotoModal.js +40 -0
- package/dist/stories/Modals/AddSongModal/AddSongModal.js +41 -0
- package/dist/stories/Modals/AddVideoAlbumModal/AddVideoAlbumModal.js +41 -0
- package/dist/stories/Modals/AddVideoModal/AddVideoModal.js +39 -0
- package/dist/stories/Modals/ChatConfigModal/ChatContifgModal.js +93 -0
- package/dist/stories/Modals/CreateEventModal/CreateEventModal.js +42 -0
- package/dist/stories/Modals/CreateFolderModal/CreateFolderModal.js +36 -0
- package/dist/stories/Modals/CreateMusicAlbumModal/CreateMusicAlbumModal.js +41 -0
- package/dist/stories/Modals/CreateNoteModal/CreateNoteModal.js +42 -0
- package/dist/stories/Modals/EventConfigModal/EventConfigModal.js +99 -0
- package/dist/stories/Modals/EventsConfigModal/EventsConfigModal.js +87 -0
- package/dist/stories/Modals/FoldersConfigModal/FoldersConfigModal.js +87 -0
- package/dist/stories/Modals/MusicAlbumConfigModal/MusicAlbumConfigModal.js +88 -0
- package/dist/stories/Modals/MusicAlbumsConfigModal/MusicAlbumsConfigModal.js +87 -0
- package/dist/stories/Modals/NotesConfigModal/NotesConfigModal.js +87 -0
- package/dist/stories/Modals/PhotoAlbumConfigModal/PhotoAlbumConfigModal.js +88 -0
- package/dist/stories/Modals/PhotoAlbumsConfigModal/PhotoAlbumsConfigModal.js +88 -0
- package/dist/stories/Modals/ShowImgModal/ShowImgModal.js +62 -0
- package/dist/stories/Modals/VideoAlbumConfigModal/VideoAlbumConfigModal.js +88 -0
- package/dist/stories/Modals/VideoAlbumsConfigModal/VideoAlbumsConfigModal.js +89 -0
- package/dist/stories/Modals/VideoConfigModal/VideoConfigModal.js +99 -0
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +9 -46
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +57 -37
- package/dist/stories/Pages/Chat/Chat.js +1 -1
- package/dist/stories/Pages/Events/Event/Event.js +1 -1
- package/dist/stories/Pages/Events/Events/Events.js +1 -1
- package/dist/stories/Pages/Library/Folders/Library.js +2 -2
- package/dist/stories/Pages/Library/Notes/Notes.js +2 -2
- package/dist/stories/Pages/Music/MusicAlbum/Music.js +2 -2
- package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -2
- package/dist/stories/Pages/Photos/Album/Album.js +2 -2
- package/dist/stories/Pages/Photos/Albums/Albums.js +2 -2
- package/dist/stories/Pages/Video/DetailedVideo/DetailedVideo.js +2 -2
- package/dist/stories/Pages/Video/VideoAlbum/Video.js +2 -2
- package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +26 -16
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +11 -4
- package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +7 -5
- package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +7 -5
- package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +7 -5
- package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +7 -5
- package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +6 -4
- package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +8 -7
- package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +7 -5
- package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +7 -5
- package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +7 -5
- package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +7 -5
- package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +7 -5
- package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +7 -5
- package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +7 -5
- package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +7 -5
- package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +7 -5
- package/dist/stories/Reusable Components/Comments/Comments.js +58 -0
- package/dist/stories/Reusable Components/Community/Community.js +13 -36
- package/dist/stories/Reusable Components/Sections/Sections.js +67 -0
- package/dist/stories/Spaces/Chat/Chat.js +103 -0
- package/dist/stories/Spaces/EventsList/EventsList.js +140 -0
- package/dist/stories/Spaces/NotesList/NotesList.js +144 -0
- package/dist/stories/Spaces/ViewDetailedPhoto/ViewDetailedPhoto.js +24 -0
- package/dist/stories/Spaces/ViewEvent/Event.js +146 -0
- package/dist/stories/Spaces/ViewFolders/ViewFolders.js +136 -0
- package/dist/stories/Spaces/ViewMusicAlbumList/ViewMusicAlbumList.js +136 -0
- package/dist/stories/Spaces/ViewMusicAlbums/ViewMusicAlbums.js +130 -0
- package/dist/stories/Spaces/ViewNote/ViewNote.js +27 -0
- package/dist/stories/Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList.js +231 -0
- package/dist/stories/Spaces/ViewPhotoAlbums/ViewPhotoAlbums.js +131 -0
- package/dist/stories/Spaces/ViewVideo/ViewVideo.js +169 -0
- package/dist/stories/Spaces/ViewVideoAlbumList/ViewVideoAlbumList.js +157 -0
- package/dist/stories/Spaces/ViewVideoAlbums/ViewVideoAlbums.js +164 -0
- package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +11 -4
- package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +17 -6
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +24 -25
- package/dist/stories/Widgets/VideoPlayer/VideoPlayer.js +235 -0
- package/dist/stories/helpers/util.js +24 -24
- package/dist/stories/store/actions/actions.js +16 -0
- package/dist/stories/store/communities.js +27 -29
- package/dist/stories/store/community.js +941 -0
- package/dist/stories/store/store.js +9 -4
- package/package.json +1 -1
- package/src/index.js +16 -16
- package/src/stories/Community/Community.jsx +31 -32
- package/src/stories/Forms/AddPhoto/AddPhoto.jsx +72 -72
- package/src/stories/{Events → Forms}/CreateEvent/CreateEvent.jsx +5 -1
- package/src/stories/{Library → Forms}/CreateFolder/CreateFolder.jsx +0 -0
- package/src/stories/Forms/{AddSong/AddSong.jsx → CreateSong/CreateSong.jsx} +0 -0
- package/src/stories/Modals/AddPhotoAlbum/AddPhotoAlbum.jsx +27 -0
- package/src/stories/Modals/AddPhotoModal/AddPhotoModal.jsx +29 -0
- package/src/stories/Modals/AddSongModal/AddSongModal.jsx +37 -0
- package/src/stories/Modals/AddVideoAlbumModal/AddVideoAlbumModal.jsx +38 -0
- package/src/stories/Modals/AddVideoModal/AddVideoModal.jsx +35 -0
- package/src/stories/Modals/ChatConfigModal/ChatContifgModal.jsx +77 -0
- package/src/stories/Modals/CreateEventModal/CreateEventModal.jsx +30 -0
- package/src/stories/Modals/CreateFolderModal/CreateFolderModal.jsx +39 -0
- package/src/stories/Modals/CreateMusicAlbumModal/CreateMusicAlbumModal.jsx +37 -0
- package/src/stories/Modals/CreateNoteModal/CreateNoteModal.jsx +43 -0
- package/src/stories/Modals/EventConfigModal/EventConfigModal.jsx +74 -0
- package/src/stories/Modals/EventsConfigModal/EventsConfigModal.jsx +67 -0
- package/src/stories/Modals/FoldersConfigModal/FoldersConfigModal.jsx +66 -0
- package/src/stories/Modals/MusicAlbumConfigModal/MusicAlbumConfigModal.jsx +69 -0
- package/src/stories/Modals/MusicAlbumsConfigModal/MusicAlbumsConfigModal.jsx +73 -0
- package/src/stories/Modals/NotesConfigModal/NotesConfigModal.jsx +65 -0
- package/src/stories/Modals/PhotoAlbumConfigModal/PhotoAlbumConfigModal.jsx +71 -0
- package/src/stories/Modals/PhotoAlbumsConfigModal/PhotoAlbumsConfigModal.jsx +69 -0
- package/src/stories/Modals/ShowImgModal/ShowImgModal.jsx +87 -0
- package/src/stories/Modals/VideoAlbumConfigModal/VideoAlbumConfigModal.jsx +67 -0
- package/src/stories/Modals/VideoAlbumsConfigModal/VideoAlbumsConfigModal.jsx +67 -0
- package/src/stories/Modals/VideoConfigModal/VideoConfigModal.jsx +78 -0
- package/src/stories/Pages/Chat/Chat.jsx +1 -1
- package/src/stories/Pages/Events/Event/Event.jsx +1 -1
- package/src/stories/Pages/Events/Events/Events.jsx +1 -1
- package/src/stories/Pages/Library/Folders/Library.jsx +1 -1
- package/src/stories/Pages/Library/Notes/Notes.jsx +1 -1
- package/src/stories/Pages/Music/MusicAlbum/Music.jsx +1 -1
- package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +1 -1
- package/src/stories/Pages/Photos/Album/Album.jsx +1 -1
- package/src/stories/Pages/Photos/Albums/Albums.jsx +1 -1
- package/src/stories/Pages/Video/DetailedVideo/DetailedVideo.jsx +1 -1
- package/src/stories/Pages/Video/VideoAlbum/Video.jsx +1 -1
- package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +106 -104
- package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +7 -5
- package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +106 -104
- package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +8 -6
- package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +6 -4
- package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +13 -11
- package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +36 -34
- package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +18 -16
- package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +7 -5
- package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +105 -103
- package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +8 -6
- package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +10 -8
- package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +7 -5
- package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +7 -5
- package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +7 -5
- package/src/stories/{VideoAlbum → Reusable Components}/Comments/Comments.jsx +0 -0
- package/src/stories/Reusable Components/Community/Community.jsx +10 -33
- package/src/stories/{Sections/Sections.jsx → Reusable Components/Sections/Sections.jsx } +1 -1
- package/src/stories/Spaces/Chat/Chat.jsx +77 -0
- package/src/stories/Spaces/EventsList/EventsList.jsx +118 -0
- package/src/stories/Spaces/NotesList/NotesList.jsx +125 -0
- package/src/stories/{Photo Album/DetailedPhoto/DetailedPhoto.jsx → Spaces/ViewDetailedPhoto/ViewDetailedPhoto.jsx} +1 -1
- package/src/stories/{Events/Event → Spaces/ViewEvent}/Event.jsx +17 -73
- package/src/stories/Spaces/ViewFolders/ViewFolders.jsx +122 -0
- package/src/stories/Spaces/ViewMusicAlbumList/ViewMusicAlbumList.jsx +118 -0
- package/src/stories/Spaces/ViewMusicAlbums/ViewMusicAlbums.jsx +108 -0
- package/src/stories/{Library → Spaces}/ViewNote/ViewNote.jsx +0 -0
- package/src/stories/{Photo Album/ViewAlbum/ViewAlbum.jsx → Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList.jsx} +48 -134
- package/src/stories/{Photo Album/ViewAlbums/ViewAlbums.jsx → Spaces/ViewPhotoAlbums/ViewPhotoAlbums.jsx} +22 -54
- package/src/stories/{VideoAlbum/VideoSpace/VideoSpace.jsx → Spaces/ViewVideo/ViewVideo.jsx} +21 -47
- package/src/stories/{VideoAlbum/ViewAlbum/ViewAlbum.jsx → Spaces/ViewVideoAlbumList/ViewVideoAlbumList.jsx} +31 -78
- package/src/stories/{VideoAlbum/AlbumsGallery/AlbumsGallery.jsx → Spaces/ViewVideoAlbums/ViewVideoAlbums.jsx} +20 -51
- package/src/stories/{VideoAlbum → Widgets}/VideoPlayer/VideoPlayer.jsx +0 -0
- package/src/stories/helpers/util.js +13 -13
- package/src/stories/store/actions/actions.js +7 -0
- package/src/stories/store/{communities.js → community.js} +27 -29
- package/src/stories/store/store.js +3 -4
- package/src/stories/Chat/Chat.jsx +0 -148
- package/src/stories/Events/EventsList/EventsList.jsx +0 -180
- package/src/stories/Library/Folders/Folders.jsx +0 -187
- package/src/stories/Library/Notes/Notes.jsx +0 -161
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +0 -216
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +0 -152
@@ -0,0 +1,108 @@
|
|
1
|
+
import React, { useState } from "react";
|
2
|
+
import PropTypes from "prop-types";
|
3
|
+
import styled from "styled-components";
|
4
|
+
|
5
|
+
import Gallery from "../../Reusable Components/Gallery/Gallery";
|
6
|
+
import CreateMusicAlbumModal from '../../Modals/CreateMusicAlbumModal/CreateMusicAlbumModal';
|
7
|
+
import MusicAlbumsConfigModal from "../../Modals/MusicAlbumsConfigModal/MusicAlbumsConfigModal";
|
8
|
+
|
9
|
+
|
10
|
+
import { AiOutlineFileAdd, AiFillDelete } from "react-icons/ai";
|
11
|
+
import { BsGear } from "react-icons/bs";
|
12
|
+
|
13
|
+
const cardControls = [
|
14
|
+
{ icon: <AiFillDelete />, action: "delete", name: "Delete album" },
|
15
|
+
];
|
16
|
+
|
17
|
+
const galleryControls = [
|
18
|
+
{ icon: <AiOutlineFileAdd />, action: "add", name: "Add Album" },
|
19
|
+
{ icon: <BsGear />, action: "config", name: "Config" },
|
20
|
+
];
|
21
|
+
|
22
|
+
const ViewAlbums = ({ albums, community, ...props }) => {
|
23
|
+
const [showModal, setShowModal] = useState(false);
|
24
|
+
const [showConfigModal, setShowConfigModal] = useState(false);
|
25
|
+
|
26
|
+
const onHeaderIconClicked = (action) => {
|
27
|
+
if (!props.preview) {
|
28
|
+
switch (action) {
|
29
|
+
case "add":
|
30
|
+
setShowModal(true);
|
31
|
+
break;
|
32
|
+
case "config":
|
33
|
+
setShowConfigModal(true);
|
34
|
+
break;
|
35
|
+
default:
|
36
|
+
break;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
};
|
40
|
+
|
41
|
+
const cardIconClicked = (action, index) => {
|
42
|
+
props.cardIconClicked(action, index);
|
43
|
+
};
|
44
|
+
|
45
|
+
|
46
|
+
const onAddAlbum = (album) => {
|
47
|
+
setShowModal(false);
|
48
|
+
props.onAddAlbum(album);
|
49
|
+
};
|
50
|
+
|
51
|
+
const closeModal = () => {
|
52
|
+
setShowModal(false);
|
53
|
+
};
|
54
|
+
|
55
|
+
const cancelConfig = () => {
|
56
|
+
setShowConfigModal(false);
|
57
|
+
localStorage.removeItem("formStyles");
|
58
|
+
};
|
59
|
+
|
60
|
+
return (
|
61
|
+
<Container>
|
62
|
+
<Gallery
|
63
|
+
galleryTitle={props.title || "Music Albums"}
|
64
|
+
data={albums}
|
65
|
+
type="flat"
|
66
|
+
cardStyle="card-style-6"
|
67
|
+
galleryControls={galleryControls}
|
68
|
+
iconClicked={onHeaderIconClicked}
|
69
|
+
cardControls={cardControls}
|
70
|
+
cardIconClicked={cardIconClicked}
|
71
|
+
{...props}
|
72
|
+
/>
|
73
|
+
<CreateMusicAlbumModal
|
74
|
+
showModal={showModal}
|
75
|
+
onAddAlbum={onAddAlbum}
|
76
|
+
closeModal={closeModal}
|
77
|
+
saveBtnText={props.saveBtnText}
|
78
|
+
cancelBtnText={props.cancelBtnText}
|
79
|
+
/>
|
80
|
+
<MusicAlbumsConfigModal
|
81
|
+
showConfigModal={showConfigModal}
|
82
|
+
cancelConfig={cancelConfig}
|
83
|
+
albums={albums}
|
84
|
+
community={community}
|
85
|
+
/>
|
86
|
+
</Container>
|
87
|
+
);
|
88
|
+
};
|
89
|
+
const Container = styled.div`
|
90
|
+
width: 100%;
|
91
|
+
`;
|
92
|
+
|
93
|
+
ViewAlbums.defaultProps = {};
|
94
|
+
|
95
|
+
ViewAlbums.propTypes = {
|
96
|
+
albums: PropTypes.array,
|
97
|
+
cardIconClicked: PropTypes.func,
|
98
|
+
onAddAlbum: PropTypes.func,
|
99
|
+
cardBackgroundColor: PropTypes.string,
|
100
|
+
albumTitleColor: PropTypes.string,
|
101
|
+
descColor: PropTypes.string,
|
102
|
+
title: PropTypes.string,
|
103
|
+
saveBtnText: PropTypes.string,
|
104
|
+
cancelBtnText: PropTypes.string,
|
105
|
+
preview: PropTypes.bool,
|
106
|
+
};
|
107
|
+
|
108
|
+
export default ViewAlbums;
|
File without changes
|
@@ -4,15 +4,10 @@ import PropTypes from 'prop-types';
|
|
4
4
|
|
5
5
|
import AddPhoto from '../../Forms/AddPhoto/AddPhoto'
|
6
6
|
import Gallery from '../../Reusable Components/Gallery/Gallery';
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import Sections from '../../Sections/Sections';
|
12
|
-
import Community from '../../Reusable Components/Community/Community';
|
13
|
-
|
14
|
-
|
15
|
-
import { AiOutlineArrowLeft, AiOutlineArrowRight, AiOutlineClose, AiOutlineFileAdd, AiFillDelete } from "react-icons/ai";
|
7
|
+
import AddPhotoModal from '../../Modals/AddPhotoModal/AddPhotoModal';
|
8
|
+
import ShowImgModal from '../../Modals/ShowImgModal/ShowImgModal';
|
9
|
+
import PhotoAlbumConfigModal from '../../Modals/PhotoAlbumConfigModal/PhotoAlbumConfigModal';
|
10
|
+
import { AiOutlineFileAdd, AiFillDelete } from "react-icons/ai";
|
16
11
|
import { BsGear } from "react-icons/bs";
|
17
12
|
|
18
13
|
|
@@ -30,6 +25,7 @@ const ViewAlbum = ({
|
|
30
25
|
cardBackgroundColor,
|
31
26
|
imgTitleColor,
|
32
27
|
descColor,
|
28
|
+
community,
|
33
29
|
...props
|
34
30
|
}) => {
|
35
31
|
|
@@ -61,20 +57,7 @@ const ViewAlbum = ({
|
|
61
57
|
const [openedImgIndex, setOpenedImgIndex] = useState(null);
|
62
58
|
const [openedImg, setOpenedImg] = useState(null);
|
63
59
|
|
64
|
-
const [centerContext, setCenterContext] = useState(<ViewAlbum album={album} />)
|
65
|
-
|
66
|
-
const formChanged = (values) => {
|
67
|
-
setCenterContext(<ViewAlbum album={album} {...values} />)
|
68
|
-
}
|
69
60
|
|
70
|
-
let tabs = [
|
71
|
-
{
|
72
|
-
title: 'New', id: 'preview'
|
73
|
-
},
|
74
|
-
{
|
75
|
-
title: 'Context', id: 'community'
|
76
|
-
}
|
77
|
-
]
|
78
61
|
|
79
62
|
|
80
63
|
const handleUserKeyPress = useCallback(event => {
|
@@ -92,15 +75,17 @@ const ViewAlbum = ({
|
|
92
75
|
}, [openedImgIndex, handleUserKeyPress]);
|
93
76
|
|
94
77
|
const onIconClicked = (action) => {
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
78
|
+
if (!props.preview) {
|
79
|
+
switch (action) {
|
80
|
+
case 'add':
|
81
|
+
setShowModal(true)
|
82
|
+
break;
|
83
|
+
case 'config':
|
84
|
+
setShowConfigModal(true)
|
85
|
+
break;
|
86
|
+
default:
|
87
|
+
break;
|
88
|
+
}
|
104
89
|
}
|
105
90
|
}
|
106
91
|
|
@@ -115,7 +100,7 @@ const ViewAlbum = ({
|
|
115
100
|
props.addPhoto(photo)
|
116
101
|
}
|
117
102
|
|
118
|
-
const
|
103
|
+
const closeModal = () => {
|
119
104
|
setShowModal(false)
|
120
105
|
}
|
121
106
|
|
@@ -136,6 +121,16 @@ const ViewAlbum = ({
|
|
136
121
|
}
|
137
122
|
}
|
138
123
|
|
124
|
+
const closeImgModal = () => {
|
125
|
+
setShowImgModal(false)
|
126
|
+
setOpenedImgIndex(null)
|
127
|
+
}
|
128
|
+
|
129
|
+
const cancelConfig = () => {
|
130
|
+
setShowConfigModal(false);
|
131
|
+
localStorage.removeItem('formStyles')
|
132
|
+
}
|
133
|
+
|
139
134
|
return (
|
140
135
|
<Container>
|
141
136
|
<Gallery
|
@@ -151,61 +146,27 @@ const ViewAlbum = ({
|
|
151
146
|
customCardStyles={cardStyles}
|
152
147
|
{...props} />
|
153
148
|
|
154
|
-
<
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
}
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
width="70vw"
|
176
|
-
height="90vh">
|
177
|
-
<CloseIconContainer onClick={() => setShowImgModal(false)}>
|
178
|
-
<AiOutlineClose />
|
179
|
-
</CloseIconContainer>
|
180
|
-
<LeftIconContainer onClick={prevPhoto}>
|
181
|
-
<AiOutlineArrowLeft />
|
182
|
-
</LeftIconContainer>
|
183
|
-
<DetailedPhoto cardClicked={nextPhoto} img={openedImg} />
|
184
|
-
<RightIconContainer onClick={nextPhoto}>
|
185
|
-
<AiOutlineArrowRight />
|
186
|
-
</RightIconContainer>
|
187
|
-
</Modal>
|
188
|
-
<Modal
|
189
|
-
modalIsOpen={showConfigModal}
|
190
|
-
closeModal={() => setShowConfigModal(false)}
|
191
|
-
exitModalButton={(e) => (
|
192
|
-
<div></div>
|
193
|
-
)}
|
194
|
-
>
|
195
|
-
<Tabs
|
196
|
-
title="Photo Album Config"
|
197
|
-
tabs={tabs}
|
198
|
-
id='styling'
|
199
|
-
>
|
200
|
-
<PhotoAlbumPreview
|
201
|
-
componentProps={{ album, title: props.title || 'Photo Album', preview: true }}
|
202
|
-
formChanged={formChanged}
|
203
|
-
/>
|
204
|
-
<Community
|
205
|
-
center={centerContext}
|
206
|
-
id="community" />
|
207
|
-
</Tabs>
|
208
|
-
</Modal>
|
149
|
+
<AddPhotoModal
|
150
|
+
showModal={showModal}
|
151
|
+
onAddPhoto={onAddPhoto}
|
152
|
+
closeModal={closeModal}
|
153
|
+
saveBtnText={props.saveBtnText}
|
154
|
+
cancelBtnText={props.cancelBtnText}
|
155
|
+
/>
|
156
|
+
<ShowImgModal
|
157
|
+
showImgModal={showImgModal}
|
158
|
+
closeModal={closeImgModal}
|
159
|
+
prevPhoto={prevPhoto}
|
160
|
+
nextPhoto={nextPhoto}
|
161
|
+
openedImg={openedImg}
|
162
|
+
/>
|
163
|
+
<PhotoAlbumConfigModal
|
164
|
+
showConfigModal={showConfigModal}
|
165
|
+
cancelConfig={cancelConfig}
|
166
|
+
album={album}
|
167
|
+
community={community}
|
168
|
+
title={props.title}
|
169
|
+
/>
|
209
170
|
</Container>
|
210
171
|
)
|
211
172
|
}
|
@@ -214,53 +175,6 @@ const Container = styled.div`
|
|
214
175
|
|
215
176
|
`
|
216
177
|
|
217
|
-
const IconContainer = styled.div`
|
218
|
-
width: 30px;
|
219
|
-
height: 30px;
|
220
|
-
background-color: #757575;
|
221
|
-
position: absolute;
|
222
|
-
transform: translateY(-50%);
|
223
|
-
top: 50%;
|
224
|
-
display: flex;
|
225
|
-
justify-content: center;
|
226
|
-
align-items: center;
|
227
|
-
border-radius: 50rem;
|
228
|
-
z-index: 999;
|
229
|
-
cursor: pointer;
|
230
|
-
opacity: .4;
|
231
|
-
transition: all .2s;
|
232
|
-
|
233
|
-
&:hover{
|
234
|
-
opacity: 1;
|
235
|
-
transform: scale(1.1) translateY(-50%);
|
236
|
-
}
|
237
|
-
|
238
|
-
svg{
|
239
|
-
color: white;
|
240
|
-
}
|
241
|
-
|
242
|
-
`
|
243
|
-
|
244
|
-
const CloseIconContainer = styled.div`
|
245
|
-
position: absolute;
|
246
|
-
z-index: 999;
|
247
|
-
right: 10px;
|
248
|
-
top: 10px;
|
249
|
-
cursor: pointer;
|
250
|
-
|
251
|
-
svg{
|
252
|
-
color: white;
|
253
|
-
}
|
254
|
-
`
|
255
|
-
|
256
|
-
const LeftIconContainer = styled(IconContainer)`
|
257
|
-
left: 10px;
|
258
|
-
`
|
259
|
-
|
260
|
-
const RightIconContainer = styled(IconContainer)`
|
261
|
-
right: 10px;
|
262
|
-
`
|
263
|
-
|
264
178
|
ViewAlbum.defaultProps = {
|
265
179
|
headerBackground: '#FE1744',
|
266
180
|
titleColor: 'white',
|
@@ -2,13 +2,9 @@ import React, { useState } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
|
5
|
-
import CreateAlbum from '../../Forms/CreateAlbum/CreateAlbum'
|
6
5
|
import Gallery from '../../Reusable Components/Gallery/Gallery';
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import Tabs from '../../Reusable Components/Tabs/Tabs';
|
10
|
-
import Sections from '../../Sections/Sections';
|
11
|
-
import Community from '../../Reusable Components/Community/Community';
|
6
|
+
import AddPhotoAlbum from '../../Modals/AddPhotoAlbum/AddPhotoAlbum';
|
7
|
+
import PhotoAlbumsConfigModal from '../../Modals/PhotoAlbumsConfigModal/PhotoAlbumsConfigModal';
|
12
8
|
|
13
9
|
import { AiOutlineFileAdd, AiFillDelete } from "react-icons/ai";
|
14
10
|
import { BsGear } from "react-icons/bs";
|
@@ -24,25 +20,12 @@ const galleryControls = [
|
|
24
20
|
|
25
21
|
const ViewAlbums = ({
|
26
22
|
albums,
|
23
|
+
community,
|
27
24
|
...props }) => {
|
28
25
|
|
29
26
|
const [showModal, setShowModal] = useState(false);
|
30
27
|
const [showConfigModal, setShowConfigModal] = useState(false);
|
31
|
-
|
32
|
-
|
33
|
-
const formChanged = (values) => {
|
34
|
-
setCenterContext(<ViewAlbums albums={albums} {...values} />)
|
35
|
-
}
|
36
|
-
|
37
|
-
|
38
|
-
let tabs = [
|
39
|
-
{
|
40
|
-
title: 'New', id: 'preview'
|
41
|
-
},
|
42
|
-
{
|
43
|
-
title: 'Context', id: 'community'
|
44
|
-
}
|
45
|
-
]
|
28
|
+
|
46
29
|
|
47
30
|
|
48
31
|
const onIconClicked = (action) => {
|
@@ -71,10 +54,15 @@ const ViewAlbums = ({
|
|
71
54
|
setShowModal(false)
|
72
55
|
}
|
73
56
|
|
74
|
-
const
|
57
|
+
const closeModal = () => {
|
75
58
|
setShowModal(false)
|
76
59
|
}
|
77
60
|
|
61
|
+
const cancelConfig = () => {
|
62
|
+
setShowConfigModal(false);
|
63
|
+
localStorage.removeItem('formStyles')
|
64
|
+
}
|
65
|
+
|
78
66
|
return (
|
79
67
|
<Container>
|
80
68
|
<Gallery
|
@@ -88,38 +76,18 @@ const ViewAlbums = ({
|
|
88
76
|
cardIconClicked={cardIconClicked}
|
89
77
|
{...props} />
|
90
78
|
|
91
|
-
<
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
closeModal={() => setShowConfigModal(false)}
|
104
|
-
exitModalButton={(e) => (
|
105
|
-
<div></div>
|
106
|
-
)}
|
107
|
-
>
|
108
|
-
<Tabs
|
109
|
-
title="Photo Albums Config"
|
110
|
-
tabs={tabs}
|
111
|
-
id='styling'
|
112
|
-
>
|
113
|
-
<PhotoAlbumsPreview
|
114
|
-
componentProps={{ albums, title: props.title || 'Photo Albums', preview: true }}
|
115
|
-
formChanged={formChanged}
|
116
|
-
id='preview'
|
117
|
-
/>
|
118
|
-
<Community
|
119
|
-
center={centerContext}
|
120
|
-
id="community" />
|
121
|
-
</Tabs>
|
122
|
-
</Modal>
|
79
|
+
<AddPhotoAlbum
|
80
|
+
showModal={showModal}
|
81
|
+
onAddAlbum={onAddAlbum}
|
82
|
+
closeModal={closeModal}
|
83
|
+
/>
|
84
|
+
<PhotoAlbumsConfigModal
|
85
|
+
showConfigModal={showConfigModal}
|
86
|
+
cancelConfig={cancelConfig}
|
87
|
+
albums={albums}
|
88
|
+
community={community}
|
89
|
+
title={props.title}
|
90
|
+
/>
|
123
91
|
</Container>
|
124
92
|
)
|
125
93
|
}
|
@@ -2,18 +2,12 @@ import React, { useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import styled from 'styled-components';
|
4
4
|
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import Comments from '
|
5
|
+
import VideoPlayer from '../../Widgets/VideoPlayer/VideoPlayer';
|
6
|
+
import VideoConfigModal from '../../Modals/VideoConfigModal/VideoConfigModal';
|
7
|
+
import Comments from '../../Reusable Components/Comments/Comments';
|
8
8
|
import RichTextInput from '../../Common Inputs/RichTextInput/RichTextInput';
|
9
9
|
import ReusableHeader from '../../Reusable Components/ReusableHeader/ReusableHeader';
|
10
10
|
import { BsGear } from "react-icons/bs";
|
11
|
-
import VideoPreview from '../../PreviewComponents/VideoPreview/VideoPreview';
|
12
|
-
import Community from '../../Reusable Components/Community/Community';
|
13
|
-
import Tabs from '../../Reusable Components/Tabs/Tabs';
|
14
|
-
|
15
|
-
|
16
|
-
|
17
11
|
|
18
12
|
const controls = [
|
19
13
|
{ icon: (<BsGear />), action: 'config', name: 'Config' },
|
@@ -38,24 +32,10 @@ const VideoSpace = ({
|
|
38
32
|
commentBackgroundColor,
|
39
33
|
commentTitleColor,
|
40
34
|
commentTitleFontSize,
|
35
|
+
community,
|
41
36
|
...props }) => {
|
42
37
|
const [showConfigModal, setShowConfigModal] = useState(false);
|
43
|
-
|
44
|
-
|
45
|
-
const formChanged = (values) => {
|
46
|
-
setCenterContext(<VideoSpace videoSrc={videoSrc} {...values} />)
|
47
|
-
}
|
48
|
-
|
49
|
-
let tabs = [
|
50
|
-
{
|
51
|
-
title: 'New', id: 'preview'
|
52
|
-
},
|
53
|
-
{
|
54
|
-
title: 'Context', id: 'community'
|
55
|
-
}
|
56
|
-
]
|
57
|
-
|
58
|
-
|
38
|
+
|
59
39
|
const iconClicked = (action) => {
|
60
40
|
if (!props.preview) {
|
61
41
|
switch (action) {
|
@@ -68,6 +48,11 @@ const VideoSpace = ({
|
|
68
48
|
}
|
69
49
|
}
|
70
50
|
|
51
|
+
const cancelConfig = () => {
|
52
|
+
setShowConfigModal(false);
|
53
|
+
localStorage.removeItem('formStyles')
|
54
|
+
}
|
55
|
+
|
71
56
|
return (
|
72
57
|
<Container backgroundColor={backgroundColor}>
|
73
58
|
<ReusableHeader
|
@@ -94,28 +79,17 @@ const VideoSpace = ({
|
|
94
79
|
<RichTextInput
|
95
80
|
users={users}
|
96
81
|
/>
|
97
|
-
<
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
>
|
109
|
-
<VideoPreview
|
110
|
-
componentProps={{ title, discription, comments, date, preview: true }}
|
111
|
-
formChanged={formChanged}
|
112
|
-
id="preview" />
|
113
|
-
|
114
|
-
<Community
|
115
|
-
center={centerContext}
|
116
|
-
id="community" />
|
117
|
-
</Tabs>
|
118
|
-
</Modal>
|
82
|
+
<VideoConfigModal
|
83
|
+
showConfigModal={showConfigModal}
|
84
|
+
cancelConfig={cancelConfig}
|
85
|
+
community={community}
|
86
|
+
videoSrc={videoSrc}
|
87
|
+
title={title}
|
88
|
+
discription={discription}
|
89
|
+
date={date}
|
90
|
+
users={users}
|
91
|
+
comments={comments}
|
92
|
+
/>
|
119
93
|
</Container>
|
120
94
|
)
|
121
95
|
}
|