From 5851369801e87c88cab86ad64b73b78cebe48f8c Mon Sep 17 00:00:00 2001 From: Mostafa Ahangarha Date: Mon, 3 Aug 2020 18:24:00 +0430 Subject: [PATCH 1/7] minor improvement in Persian translation --- resources/lang/fa/helpcenter.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/lang/fa/helpcenter.php b/resources/lang/fa/helpcenter.php index bd9f7975e..a5a9aebc0 100644 --- a/resources/lang/fa/helpcenter.php +++ b/resources/lang/fa/helpcenter.php @@ -12,15 +12,17 @@ return [ 'hashtags' => 'هشتگ‌ها', 'discover' => 'کشف‌کردن', 'directMessages' => 'پیام‌های شخصی', - 'timelines' => 'جدول زمانی', + 'timelines' => 'خط زمانی', 'embed' => 'توکار', 'communityGuidelines' => 'دستورالعمل‌های انجمن', 'whatIsTheFediverse' => 'نامتمرکز یعنی چی؟', - 'controllingVisibility' => 'کنترل بینایی', + 'controllingVisibility' => 'کنترل نمایش', 'blockingAccounts' => 'حساب‌های مسدودشده', 'safetyTips' => 'نکات امنیتی', 'reportSomething' => 'گزارش چیزی', - 'dataPolicy' => 'خط مشی داده' + 'dataPolicy' => 'خط مشی داده', + + 'taggingPeople' => 'برچسب زدن افراد' -]; \ No newline at end of file +]; From 0c8ebf26fe228e87387a592c51d2b8d9a9c8d27b Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 4 Aug 2020 23:54:14 -0600 Subject: [PATCH 2/7] Update PostComponent.vue, improve MetroUI and fixes #2363 --- .../assets/js/components/PostComponent.vue | 49 +++++++++++++------ 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index d6e3934af..3f5a369e2 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -144,7 +144,7 @@

{{statusUsername}} - +


@@ -179,7 +179,7 @@

{{truncate(reply.account.username,15)}} - + @@ -189,7 +189,7 @@

{{reply.favourites_count == 1 ? '1 like' : reply.favourites_count + ' likes'}} - Reply + Reply

@@ -202,7 +202,7 @@

{{s.account.username}} - + @@ -226,13 +226,13 @@

-
-

-

-

- -

+
+

+

+

+ +

+

