diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index b27cb2fd..7344b2fc 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -2532,7 +2532,7 @@ class ApiV1Controller extends Controller } $data = $ids->map(function($post) use($pid) { - $status = StatusService::getMastodon($post->id); + $status = StatusService::get($post->id); if(!$status || !isset($status['id'])) { return false; @@ -2542,7 +2542,7 @@ class ApiV1Controller extends Controller return $status; }) ->filter(function($post) { - return $post && isset($post['id']); + return $post && isset($post['id']) && isset($post['account']); }) ->values(); diff --git a/public/_lang/en.json b/public/_lang/en.json index 1acb0863..b6c4fccc 100644 --- a/public/_lang/en.json +++ b/public/_lang/en.json @@ -19,6 +19,10 @@ "other": "Other", "readMore": "Read more", "success": "Success", + "proceed": "Proceed", + "next": "Next", + "close": "Close", + "clickHere": "click here", "sensitive": "Sensitive", "sensitiveContent": "Sensitive Content", "sensitiveContentWarning": "This post may contain sensitive content" @@ -146,5 +150,13 @@ }, "hashtags": { "emptyFeed": "We can't seem to find any posts for this hashtag" + }, + "report": { + "report": "Report", + "selectReason": "Select a reason", + "reported": "Reported", + "sendingReport": "Sending report", + "thanksMsg": "Thanks for the report, people like you help keep our community safe!", + "contactAdminMsg": "If you'd like to contact an administrator about this post or report" } } \ No newline at end of file diff --git a/public/js/app.js b/public/js/app.js index 131f168c..b16d6fdd 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{"+lRy":function(t,e){},0:function(t,e,r){r("JO1w"),r("+lRy"),r("xWuY"),r("BLqG"),r("B38u"),t.exports=r("YfGV")},"8FsP":function(t,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(){var t="object"===("undefined"==typeof window?"undefined":r(window))?window:"object"===("undefined"==typeof self?"undefined":r(self))?self:this,e=t.BlobBuilder||t.WebKitBlobBuilder||t.MSBlobBuilder||t.MozBlobBuilder;t.URL=t.URL||t.webkitURL||function(t,e){return(e=document.createElement("a")).href=t,e};var n=t.Blob,o=URL.createObjectURL,i=URL.revokeObjectURL,a=t.Symbol&&t.Symbol.toStringTag,s=!1,c=!1,u=!!t.ArrayBuffer,f=e&&e.prototype.append&&e.prototype.getBlob;try{s=2===new Blob(["ä"]).size,c=2===new Blob([new Uint8Array([1,2])]).size}catch(t){}function h(t){return t.map((function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;if(t.byteLength!==e.byteLength){var r=new Uint8Array(t.byteLength);r.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=r.buffer}return e}return t}))}function d(t,r){r=r||{};var n=new e;return h(t).forEach((function(t){n.append(t)})),r.type?n.getBlob(r.type):n.getBlob()}function p(t,e){return new n(h(t),e||{})}t.Blob&&(d.prototype=Blob.prototype,p.prototype=Blob.prototype);var b="function"==typeof TextEncoder?TextEncoder.prototype.encode.bind(new TextEncoder):function(e){for(var r=0,n=e.length,o=t.Uint8Array||Array,i=0,a=Math.max(32,n+(n>>1)+7),s=new o(a>>3<<3);r=55296&&l<=56319){if(r=55296&&l<=56319)continue}if(i+4>s.length){a+=8,a=(a*=1+r/e.length*2)>>3<<3;var u=new Uint8Array(a);u.set(s),s=u}if(0!=(4294967168&l)){if(0==(4294965248&l))s[i++]=l>>6&31|192;else if(0==(4294901760&l))s[i++]=l>>12&15|224,s[i++]=l>>6&63|128;else{if(0!=(4292870144&l))continue;s[i++]=l>>18&7|240,s[i++]=l>>12&63|128,s[i++]=l>>6&63|128}s[i++]=63&l|128}else s[i++]=l}return s.slice(0,i)},y="function"==typeof TextDecoder?TextDecoder.prototype.decode.bind(new TextDecoder):function(t){for(var e=t.length,r=[],n=0;n239?4:l>223?3:l>191?2:1;if(n+u<=e)switch(u){case 1:l<128&&(c=l);break;case 2:128==(192&(o=t[n+1]))&&(s=(31&l)<<6|63&o)>127&&(c=s);break;case 3:o=t[n+1],i=t[n+2],128==(192&o)&&128==(192&i)&&(s=(15&l)<<12|(63&o)<<6|63&i)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:o=t[n+1],i=t[n+2],a=t[n+3],128==(192&o)&&128==(192&i)&&128==(192&a)&&(s=(15&l)<<18|(63&o)<<12|(63&i)<<6|63&a)>65535&&s<1114112&&(c=s)}null===c?(c=65533,u=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),n+=u}var f=r.length,h="";for(n=0;n>2,u=(3&o)<<4|a>>4,f=(15&a)<<2|l>>6,h=63&l;s||(h=64,i||(f=64)),r.push(e[c],e[u],e[f],e[h])}return r.join("")}var n=Object.create||function(t){function e(){}return e.prototype=t,new e};if(u)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function c(r,n){n=null==n?{}:n;for(var o=0,i=(r=r||[]).length;o=e.size&&r.close()}))}})}}catch(t){try{new ReadableStream({}),g=function(t){var e=0;t=this;return new ReadableStream({pull:function(r){return t.slice(e,e+524288).arrayBuffer().then((function(n){e+=n.byteLength;var o=new Uint8Array(n);r.enqueue(o),e==t.size&&r.close()}))}})}}catch(t){try{new Response("").body.getReader().read(),g=function(){return new Response(this).body}}catch(t){g=function(){throw new Error("Include https://github.com/MattiasBuelens/web-streams-polyfill")}}}}m.arrayBuffer||(m.arrayBuffer=function(){var t=new FileReader;return t.readAsArrayBuffer(this),v(t)}),m.text||(m.text=function(){var t=new FileReader;return t.readAsText(this),v(t)}),m.stream||(m.stream=g)}(),function(t){"use strict";var e,r=t.Uint8Array,n=t.HTMLCanvasElement,o=n&&n.prototype,i=/\s*;\s*base64\s*(?:;|$)/i,a="toDataURL",s=function(t){for(var n,o,i=t.length,a=new r(i/4*3|0),s=0,l=0,c=[0,0],u=0,f=0;i--;)o=t.charCodeAt(s++),255!==(n=e[o-43])&&void 0!==n&&(c[1]=c[0],c[0]=o,f=f<<6|n,4===++u&&(a[l++]=f>>>16,61!==c[1]&&(a[l++]=f>>>8),61!==c[0]&&(a[l++]=f),u=0));return a};r&&(e=new r([62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51])),!n||o.toBlob&&o.toBlobHD||(o.toBlob||(o.toBlob=function(t,e){if(e||(e="image/png"),this.mozGetAsFile)t(this.mozGetAsFile("canvas",e));else if(this.msToBlob&&/^\s*image\/png\s*(?:$|;)/i.test(e))t(this.msToBlob());else{var n,o=Array.prototype.slice.call(arguments,1),l=this[a].apply(this,o),c=l.indexOf(","),u=l.substring(c+1),f=i.test(l.substring(0,c));Blob.fake?((n=new Blob).encoding=f?"base64":"URI",n.data=u,n.size=u.length):r&&(n=f?new Blob([s(u)],{type:e}):new Blob([decodeURIComponent(u)],{type:e})),t(n)}}),!o.toBlobHD&&o.toDataURLHD?o.toBlobHD=function(){a="toDataURLHD";var t=this.toBlob();return a="toDataURL",t}:o.toBlobHD=o.toBlob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this)},"8oxB":function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var l,c=[],u=!1,f=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):f=-1,c.length&&d())}function d(){if(!u){var t=s(h);u=!0;for(var e=c.length;e;){for(l=c,c=[];++f1)for(var r=1;r{let e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},o=t=>{let e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.round(12.92*e*255+.5):Math.round(255*(1.055*Math.pow(e,1/2.4)-.055)+.5)},i=(t,e)=>(t<0?-1:1)*Math.pow(Math.abs(t),e)},B38u:function(t,e){},BLqG:function(t,e){},JO1w:function(t,e,r){r("8FsP"),window._=r("LvDl"),window.Popper=r("8L3F").default,window.pixelfed=window.pixelfed||{},window.$=window.jQuery=r("EVdn"),r("SYky"),window.axios=r("vDqi"),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",r("KGuw"),window.blurhash=r("tz93");var n=document.head.querySelector('meta[name="csrf-token"]');n?window.axios.defaults.headers.common["X-CSRF-TOKEN"]=n.content:console.error("CSRF token not found."),window.App=window.App||{},window.App.redirect=function(){document.querySelectorAll("a").forEach((function(t,e){var r=t.getAttribute("href");if(r&&r.length>5&&r.startsWith("https://")){var n=new URL(r);n.host!==window.location.host&&"/i/redirect"!==n.pathname&&t.setAttribute("href","/i/redirect?url="+encodeURIComponent(r))}}))},window.App.boot=function(){new Vue({el:"#content"})},window.addEventListener("load",(function(){"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js")})),window.App.util={compose:{post:function(){var t=window.location.pathname;["/","/timeline/public"].includes(t)?$("#composeModal").modal("show"):window.location.href="/?a=co"},circle:function(){console.log("Unsupported method.")},collection:function(){console.log("Unsupported method.")},loop:function(){console.log("Unsupported method.")},story:function(){console.log("Unsupported method.")}},time:function(){return new Date},version:1,format:{count:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-GB",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"compact";return t<1?0:new Intl.NumberFormat(e,{notation:r,compactDisplay:"short"}).format(t)},timeAgo:function(t){var e=Date.parse(t),r=Math.floor((new Date-e)/1e3),n=Math.floor(r/63072e3);return n>=1?n+"y":(n=Math.floor(r/604800))>=1?n+"w":(n=Math.floor(r/86400))>=1?n+"d":(n=Math.floor(r/3600))>=1?n+"h":(n=Math.floor(r/60))>=1?n+"m":Math.floor(r)+"s"},timeAhead:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=Date.parse(t),n=r-Date.parse(new Date),o=Math.floor(n/1e3),i=Math.floor(o/63072e3);return i>=1?i+(e?"y":" years"):(i=Math.floor(o/604800))>=1?i+(e?"w":" weeks"):(i=Math.floor(o/86400))>=1?i+(e?"d":" days"):(i=Math.floor(o/3600))>=1?i+(e?"h":" hours"):(i=Math.floor(o/60))>=1?i+(e?"m":" minutes"):Math.floor(o)+(e?"s":" seconds")},rewriteLinks:function(t){var e=t.innerText;return t.href.startsWith(window.location.origin)?t.href:e=1==e.startsWith("#")?"/discover/tags/"+e.substr(1)+"?src=rph":1==e.startsWith("@")?"/"+t.innerText+"?src=rpp":"/i/redirect?url="+encodeURIComponent(e)}},filters:[["1977","filter-1977"],["Aden","filter-aden"],["Amaro","filter-amaro"],["Ashby","filter-ashby"],["Brannan","filter-brannan"],["Brooklyn","filter-brooklyn"],["Charmes","filter-charmes"],["Clarendon","filter-clarendon"],["Crema","filter-crema"],["Dogpatch","filter-dogpatch"],["Earlybird","filter-earlybird"],["Gingham","filter-gingham"],["Ginza","filter-ginza"],["Hefe","filter-hefe"],["Helena","filter-helena"],["Hudson","filter-hudson"],["Inkwell","filter-inkwell"],["Kelvin","filter-kelvin"],["Kuno","filter-juno"],["Lark","filter-lark"],["Lo-Fi","filter-lofi"],["Ludwig","filter-ludwig"],["Maven","filter-maven"],["Mayfair","filter-mayfair"],["Moon","filter-moon"],["Nashville","filter-nashville"],["Perpetua","filter-perpetua"],["Poprocket","filter-poprocket"],["Reyes","filter-reyes"],["Rise","filter-rise"],["Sierra","filter-sierra"],["Skyline","filter-skyline"],["Slumber","filter-slumber"],["Stinson","filter-stinson"],["Sutro","filter-sutro"],["Toaster","filter-toaster"],["Valencia","filter-valencia"],["Vesper","filter-vesper"],["Walden","filter-walden"],["Willow","filter-willow"],["X-Pro II","filter-xpro-ii"]],filterCss:{"filter-1977":"sepia(.5) hue-rotate(-30deg) saturate(1.4)","filter-aden":"sepia(.2) brightness(1.15) saturate(1.4)","filter-amaro":"sepia(.35) contrast(1.1) brightness(1.2) saturate(1.3)","filter-ashby":"sepia(.5) contrast(1.2) saturate(1.8)","filter-brannan":"sepia(.4) contrast(1.25) brightness(1.1) saturate(.9) hue-rotate(-2deg)","filter-brooklyn":"sepia(.25) contrast(1.25) brightness(1.25) hue-rotate(5deg)","filter-charmes":"sepia(.25) contrast(1.25) brightness(1.25) saturate(1.35) hue-rotate(-5deg)","filter-clarendon":"sepia(.15) contrast(1.25) brightness(1.25) hue-rotate(5deg)","filter-crema":"sepia(.5) contrast(1.25) brightness(1.15) saturate(.9) hue-rotate(-2deg)","filter-dogpatch":"sepia(.35) saturate(1.1) contrast(1.5)","filter-earlybird":"sepia(.25) contrast(1.25) brightness(1.15) saturate(.9) hue-rotate(-5deg)","filter-gingham":"contrast(1.1) brightness(1.1)","filter-ginza":"sepia(.25) contrast(1.15) brightness(1.2) saturate(1.35) hue-rotate(-5deg)","filter-hefe":"sepia(.4) contrast(1.5) brightness(1.2) saturate(1.4) hue-rotate(-10deg)","filter-helena":"sepia(.5) contrast(1.05) brightness(1.05) saturate(1.35)","filter-hudson":"sepia(.25) contrast(1.2) brightness(1.2) saturate(1.05) hue-rotate(-15deg)","filter-inkwell":"brightness(1.25) contrast(.85) grayscale(1)","filter-kelvin":"sepia(.15) contrast(1.5) brightness(1.1) hue-rotate(-10deg)","filter-juno":"sepia(.35) contrast(1.15) brightness(1.15) saturate(1.8)","filter-lark":"sepia(.25) contrast(1.2) brightness(1.3) saturate(1.25)","filter-lofi":"saturate(1.1) contrast(1.5)","filter-ludwig":"sepia(.25) contrast(1.05) brightness(1.05) saturate(2)","filter-maven":"sepia(.35) contrast(1.05) brightness(1.05) saturate(1.75)","filter-mayfair":"contrast(1.1) brightness(1.15) saturate(1.1)","filter-moon":"brightness(1.4) contrast(.95) saturate(0) sepia(.35)","filter-nashville":"sepia(.25) contrast(1.5) brightness(.9) hue-rotate(-15deg)","filter-perpetua":"contrast(1.1) brightness(1.25) saturate(1.1)","filter-poprocket":"sepia(.15) brightness(1.2)","filter-reyes":"sepia(.75) contrast(.75) brightness(1.25) saturate(1.4)","filter-rise":"sepia(.25) contrast(1.25) brightness(1.2) saturate(.9)","filter-sierra":"sepia(.25) contrast(1.5) brightness(.9) hue-rotate(-15deg)","filter-skyline":"sepia(.15) contrast(1.25) brightness(1.25) saturate(1.2)","filter-slumber":"sepia(.35) contrast(1.25) saturate(1.25)","filter-stinson":"sepia(.35) contrast(1.25) brightness(1.1) saturate(1.25)","filter-sutro":"sepia(.4) contrast(1.2) brightness(.9) saturate(1.4) hue-rotate(-10deg)","filter-toaster":"sepia(.25) contrast(1.5) brightness(.95) hue-rotate(-15deg)","filter-valencia":"sepia(.25) contrast(1.1) brightness(1.1)","filter-vesper":"sepia(.35) contrast(1.15) brightness(1.2) saturate(1.3)","filter-walden":"sepia(.35) contrast(.8) brightness(1.25) saturate(1.4)","filter-willow":"brightness(1.2) contrast(.85) saturate(.05) sepia(.2)","filter-xpro-ii":"sepia(.45) contrast(1.25) brightness(1.75) saturate(1.3) hue-rotate(-5deg)"},emoji:["😂","💯","❤️","🙌","👏","👌","😍","😯","😢","😅","😁","🙂","😎","😀","🤣","😃","😄","😆","😉","😊","😋","😘","😗","😙","😚","🤗","🤩","🤔","🤨","😐","😑","😶","🙄","😏","😣","😥","😮","🤐","😪","😫","😴","😌","😛","😜","😝","🤤","😒","😓","😔","😕","🙃","🤑","😲","🙁","😖","😞","😟","😤","😭","😦","😧","😨","😩","🤯","😬","😰","😱","😳","🤪","😵","😡","😠","🤬","😷","🤒","🤕","🤢","🤮","🤧","😇","🤠","🤡","🤥","🤫","🤭","🧐","🤓","😈","👿","👹","👺","💀","👻","👽","🤖","💩","😺","😸","😹","😻","😼","😽","🙀","😿","😾","🤲","👐","🤝","👍","👎","👊","✊","🤛","🤜","🤞","✌️","🤟","🤘","👈","👉","👆","👇","☝️","✋","🤚","🖐","🖖","👋","🤙","💪","🖕","✍️","🙏","💍","💄","💋","👄","👅","👂","👃","👣","👁","👀","🧠","🗣","👤","👥"],embed:{post:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"full",o=t+"/embed?";return o+=e?"caption=true&":"caption=false&",o+=r?"likes=true&":"likes=false&",'