@plusscommunities/pluss-core-web 1.4.31 → 1.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +10 -6
- package/dist/index.esm.js +10 -6
- package/dist/index.umd.js +10 -6
- package/package.json +1 -1
- package/src/config.js +2 -1
- package/src/helper/files/getThumb300.js +4 -0
package/dist/index.cjs.js
CHANGED
|
@@ -72,7 +72,7 @@ var CoreConfig = {
|
|
|
72
72
|
colourBrandingMain: '',
|
|
73
73
|
colourBrandingOff: '',
|
|
74
74
|
colourBrandingApp: '',
|
|
75
|
-
defaultProfileImage: 'https://s3
|
|
75
|
+
defaultProfileImage: 'https://pluss60-demo-uploads.s3.ap-southeast-2.amazonaws.com/uploads/users/ap-southeast-2:97769b56-25ec-41c0-a73c-6c2c4140f629/public/3d2433c6419383beb1078036b7/tinydefaultprofile.png',
|
|
76
76
|
utcOffset: '',
|
|
77
77
|
hasAvailableNews: false,
|
|
78
78
|
newsHaveTags: true,
|
|
@@ -788,11 +788,20 @@ var getFileName = function getFileName(url, noExtension) {
|
|
|
788
788
|
return name.split('.')[0];
|
|
789
789
|
};
|
|
790
790
|
|
|
791
|
+
var isVideo = function isVideo(url) {
|
|
792
|
+
var extension = getExtension(url);
|
|
793
|
+
return ['mov', 'mp4'].includes(extension);
|
|
794
|
+
};
|
|
795
|
+
|
|
791
796
|
var getThumb300 = function getThumb300(url) {
|
|
792
797
|
if (!url) {
|
|
793
798
|
return url;
|
|
794
799
|
}
|
|
795
800
|
|
|
801
|
+
if (isVideo(url)) {
|
|
802
|
+
return 'https://pluss60-demo-uploads.s3.ap-southeast-2.amazonaws.com/uploads/users/ap-southeast-2:97769b56-25ec-41c0-a73c-6c2c4140f629/public/9d0bbec64614b1ed654a03f7e7/movie.jpg';
|
|
803
|
+
}
|
|
804
|
+
|
|
796
805
|
if (url.indexOf('https://plussprdstorage.blob.core.windows.net/') !== -1) {
|
|
797
806
|
return url.replace('https://plussprdstorage.blob.core.windows.net/', 'https://plusscdn.azureedge.net/');
|
|
798
807
|
}
|
|
@@ -819,11 +828,6 @@ var getThumb300 = function getThumb300(url) {
|
|
|
819
828
|
return url;
|
|
820
829
|
};
|
|
821
830
|
|
|
822
|
-
var isVideo = function isVideo(url) {
|
|
823
|
-
var extension = getExtension(url);
|
|
824
|
-
return ['mov', 'mp4'].includes(extension);
|
|
825
|
-
};
|
|
826
|
-
|
|
827
831
|
var getFirstName = function getFirstName(string) {
|
|
828
832
|
if (___default['default'].isEmpty(string)) {
|
|
829
833
|
return '';
|
package/dist/index.esm.js
CHANGED
|
@@ -42,7 +42,7 @@ var CoreConfig = {
|
|
|
42
42
|
colourBrandingMain: '',
|
|
43
43
|
colourBrandingOff: '',
|
|
44
44
|
colourBrandingApp: '',
|
|
45
|
-
defaultProfileImage: 'https://s3
|
|
45
|
+
defaultProfileImage: 'https://pluss60-demo-uploads.s3.ap-southeast-2.amazonaws.com/uploads/users/ap-southeast-2:97769b56-25ec-41c0-a73c-6c2c4140f629/public/3d2433c6419383beb1078036b7/tinydefaultprofile.png',
|
|
46
46
|
utcOffset: '',
|
|
47
47
|
hasAvailableNews: false,
|
|
48
48
|
newsHaveTags: true,
|
|
@@ -758,11 +758,20 @@ var getFileName = function getFileName(url, noExtension) {
|
|
|
758
758
|
return name.split('.')[0];
|
|
759
759
|
};
|
|
760
760
|
|
|
761
|
+
var isVideo = function isVideo(url) {
|
|
762
|
+
var extension = getExtension(url);
|
|
763
|
+
return ['mov', 'mp4'].includes(extension);
|
|
764
|
+
};
|
|
765
|
+
|
|
761
766
|
var getThumb300 = function getThumb300(url) {
|
|
762
767
|
if (!url) {
|
|
763
768
|
return url;
|
|
764
769
|
}
|
|
765
770
|
|
|
771
|
+
if (isVideo(url)) {
|
|
772
|
+
return 'https://pluss60-demo-uploads.s3.ap-southeast-2.amazonaws.com/uploads/users/ap-southeast-2:97769b56-25ec-41c0-a73c-6c2c4140f629/public/9d0bbec64614b1ed654a03f7e7/movie.jpg';
|
|
773
|
+
}
|
|
774
|
+
|
|
766
775
|
if (url.indexOf('https://plussprdstorage.blob.core.windows.net/') !== -1) {
|
|
767
776
|
return url.replace('https://plussprdstorage.blob.core.windows.net/', 'https://plusscdn.azureedge.net/');
|
|
768
777
|
}
|
|
@@ -789,11 +798,6 @@ var getThumb300 = function getThumb300(url) {
|
|
|
789
798
|
return url;
|
|
790
799
|
};
|
|
791
800
|
|
|
792
|
-
var isVideo = function isVideo(url) {
|
|
793
|
-
var extension = getExtension(url);
|
|
794
|
-
return ['mov', 'mp4'].includes(extension);
|
|
795
|
-
};
|
|
796
|
-
|
|
797
801
|
var getFirstName = function getFirstName(string) {
|
|
798
802
|
if (_.isEmpty(string)) {
|
|
799
803
|
return '';
|
package/dist/index.umd.js
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
colourBrandingMain: '',
|
|
41
41
|
colourBrandingOff: '',
|
|
42
42
|
colourBrandingApp: '',
|
|
43
|
-
defaultProfileImage: 'https://s3
|
|
43
|
+
defaultProfileImage: 'https://pluss60-demo-uploads.s3.ap-southeast-2.amazonaws.com/uploads/users/ap-southeast-2:97769b56-25ec-41c0-a73c-6c2c4140f629/public/3d2433c6419383beb1078036b7/tinydefaultprofile.png',
|
|
44
44
|
utcOffset: '',
|
|
45
45
|
hasAvailableNews: false,
|
|
46
46
|
newsHaveTags: true,
|
|
@@ -756,11 +756,20 @@
|
|
|
756
756
|
return name.split('.')[0];
|
|
757
757
|
};
|
|
758
758
|
|
|
759
|
+
var isVideo = function isVideo(url) {
|
|
760
|
+
var extension = getExtension(url);
|
|
761
|
+
return ['mov', 'mp4'].includes(extension);
|
|
762
|
+
};
|
|
763
|
+
|
|
759
764
|
var getThumb300 = function getThumb300(url) {
|
|
760
765
|
if (!url) {
|
|
761
766
|
return url;
|
|
762
767
|
}
|
|
763
768
|
|
|
769
|
+
if (isVideo(url)) {
|
|
770
|
+
return 'https://pluss60-demo-uploads.s3.ap-southeast-2.amazonaws.com/uploads/users/ap-southeast-2:97769b56-25ec-41c0-a73c-6c2c4140f629/public/9d0bbec64614b1ed654a03f7e7/movie.jpg';
|
|
771
|
+
}
|
|
772
|
+
|
|
764
773
|
if (url.indexOf('https://plussprdstorage.blob.core.windows.net/') !== -1) {
|
|
765
774
|
return url.replace('https://plussprdstorage.blob.core.windows.net/', 'https://plusscdn.azureedge.net/');
|
|
766
775
|
}
|
|
@@ -787,11 +796,6 @@
|
|
|
787
796
|
return url;
|
|
788
797
|
};
|
|
789
798
|
|
|
790
|
-
var isVideo = function isVideo(url) {
|
|
791
|
-
var extension = getExtension(url);
|
|
792
|
-
return ['mov', 'mp4'].includes(extension);
|
|
793
|
-
};
|
|
794
|
-
|
|
795
799
|
var getFirstName = function getFirstName(string) {
|
|
796
800
|
if (___default['default'].isEmpty(string)) {
|
|
797
801
|
return '';
|
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -8,7 +8,8 @@ const CoreConfig = {
|
|
|
8
8
|
colourBrandingMain: '',
|
|
9
9
|
colourBrandingOff: '',
|
|
10
10
|
colourBrandingApp: '',
|
|
11
|
-
defaultProfileImage:
|
|
11
|
+
defaultProfileImage:
|
|
12
|
+
'https://pluss60-demo-uploads.s3.ap-southeast-2.amazonaws.com/uploads/users/ap-southeast-2:97769b56-25ec-41c0-a73c-6c2c4140f629/public/3d2433c6419383beb1078036b7/tinydefaultprofile.png',
|
|
12
13
|
utcOffset: '',
|
|
13
14
|
hasAvailableNews: false,
|
|
14
15
|
newsHaveTags: true,
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import Config from '../../config';
|
|
2
2
|
import getExtension from './getExtension';
|
|
3
|
+
import isVideo from './isVideo';
|
|
3
4
|
|
|
4
5
|
const getThumb300 = (url) => {
|
|
5
6
|
if (!url) {
|
|
6
7
|
return url;
|
|
7
8
|
}
|
|
9
|
+
if (isVideo(url)) {
|
|
10
|
+
return 'https://pluss60-demo-uploads.s3.ap-southeast-2.amazonaws.com/uploads/users/ap-southeast-2:97769b56-25ec-41c0-a73c-6c2c4140f629/public/9d0bbec64614b1ed654a03f7e7/movie.jpg';
|
|
11
|
+
}
|
|
8
12
|
if (url.indexOf('https://plussprdstorage.blob.core.windows.net/') !== -1) {
|
|
9
13
|
return url.replace('https://plussprdstorage.blob.core.windows.net/', 'https://plusscdn.azureedge.net/');
|
|
10
14
|
}
|