@@ -726,6 +726,7 @@ export default { sharesPage: 1, lightboxMedia: false, replyText: '', + replyStatus: {}, replySensitive: false, relationship: {}, results: [], @@ -740,6 +741,7 @@ export default { loading: null, replyingToId: this.statusId, replyToIndex: 0, + replySending: false, emoji: window.App.util.emoji, showReadMore: true, showCaption: true, @@ -864,7 +866,11 @@ export default { }, likesModal() { - if(this.status.favourites_count == 0 || $('body').hasClass('loggedIn') == false) { + if($('body').hasClass('loggedIn') == false) { + window.location.href = '/login?next=' + encodeURIComponent('/p/' + this.status.shortcode); + return; + } + if(this.status.favourites_count == 0) { return; } this.$refs.likesModal.show(); @@ -1119,10 +1125,13 @@ export default { return e.substr(0, 10)+'...'; }, - replyFocus(e, index) { + replyFocus(e, index, prependUsername = false) { this.replyToIndex = index; this.replyingToId = e.id; this.reply_to_profile_id = e.account.id; + if(prependUsername == true) { + this.replyText = '@' + e.account.username + ' '; + } $('textarea[name="comment"]').focus(); }, @@ -1140,6 +1149,18 @@ export default { } $('.postCommentsLoader').addClass('d-none'); $('.postCommentsContainer').removeClass('d-none'); + setTimeout(function() { + document.querySelectorAll('.comments .comment-body a').forEach(function(i, e) { + if(i.href.startsWith(window.location.origin)) { + return; + } + let tag = i.innerText; + if(tag.startsWith('#')) { + tag = tag.substr(1); + } + i.href = '/discover/tags/'+tag+'?src=rph'; + }); + }, 500); }).catch(error => { if(!error.response) { $('.postCommentsLoader .lds-ring') @@ -1190,6 +1211,7 @@ export default { likeReply(status, $event) { if($('body').hasClass('loggedIn') == false) { + swal('Login', 'Please login to perform this action.', 'info'); return; } @@ -1410,7 +1432,6 @@ export default { swal('An Error Occurred', 'Please try again later.', 'error'); }); } - }, } From f53f10fd9f36dec95690e11ac7e9f05a6c813a10 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 4 Aug 2020 23:58:12 -0600 Subject: [PATCH 3/7] Update Timeline.vue, fixes #2363 --- resources/assets/js/components/Timeline.vue | 24 ++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index b70c712bb..6b8b4a05b 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -185,10 +185,10 @@

-

+

{{reply.account.username}} - + @@ -540,7 +540,7 @@

- {{replyText.length}}/600 + {{replyText.length > config.uploader.max_caption_length ? config.uploader.max_caption_length - replyText.length : replyText.length}}/{{config.uploader.max_caption_length}}
@@ -958,6 +958,18 @@ return res.sensitive == false; }); this.replies = _.reverse(data); + setTimeout(function() { + document.querySelectorAll('.comments .comment-body a').forEach(function(i, e) { + if(i.href.startsWith(window.location.origin)) { + return; + } + let tag = i.innerText; + if(tag.startsWith('#')) { + tag = tag.substr(1); + } + i.href = '/discover/tags/'+tag+'?src=rph'; + }); + }, 500); }).catch(err => { }) }, @@ -1019,6 +1031,12 @@ this.replySending = true; let id = status.id; let comment = this.replyText; + let limit = this.config.uploader.max_caption_length; + if(comment.length > limit) { + this.replySending = false; + swal('Comment Too Long', 'Please make sure your comment is '+limit+' characters or less.', 'error'); + return; + } axios.post('/i/comment', { item: id, comment: comment From aa8fa30def3de783029e8e3301c69fc5f39b1a82 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 4 Aug 2020 23:58:46 -0600 Subject: [PATCH 4/7] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 708591e25..61a3a3e22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -79,6 +79,8 @@ - Updated webfinger util, fix bug preventing username with dots. ([c2d194af](https://github.com/pixelfed/pixelfed/commit/c2d194af)) - Updated upload endpoints with MediaBlocklist checks. ([597378bf](https://github.com/pixelfed/pixelfed/commit/597378bf)) - Updated Timeline.vue component, fixes ([#2352](https://github.com/pixelfed/pixelfed/issues/2352)) and ([#2343](https://github.com/pixelfed/pixelfed/issues/2343)). ([e134a9ac](https://github.com/pixelfed/pixelfed/commit/e134a9ac)) +- Updated PostComponent.vue, improve MetroUI and fixes ([#2363](https://github.com/pixelfed/pixelfed/issues/2363)). ([0c8ebf26](https://github.com/pixelfed/pixelfed/commit/0c8ebf26)) +- Updated Timeline.vue, fixes ([#2363](https://github.com/pixelfed/pixelfed/issues/2363)). ([f53f10fd](https://github.com/pixelfed/pixelfed/commit/f53f10fd)) ## [v0.10.9 (2020-04-17)](https://github.com/pixelfed/pixelfed/compare/v0.10.8...v0.10.9) ### Added From 714eceb3ea325142aaef74e4cbbcf4f1b80ccdc7 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 5 Aug 2020 00:04:19 -0600 Subject: [PATCH 5/7] Update compiled assets --- public/js/status.js | Bin 79393 -> 80293 bytes public/js/timeline.js | Bin 130373 -> 131125 bytes public/mix-manifest.json | Bin 1939 -> 1939 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/public/js/status.js b/public/js/status.js index 405ef5984b609a01e86c31add0f690543543d4e8..316df3f4d1ea493e7e402c133994252c794753c3 100644 GIT binary patch delta 1513 zcmbVMT}&KR6wbo#vY^mtXelg(;Yz1FvO5dAMGJI`w3u4k256gT0=2z6bC;bkJG0(< zmxa=0ttO48F#_ko2Y;f8)dv$(GbW7>Dv`ugje+>oD6zr#(!?KPA4-~-I5R7|n)qOR z*}dO6_nz~8=bSlj|Lnbb$Gb4#?KzcG;kk`=VH#5bCs+ujM=lH_X@JQ_2um_9gi-9t zYzD#NPl*o;H9l*z?t$t6$2`aS=L&GI{;M67WcAt8#85S3vcIFpT4`9UgQeDX7;Ekb z^0da}PD)Zt*0m|ZPMRv#WtKMcA?RuA3!-Q?in`oe%#G^!C|69CSl615K6uC>#uAuL z<}$?Kb`)Yv^7NsYC{CN2Ds*=wD$eoP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NY$y)q8I-iTD;>}8;?L@~h zn2nbbk}*7tUm>K}An?u%n^BGaboaS_l4=kfUOP)USp4SGy*xsSGut5<{N3?3S(Zac zV;NWJz9m diff --git a/public/js/timeline.js b/public/js/timeline.js index 70573e946fb2aa486da11fe29e6898f2d6224c3c..1a52d4c8acd46bc23ad927d4b228e96076608953 100644 GIT binary patch delta 1122 zcma)4OGs5g80OTq#7KKk+0$tvJJUV)_`s}`YeX+dgFqol#l~~yo^$Zrnd{8lt0EUI zXi)?$Cb|SIg7!T)go_s8qIUM6Hq|z$O+}kX)9T!-b^xr-%n(`booADX82{+StxX;3wVr_jsp^kK0!$v%F{@#WWCo;<^ zD2X}A_#>T!+8%Y1yBmxg^K2l7aA?@EdA~pxW1xdk2O99KPp}{$jRy!gB(j`<5tij( z!CBx50OL3gf#qV3ElIclj02wtVTNkLIpYuoTMs_m6Fbx3bQWIMXie%>dAv|Frj@HU zvMxB@y}z~$q-CN}(MwMh$gWji##bAqQ9&b|g7mCTIpUL+Q8>i7o#^KT55N{!IuqFU zp_}1{T64lXop;ee@CDU6$u+thww1h0^$R( zH*a)HvoEKs`%_!S+Lje;Ii$qWN?VpbA=F#kpD;ZP_eI9dKA|rsI*LQ}@@YdbH}#{U zyxB_OgUyXr;jYql2G#FsR;&z1qaKy*+vJ>g2t?r)Q(Yhv=Z!Ob&@D_Vttp@%T6YHP z|5Q}PiX`=|YFo@7?no6hs9lY@tUXtx858Z5+QrJ!kE-8zSbhGv>t8-qIej|<52jB> zU~amuYO$N!_D;Orp{*&KxCXT+@BaeF`k0dd delta 421 zcmdnmz;W~!`-YD~%qHQMlQ*)e^A|}wZhj~9N^bKdBUaYUeHI&( zSv-L1rspU#noPdHp*@|yiIHQnL$1K)oiSQ!lfO0aPyXJtX7cMsjm^9*p5Bv#j|ed- zX-__QUYuQ1TS?!{z+iIz5yQ#;aqQC{h%yRIZir)_oE0lK`9UVn=D!!#aB&z~q*@pl znk8=Dc-w}Fxu`H>`o?LDCYuxPSC2wfsZBMCC>}wOV#c93XI&W WETHh8eDIkR3&^|MKdLag+y($8b%~Gw diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 704591dc667d2649508b7e8773fc81e486363837..dc11c7e7d58d3c0c57d16696d8b0948daaa89da9 100644 GIT binary patch delta 57 zcmbQtKbe2SLN*bD6jKXhL(?>qw4@|+OEaSsLkpwHTiK3Dm{=MZ8JL-yn_8GACs|rr N7#o`>DRI?u0RY|-4|f0n delta 57 zcmbQtKbe2SLN*aYlO%JCL<@7%#KdF^GXsMZBZI`rTiK3DBpW0f7$qB8q!=X`n5U&B NC0ZDzDsk0v0RZ#{5XArh From b1fb7dcbc30cdc3c27a8874f9d5e2c5dc14dfa82 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 5 Aug 2020 00:26:29 -0600 Subject: [PATCH 6/7] Update components, redirect remote hashtag to local hashtag page --- resources/assets/js/components/PostComponent.vue | 12 ++++++++++++ resources/assets/js/components/Timeline.vue | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index 3f5a369e2..8b0c0e115 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -860,6 +860,18 @@ export default { } this.loaded = true; this.fetchProfilePosts(); + setTimeout(function() { + document.querySelectorAll('.status-comment .comment-text a').forEach(function(i, e) { + if(i.href.startsWith(window.location.origin)) { + return; + } + let tag = i.innerText; + if(tag.startsWith('#')) { + tag = tag.substr(1); + } + i.href = '/discover/tags/'+tag+'?src=rph'; + }); + }, 500); }).catch(error => { swal('Oops!', 'An error occured, please try refreshing the page.', 'error'); }); diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index 6b8b4a05b..eab0869e4 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -815,6 +815,18 @@ } // this.fetchStories(); this.rtw(); + setTimeout(function() { + document.querySelectorAll('.caption .status-content a').forEach(function(i, e) { + if(i.href.startsWith(window.location.origin)) { + return; + } + let tag = i.innerText; + if(tag.startsWith('#')) { + tag = tag.substr(1); + } + i.href = '/discover/tags/'+tag+'?src=rph'; + }); + }, 500); }).catch(err => { swal( 'Oops, something went wrong', From d30d16b3d759aa65055eb0a561615ad3d24c215b Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 5 Aug 2020 00:28:08 -0600 Subject: [PATCH 7/7] Update compiled assets --- public/js/status.js | Bin 80293 -> 80551 bytes public/js/timeline.js | Bin 131125 -> 131382 bytes public/mix-manifest.json | Bin 1939 -> 1939 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/public/js/status.js b/public/js/status.js index 316df3f4d1ea493e7e402c133994252c794753c3..77a89c13d4cd3e061b24630dc78480fba3e27cb4 100644 GIT binary patch delta 636 zcmZ4bnPvG`mI>A@MqUNElMkMipY%|E<8FOc7E|*Q-^m}}h)+Mj!^pxCU>V^vdEJdp zRwc72M+1mD_RS(}n|UWIC`wE|s3{{;T#{H)TCAI#pPQSSSE8T?W$2cqR+LQsta*I% zJz*6szQU>yb0tlkVhyDX{jA{40(R~F9L7n;mT9IbW}D}qUC*_-=f-mZ7Jr|_l*t!g zSx)ccWfWI~DTvjH$tT$_kDnU}S5Efl`B#rggDio<^dkUSh3|Qf`HbJ|ca9 n;|rKRSU~YRx$uJAA@hC!t%lMT*mh-LU!xhQE`7whF|Bx>p<*6Ju3c@^XWrQ|op`LVK? zML8OPI1}U8H#f6w=AA5LFS|KdR8ETzWP*~WPO*lPbCRk4=6d_~evahCBvX^5REy1g z=ht(wf+awf@K*#G=OS6MdH2ni0xSW>*-n$sf3lqH{Xr70b8^lHPXuT02NeV-=Y!^C zp^wsVfz75LxmX$FCp&y|VvOJ1{Ou$QW71^b-*P}Q=eI9VXxDE!CdQ=AH~(gcvVgof zc_XV7OJ1pu_vG`eolpkQ`iHN?;bu;HEe2;#mV0f3%#od3|JoWMaOkxTg7fWl41yE& zW;TNJ_l*UDWBb+;!Kr&|hT!aZYlPr@d%GIJS^3T$!TInm8o>#E--h5ke6Py_3TB`u drJ2DY3-n`UQD*XF!}D?zI(>G3IG?|=m zk8@*f9xHQpY3}3;FRZ4^N-@fDSf-ko8(NwtPIs1KoQdE)kz#a1@QkDx_4#2cV->1n z@?uJ+CthO|o!%;Q5>(xu JufTZhJ^&$wguMU& delta 386 zcmdni#Id!3V}doSkyk;k()5kYjB?X2OlK6EZotXNF>^r@|*~^2c|bEE)OU zWpJf@+n)qw4@|+OEaSsLkpwHTiK3Dm{=MZ8JL-yn_8GACs|rr N7#o`>DRI?u0RY|-4|f0n