Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 6021 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 6021 Rev 6022
Línea 10... Línea 10...
10
const DragAndDropContainer = styled.div`
10
const DragAndDropContainer = styled.div`
11
  display: flex;
11
  display: flex;
12
  flex-direction: column;
12
  flex-direction: column;
13
  align-items: center;
13
  align-items: center;
14
  padding: 2rem 0;
14
  padding: 2rem 0;
15
  border-width: 2;
15
  border: 2px dashed #eee;
16
  border-radius: 2;
16
  border-radius: 2;
17
  border-color: #eeeeee;
-
 
18
  border-style: dashed;
-
 
19
  background-color: #fafafa;
17
  background-color: #fafafa;
20
  color: #bdbdbd;
18
  color: #bdbdbd;
21
  outline: none;
19
  outline: none;
22
  transition: border 0.24s ease-in-out;
20
  transition: border 0.24s ease-in-out;
23
  margin-top: 1rem;
21
  margin-top: 1rem;
Línea 39... Línea 37...
39
  }
37
  }
40
`
38
`
Línea 41... Línea 39...
41
 
39
 
42
const CloseButton = styled(IconButton)`
40
const CloseButton = styled(IconButton)`
43
  position: absolute;
41
  position: absolute;
44
  background-color: #000;
42
  background-color: #000 !important;
-
 
43
  color: #fff;
-
 
44
 
-
 
45
  &:hover {
-
 
46
    color: #fff !important;
45
  color: #fff;
47
  }
Línea 46... Línea 48...
46
`
48
`
47
 
49
 
48
const areEqual = (prevProps, nextProps) => {
50
const areEqual = (prevProps, nextProps) => {
Línea 115... Línea 117...
115
 
117
 
116
  const filePreviewTest = (file) => {
118
  const filePreviewTest = (file) => {
117
    switch (modalType) {
119
    switch (modalType) {
118
      case shareModalTypes.IMAGE:
120
      case shareModalTypes.IMAGE:
-
 
121
        return <img src={URL.createObjectURL(file)} />
-
 
122
      case shareModalTypes.VIDEO:
-
 
123
        return (
-
 
124
          <video
-
 
125
            src={URL.createObjectURL(file)}
-
 
126
            width="400"
-
 
127
            height="300"
-
 
128
            controls
-
 
129
            autoPlay
-
 
130
            muted
-
 
131
          />
-
 
132
        )
-
 
133
      case shareModalTypes.CHAT:
-
 
134
        switch (file.type) {
-
 
135
          case 'video/mp4':
-
 
136
          case 'video/mpeg':
-
 
137
          case 'video/webm':
-
 
138
            return (
-
 
139
              <video
-
 
140
                src={URL.createObjectURL(file)}
-
 
141
                width="400"
-
 
142
                height="300"
-
 
143
                controls
-
 
144
                autoPlay
-
 
145
                muted
-
 
146
              />
-
 
147
            )
-
 
148
          case 'image/jpeg':
-
 
149
          case 'image/png':
-
 
150
          case 'image/jpg':
-
 
151
            return <img src={URL.createObjectURL(file)} />
-
 
152
          case 'application/pdf':
-
 
153
            return (
-
 
154
              <object
-
 
155
                data={URL.createObjectURL(file)}
-
 
156
                type="application/pdf"
-
 
157
                width="400"
-
 
158
                height="200"
-
 
159
              />
-
 
160
            )
-
 
161
          default:
-
 
162
            break
-
 
163
        }
119
        return <img src={URL.createObjectURL(file)} />
164
        break
120
      case shareModalTypes.FILE:
165
      case shareModalTypes.FILE:
121
        switch (file.type) {
166
        switch (file.type) {
122
          case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
167
          case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
123
            return (
168
            return (
Línea 131... Línea 176...
131
            )
176
            )
132
          case 'application/pdf':
177
          case 'application/pdf':
133
            return (
178
            return (
134
              <object data={URL.createObjectURL(file)} type="application/pdf" />
179
              <object data={URL.createObjectURL(file)} type="application/pdf" />
135
            )
180
            )
136
          case shareModalTypes.VIDEO:
-
 
137
            return (
-
 
138
              <video
-
 
139
                src={URL.createObjectURL(file)}
-
 
140
                width="400"
-
 
141
                height="300"
-
 
142
                controls
-
 
143
                autoPlay
-
 
144
                muted
-
 
145
              />
-
 
146
            )
-
 
147
          case shareModalTypes.CHAT:
-
 
148
            switch (file.type) {
-
 
149
              case 'video/mp4':
-
 
150
              case 'video/mpeg':
-
 
151
              case 'video/webm':
-
 
152
                return (
-
 
153
                  <video
-
 
154
                    src={URL.createObjectURL(file)}
-
 
155
                    width="400"
-
 
156
                    height="300"
-
 
157
                    controls
-
 
158
                    autoPlay
-
 
159
                    muted
-
 
160
                  />
-
 
161
                )
-
 
162
              case 'image/jpeg':
-
 
163
              case 'image/png':
-
 
164
              case 'image/jpg':
-
 
165
                return <img src={URL.createObjectURL(file)} />
-
 
166
              case 'application/pdf':
-
 
167
                return (
-
 
168
                  <object
-
 
169
                    data={URL.createObjectURL(file)}
-
 
170
                    type="application/pdf"
-
 
171
                    width="400"
-
 
172
                    height="200"
-
 
173
                  />
-
 
174
                )
-
 
175
              default:
-
 
176
                break
-
 
177
            }
-
 
178
            break
-
 
179
          default:
181
          default:
180
            break
182
            break
181
        }
183
        }
182
    }
184
    }
183
  }
185
  }