diff --git a/css/main.css b/css/main.css
index b3db2f3475..b6a463c088 100644
--- a/css/main.css
+++ b/css/main.css
@@ -5784,6 +5784,7 @@ html.allcontent_application #footerWrapper {
.article_body .article_image img {
border-radius: 5px;
display: block;
+ cursor: pointer;
}
.article_body .article_image .article_image_caption {
text-align: center;
@@ -5824,6 +5825,7 @@ html.allcontent_application #footerWrapper {
}
.article_body .article_carousel .img {
background-size: contain!important;
+ cursor: pointer;
}
.article_body .article_this_embed {
padding: 1.5em;
diff --git a/css/main.less b/css/main.less
index f77d2494e0..4ab141ce2d 100644
--- a/css/main.less
+++ b/css/main.less
@@ -7055,6 +7055,7 @@ html.allcontent_application{
}
.article_image{
+
margin-bottom: @rhythm;
&.withBorder{
@@ -7085,6 +7086,7 @@ html.allcontent_application{
img{
border-radius: 5px;
display: block;
+ cursor: pointer;
}
.article_image_caption{
@@ -7134,6 +7136,7 @@ html.allcontent_application{
.img{
background-size: contain!important;
+ cursor: pointer;
}
}
diff --git a/js/functions.js b/js/functions.js
index 35b4418c1c..8c1f7ed910 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -10285,6 +10285,8 @@ var connectionSpeed = function()
};
replaceArchiveInImage = function(src) {
+ if(!src) return ''
+
var srcNew = src;
window.project_config.archivedPeertubeServers.map(server => {
diff --git a/js/functionsfirst.js b/js/functionsfirst.js
index 46754da56b..975ec275ec 100644
--- a/js/functionsfirst.js
+++ b/js/functionsfirst.js
@@ -174,6 +174,26 @@ edjsHTMLCnt = function (a, app) {
return ftext
}
+ var im = {
+ image: function (e) {
+
+ var t = e.data
+
+ var src = checkIfAllowedImageApply(trydecode(_.escape(replaceArchiveInImage(t.file && t.file.url ? t.file.url : t.file))))
+
+ if(src) return [src]
+
+ return []
+
+ },
+
+ carousel : function(e){
+ return _.map(e.data, function (i) {
+ return _.escape(trydecode(i.url))
+ })
+ }
+ }
+
var e = {
delimiter: function () {
return '
'
@@ -462,6 +482,7 @@ edjsHTMLCnt = function (a, app) {
void 0 === n && (n = {});
var i = Object.assign({}, e, n);
+ var iim = Object.assign({}, im, n);
return {
@@ -558,7 +579,21 @@ edjsHTMLCnt = function (a, app) {
return t.filter((function (e) {
return !r.includes(e)
}))
- }
+ },
+
+ getallimages : function(e){
+ var result = []
+
+ e.blocks.map((function (e) {
+ var ims = iim[e.type] ? iim[e.type](e) : []
+
+ console.log('ims images', ims, iim, e)
+
+ result = result.concat(ims)
+ }))
+
+ return result
+ }
}
};
return r
diff --git a/js/satolist.js b/js/satolist.js
index ee720ecdaf..510c7d3e36 100644
--- a/js/satolist.js
+++ b/js/satolist.js
@@ -3499,11 +3499,23 @@ Platform = function (app, listofnodes) {
articledecoration : function(wr, share, extend, clbk){
var caption = wr.find('.shareBgCaption')
var capiontextclass = 'caption_small'
+ var edjs = new edjsHTML(null, app)
+ var images = edjs.getallimages(share.message)
+
+ console.log('images', images)
if(share.caption.length > 10) capiontextclass = 'caption_medium'
if(share.caption.length > 60) capiontextclass = 'caption_long'
+ var opengallery = function(src){
+
+ console.log('iamges opengallery', src)
+
+ self.app.platform.ui.images(images, src)
+
+ }
+
caption.addClass(capiontextclass)
if(extend){
@@ -3532,6 +3544,14 @@ Platform = function (app, listofnodes) {
})
+ _el.find(".img").on('click', function(){
+ var src = $(this).attr('i')
+
+ if (src){
+ opengallery(src)
+ }
+ })
+
//self.app.platform.ui.carousel($(this))
})
@@ -3543,6 +3563,16 @@ Platform = function (app, listofnodes) {
}
})
+
+ wr.find('.article_image img').on('click', function(){
+
+ var src = $(this).attr('src')
+
+ if (src){
+ opengallery(src)
+ }
+
+ })
}
var cover = share.images[0]
diff --git a/package.json b/package.json
index 4df1efbcc0..006d4b6031 100644
--- a/package.json
+++ b/package.json
@@ -3,9 +3,9 @@
"project": "Bastyon",
"version": "0.8.93",
- "versionsuffix": "1",
+ "versionsuffix": "2",
"cordovaversion": "1.8.93",
- "cordovaversioncode": "180931",
+ "cordovaversioncode": "180932",
"description": "Bastyon desktop application",
"author": "Pocketnet Community ",