PageSourceSearch

https://www.homespun.com/assets/2.4.1/ActivityFeed.1c7b09ae.js

js homespun.com collected 2026-10-02 05:16:30 UTC 11,087 bytes, 1 lines download raw bytes

1import{v as R,cp as x,c1 as M,m as L,cq as Q,B as g,x as d,y as b,j as i,D as n,C as f,ao as E,M as w,z as A,O as S,I as u,ah as m,a1 as c,a3 as p,cr as B,bU as U,ai as F,aR as z,al as N,a4 as h,aj as T,V as _,a5 as V,cs as H,F as j,U as J,an as C,X as Y,H as Z,aU as k}from"./index.ccd35ebd.js";import{Q as O}from"./QScrollArea.06db0997.js";import X from"./ActivityItem.49099775.js";import G from"./ActivityNotificationsList.b578f306.js";import"./TouchPan.fe5c8598.js";import"./touch.6391c159.js";import"./Avatar.b85c0ce1.js";import"./Reactions.519d8ec3.js";import"./reactionOptionsMixin.7943d3d6.js";const K={components:{ActivityItem:X,PostModal:x,ActivityNotificationsList:G},props:["colorText"],mixins:[M],data(){return{loading:!1,activities:[],LAZY_LOAD_AMOUNT:30,openFullView:!1,notificationModalState:!1,displayedNotification:null,requiredContentsOwned:!1,showReaction:!0,lastViewedDate:null,seenThreadsOnHold:[],notificationSoundSaving:!1,pendingScrollToActivityId:null}},computed:{...L(["userPrefsForEnvironment","user","eJSON","environmentID","notifications"]),displayActivityBell(){var e;return this.user.userState=="signedIn"&&((e=this.feedIDsInEnv)==null?void 0:e.length)&&this.requiredContentsOwned},newActivitiesCount(){var e,t,a;return((t=(e=this.activities)==null?void 0:e.filter(l=>new Date(l==null?void 0:l.whenCreated)>new Date(this.lastViewedDate)))==null?void 0:t.length)+((a=this.notifications)==null?void 0:a.newNotificationsCount)},feedIDsInEnv(){var e;return(e=this.eJSON)==null?void 0:e.pages.reduce((t,a)=>(a.pageBlocks.forEach(l=>{l.componentName==="Feed"&&!l.hidden&&t.push(l.id)}),t),[])},feedInfo(){var e;return this.$store.getters["social/getFeedByID"]((e=this.displayedNotification)==null?void 0:e.feedID)},requiredContentsIDs(){var e,t,a,l;return(l=(a=(t=(e=this.eJSON)==null?void 0:e.globalProps)==null?void 0:t.social)==null?void 0:a.activity)==null?void 0:l.requiredContentIDs},notificationSoundForcedOff(){var e,t,a,l;return!!((l=(a=(t=(e=this.eJSON)==null?void 0:e.globalProps)==null?void 0:t.social)==null?void 0:a.activity)!=null&&l.disableSound)},notificationSoundEnabled:{get(){var e;return this.notificationSoundForcedOff?!1:!((e=this.userPrefsForEnvironment)!=null&&e.notificationSoundDisabled)},set(e){this.notificationSoundForcedOff||this.toggleNotificationSound()}}},methods:{async getActivities(e,t,a,l){var o;this.loading=!0,e===1&&(this.activities=[]);const s=await this.$store.dispatch("smartFetchFunnel",{endpoint:"social/getActivityForFeedIDs",payload:{feedIDs:this.feedIDsInEnv,environmentID:this.environmentID,includeReactionActivity:this.showReaction||a,pagination:{page:e,rowsPerPage:this.LAZY_LOAD_AMOUNT}},force:!a||l});if(s.success){const{data:v,lastViewedDate:y}=s,I=v.filter(D=>this.$store.getters["social/getFeedByID"](D.feedID));(o=this.seenThreadsOnHold)!=null&&o.length&&(this.seenThreadsOnHold.forEach(this.markThreadAsSeen),this.seenThreadsOnHold=[]),this.activities.push(...I),t(v.length<this.LAZY_LOAD_AMOUNT),this.$store.commit("notifications/setNewNotificationsCount",0),e==1&&(this.lastViewedDate=y,a||this.$apiPublic("remember/it",{logType:"userViewedSocialActivityFeed",description:"user viewed social activity feed",context:"social",environmentID:this.environmentID}))}else t(!0);this.loading=!1},async openInFullView(){var e;this.openFullView=!0,await this.$nextTick(),(e=this.$refs.virtualScroll)==null||e.trigger()},reload(){this.$refs.virtualScroll&&(this.activities=[],this.$refs.virtualScroll.stop(),this.$refs.virtualScroll.reset(),this.$refs.virtualScroll.resume(),this.$refs.virtualScroll.trigger())},async openNotification(e,t){if(t&&this.openInFullView(),this.notificationModalState=!1,this.displayedNotification=e,await this.$nextTick(),!this.feedInfo)return this.$q.notify({type:"warning",message:"The Post is no longer available"});this.notificationModalState=!0,this.$store.commit("social/setFocusFeedModalInput",!0),this.pendingScrollToActivityId=e.id,await this.$nextTick()},async checkRequiredContentsOwnership(){var e;this.loading=!0,this.requiredContentsOwned=(e=this.requiredContentsIDs)!=null&&e.length?await this.$store.dispatch("checkRequiredContentsOwnership",{contentIDs:this.requiredContentsIDs,some:!0}):!0,this.loading=!1},refresh(){this.reload()},getShowReactionPref(){const e=`${this.environmentID}_activity_reactions_state`;this.showReaction=localStorage.getItem(e)===null?!0:localStorage.getItem(e)==="true"},setShowReactionPref(){localStorage.setItem(`${this.environmentID}_activity_reactions_state`,this.showReaction)},markThreadAsSeen(e){var t,a;if(!((t=this.activities)!=null&&t.length)){this.seenThreadsOnHold.push(e);return}(a=this.activities)==null||a.forEach(l=>{(l.parentPostID===e.parentPostID||l.id===e.parentPostID||l.parentPostID===e.id||l.id===e.id)&&(l.seen=!0)})},async toggleNotificationSound(){var a;if(this.notificationSoundForcedOff)return;this.notificationSoundSaving=!0;const e=!((a=this.userPrefsForEnvironment)!=null&&a.notificationSoundDisabled);this.$store.commit("saveUserPrefsForEnvironment",{notificationSoundDisabled:e}),(await this.$api("userPrefs/saveUserPrefForEnvironment",{environmentID:this.environmentID,prefsToSave:{notificationSoundDisabled:e}})).success||this.$store.commit("saveUserPrefsForEnvironment",{notificationSoundDisabled:!e}),this.notificationSoundSaving=!1},handleFeedTreeReady(){this.pendingScrollToActivityId&&this.$refs.postModal&&(this.$refs.postModal.scrollTo(this.pendingScrollToActivityId),this.pendingScrollToActivityId=null)}}
1,created(){this.getShowReactionPref(),this._on("post-modal-opened",this.markThreadAsSeen)},async mounted(){await this.checkRequiredContentsOwnership(),this.displayActivityBell&&this.getActivities(1,()=>{},!0)},watch:{showReaction(){this.refresh(),this.setShowReactionPref()},requiredContentsIDs(){this.checkRequiredContentsOwnership()},"user.userState"(){this.checkRequiredContentsOwnership()},"$q.appVisible"(e){e&&Q()&&this.getActivities(1,()=>{},!0,!0)},newActivitiesCount(e){this.$store.commit("setNewActivitiesCount",e)}}},W={key:0},$={class:"bg-white no-scroll",style:{"max-width":"1400 !important",width:"1200px !important"}},ee={class:"row flex-center justify-between items-center align-center q-mx-auto"},te={class:"col"},ie={class:"row justify-center q-my-md"},ne={class:"col-8"},se={key:1,class:"text-center text-bold q-pa-xl text-body1"};function oe(e,t,a,l,s,o){const v=g("ActivityNotificationsList"),y=g("ActivityItem"),I=g("loading"),D=g("PostModal");return o.displayActivityBell?(d(),b("div",W,[i(S,{style:A(a.colorText),title:"notifications",dense:"","no-caps":"",loading:s.loading&&!s.openFullView,class:"q-mx-xs",flat:"",icon:"fa fa-bell",onClick:o.openInFullView},{default:n(()=>[(o.newActivitiesCount||!s.lastViewedDate)&&!s.loading?(d(),f(E,{key:0,floating:"",transparent:"",color:"red",label:o.newActivitiesCount?o.newActivitiesCount:""},null,8,["label"])):w("",!0)]),_:1},8,["style","loading","onClick"]),e.isPlayerRoute?w("",!0):(d(),f(v,{key:0,class:"text-black",onOpenNotification:o.openNotification},null,8,["onOpenNotification"])),i(Z,{modelValue:s.openFullView,"onUpdate:modelValue":t[3]||(t[3]=r=>s.openFullView=r),"full-height":"","full-width":"",maximized:e.$q.screen.lt.md,persistent:e.$q.screen.lt.md,onHide:t[4]||(t[4]=r=>s.lastViewedDate=new Date)},{default:n(()=>[u("div",$,[u("div",{class:"justify-between row",style:A({color:"white",background:e.$store.getters.brandColor})},[i(m,{class:"text-body2 q-pa-md"},{default:n(()=>t[5]||(t[5]=[c("Notifications")])),_:1}),p(i(S,{icon:"fa fa-times",size:"sm",flat:"",unelevated:""},null,512),[[k]])],4),i(B,{class:"bg-grey-3"},{default:n(()=>[i(U),i(S,{icon:s.loading?"fa fa-spinner fa-spin":"fa fa-sync",disable:s.loading,round:"",size:"xs",class:"q-mr-sm",onClick:o.refresh},{default:n(()=>[i(F,null,{default:n(()=>t[6]||(t[6]=[c("Refresh notifications")])),_:1})]),_:1},8,["icon","disable","onClick"]),i(S,{icon:"fa fa-cog",round:"",size:"xs"},{default:n(()=>[i(z,null,{default:n(()=>[i(N,{style:{"min-width":"200px"}},{default:n(()=>[p((d(),f(V,null,{default:n(()=>[i(h,{avatar:""},{default:n(()=>[i(T,{name:"fa fa-thumbs-up"})]),_:1}),i(h,null,{default:n(()=>[i(m,null,{default:n(()=>t[7]||(t[7]=[c("Show Reactions")])),_:1}),i(m,{caption:""},{default:n(()=>t[8]||(t[8]=[c("Display reaction notifications")])),_:1})]),_:1}),i(h,{side:""},{default:n(()=>[i(_,{modelValue:s.showReaction,"onUpdate:modelValue":t[0]||(t[0]=r=>s.showReaction=r),disable:s.loading},null,8,["modelValue","disable"])]),_:1})]),_:1})),[[k]]),o.notificationSoundForcedOff?w("",!0):p((d(),f(V,{key:0},{default:n(()=>[i(h,{avatar:""},{default:n(()=>[i(T,{name:"fa fa-volume-up"})]),_:1}),i(h,null,{default:n(()=>[i(m,null,{default:n(()=>t[9]||(t[9]=[c("Notification Sound")])),_:1}),i(m,{caption:""},{default:n(()=>t[10]||(t[10]=[c("Play sound for new notifications")])),_:1})]),_:1}),i(h,{side:""},{default:n(()=>[i(_,{modelValue:o.notificationSoundEnabled,"onUpdate:modelValue":t[1]||(t[1]=r=>o.notificationSoundEnabled=r),loading:s.notificationSoundSaving,disable:s.loading||s.notificationSoundSaving},null,8,["modelValue","loading","disable"])]),_:1})]),_:1})),[[k]])]),_:1})]),_:1}),i(F,null,{default:n(()=>t[11]||(t[11]=[c("Settings")])),_:1})]),_:1})]),_:1}),u("div",ee,[u("div",te,[i(O,{style:A(`height: ${e.$q.screen.lt.md?"calc(100vh - 104px)":"calc(100vh - 148px)"} `),class:"bg-grey-1"},{default:n(()=>[i(H,{ref:"virtualScroll",offset:500,onLoad:o.getActivities},{loading:n(()=>[u("div",ie,[i(I)])]),default:n(()=>[(d(!0),b(j,null,J(s.activities,(r,q)=>(d(),f(N,{key:q},{default:n(()=>[i(y,{activity:r,"last-viewed-date":s.lastViewedDate,onOpenNotification:P=>o.openNotification(r),onMarkThreadAsSeen:P=>o.markThreadAsSeen(r)},null,8,["activity","last-viewed-date","onOpenNotification","onMarkThreadAsSeen"])]),_:2},1024))),128))]),_:1},8,["onLoad"])]),_:1},8,["style"])]),p(i(Y,{vertical:""}
1,null,512),[[C,e.$q.screen.gt.sm]]),p(u("div",ne,[i(O,{style:"height: calc(100vh - 150px)"},{default:n(()=>[s.notificationModalState&&s.displayedNotification?(d(),f(D,{key:0,ref:"postModal","post-modal-state":s.notificationModalState,"onUpdate:postModalState":t[2]||(t[2]=r=>s.notificationModalState=r),"prevent-interactions":o.feedInfo.onlyAdmins,"display-block":e.$q.screen.gt.sm,height:e.$q.screen.gt.sm?"calc(100vh - 150px)":null,post:{id:s.displayedNotification.parentPostID,parentID:s.displayedNotification.feedID},"required-content-i-ds":o.feedInfo.requiredContentIDs,"hide-instant-recording-options":o.feedInfo.hideInstantRecordingOptions,resolvable:o.feedInfo.resolvable,disableLinksPreview:o.feedInfo.disableLinksPreview,showVipIndicator:o.feedInfo.showVipIndicator,onFeedTreeReady:o.handleFeedTreeReady},null,8,["post-modal-state","prevent-interactions","display-block","height","post","required-content-i-ds","hide-instant-recording-options","resolvable","disableLinksPreview","showVipIndicator","onFeedTreeReady"])):(d(),b("div",se," Click a notification "))]),_:1})],512),[[C,e.$q.screen.gt.sm]])])])]),_:1},8,["modelValue","maximized","persistent"])])):w("",!0)}var pe=R(K,[["render",oe]]);export{pe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.