diff --git a/CHANGELOG.md b/CHANGELOG.md index e01bc76ca..94db60342 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - New Discover Layout, add trending hashtags, places and posts ([c251d41b](https://github.com/pixelfed/pixelfed/commit/c251d41b)) - Add Password change email notification ([de1cca4f](https://github.com/pixelfed/pixelfed/commit/de1cca4f)) - Add shared inbox ([4733ca9f](https://github.com/pixelfed/pixelfed/commit/4733ca9f)) +- Add federated photo filters ([0a5a0e86](https://github.com/pixelfed/pixelfed/commit/0a5a0e86)) ### Updated - Updated PostComponent, fix remote urls ([42716ccc](https://github.com/pixelfed/pixelfed/commit/42716ccc)) diff --git a/app/Http/Controllers/MediaController.php b/app/Http/Controllers/MediaController.php index 0f5c101a4..95c90396f 100644 --- a/app/Http/Controllers/MediaController.php +++ b/app/Http/Controllers/MediaController.php @@ -41,6 +41,9 @@ class MediaController extends Controller ->whereNull('status_id') ->findOrFail($id); + $media->version = 2; + $media->save(); + $fragments = explode('/', $media->media_path); $name = last($fragments); array_pop($fragments); diff --git a/app/Transformer/Api/MediaTransformer.php b/app/Transformer/Api/MediaTransformer.php index cca1e37c1..b1993e788 100644 --- a/app/Transformer/Api/MediaTransformer.php +++ b/app/Transformer/Api/MediaTransformer.php @@ -22,7 +22,7 @@ class MediaTransformer extends Fractal\TransformerAbstract 'is_nsfw' => $media->is_nsfw, 'orientation' => $media->orientation, 'filter_name' => $media->filter_name, - 'filter_class' => $media->filter_class, + 'filter_class' => $media->version == 1 ? $media->filter_class : null, 'mime' => $media->mime, ]; } diff --git a/public/js/app.js b/public/js/app.js index 7cb3eb93a..76304486c 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{"+lRy":function(e,t){},0:function(e,t,n){n("JO1w"),n("+lRy"),n("xWuY"),n("YfGV"),e.exports=n("RvBz")},"8oxB":function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:l}catch(e){r=l}}();var c,f=[],u=!1,s=-1;function d(){u&&c&&(u=!1,c.length?f=c.concat(f):s=-1,f.length&&p())}function p(){if(!u){var e=a(d);u=!0;for(var t=f.length;t;){for(c=f,f=[];++s1)for(var n=1;n5&&n.startsWith("https://")){var r=new URL(n);r.host!==window.location.host&&"/i/redirect"!==r.pathname&&e.setAttribute("href","/i/redirect?url="+encodeURIComponent(n))}}))},window.App.boot=function(){new Vue({el:"#content"})},window.App.util={compose:{post:function(){var e=window.location.pathname;["/","/timeline/public"].includes(e)?$("#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 e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-GB",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"compact";return e<1?0:new Intl.NumberFormat(t,{notation:n,compactDisplay:"short"}).format(e)},timeAgo:function(e){var t=Date.parse(e),n=Math.floor((new Date-t)/1e3),r=Math.floor(n/63072e3);return r>=1?r+"y":(r=Math.floor(n/604800))>=1?r+"w":(r=Math.floor(n/86400))>=1?r+"d":(r=Math.floor(n/3600))>=1?r+"h":(r=Math.floor(n/60))>=1?r+"m":Math.floor(n)+"s"}},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"]],emoji:["๐Ÿ˜‚","๐Ÿ’ฏ","โค๏ธ","๐Ÿ™Œ","๐Ÿ‘","๐Ÿ‘Œ","๐Ÿ˜","๐Ÿ˜ฏ","๐Ÿ˜ข","๐Ÿ˜…","๐Ÿ˜","๐Ÿ™‚","๐Ÿ˜Ž","๐Ÿ˜€","๐Ÿคฃ","๐Ÿ˜ƒ","๐Ÿ˜„","๐Ÿ˜†","๐Ÿ˜‰","๐Ÿ˜Š","๐Ÿ˜‹","๐Ÿ˜˜","๐Ÿ˜—","๐Ÿ˜™","๐Ÿ˜š","๐Ÿค—","๐Ÿคฉ","๐Ÿค”","๐Ÿคจ","๐Ÿ˜","๐Ÿ˜‘","๐Ÿ˜ถ","๐Ÿ™„","๐Ÿ˜","๐Ÿ˜ฃ","๐Ÿ˜ฅ","๐Ÿ˜ฎ","๐Ÿค","๐Ÿ˜ช","๐Ÿ˜ซ","๐Ÿ˜ด","๐Ÿ˜Œ","๐Ÿ˜›","๐Ÿ˜œ","๐Ÿ˜","๐Ÿคค","๐Ÿ˜’","๐Ÿ˜“","๐Ÿ˜”","๐Ÿ˜•","๐Ÿ™ƒ","๐Ÿค‘","๐Ÿ˜ฒ","๐Ÿ™","๐Ÿ˜–","๐Ÿ˜ž","๐Ÿ˜Ÿ","๐Ÿ˜ค","๐Ÿ˜ญ","๐Ÿ˜ฆ","๐Ÿ˜ง","๐Ÿ˜จ","๐Ÿ˜ฉ","๐Ÿคฏ","๐Ÿ˜ฌ","๐Ÿ˜ฐ","๐Ÿ˜ฑ","๐Ÿ˜ณ","๐Ÿคช","๐Ÿ˜ต","๐Ÿ˜ก","๐Ÿ˜ ","๐Ÿคฌ","๐Ÿ˜ท","๐Ÿค’","๐Ÿค•","๐Ÿคข","๐Ÿคฎ","๐Ÿคง","๐Ÿ˜‡","๐Ÿค ","๐Ÿคก","๐Ÿคฅ","๐Ÿคซ","๐Ÿคญ","๐Ÿง","๐Ÿค“","๐Ÿ˜ˆ","๐Ÿ‘ฟ","๐Ÿ‘น","๐Ÿ‘บ","๐Ÿ’€","๐Ÿ‘ป","๐Ÿ‘ฝ","๐Ÿค–","๐Ÿ’ฉ","๐Ÿ˜บ","๐Ÿ˜ธ","๐Ÿ˜น","๐Ÿ˜ป","๐Ÿ˜ผ","๐Ÿ˜ฝ","๐Ÿ™€","๐Ÿ˜ฟ","๐Ÿ˜พ","๐Ÿคฒ","๐Ÿ‘","๐Ÿค","๐Ÿ‘","๐Ÿ‘Ž","๐Ÿ‘Š","โœŠ","๐Ÿค›","๐Ÿคœ","๐Ÿคž","โœŒ๏ธ","๐ŸคŸ","๐Ÿค˜","๐Ÿ‘ˆ","๐Ÿ‘‰","๐Ÿ‘†","๐Ÿ‘‡","โ˜๏ธ","โœ‹","๐Ÿคš","๐Ÿ–","๐Ÿ––","๐Ÿ‘‹","๐Ÿค™","๐Ÿ’ช","๐Ÿ–•","โœ๏ธ","๐Ÿ™","๐Ÿ’","๐Ÿ’„","๐Ÿ’‹","๐Ÿ‘„","๐Ÿ‘…","๐Ÿ‘‚","๐Ÿ‘ƒ","๐Ÿ‘ฃ","๐Ÿ‘","๐Ÿ‘€","๐Ÿง ","๐Ÿ—ฃ","๐Ÿ‘ค","๐Ÿ‘ฅ"],embed:{post:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"full",o=e+"/embed?";return o+=t?"caption=true&":"caption=false&",o+=n?"likes=true&":"likes=false&",'