mirror of https://github.com/pixelfed/pixelfed.git
25 lines
23 KiB
JavaScript
25 lines
23 KiB
JavaScript
|
"use strict";(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([["groups-profile"],{"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/GroupProfile.vue?vue&type=script&lang=js":
|
||
|
/*!**********************************************************************************************************************************************************************************************************!*\
|
||
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/GroupProfile.vue?vue&type=script&lang=js ***!
|
||
|
\**********************************************************************************************************************************************************************************************************/(e,t,s)=>{s.r(t),s.d(t,{default:()=>i});var o=s(/*! @/groups/partials/GroupStatus.vue */"./resources/assets/components/groups/partials/GroupStatus.vue"),n=s(/*! jquery */"./node_modules/jquery/dist/jquery.js");const i={props:{gid:{type:String},pid:{type:String}},components:{"group-status":o.default},data:function(){return{loaded:!1,currentProfile:{},roleTitle:"Member",group:{},profile:{},relationship:{following:!1},feed:[],ids:[],feedLoaded:!1,feedEmpty:!1,page:1,canIntersect:!1,commonIntersects:[]}},beforeMount:function(){n("body").css("background-color","#f0f2f5")},mounted:function(){this.fetchGroup(),this.$nextTick((function(){n('[data-toggle="tooltip"]').tooltip()}))},methods:{fetchGroup:function(){var e=this;axios.get("/api/v0/groups/"+this.gid).then((function(t){e.group=t.data})).finally((function(){e.fetchSelfProfile()}))},fetchSelfProfile:function(){var e=this;axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(t){e.currentProfile=t.data})).catch((function(t){e.$router.push("/groups/"+e.gid)})).finally((function(){e.fetchProfile()})),this.$nextTick((function(){n('[data-toggle="tooltip"]').tooltip()}))},fetchProfile:function(){var e=this;axios.get("/api/v0/groups/accounts/"+this.gid+"/"+this.pid).then((function(t){e.profile=t.data,"founder"==t.data.group.role&&(e.roleTitle="Admin")})),window._sharedData.user.id!=this.pid?axios.get("/api/v1/accounts/relationships?id[]="+this.pid).then((function(t){e.relationship=t.data[0]})).finally((function(){e.fetchInitialFeed()})):this.fetchInitialFeed()},fetchInitialFeed:function(){var e=this;window._sharedData.user&&window._sharedData.user.id!=this.pid&&this.fetchCommonIntersections(),axios.get("/api/v0/groups/".concat(this.gid,"/user/").concat(this.pid,"/feed")).then((function(t){e.feed=t.data.filter((function(t){return"reply:text"!=t.pf_type||t.account.id!=e.profile.id})),e.feedLoaded=!0,e.feedEmpty=0==e.feed.length,e.page++,e.loaded=!0})).catch((function(t){e.$router.push("/groups/"+e.gid),console.log(t)}))},infiniteFeed:function(e){var t=this;0!=this.feed.length?axios.get("/api/v0/groups/".concat(this.group.id,"/user/").concat(this.profile.id,"/feed"),{params:{page:this.page}}).then((function(s){if(s.data.length){var o=s.data.filter((function(e){return"reply:text"!=e.pf_type||e.account.id!=t.profile.id})),n=t;o.forEach((function(e){-1==n.ids.indexOf(e.id)&&(n.ids.push(e.id),n.feed.push(e))})),e.loaded(),t.page++}else e.complete()})):e.complete()},fetchCommonIntersections:function(){var e=this;axios.get("/api/v0/groups/member/intersect/common",{params:{gid:this.gid,pid:this.pid}}).then((function(t){e.commonIntersects=t.data,e.canIntersect=t.data.groups.length||t.data.topics.length}))},formatJoinedDate:function(e){var t=new Date(e);return new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long"}).format(t)}}}},"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/GroupProfile.vue?vue&type=template&id=61a7984f":
|
||
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/GroupProfile.vue?vue&type=template&id=61a7984f ***!
|
||
|
\*********************************************************************************************************************************************************************************************************************************************************************************************/(e,t,s)=>{s.r(t),s.d(t,{render:()=>o,staticRenderFns:()=>n});var o=function(){var e,t=this,s=t._self._c;return s("div",{staticClass:"group-profile-component w-100 h-100"},[t.loaded?[s("div",{staticClass:"bg-white mb-3 border-bottom"},[s("div",{staticClass:"container-xl header"},[s("div",{staticClass:"header-jumbotron"}),t._v(" "),s("div",{staticClass:"header-profile-card"},[s("img",{staticClass:"avatar",attrs:{src:t.profile.avatar,onerror:"this.onerror=null;this.src='/storage/avatars/default.png?v=2'"}}),t._v(" "),s("p",{staticClass:"name"},[t._v("\n "+t._s(t.profile.display_name)+"\n ")]),t._v(" "),s("p",{staticClass:"username text-muted"},[t.profile.local?s("span",[t._v("@"+t._s(t.profile.username))]):s("span",[t._v(t._s(t.profile.acct))]),t._v(" "),t.profile.is_admin?s("span",{staticClass:"text-danger ml-1",attrs:{title:"Site administrator","data-toggle":"tooltip","data-placement":"bottom"}},[s("i",{staticClass:"far fa-users-crown"})]):t._e()])]),t._v(" "),s("div",{staticClass:"header-navbar"},[s("div"),t._v(" "),s("div",[t.currentProfile.id===t.profile.id?s("a",{staticClass:"btn btn-light font-weight-bold mr-2",attrs:{href:"/settings/home"}},[s("i",{staticClass:"fas fa-edit mr-1"}),t._v(" Edit Profile\n ")]):t._e(),t._v(" "),t.relationship.following?s("a",{staticClass:"btn btn-primary font-weight-bold mr-2",attrs:{href:t.profile.url}},[s("i",{staticClass:"far fa-comment-alt-dots mr-1"}),t._v(" Message\n ")]):t._e(),t._v(" "),t.relationship.following?s("a",{staticClass:"btn btn-light font-weight-bold mr-2",attrs:{href:t.profile.url}},[s("i",{staticClass:"fas fa-user-check mr-1"}),t._v(" "+t._s(t.relationship.followed_by?"Friends":"Following")+"\n ")]):t._e(),t._v(" "),t.relationship.following?t._e():s("a",{staticClass:"btn btn-light font-weight-bold mr-2",attrs:{href:t.profile.url}},[s("i",{staticClass:"fas fa-user mr-1"}),t._v(" View Main Profile\n ")]),t._v(" "),s("div",{staticClass:"dropdown"},[t._m(1),t._v(" "),s("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"amenu"}},[t.currentProfile.id!=t.profile.id?s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:"/i/report?type=user&id=".concat(t.profile.id)}},[t._v("Report")]):t._e(),t._v(" "),t.currentProfile.id==t.profile.id?s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:"#"}},[t._v("Leave Group")]):t._e()])])])])])]),t._v(" "),s("div",{staticClass:"w-100 h-100 group-profile-feed"},[s("div",{staticClass:"container-xl"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-md-5"},[s("div",{staticClass:"card card-body shadow-sm infolet"},[s("h5",{staticClass:"font-weight-bold mb-3"},[t._v("Intro")]),t._v(" "),t.profile.local?t._e():s("div",{staticClass:"media mb-3 align-items-center"},[t._m(2),t._v(" "),s("div",{staticClass:"media-body"},[t._v("\n Remote member from "),s("strong",[t._v(t._s(t.profile.acct.split("@")[1]))])])]),t._v(" "),s("div",{staticClass:"media align-items-center"},[t._m(3),t._v(" "),s("div",{staticClass:"media-body"},[t._v("\n "+t._s(t.roleTitle)+" of "),s("strong",[t._v(t._s(t.group.name))]),t._v(" since "+t._s(t.formatJoinedDate(null===(e=t.profile.group)||void 0===e?void 0:e.joined))+"\n ")])])]),t._v(" "),t.canIntersect?s("div",{staticClass:"card card-body shadow-sm infolet"},[s("h5",{staticClass:"font-weight-bold mb-3"},[t._v("Things in Common")]),t._v(" "),t.commonIntersects.friends.length?t._m(5):t._e(),t._v(" "),t.commonIntersects.groups.length?s("div",{staticClass:"media mb-3 align-items-center"},[t._m(6),t._v(" "),s("div",{staticClass:"media-body"},[t._v("
|
||
|
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||
|
!*** ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/GroupProfile.vue?vue&type=style&index=0&id=61a7984f&lang=scss ***!
|
||
|
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/(e,t,s)=>{s.r(t),s.d(t,{default:()=>i});var o=s(/*! ../../../node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js */"./node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js"),n=s.n(o)()((function(e){return e[1]}));n.push([e.id,".group-profile-component {\n background-color: #f0f2f5;\n}\n.group-profile-component .header-jumbotron {\n background-color: #F3F4F6;\n height: 320px;\n border-bottom-left-radius: 20px;\n border-bottom-right-radius: 20px;\n}\n.group-profile-component .header-profile-card {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n.group-profile-component .header-profile-card .avatar {\n width: 170px;\n height: 170px;\n border-radius: 50%;\n margin-top: -150px;\n margin-bottom: 20px;\n}\n.group-profile-component .header-profile-card .name {\n font-size: 30px;\n line-height: 30px;\n font-weight: 700;\n text-align: center;\n margin-bottom: 6px;\n}\n.group-profile-component .header-profile-card .username {\n font-size: 16px;\n font-weight: 500;\n text-align: center;\n}\n.group-profile-component .header-navbar {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 60px;\n border-top: 1px solid #F3F4F6;\n}\n.group-profile-component .header-navbar .dropdown {\n display: inline-block;\n}\n.group-profile-component .header-navbar .dropdown-toggle:after {\n display: none;\n}\n.group-profile-component .group-profile-feed {\n min-height: 500px;\n}\n.group-profile-component .infolet {\n margin-bottom: 1rem;\n}\n.group-profile-component .infolet .media-icon {\n display: flex;\n justify-content: center;\n width: 30px;\n margin-right: 10px;\n}\n.group-profile-component .infolet .media-icon i {\n font-size: 1.1rem;\n color: #D1D5DB !important;\n}\n.group-profile-component .btn-light {\n border-color: #F3F4F6;\n}",""]);const i=n},"./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/GroupProfile.vue?vue&type=style&index=0&id=61a7984f&lang=scss":
|
||
|
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/GroupProfile.vue?vue&type=style&index=0&id=61a7984f&lang=scss ***!
|
||
|
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/(e,t,s)=>{s.r(t),s.d(t,{default:()=>r});var o=s(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),n=s.n(o),i=s(/*! !!../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GroupProfile.vue?vue&type=style&index=0&id=61a7984f&lang=scss */"./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/GroupProfile.vue?vue&type=style&index=0&id=61a7984f&lang=scss"),a={insert:"head",singleton:!1};n()(i.default,a);const r=i.default.locals||{}},"./resources/assets/components/GroupProfile.vue":
|
||
|
/*!******************************************************!*\
|
||
|
!*** ./resources/assets/components/GroupProfile.vue ***!
|
||
|
\******************************************************/(e,t,s)=>{s.r(t),s.d(t,{default:()=>r});var o=s(/*! ./GroupProfile.vue?vue&type=template&id=61a7984f */"./resources/assets/components/GroupProfile.vue?vue&type=template&id=61a7984f"),n=s(/*! ./GroupProfile.vue?vue&type=script&lang=js */"./resources/assets/components/GroupProfile.vue?vue&type=script&lang=js"),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);s.d(t,i);s(/*! ./GroupProfile.vue?vue&type=style&index=0&id=61a7984f&lang=scss */"./resources/assets/components/GroupProfile.vue?vue&type=style&index=0&id=61a7984f&lang=scss");var a=(0,s(/*! !../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */"./node_modules/vue-loader/lib/runtime/componentNormalizer.js").default)(n.default,o.render,o.staticRenderFns,!1,null,null,null);a.options.__file="resources/assets/components/GroupProfile.vue";const r=a.exports},"./resources/assets/components/GroupProfile.vue?vue&type=script&lang=js":
|
||
|
/*!******************************************************************************!*\
|
||
|
!*** ./resources/assets/components/GroupProfile.vue?vue&type=script&lang=js ***!
|
||
|
\******************************************************************************/(e,t,s)=>{s.r(t),s.d(t,{default:()=>i});var o=s(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GroupProfile.vue?vue&type=script&lang=js */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/GroupProfile.vue?vue&type=script&lang=js"),n={};for(const e in o)"default"!==e&&(n[e]=()=>o[e]);s.d(t,n);const i=o.default},"./resources/assets/components/GroupProfile.vue?vue&type=template&id=61a7984f":
|
||
|
/*!************************************************************************************!*\
|
||
|
!*** ./resources/assets/components/GroupProfile.vue?vue&type=template&id=61a7984f ***!
|
||
|
\************************************************************************************/(e,t,s)=>{s.r(t);var o=s(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GroupProfile.vue?vue&type=template&id=61a7984f */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/GroupProfile.vue?vue&type=template&id=61a7984f"),n={};for(const e in o)"default"!==e&&(n[e]=()=>o[e]);s.d(t,n)},"./resources/assets/components/GroupProfile.vue?vue&type=style&index=0&id=61a7984f&lang=scss":
|
||
|
/*!***************************************************************************************************!*\
|
||
|
!*** ./resources/assets/components/GroupProfile.vue?vue&type=style&index=0&id=61a7984f&lang=scss ***!
|
||
|
\***************************************************************************************************/(e,t,s)=>{s.r(t);var o=s(/*! -!../../../node_modules/style-loader/dist/cjs.js!../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GroupProfile.vue?vue&type=style&index=0&id=61a7984f&lang=scss */"./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/GroupProfile.vue?vue&type=style&index=0&id=61a7984f&lang=scss"),n={};for(const e in o)"default"!==e&&(n[e]=()=>o[e]);s.d(t,n)}}]);
|