|
|
"use strict";(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[4082],{9713(t,e,s){function a(){var t,e,s="function"==typeof Symbol?Symbol:{},o=s.iterator||"@@iterator",n=s.toStringTag||"@@toStringTag";function r(s,a,o,n){var r=a&&a.prototype instanceof c?a:c,d=Object.create(r.prototype);return i(d,"_invoke",function(s,a,i){var o,n,r,c=0,d=i||[],u=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,s){return o=e,n=0,r=t,f.n=s,l}};function p(s,a){for(n=s,r=a,e=0;!u&&c&&!i&&e<d.length;e++){var i,o=d[e],p=f.p,h=o[2];s>3?(i=h===a)&&(r=o[(n=o[4])?5:(n=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=s<2&&p<o[1])?(n=0,f.v=a,f.n=o[1]):p<h&&(i=s<3||o[0]>a||a>h)&&(o[4]=s,o[5]=a,f.n=h,n=0))}if(i||s>1)return l;throw u=!0,a}return function(i,d,h){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&p(d,h),n=d,r=h;(e=n<2?t:r)||!u;){o||(n?n<3?(n>1&&(f.n=-1),p(n,r)):f.n=r:f.v=r);try{if(c=2,o){if(n||(i="next"),e=o[i]){if(!(e=e.call(o,r)))throw TypeError("iterator result is not an object");if(!e.done)return e;r=e.value,n<2&&(n=0)}else 1===n&&(e=o.return)&&e.call(o),n<2&&(r=TypeError("The iterator does not provide a '"+i+"' method"),n=1);o=t}else if((e=(u=f.n<0)?r:s.call(a,f))!==l)break}catch(e){o=t,n=1,r=e}finally{c=1}}return{value:e,done:u}}}(s,o,n),!0),d}var l={};function c(){}function d(){}function u(){}e=Object.getPrototypeOf;var f=[][o]?e(e([][o]())):(i(e={},o,function(){return this}),e),p=u.prototype=c.prototype=Object.create(f);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,i(t,n,"GeneratorFunction")),t.prototype=Object.create(p),t}return d.prototype=u,i(p,"constructor",u),i(u,"constructor",d),d.displayName="GeneratorFunction",i(u,n,"GeneratorFunction"),i(p),i(p,n,"Generator"),i(p,o,function(){return this}),i(p,"toString",function(){return"[object Generator]"}),(a=function(){return{w:r,m:h}})()}function i(t,e,s,a){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}i=function(t,e,s,a){function n(e,s){i(t,e,function(t){return this._invoke(e,s,t)})}e?o?o(t,e,{value:s,enumerable:!a,configurable:!a,writable:!a}):t[e]=s:(n("next",0),n("throw",1),n("return",2))},i(t,e,s,a)}function o(t,e,s,a,i,o,n){try{var r=t[o](n),l=r.value}catch(t){return void s(t)}r.done?e(l):Promise.resolve(l).then(a,i)}s.r(e),s.d(e,{default:()=>n});const n={props:["initialData"],data:function(){return{loading:!0,isAuthed:void 0,user:void 0,settings:void 0,post:void 0,profile:void 0,settingsUrl:window._portfolio.path+"/settings"}},mounted:function(){var t=JSON.parse(this.initialData);this.post=t.post,this.profile=t.profile,this.isAuthed=t.authed,this.fetchUser()},methods:{fetchUser:function(){var t,e=this;return(t=a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:if(!e.isAuthed){t.n=1;break}return t.n=1,axios.get("/api/v1/accounts/verify_credentials").then(function(t){e.user=t.data}).catch(function(t){});case 1:return t.n=2,axios.get("/api/portfolio/account/settings.json",{params:{id:e.profile.id}}).then(function(t){e.settings=t.data,t.data.hasOwnProperty("background_color")&&e.updateCssVariable("--body-bg",t.data.background_color),t.data.hasOwnProperty("text_color")&&(e.updateCssVariable("--text-color",t.data.text_color),e.updateCssVariable("--link-color",t.data.text_color))}).then(function(){setTimeout(function(){e.loading=!1},500)});case 2:return t.a(2)}},t)}),function(){var e=this,s=arguments;return new Promise(function(a,i){var n=t.apply(e,s);function r(t){o(n,a,i,r,l,"next",t)}function l(t){o(n,a,i,r,l,"throw",t)}r(void 0)})})()},profileUrl:function(){return"https://".concat(window._portfolio.domain).concat(window._portfolio.path,"/").concat(this.profile.username)},postUrl:function(t){return"/".concat(this.profile.username,"/").concat(t.id)},formatDate:function(t){return new Date(t).toLocaleDateString(void 0,{weekday:"short",year:"numeric",month:"long",day:"numeric"})},updateCssVariable:function(t,e){document.querySelector(":root").style.setProperty(t,e)}}}},17e3(t,e,s){s.r(e),s.d(e,{default:()=>l});s(13950),s(79676);var a=s(74692);function i(){var t,e,s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",n=s.toStringTag||"@@toStringTag";function r(s,a,i,n){var r=a&&a.prototype instanceof c?a:c,d=Object.create(r.prototype);return o(d,"_invoke",function(s,a,i){var o,n,r,c=0,d=i||[],u=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,s){return o=e,n=0,r=t,f.n=s,l}};function p(s,a){for(n=s,r=a,e=0;!u&&c&&!i&&e<d.length;e++){var i,o=d[e],p=f.p,h=o[2];s>3?(i=h===a)&&(r=o[(n=o[4])?5:(n=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=s<2&&p<o[1])?(n=0,f.v=a,f.n=o[1]):p<h&&(i=s<3||o[0]>a||a>h)&&(o[4]=s,o[5]=a,f.n=h,n=0))}if(i||s>1)return l;throw u=!0,a}return function(i,d,h){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&p(d,h),n=d,r=h;(e=n<2?t:r)||!u;){o||(n?n<3?(n>1&&(f.n=-1),p(n,r)):f.n=r:f.v=r);try{if(c=2,o){if(n||(i="next"),e=o[i]){if(!(e=e.call(o,r)))throw TypeError("iterator result is not an object");if(!e.done)return e;r=e.value,n<2&&(n=0)}else 1===n&&(e=o.return)&&e.call(o),n<2&&(r=TypeError("The iterator does not provide a '"+i+"' method"),n=1);o=t}else if((e=(u=f.n<0)?r:s.call(a,f))!==l)break}catch(e){o=t,n=1,r=e}finally{c=1}}return{value:e,done:u}}}(s,i,n),!0),d}var l={};function c(){}function d(){}function u(){}e=Object.getPrototypeOf;var f=[][a]?e(e([][a]())):(o(e={},a,function(){return this}),e),p=u.prototype=c.prototype=Object.create(f);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,o(t,n,"GeneratorFunction")),t.prototype=Object.create(p),t}return d.prototype=u,o(p,"constructor",u),o(u,"constructor",d),d.displayName="GeneratorFunction",o(u,n,"GeneratorFunction"),o(p),o(p,n,"Generator"),o(p,a,function(){return this}),o(p,"toString",function(){return"[object Generator]"}),(i=function(){return{w:r,m:h}})()}function o(t,e,s,a){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,s,a){function n(e,s){o(t,e,function(t){return this._invoke(e,s,t)})}e?i?i(t,e,{value:s,enumerable:!a,configurable:!a,writable:!a}):t[e]=s:(n("next",0),n("throw",1),n("return",2))},o(t,e,s,a)}function n(t,e,s,a,i,o,n){try{var r=t[o](n),l=r.value}catch(t){return void s(t)}r.done?e(l):Promise.resolve(l).then(a,i)}function r(t){return function(){var e=this,s=arguments;return new Promise(function(a,i){var o=t.apply(e,s);function r(t){n(o,a,i,r,l,"next",t)}function l(t){n(o,a,i,r,l,"throw",t)}r(void 0)})}}const l={props:["initialData"],data:function(){return{loading:!0,user:void 0,profile:void 0,settings:void 0,feed:[],albumIndex:0,settingsUrl:window._portfolio.path+"/settings"}},mounted:function(){var t=JSON.parse(this.initialData);this.profile=t.profile,this.fetchUser()},methods:{fetchUser:function(){var t=this;return r(i().m(function e(){return i().w(function(e){for(;;)switch(e.n){case 0:return axios.get("/api/v1/accounts/verify_credentials").then(function(e){t.user=e.data}).catch(function(t){}),e.n=1,axios.get("/api/portfolio/account/settings.json",{params:{id:t.profile.id}}).then(function(e){t.settings=e.data,e.data.hasOwnProperty("background_color")&&t.updateCssVariable("--body-bg",e.data.background_color),e.data.hasOwnProperty("text_color")&&(t.updateCssVariable("--text-color",e.data.text_color),t.updateCssVariable("--link-color",e.data.text_color))}).then(function(){t.fetchFeed()});case 1:return e.a(2)}},e)}))()},fetchFeed:function(){var t=this;return r(i().m(function e(){return i().w(function(e){for(;;)switch(e.n){case 0:axios.get("/api/portfolio/"+t.profile.id+"/feed").then(function(e){t.feed=e.data.filter(function(t){return["photo","photo:album"].includes(t.pf_type)})}).then(function(){t.setAlbumSlide()}).then(function(){setTimeout(function(){t.loading=!1},500)}).then(function(){"masonry"===t.settings.profile_layout&&setTimeout(function(){t.initMasonry()},500)}).then(function(){setTimeout(function(){t.bootIntersectors()},500)}).catch(function(e){t.loading=!1});case 1:return e.a(2)}},e)}))()},postUrl:function(t){return"".concat(window._portfolio.path,"/").concat(this.profile.username,"/").concat(t.id)},albumPrev:function(){if(0!==this.albumIndex){if(1===this.albumIndex){this.albumIndex--;var t=new URL(window.location);return t.searchParams.delete("slide"),void window.history.pushState({},"",t)}this.albumIndex--;var e=new URL(window.location);e.searchParams.set("slide",this.albumIndex+1),window.history.pushState({},"",e)}},albumNext:function(){if(this.albumIndex!==this.feed.length-1){this.albumIndex++;var t=new URL(window.location);t.searchParams.set("slide",this.albumIndex+1),window.history.pushState({},"",t)}},setAlbumSlide:function(){var t=new URL(window.location);if(t.searchParams.has("slide")){var e=Number.parseInt(t.searchParams.get("slide"));if(Number.isNaN(e))return;if(e<=0)return;if(e>this.feed.length)return;this.albumIndex=t.searchParams.get("slide")-1}},initMasonry:function(){a('[data-fancybox="recent"]').fancybox({gutter:20,modal:!1})},updateCssVariable:function(t,e){document.querySelector(":root").style.setProperty(t,e)},bootIntersectors:function(){var t=[].slice.call(document.querySelectorAll("img.img-placeholder"));if("IntersectionObserver"in window){var e=new IntersectionObserver(function(t,s){t.forEach(function(t){if(t.isIntersecting){var s=t.target;s.src=s.dataset.src,s.style.zIndex=2,s.classList.remove("img-placeholder"),e.unobserve(s)}})});t.forEach(function(t){e.observe(t)})}else t.forEach(function(t){t.src=t.dataset.src,t.style.zIndex=2})}}}},19296(t,e,s){s.r(e),s.d(e,{default:()=>a});const a={data:function(){return{loading:!0,tabIndex:"Configure",tabs:["Configure","Customize","View Portfolio"],user:void 0,settings:void 0,recentPostsLoaded:!1,rpStart:0,recentPosts:[],recentPostsPage:void 0,selectedRecentPosts:[],isSavingCurated:!1,canSaveCurated:!1,customizeSettings:[],skipWatch:!1,profileSourceOptions:[{value:null,text:"Please select an option",disabled:!0},{value:"recent",text:"Most recent posts"}],profileLayoutOptions:[{value:null,text:"Please select an option",disabled:!0},{value:"grid",text:"Grid"},{value:"masonry",text:"Masonry"},{value:"album",text:"Album"}],profileLayoutColorSchemeOptions:[{value:null,text:"Please select an option",disabled:!0},{value:"light",text:"Light mode"},{value:"dark",text:"Dark mode"},{value:"custom",text:"Custom color scheme",disabled:!0}],profileLayoutFeedOrder:[{value:"oldest",text:"Oldest first"},{value:"recent",text:"Recent first"}]}},computed:{prevClass:function(){return 0===this.rpStart?"fa fa-arrow-circle-left fa-3x text-dark":"fa fa-arrow-circle-left fa-3x text-muted cursor-pointer"},nextClass:function(){return this.rpStart>this.recentPosts.length-9?"fa fa-arrow-circle-right fa-3x text-dark":"fa fa-arrow-circle-right fa-3x text-muted cursor-pointer"}},watch:{settings:{deep:!0,immediate:!0,handler:function(t,e){this.loading||this.skipWatch||(e.show_timestamp||(this.settings.show_link=!1),this.updateSettings())}}},mounted:function(){this.fetchUser()},methods:{fetchUser:function(){var t=this;axios.get("/api/v1/accounts/verify_credentials").then(function(e){t.user=e.data,e.data.statuses_count>0?t.profileSourceOptions=[{value:null,text:"Please select an option",disabled:!0},{value:"recent",text:"Most recent posts"},{value:"custom",text:"Curated posts"}]:setTimeout(function(){t.settings.active=!1,t.settings.profile_source="recent",t.tabIndex="Configure"},1e3)}),axios.post(this.apiPath("/api/portfolio/self/settings.json")).then(function(e){t.settings=e.data,t.updateTabs(),e.data.metadata&&e.data.metadata.posts&&(t.selectedRecentPosts=e.data.metadata.posts),"dark"!=e.data.color_scheme&&("light"===e.data.color_scheme?t.updateBackgroundColor("#ffffff"):(e.data.hasOwnProperty("background_color")&&t.updateBackgroundColor(e.data.background_color),e.data.hasOwnProperty("text_color")&&t.updateTextColor(e.data.text_color)))}).then(function(){t.initCustomizeSettings()}).then(function(){var e=new URL(window.location);if(e.searchParams.has("tab")){var s=e.searchParams.get("tab");-1!==("custom"===t.settings.profile_source?["curate","customize","share"]:["customize","share"]).indexOf(s)&&t.toggleTab(s.slice(0,1).toUpperCase()+s.slice(1))}}).then(function(){setTimeout(function(){t.loading=!1},500)})},apiPath:function(t){return t},toggleTab:function(t){if("Curate"!==t||this.recentPostsLoaded||this.loadRecentPosts(),this.tabIndex=t,this.rpStart=0,"Configure"==t){var e=new URL(window.location);e.searchParams.delete("tab"),window.history.pushState({},"",e)}else{if("View Portfolio"==t)return this.tabIndex="Configure",void(window.location.href="https://".concat(window._portfolio.domain).concat(window._portfolio.path,"/").concat(this.user.username));var s=new URL(window.location);s.searchParams.set("tab",t.toLowerCase()),window.history.pushState({},"",s)}},updateTabs:function(){"custom"===this.settings.profile_source?this.tabs=["Configure","Curate","Customize","View Portfolio"]:this.tabs=["Configure","Customize","View Portfolio"]},updateSettings:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.skipWatch||axios.post(this.apiPath("/api/portfolio/self/update-settings.json"),this.settings).then(function(s){t.updateTabs(),e||t.$bvToast.toast("Your settings have been successfully updated!",{variant:"dark",title:"Settings Updated",autoHideDelay:2e3,appendToast:!1})})},loadRecentPosts:function(){var t=this;axios.get("/api/v1/accounts/"+this.user.id+"/statuses?only_media=1&media_types=photo&limit=100&_pe=1").then(function(e){e.data.length&&(t.recentPosts=e.data.filter(function(t){return["photo","photo:album"].includes(t.pf_type)&&"public"===t.visibility}))}).then(function(){setTimeout(function(){t.recentPostsLoaded=!0},500)})},toggleRecentPost:function(t){if(-1==this.selectedRecentPosts.indexOf(t)){if(100===this.selectedRecentPosts.length)return;this.selectedRecentPosts.push(t)}else this.selectedRecentPosts=this.selectedRecentPosts.filter(function(e){return e!==t});this.canSaveCurated=!0},recentPostsPrev:function(){0!==this.rpStart&&(this.rpStart=this.rpStart-9)},recentPostsNext:function(){this.rpStart>this.recentPosts.length-9||(this.rpStart=this.rpStart+9)},clearSelected:function(){this.selectedRecentPosts=[]},saveCurated:function(){var t,e=this;this.isSavingCurated=!0,null===(t=event.currentTarget)||void 0===t||t.blur(),axios.post("/api/portfolio/self/curated.json",{ids:this.selectedRecentPosts}).then(function(t){e.isSavingCurated=!1,e.$bvToast.toast("Your curated posts have been updated!",{variant:"dark",title:"Portfolio Updated",autoHideDelay:2e3,appendToast:!1})}).catch(function(t){e.isSavingCurated=!1,e.$bvToast.toast("An error occured while attempting to update your portfolio, please try again later and contact an admin if this problem persists.",{variant:"dark",title:"Error",autoHideDelay:2e3,appendToast:!1})})},initCustomizeSettings:function(){this.customizeSettings=[{title:"Post Settings",items:[{label:"Show Captions",model:"show_captions"},{label:"Show License",model:"show_license"},{label:"Show Location",model:"show_location"},{label:"Show Timestamp",model:"show_timestamp"},{label:"Link to Post",description:"Add link to timestamp to view the original post url, requires show timestamp to be enabled",model:"show_link",requiredWithTrue:"show_timestamp"}]},{title:"Profile Settings",items:[{label:"Show Avatar",model:"show_avatar"},{label:"Show Bio",model:"show_bio"},{label:"Show View Profile Button",model:"show_profile_button"},{label:"Enable RSS Feed",description:"Enable your RSS feed with the 10 most recent portfolio items",model:"rss_enabled"},{label:"Show RSS Feed Button",model:"show_rss_button",requiredWithTrue:"rss_enabled"}]}]},updateBackgroundColor:function(t){var e=this;this.skipWatch=!0,document.querySelector(":root").style.setProperty("--body-bg",t),"#000000"!==t&&"#ffffff"!==t&&(this.settings.color_scheme="custom"),this.$nextTick(function(){e.skipWatch=!1})},updateTextColor:function(t){var e=this;this.skipWatch=!0,document.querySelector(":root").style.setProperty("--text-color",t),"#d4d4d8"!==t&&(this.settings.color_scheme="custom"),this.$nextTick(function(){e.skipWatch=!1})},resetBackgroundColor:function(){var t=this;this.skipWatch=!0,this.$nextTick(function(){t.updateBackgroundColor("#000000"),t.settings.color_scheme="dark",t.settings.background_color="#000000",t.updateSettings(!0),setTimeout(function(){t.skipWatch=!1},1e3)})},resetTextColor:function(){var t=this;this.skipWatch=!0,this.$nextTick(function(){t.updateTextColor("#d4d4d8"),t.settings.color_scheme="dark",t.settings.text_color="#d4d4d8",t.updateSettings(!0),setTimeout(function(){t.skipWatch=!1},1e3)})},updateColorScheme:function(t){"light"===t&&this.updateBackgroundColor("#ffffff"),"dark"===t&&this.updateBackgroundColor("#000000")},getPreviewUrl:function(t){var e=t.media_attachments[0];return e?e.preview_url&&!e.preview_url.endsWith("/no-preview.png")?e.preview_url:e.url:"/storage/no-preview.png"}}}},91592(t,e,s){s.r(e),s.d(e,{render:()=>a,staticRenderFns:()=>i});var a=function(){var t=this,e=t._self._c;return e("div",[t.loading?e("div",{staticClass:"container"},[e("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"100vh"}},[e("b-spinner")],1)]):e("div",[e("div",{staticClass:"container mb-5"},[e("div",{staticClass:"row mt-3"},[e("div",{staticClass:"col-12 mb-4"},[e("div",{staticClass:"d-flex justify-content-center"},[e("img",{staticClass:"img-fluid mb-4",staticStyle:{"max-height":"80vh","object-fit":"contain"},attrs:{src:t.post.media_attachments[0].url}})])]),t._v(" "),e("div",{staticClass:"col-12 mb-4"},[t.settings.show_captions&&t.post.content_text?e("p",[t._v(t._s(t.post.content_text))]):t._e(),t._v(" "),e("div",{staticClass:"d-md-flex justify-content-between align-items-center"},[e("p",{staticClass:"small"},[t._v("by "),e("a",{staticClass:"font-weight-bold link-color",attrs:{href:t.profileUrl()}},[t._v("@"+t._s(t.profile.username))])]),t._v(" "),t.settings.show_license&&t.post.media_attachments[0].license?e("p",{staticClass:"small"},[t._v("Licensed under "+t._s(t.post.media_attachments[0].license.title))]):t._e(),t._v(" "),t.settings.show_location&&t.post.place?e("p",{staticClass:"small text-muted"},[t._v(t._s(t.post.place.name)+", "+t._s(t.post.place.country))]):t._e(),t._v(" "),t.settings.show_timestamp?e("p",{staticClass:"small"},[t.settings.show_link?e("a",{staticClass:"font-weight-bold link-color",staticStyle:{"z-index":"2"},attrs:{href:t.post.url}},[t._v("\n "+t._s(t.formatDate(t.post.created_at))+"\n ")]):e("span",{staticClass:"user-select-none"},[t._v("\n "+t._s(t.formatDate(t.post.created_at))+"\n ")])]):t._e()])])])]),t._v(" "),e("div",{staticClass:"container"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"d-flex fixed-bottom p-3 justify-content-between align-items-center"},[t.user?e("a",{staticClass:"logo-mark logo-mark-sm mb-0 p-1",attrs:{href:"/"}},[e("span",{staticClass:"text-gradient-primary"},[t._v("portfolio")])]):e("span",{staticClass:"logo-mark logo-mark-sm mb-0 p-1"},[e("span",{staticClass:"text-gradient-primary"},[t._v("portfolio")])]),t._v(" "),t.user&&t.user.id===t.profile.id?e("p",{staticClass:"text-center mb-0"},[e("a",{staticClass:"text-muted",attrs:{href:t.settingsUrl}},[e("i",{staticClass:"far fa-cog fa-lg"})])]):t._e()])])])])])])},i=[]},10938(t,e,s){s.r(e),s.d(e,{render:()=>a,staticRenderFns:()=>i});var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"w-100 h-100"},[t.loading?e("div",{staticClass:"container"},[e("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"100vh"}},[e("b-spinner")],1)]):e("div",{staticClass:"container"},[e("div",{staticClass:"row py-5"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"d-flex align-items-center flex-column"},[t.settings.show_avatar?e("img",{staticClass:"rounded-circle shadow",attrs:{src:t.profile.avatar,width:"60",height:"60",onerror:"this.src='/storage/avatars/default.png?v=0';this.onerror=null;"}}):t._e(),t._v(" "),e("div",{staticClass:"py-3 text-center",staticStyle:{"max-width":"60%"}},[e("h1",{staticClass:"font-weight-bold"},[t._v(t._s(t.profile.username))]),t._v(" "),t.settings.show_bio?e("p",{staticClass:"font-weight-light mb-0 text-break"},[t._v(t._s(t.profile.note_text))]):t._e()]),t._v(" "),t.settings.show_profile_button||t.settings.rss_enabled&&t.settings.show_rss_button?e("div",{staticClass:"pb-3 text-center d-flex flex-column flex-sm-row",staticStyle:{"max-width":"60%",gap:"1rem"}},[t.settings.show_profile_button?e("a",{staticClass:"btn btn-outline-primary btn-custom-color",attrs:{href:t.profile.url,target:"_blank"}},[t._v("\n \t\tView Profile\n \t")]):t._e(),t._v(" "),t.settings.rss_enabled&&t.settings.show_rss_button?e("a",{staticClass:"btn btn-outline-primary btn-custom-color",attrs:{href:t.settings.rss_feed_url,target:"_blank"}},[e("i",{staticClass:"far fa-rss"}),t._v(" RSS\n \t")]):t._e()]):t._e()])])]),t._v(" "),e("div",{staticClass:"container mb-5 pb-5"},[e("div",{class:["masonry"===t.settings.profile_layout?"card-columns":"row"],attrs:{id:"portContainer"}},["grid"===t.settings.profile_layout?t._l(t.feed,function(s,a){return e("div",{staticClass:"col-12 col-md-4 mb-1 p-1"},[e("div",{staticClass:"square"},[e("a",{attrs:{href:t.postUrl(s)}},[e("div",{staticClass:"lazy-img"},[e("blur-hash-canvas",{staticClass:"square-content pr-1",attrs:{width:"32",height:"32",hash:s.media_attachments[0].blurhash}}),t._v(" "),e("img",{staticClass:"square-content pr-1 img-placeholder",staticStyle:{overflow:"hidden","object-fit":"cover","z-index":"-1"},attrs:{src:"","data-src":s.media_attachments[0].url,width:"100%",height:"300",loading:"lazy"}})],1)])])])}):"album"===t.settings.profile_layout?e("div",{staticClass:"col-12 mb-1 p-1"},[e("div",{staticClass:"d-flex justify-content-center"},[e("p",{staticClass:"text-color font-weight-bold"},[t._v(t._s(t.albumIndex+1)+" "),e("span",{staticClass:"font-weight-light"},[t._v("/")]),t._v(" "+t._s(t.feed.length))])]),t._v(" "),e("div",{staticClass:"d-flex justify-content-between align-items-center"},[0===t.albumIndex?e("span",[e("i",{staticClass:"fa fa-arrow-circle-left fa-3x text-color-lighter"})]):e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.albumPrev()}}},[e("i",{staticClass:"fa fa-arrow-circle-left fa-3x text-color"})]),t._v(" "),e("transition",{attrs:{name:"slide-fade"}},[e("a",{key:t.albumIndex,staticClass:"mx-4",attrs:{href:t.postUrl(t.feed[t.albumIndex])}},[e("img",{staticClass:"user-select-none",staticStyle:{height:"60vh",overflow:"hidden","object-fit":"contain"},attrs:{src:t.feed[t.albumIndex].media_attachments[0].url,width:"100%",draggable:!1}})])]),t._v(" "),t.albumIndex===t.feed.length-1?e("span",[e("i",{staticClass:"fa fa-arrow-circle-right fa-3x text-color-lighter"})]):e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.albumNext()}}},[e("i",{staticClass:"fa fa-arrow-circle-right fa-3x text-color"})])],1)]):"masonry"===t.settings.profile_layout?e("div",{staticClass:"col-12 p-0 m-0"},t._l(t.feed,function(s,a){return e("div",{staticClass:"p-1"},[e("a",{attrs:{href:t.postUrl(s),"data-fancybox":"recent","data-src":s.media_attachments[0].url,"data-width":s.media_attachments[0].width,"data-height":s.media_attachments[0].height}},[e("img",{staticClass:"user-select-none",staticStyle:{overflow:"hidden","object-fit":"contain"},attrs:{src:s.media_attachments[0].url,width:"100%",draggable:!1}})])])}),0):t._e()],2)]),t._v(" "),e("div",{staticClass:"d-flex fixed-bottom p-3 justify-content-between align-items-center"},[t.user?e("a",{staticClass:"logo-mark logo-mark-sm mb-0 p-1",attrs:{href:"/"}},[e("span",{staticClass:"text-gradient-primary"},[t._v("portfolio")])]):e("span",{staticClass:"logo-mark logo-mark-sm mb-0 p-1"},[e("span",{staticClass:"text-gradient-primary"},[t._v("portfolio")])]),t._v(" "),t.user&&t.user.id==t.profile.id?e("p",{staticClass:"text-center mb-0"},[e("a",{staticClass:"link-color",attrs:{href:t.settingsUrl}},[e("i",{staticClass:"far fa-cog fa-lg"})])]):t._e()])])])},i=[]},52609(t,e,s){s.r(e),s.d(e,{render:()=>a,staticRenderFns:()=>i});var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"portfolio-settings px-3"},[t.loading?e("div",{staticClass:"d-flex justify-content-center align-items-center py-5"},[e("b-spinner",{attrs:{variant:"primary"}})],1):e("div",{staticClass:"row justify-content-center mb-5 pb-5"},[e("div",{staticClass:"col-12 col-md-8 bg-dark py-2 rounded"},[e("ul",{staticClass:"nav nav-pills nav-fill"},t._l(t.tabs,function(s,a){return e("li",{staticClass:"nav-item",class:{disabled:0!==a&&!t.settings.active}},[0===a||t.settings.active?e("a",{staticClass:"nav-link",class:{active:s===t.tabIndex},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleTab(s)}}},[t._v(t._s(s))]):e("span",{staticClass:"nav-link"},[t._v(t._s(s))])])}),0)]),t._v(" "),e("transition",{attrs:{name:"slide-fade"}},["Configure"===t.tabIndex?e("div",{key:"0",staticClass:"col-12 col-md-8 bg-dark mt-3 py-2 rounded"},[t.user.statuses_count?t._e():e("div",{staticClass:"alert alert-danger"},[e("p",{staticClass:"mb-0 small font-weight-bold"},[t._v("You don't have any public posts, once you share public posts you can enable your portfolio.")])]),t._v(" "),e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label"},[e("p",{staticClass:"lead mb-0"},[t._v("Portfolio Enabled")]),t._v(" "),e("p",{staticClass:"small mb-0 text-muted"},[t._v("You must enable your portfolio before you or anyone can view it.")])]),t._v(" "),e("div",{staticClass:"setting-switch mt-n1"},[e("b-form-checkbox",{attrs:{name:"check-button",size:"lg",switch:"",disabled:!t.user.statuses_count},model:{value:t.settings.active,callback:function(e){t.$set(t.settings,"active",e)},expression:"settings.active"}})],1)]),t._v(" "),e("hr"),t._v(" "),e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label",staticStyle:{"max-width":"50%"}},[e("p",{staticClass:"mb-0"},[t._v("Portfolio Source")]),t._v(" "),e("p",{staticClass:"small mb-0 text-muted"},[t._v("Choose how you want to populate your portfolio, select Most Recent posts to automatically update your portfolio with recent posts or Curated Posts to select specific posts for your portfolio.")])]),t._v(" "),e("div",{staticClass:"ml-3"},[e("b-form-select",{attrs:{options:t.profileSourceOptions,disabled:!t.user.statuses_count},model:{value:t.settings.profile_source,callback:function(e){t.$set(t.settings,"profile_source",e)},expression:"settings.profile_source"}})],1)])]):"Curate"===t.tabIndex?e("div",{key:"1",staticClass:"col-12 col-md-8 mt-3 py-2 px-0"},[t.recentPostsLoaded?[e("div",{staticClass:"mt-n2 mb-4"},[e("p",{staticClass:"text-muted small"},[t._v("Select up to 100 photos from your 100 most recent posts. You can only select public photo posts, videos are not supported at this time.")]),t._v(" "),e("div",{staticClass:"d-flex align-items-center justify-content-between"},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v("Selected "+t._s(t.selectedRecentPosts.length)+"/100")]),t._v(" "),e("div",[e("button",{staticClass:"btn btn-link font-weight-bold mr-3 text-decoration-none",attrs:{disabled:!t.selectedRecentPosts.length},on:{click:t.clearSelected}},[t._v("\n Clear selected\n ")]),t._v(" "),e("button",{staticClass:"btn btn-primary py-0 font-weight-bold",staticStyle:{width:"150px"},attrs:{disabled:!t.canSaveCurated},on:{click:function(e){return t.saveCurated()}}},[t.isSavingCurated?e("b-spinner",{attrs:{small:""}}):[t._v("Save")]],2)])])]),t._v(" "),e("div",{staticClass:"d-flex justify-content-between align-items-center"},[e("span",{on:{click:t.recentPostsPrev}},[e("i",{class:t.prevClass})]),t._v(" "),e("div",{staticClass:"row flex-grow-1 mx-2"},t._l(t.recentPosts.slice(t.rpStart,t.rpStart+9),function(s,a){return e("div",{staticClass:"col-12 col-md-4 mb-1 p-1"},[e("div",{staticClass:"square user-select-none",on:{click:function(e){return e.preventDefault(),t.toggleRecentPost(s.id)}}},[e("transition",{attrs:{name:"fade"}},[e("img",{key:s.id,staticClass:"square-content pr-1",staticStyle:{overflow:"hidden","object-fit":"cover"},attrs:{src:t.getPreviewUrl(s),width:"100%",height:"300",draggable:!1,loading:"lazy",onerror:"this.src='/storage/no-preview.png';this.onerror=null;"}})]),t._v(" "),-1!==t.selectedRecentPosts.indexOf(s.id)?e("div",{staticStyle:{position:"absolute",right:"-5px",bottom:"-5px"}},[e("div",{staticClass:"selected-badge"},[t._v(t._s(t.selectedRecentPosts.indexOf(s.id)+1))])]):t._e()],1)])}),0),t._v(" "),e("span",{on:{click:function(e){return t.recentPostsNext()}}},[e("i",{class:t.nextClass})])])]:e("div",{staticClass:"d-flex align-items-center justify-content-center py-5 my-5"},[e("div",{staticClass:"text-center"},[e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[t._v("Loading...")])]),t._v(" "),e("p",{staticClass:"text-muted"},[t._v("Loading recent posts...")])])])],2):"Customize"===t.tabIndex?e("div",{key:"2",staticClass:"col-12 mt-3 py-2"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},t._l(t.customizeSettings,function(s){return e("div",{staticClass:"card bg-dark mb-5"},[e("div",{staticClass:"card-header"},[t._v(t._s(s.title))]),t._v(" "),e("div",{staticClass:"list-group bg-dark"},t._l(s.items,function(s){return e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label"},[e("p",{staticClass:"mb-0"},[t._v(t._s(s.label))]),t._v(" "),s.description?e("p",{staticClass:"small text-muted mb-0"},[t._v(t._s(s.description))]):t._e()]),t._v(" "),e("div",{staticClass:"setting-switch mt-n1"},[e("b-form-checkbox",{attrs:{name:"check-button",size:"lg",switch:"",disabled:s.requiredWithTrue&&!t.settings[s.requiredWithTrue]},model:{value:t.settings[s.model],callback:function(e){t.$set(t.settings,s.model,e)},expression:"settings[item.model]"}})],1)])])}),0)])}),0),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card bg-dark mb-5"},[e("div",{staticClass:"card-header"},[t._v("Portfolio")]),t._v(" "),e("div",{staticClass:"list-group bg-dark"},[e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label"},[e("p",{staticClass:"mb-0"},[t._v("Layout")])]),t._v(" "),e("div",[e("b-form-select",{attrs:{options:t.profileLayoutOptions},model:{value:t.settings.profile_layout,callback:function(e){t.$set(t.settings,"profile_layout",e)},expression:"settings.profile_layout"}})],1)])]),t._v(" "),"custom"===t.settings.profile_source?e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label"},[e("p",{staticClass:"mb-0"},[t._v("Order")])]),t._v(" "),e("div",[e("b-form-select",{attrs:{options:t.profileLayoutFeedOrder},model:{value:t.settings.feed_order,callback:function(e){t.$set(t.settings,"feed_order",e)},expression:"settings.feed_order"}})],1)])]):t._e(),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label"},[e("p",{staticClass:"mb-0"},[t._v("Color Scheme")])]),t._v(" "),e("div",[e("b-form-select",{attrs:{options:t.profileLayoutColorSchemeOptions,disabled:"custom"===t.settings.color_scheme},on:{change:t.updateColorScheme},model:{value:t.settings.color_scheme,callback:function(e){t.$set(t.settings,"color_scheme",e)},expression:"settings.color_scheme"}})],1)])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label"},[e("p",{staticClass:"mb-0"},[t._v("Background Color")])]),t._v(" "),e("b-col",{attrs:{sm:"2"}},[e("b-form-input",{attrs:{debounce:"1000",type:"color"},on:{change:t.updateBackgroundColor},model:{value:t.settings.background_color,callback:function(e){t.$set(t.settings,"background_color",e)},expression:"settings.background_color"}}),t._v(" "),["#000000",null].includes(t.settings.background_color)?t._e():e("b-button",{attrs:{variant:"link"},on:{click:t.resetBackgroundColor}},[t._v("\n\t\t \t\t\tReset\n\t\t \t\t")])],1)],1)]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex justify-content-between align-items-center py-2"},[e("div",{staticClass:"setting-label"},[e("p",{staticClass:"mb-0"},[t._v("Text Color")])]),t._v(" "),e("b-col",{attrs:{sm:"2"}},[e("b-form-input",{attrs:{debounce:"1000",type:"color"},on:{change:t.updateTextColor},model:{value:t.settings.text_color,callback:function(e){t.$set(t.settings,"text_color",e)},expression:"settings.text_color"}}),t._v(" "),["#d4d4d8",null].includes(t.settings.text_color)?t._e():e("b-button",{attrs:{variant:"link"},on:{click:t.resetTextColor}},[t._v("\n\t\t \t\t\tReset\n\t\t \t\t")])],1)],1)])])])])])]):"Share"===t.tabIndex?e("div",{key:"3",staticClass:"col-12 col-md-8 bg-dark mt-3 py-2 rounded"},[e("div",{staticClass:"py-2"},[e("p",{staticClass:"text-muted"},[t._v("Portfolio URL")]),t._v(" "),e("p",{staticClass:"lead mb-0"},[e("a",{attrs:{href:t.settings.url}},[t._v(t._s(t.settings.url))])])])]):t._e()])],1)])},i=[]},30300(t,e,s){s.r(e);var a=s(62893),i=s(63288),o=s(89829),n=s.n(o);s(18650);window.Vue=a.default,a.default.use(i.default),a.default.use(n()),a.default.component("portfolio-post",s(57587).default),a.default.component("portfolio-profile",s(32072).default),a.default.component("portfolio-settings",s(62054).default)},57587(t,e,s){s.r(e),s.d(e,{default:()=>n});var a=s(13195),i=s(30352),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const n=(0,s(14486).default)(i.default,a.render,a.staticRenderFns,!1,null,null,null).exports},32072(t,e,s){s.r(e),s.d(e,{default:()=>n});var a=s(61779),i=s(94915),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const n=(0,s(14486).default)(i.default,a.render,a.staticRenderFns,!1,null,null,null).exports},62054(t,e,s){s.r(e),s.d(e,{default:()=>n});var a=s(96062),i=s(81333),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const n=(0,s(14486).default)(i.default,a.render,a.staticRenderFns,!1,null,null,null).exports},30352(t,e,s){s.r(e),s.d(e,{default:()=>o});var a=s(9713),i={};for(const t in a)"default"!==t&&(i[t]=()=>a[t]);s.d(e,i);const o=a.default},94915(t,e,s){s.r(e),s.d(e,{default:()=>o});var a=s(17e3),i={};for(const t in a)"default"!==t&&(i[t]=()=>a[t]);s.d(e,i);const o=a.default},81333(t,e,s){s.r(e),s.d(e,{default:()=>o});var a=s(19296),i={};for(const t in a)"default"!==t&&(i[t]=()=>a[t]);s.d(e,i);const o=a.default},13195(t,e,s){s.r(e);var a=s(91592),i={};for(const t in a)"default"!==t&&(i[t]=()=>a[t]);s.d(e,i)},61779(t,e,s){s.r(e);var a=s(10938),i={};for(const t in a)"default"!==t&&(i[t]=()=>a[t]);s.d(e,i)},96062(t,e,s){s.r(e);var a=s(52609),i={};for(const t in a)"default"!==t&&(i[t]=()=>a[t]);s.d(e,i)}},t=>{t.O(0,[3660],()=>{return e=30300,t(t.s=e);var e});t.O()}]); |