forked from mirror/pixelfed
1 line
No EOL
24 KiB
JavaScript
Vendored
1 line
No EOL
24 KiB
JavaScript
Vendored
"use strict";(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[784],{13310:(t,e,i)=>{i.r(e),i.d(e,{default:()=>d});var a=i(42755),n=i(88231),s=i(18303),o=i(73128),r=i(78423);function c(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return l(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}const d={components:{drawer:a.default,sidebar:n.default,intersect:r.default,notification:s.default,placeholder:o.default},data:function(){return{isLoaded:!1,profile:void 0,ids:[],notifications:void 0,notificationsLoaded:!1,max_id:void 0,canLoadMore:!0,isIntersecting:!1,tabIndex:0,tabs:[{id:"all",name:"All",icon:"far fa-bell",types:[]},{id:"mentions",name:"Mentions",description:"Replies to your posts and posts you were mentioned in",icon:"far fa-at",types:["comment","mention"]},{id:"likes",name:"Likes",description:"Accounts that liked your posts",icon:"far fa-heart",types:["favourite"]},{id:"followers",name:"Followers",description:"Accounts that followed you",icon:"far fa-user-plus",types:["follow"]},{id:"reblogs",name:"Reblogs",description:"Accounts that shared or reblogged your posts",icon:"far fa-retweet",types:["share"]},{id:"direct",name:"DMs",description:"Direct messages you have with other accounts",icon:"far fa-envelope",types:["direct"]}],tabSwitching:!1,filteredFeed:[],filteredLoaded:!1,filteredIsIntersecting:!1,filteredMaxId:void 0,canLoadMoreFiltered:!0,filterPaginationTimeout:void 0,filteredIterations:0,filteredEmpty:!1,followRequests:[],followRequestsChecked:!1,followRequestsPage:1}},updated:function(){},mounted:function(){this.profile=window._sharedData.user,this.isLoaded=!0,this.profile.locked&&this.fetchFollowRequests(),this.fetchNotifications()},methods:{fetchNotifications:function(){var t=this;axios.get("/api/pixelfed/v1/notifications?pg=true").then((function(e){var i,a=e.data.filter((function(t){return!("share"==t.type&&!t.status)&&(!("comment"==t.type&&!t.status)&&(!("mention"==t.type&&!t.status)&&(!("favourite"==t.type&&!t.status)&&!("follow"==t.type&&!t.account))))})),n=e.data.map((function(t){return t.id}));t.max_id=Math.min.apply(Math,c(n)),(i=t.ids).push.apply(i,c(n)),t.notifications=a,t.notificationsLoaded=!0}))},enterIntersect:function(){var t=this;this.isIntersecting||isFinite(this.max_id)&&(this.isIntersecting=!0,axios.get("/api/pixelfed/v1/notifications",{params:{max_id:this.max_id}}).then((function(e){var i;e.data.length||(t.canLoadMore=!1);var a=e.data.map((function(t){return t.id}));t.max_id=Math.min.apply(Math,c(a)),(i=t.notifications).push.apply(i,c(e.data)),t.isIntersecting=!1})))},toggleTab:function(t){this.tabSwitching=!0,this.filteredEmpty=!1,this.filteredIterations=0,this.filterFeed(this.tabs[t].id)},filterFeed:function(t){var e=this;switch(t){case"all":this.tabIndex=0,this.filteredFeed=[],this.filteredLoaded=!1,this.filteredIsIntersecting=!1,this.filteredMaxId=void 0,this.canLoadMoreFiltered=!1,this.tabSwitching=!1;break;case"mentions":this.tabIndex=1,this.filteredMaxId=this.max_id,this.filteredFeed=this.notifications.filter((function(t){return e.tabs[e.tabIndex].types.includes(t.type)})),this.filteredIsIntersecting=!1,this.tabSwitching=!1,this.canLoadMoreFiltered=!0,this.filteredLoaded=!0;break;case"likes":this.tabIndex=2,this.filteredMaxId=this.max_id,this.filteredFeed=this.notifications.filter((function(t){return"favourite"===t.type})),this.filteredIsIntersecting=!1,this.tabSwitching=!1,this.canLoadMoreFiltered=!0,this.filteredLoaded=!0;break;case"followers":this.tabIndex=3,this.filteredMaxId=this.max_id,this.filteredFeed=this.notifications.filter((function(t){return"follow"===t.type})),this.filteredIsIntersecting=!1,this.tabSwitching=!1,this.canLoadMoreFiltered=!0,this.filteredLoaded=!0;break;case"reblogs":this.tabIndex=4,this.filteredMaxId=this.max_id,this.filteredFeed=this.notifications.filter((function(t){return"share"===t.type})),this.filteredIsIntersecting=!1,this.tabSwitching=!1,this.canLoadMoreFiltered=!0,this.filteredLoaded=!0;break;case"direct":this.tabIndex=5,this.filteredMaxId=this.max_id,this.filteredFeed=this.notifications.filter((function(t){return"direct"===t.type})),this.filteredIsIntersecting=!1,this.tabSwitching=!1,this.canLoadMoreFiltered=!0,this.filteredLoaded=!0}},enterFilteredIntersect:function(){var t=this;this.filteredIsIntersecting||this.filteredIterations>10?0==this.filteredFeed.length&&(this.filteredEmpty=!0):isFinite(this.max_id)&&isFinite(this.filteredMaxId)?(this.filteredIsIntersecting=!0,axios.get("/api/pixelfed/v1/notifications",{params:{max_id:this.filteredMaxId,limit:40}}).then((function(e){var i,a=e.data.map((function(t){return t.id})),n=Math.min.apply(Math,c(a));n<t.max_id&&(t.max_id=n,e.data.forEach((function(e){-1==t.ids.indexOf(e.id)?(t.ids.push(e.id),t.notifications.push(e)):console.log("dupe notification id "+e.id)}))),t.filteredIterations++,t.filterPaginationTimeout&&t.filterPaginationTimeout<500&&clearTimeout(t.filterPaginationTimeout),e.data&&e.data.length||(t.canLoadMoreFiltered=!1),e.data.length||(t.canLoadMoreFiltered=!1);var s=e.data.map((function(t){return t.id}));t.filteredMaxId=Math.min.apply(Math,c(s));var o=t.tabs[t.tabIndex].types,r=e.data.filter((function(t){return o.includes(t.type)}));(i=t.filteredFeed).push.apply(i,c(r)),t.filteredIsIntersecting=!1,t.filteredFeed.length<10&&setTimeout((function(){return t.enterFilteredIntersect()}),500),t.filterPaginationTimeout=setTimeout((function(){t.canLoadMoreFiltered=!1}),2e3)})).catch((function(e){t.canLoadMoreFiltered=!1}))):this.canLoadMoreFiltered=!1},fetchFollowRequests:function(){var t=this;axios.get("/account/follow-requests.json").then((function(e){var i;1==t.followRequestsPage?(t.followRequests=e.data,t.followRequestsChecked=!0):(i=t.followRequests.accounts).push.apply(i,c(e.data.accounts));t.followRequestsPage++}))},showFollowRequests:function(){this.tabSwitching=!1,this.filteredEmpty=!1,this.filteredIterations=0,this.tabIndex=10},handleFollowRequest:function(t,e){var i=this;window.confirm("Are you sure you want to "+t+" this follow request?")&&axios.post("/account/follow-requests",{action:t,id:this.followRequests.accounts[e].rid}).then((function(t){i.followRequests.count--,i.followRequests.accounts.splice(e,1),i.toggleTab(0)}))},truncate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40;return _.truncate(t,{length:e})}}}},96668:(t,e,i)=>{i.r(e),i.d(e,{default:()=>a});const a={props:{n:{type:Object}},data:function(){return{profile:window._sharedData.user}},methods:{truncate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30;return t.length<=e?t:t.slice(0,e)+"..."},timeAgo:function(t){var e=Date.parse(t),i=Math.floor((new Date-e)/1e3),a=Math.floor(i/31536e3);return a>=1?a+"y":(a=Math.floor(i/604800))>=1?a+"w":(a=Math.floor(i/86400))>=1?a+"d":(a=Math.floor(i/3600))>=1?a+"h":(a=Math.floor(i/60))>=1?a+"m":Math.floor(i)+"s"},mentionUrl:function(t){return"/p/"+t.account.username+"/"+t.id},followProfile:function(t){var e=this,i=t.account.id;axios.post("/i/follow",{item:i}).then((function(t){e.notifications.map((function(t){t.account.id===i&&(t.relationship.following=!0)}))})).catch((function(t){t.response.data.message&&swal("Error",t.response.data.message,"error")}))},viewContext:function(t){switch(t.type){case"follow":return this.getProfileUrl(t.account);case"mention":return t.status.url;case"like":case"favourite":case"comment":return this.getPostUrl(t.status);case"tagged":return t.tagged.post_url;case"direct":return"/account/direct/t/"+t.account.id}return"/"},displayProfileUrl:function(t){return"/i/web/profile/".concat(t.id)},displayPostUrl:function(t){return"/i/web/post/".concat(t.id)},getProfileUrl:function(t){this.$router.push({name:"profile",path:"/i/web/profile/".concat(t.id),params:{id:t.id,cachedProfile:t,cachedUser:this.profile}})},getPostUrl:function(t){this.$router.push({name:"post",path:"/i/web/post/".concat(t.id),params:{id:t.id,cachedStatus:t,cachedProfile:this.profile}})}}}},44467:(t,e,i)=>{i.r(e),i.d(e,{default:()=>s});var a=i(23645),n=i.n(a)()((function(t){return t[1]}));n.push([t.id,".notification-metro-component .notification-filters .nav-link[data-v-0a315271]{font-size:12px}.notification-metro-component .notification-filters .nav-link.active[data-v-0a315271]{font-weight:700}.notification-metro-component .notification-filters .nav-link-icon[data-v-0a315271]:not(.active){opacity:.5}.notification-metro-component .notification-filters .nav-link[data-v-0a315271]:not(.active){color:#9ca3af}",""]);const s=n},96714:(t,e,i)=>{i.r(e),i.d(e,{default:()=>r});var a=i(93379),n=i.n(a),s=i(44467),o={insert:"head",singleton:!1};n()(s.default,o);const r=s.default.locals||{}},73209:(t,e,i)=>{i.r(e),i.d(e,{default:()=>o});var a=i(80977),n=i(36489),s={};for(const t in n)"default"!==t&&(s[t]=()=>n[t]);i.d(e,s);i(88790);const o=(0,i(51900).default)(n.default,a.render,a.staticRenderFns,!1,null,"0a315271",null).exports},18303:(t,e,i)=>{i.r(e),i.d(e,{default:()=>o});var a=i(94013),n=i(98522),s={};for(const t in n)"default"!==t&&(s[t]=()=>n[t]);i.d(e,s);const o=(0,i(51900).default)(n.default,a.render,a.staticRenderFns,!1,null,null,null).exports},36489:(t,e,i)=>{i.r(e),i.d(e,{default:()=>s});var a=i(13310),n={};for(const t in a)"default"!==t&&(n[t]=()=>a[t]);i.d(e,n);const s=a.default},98522:(t,e,i)=>{i.r(e),i.d(e,{default:()=>s});var a=i(96668),n={};for(const t in a)"default"!==t&&(n[t]=()=>a[t]);i.d(e,n);const s=a.default},88790:(t,e,i)=>{i.r(e);var a=i(96714),n={};for(const t in a)"default"!==t&&(n[t]=()=>a[t]);i.d(e,n)},80977:(t,e,i)=>{i.r(e);var a=i(34194),n={};for(const t in a)"default"!==t&&(n[t]=()=>a[t]);i.d(e,n)},94013:(t,e,i)=>{i.r(e);var a=i(93386),n={};for(const t in a)"default"!==t&&(n[t]=()=>a[t]);i.d(e,n)},34194:(t,e,i)=>{i.r(e),i.d(e,{render:()=>a,staticRenderFns:()=>n});var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"web-wrapper notification-metro-component"},[t.isLoaded?i("div",{staticClass:"container-fluid mt-3"},[i("div",{staticClass:"row"},[i("div",{staticClass:"col-md-3 d-md-block"},[i("sidebar",{attrs:{user:t.profile}})],1),t._v(" "),i("div",{staticClass:"col-md-9 col-lg-9 col-xl-5 offset-xl-1"},[0===t.tabIndex?[i("h1",{staticClass:"font-weight-bold"},[t._v("\n\t\t\t\t\t\tNotifications\n\t\t\t\t\t")]),t._v(" "),i("p",{staticClass:"small mt-n2"},[t._v(" ")])]:10===t.tabIndex?[i("div",{staticClass:"d-flex align-items-center mb-3"},[i("a",{staticClass:"text-muted",staticStyle:{opacity:"0.3"},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.tabIndex=0}}},[i("i",{staticClass:"far fa-chevron-circle-left fa-2x mr-3",attrs:{title:"Go back to notifications"}})]),t._v(" "),i("h1",{staticClass:"font-weight-bold"},[t._v("\n\t\t\t\t\t\t\tFollow Requests\n\t\t\t\t\t\t")])])]:[i("h1",{staticClass:"font-weight-bold"},[t._v("\n\t\t\t\t\t\t"+t._s(t.tabs[t.tabIndex].name)+"\n\t\t\t\t\t")]),t._v(" "),i("p",{staticClass:"small text-lighter mt-n2"},[t._v(t._s(t.tabs[t.tabIndex].description))])],t._v(" "),10!=t.tabIndex&&t.notificationsLoaded&&t.notifications.length?i("ul",{staticClass:"notification-filters nav nav-tabs nav-fill mb-3"},t._l(t.tabs,(function(e,a){return i("li",{staticClass:"nav-item"},[i("a",{staticClass:"nav-link",class:{active:t.tabIndex===a},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleTab(a)}}},[i("i",{staticClass:"mr-1 nav-link-icon",class:[e.icon]}),t._v(" "),i("span",{staticClass:"d-none d-xl-inline-block"},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(e.name)+"\n\t\t\t\t\t\t\t")])])])})),0):t._e(),t._v(" "),t.tabSwitching?i("div",[i("placeholder")],1):i("div",[0===t.tabIndex?i("div",[t.followRequests&&t.followRequests.hasOwnProperty("accounts")&&t.followRequests.accounts.length?i("div",{staticClass:"card card-body shadow-none border border-warning rounded-pill mb-3 py-2"},[i("div",{staticClass:"media align-items-center"},[i("i",{staticClass:"far fa-exclamation-circle mr-3 text-warning"}),t._v(" "),i("div",{staticClass:"media-body"},[i("p",{staticClass:"mb-0"},[i("strong",[t._v(t._s(t.followRequests.count)+" follow "+t._s(t.followRequests.count>1?"requests":"request"))])])]),t._v(" "),i("a",{staticClass:"ml-2 small d-flex font-weight-bold primary text-uppercase mb-0",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showFollowRequests()}}},[t._v("\n\t\t\t\t\t\t\t\t\tView"),i("span",{staticClass:"d-none d-md-block"},[t._v(" Follow Requests")])])])]):t._e(),t._v(" "),t.notificationsLoaded?i("div",[t._l(t.notifications,(function(t,e){return i("notification",{key:"notification:"+e+":"+t.id,attrs:{n:t}})})),t._v(" "),t.notifications&&t.notificationsLoaded&&!t.notifications.length?i("div",[i("div",{staticClass:"row justify-content-center"},[i("div",{staticClass:"col-12 col-md-10 text-center"},[i("img",{staticClass:"img-fluid",staticStyle:{opacity:"0.6"},attrs:{src:"/img/illustrations/dk-nature-man-monochrome.svg"}}),t._v(" "),i("p",{staticClass:"lead text-muted font-weight-bold"},[t._v(t._s(t.$t("notifications.noneFound")))])])])]):t._e(),t._v(" "),t.canLoadMore?i("div",[i("intersect",{on:{enter:t.enterIntersect}},[i("placeholder")],1)],1):t._e()],2):i("div",[i("placeholder")],1)]):10===t.tabIndex?i("div",[t.followRequests&&t.followRequests.accounts&&t.followRequests.accounts.length?i("div",{staticClass:"list-group"},t._l(t.followRequests.accounts,(function(e,a){return i("div",{staticClass:"list-group-item"},[i("div",{staticClass:"media align-items-center"},[i("router-link",{staticClass:"primary",attrs:{to:"/i/web/profile/"+e.account.id}},[i("img",{staticClass:"rounded-lg shadow mr-3",attrs:{src:e.avatar,width:"80",height:"80",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}})]),t._v(" "),i("div",{staticClass:"media-body mr-3"},[i("p",{staticClass:"font-weight-bold mb-0 text-break",staticStyle:{"font-size":"17px"}},[i("router-link",{staticClass:"primary",attrs:{to:"/i/web/profile/"+e.account.id}},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t\t"+t._s(e.username)+"\n\t\t\t\t\t\t\t\t\t\t\t")])],1),t._v(" "),i("p",{staticClass:"mb-1 text-muted text-break",staticStyle:{"font-size":"11px"}},[t._v(t._s(t.truncate(e.account.note_text,100)))]),t._v(" "),i("div",{staticClass:"d-flex text-lighter",staticStyle:{"font-size":"11px"}},[i("span",{staticClass:"mr-3"},[i("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.account.statuses_count))]),t._v(" "),i("span",[t._v("Posts")])]),t._v(" "),i("span",[i("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.account.followers_count))]),t._v(" "),i("span",[t._v("Followers")])])])]),t._v(" "),i("div",{staticClass:"d-flex flex-column d-md-block"},[i("button",{staticClass:"btn btn-outline-success py-1 btn-sm font-weight-bold rounded-pill mr-2 mb-1",on:{click:function(e){return e.preventDefault(),t.handleFollowRequest("accept",a)}}},[t._v("\n\t\t\t\t\t\t\t\t\t\t\tAccept\n\t\t\t\t\t\t\t\t\t\t")]),t._v(" "),i("button",{staticClass:"btn btn-outline-lighter py-1 btn-sm font-weight-bold rounded-pill mb-1",on:{click:function(e){return e.preventDefault(),t.handleFollowRequest("reject",a)}}},[t._v("\n\t\t\t\t\t\t\t\t\t\t\tReject\n\t\t\t\t\t\t\t\t\t\t")])])],1)])})),0):t._e()]):i("div",[t.filteredLoaded?i("div",[t._m(0),t._v(" "),t.filteredFeed.length?i("div",t._l(t.filteredFeed,(function(t,e){return i("notification",{key:"notification:filtered:"+e+":"+t.id,attrs:{n:t}})})),1):i("div",[t.filteredEmpty?i("div",[i("p",{staticClass:"font-weight-bold"},[t._v("No results found")])]):i("placeholder")],1),t._v(" "),t.canLoadMoreFiltered?i("div",[i("intersect",{on:{enter:t.enterFilteredIntersect}},[i("placeholder")],1)],1):t._e()]):i("div",[i("placeholder")],1)])])],2)]),t._v(" "),i("drawer")],1):t._e()])},n=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"card card-body bg-transparent shadow-none border p-2 mb-3 rounded-pill text-lighter"},[i("div",{staticClass:"media align-items-center small"},[i("i",{staticClass:"far fa-exclamation-triangle mx-2"}),t._v(" "),i("div",{staticClass:"media-body"},[i("p",{staticClass:"mb-0 font-weight-bold"},[t._v("Filtering results may not include older notifications")])])])])}]},93386:(t,e,i)=>{i.r(e),i.d(e,{render:()=>a,staticRenderFns:()=>n});var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"media mb-2 align-items-center px-3 shadow-sm py-2 bg-white",staticStyle:{"border-radius":"15px"}},[i("a",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{href:"#",title:t.n.account.acct},on:{click:function(e){return e.preventDefault(),t.getProfileUrl(t.n.account)}}},[i("img",{staticClass:"mr-3 shadow-sm",staticStyle:{"border-radius":"8px"},attrs:{src:t.n.account.avatar,alt:"",width:"40",height:"40",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg';"}})]),t._v(" "),i("div",{staticClass:"media-body font-weight-light"},["favourite"==t.n.type?i("div",[i("p",{staticClass:"my-0"},[i("a",{staticClass:"font-weight-bold text-dark text-break",attrs:{href:t.displayProfileUrl(t.n.account),title:t.n.account.acct},on:{click:function(e){return e.preventDefault(),t.getProfileUrl(t.n.account)}}},[t._v("@"+t._s(t.n.account.acct))]),t._v(" "+t._s(t.$t("notifications.liked"))+" "),i("a",{staticClass:"font-weight-bold",attrs:{href:t.displayPostUrl(t.n.status)},on:{click:function(e){return e.preventDefault(),t.getPostUrl(t.n.status)}}},[t._v("post")]),t._v(".\n\t\t\t")])]):"comment"==t.n.type?i("div",[i("p",{staticClass:"my-0"},[i("a",{staticClass:"font-weight-bold text-dark text-break",attrs:{href:t.displayProfileUrl(t.n.account),title:t.n.account.acct},on:{click:function(e){return e.preventDefault(),t.getProfileUrl(t.n.account)}}},[t._v("@"+t._s(t.n.account.acct))]),t._v(" "+t._s(t.$t("notifications.commented"))+" "),i("a",{staticClass:"font-weight-bold",attrs:{href:t.displayPostUrl(t.n.status)},on:{click:function(e){return e.preventDefault(),t.getPostUrl(t.n.status)}}},[t._v("post")]),t._v(".\n\t\t\t")])]):"story:react"==t.n.type?i("div",[i("p",{staticClass:"my-0"},[i("a",{staticClass:"font-weight-bold text-dark text-break",attrs:{href:t.displayProfileUrl(t.n.account),title:t.n.account.acct},on:{click:function(e){return e.preventDefault(),t.getProfileUrl(t.n.account)}}},[t._v("@"+t._s(t.n.account.acct))]),t._v(" "+t._s(t.$t("notifications.reacted"))+" "),i("a",{staticClass:"font-weight-bold",attrs:{href:"/account/direct/t/"+t.n.account.id}},[t._v("story")]),t._v(".\n\t\t\t")])]):"story:comment"==t.n.type?i("div",[i("p",{staticClass:"my-0"},[i("a",{staticClass:"font-weight-bold text-dark text-break",attrs:{href:t.displayProfileUrl(t.n.account),title:t.n.account.acct},on:{click:function(e){return e.preventDefault(),t.getProfileUrl(t.n.account)}}},[t._v("@"+t._s(t.n.account.acct))]),t._v(" "+t._s(t.$t("notifications.commented"))+" "),i("a",{staticClass:"font-weight-bold",attrs:{href:"/account/direct/t/"+t.n.account.id}},[t._v(t._s(t.$t("notifications.story")))]),t._v(".\n\t\t\t")])]):"mention"==t.n.type?i("div",[i("p",{staticClass:"my-0"},[i("a",{staticClass:"font-weight-bold text-dark text-break",attrs:{href:t.displayProfileUrl(t.n.account),title:t.n.account.acct},on:{click:function(e){return e.preventDefault(),t.getProfileUrl(t.n.account)}}},[t._v("@"+t._s(t.n.account.acct))]),t._v(" "),i("a",{staticClass:"font-weight-bold",attrs:{href:t.mentionUrl(t.n.status)}},[t._v(t._s(t.$t("notifications.mentioned")))]),t._v(" "+t._s(t.$t("notifications.you"))+".\n\t\t\t")])]):"follow"==t.n.type?i("div",[i("p",{staticClass:"my-0"},[i("a",{staticClass:"font-weight-bold text-dark text-break",attrs:{href:t.displayProfileUrl(t.n.account),title:t.n.account.acct},on:{click:function(e){return e.preventDefault(),t.getProfileUrl(t.n.account)}}},[t._v("@"+t._s(t.n.account.acct))]),t._v(" "+t._s(t.$t("notifications.followed"))+" "+t._s(t.$t("notifications.you"))+".\n\t\t\t")])]):"share"==t.n.type?i("div",[i("p",{staticClass:"my-0"},[i("a",{staticClass:"font-weight-bold text-dark text-break",attrs:{href:t.displayProfileUrl(t.n.account),title:t.n.account.acct},on:{click:function(e){return e.preventDefault(),t.getProfileUrl(t.n.account)}}},[t._v("@"+t._s(t.n.account.acct))]),t._v(" "+t._s(t.$t("notifications.shared"))+" "),i("a",{staticClass:"font-weight-bold",attrs:{href:t.displayPostUrl(t.n.status)},on:{click:function(e){return e.preventDefault(),t.getPostUrl(t.n.status)}}},[t._v(t._s(t.$t("notifications.post")))]),t._v(".\n\t\t\t")])]):"modlog"==t.n.type?i("div",[i("p",{staticClass:"my-0"},[i("a",{staticClass:"font-weight-bold text-dark text-break",attrs:{href:t.displayProfileUrl(t.n.account),title:t.n.account.acct},on:{click:function(e){return e.preventDefault(),t.getProfileUrl(t.n.account)}}},[t._v(t._s(t.truncate(t.n.account.username)))]),t._v(" "+t._s(t.$t("notifications.updatedA"))+" "),i("a",{staticClass:"font-weight-bold",attrs:{href:t.n.modlog.url}},[t._v(t._s(t.$t("notifications.modlog")))]),t._v(".\n\t\t\t")])]):"tagged"==t.n.type?i("div",[i("p",{staticClass:"my-0"},[i("a",{staticClass:"font-weight-bold text-dark text-break",attrs:{href:t.displayProfileUrl(t.n.account),title:t.n.account.acct},on:{click:function(e){return e.preventDefault(),t.getProfileUrl(t.n.account)}}},[t._v("@"+t._s(t.n.account.acct))]),t._v(" "+t._s(t.$t("notifications.tagged"))+" "),i("a",{staticClass:"font-weight-bold",attrs:{href:t.n.tagged.post_url}},[t._v(t._s(t.$t("notifications.post")))]),t._v(".\n\t\t\t")])]):"direct"==t.n.type?i("div",[i("p",{staticClass:"my-0"},[i("a",{staticClass:"font-weight-bold text-dark text-break",attrs:{href:t.displayProfileUrl(t.n.account),title:t.n.account.acct},on:{click:function(e){return e.preventDefault(),t.getProfileUrl(t.n.account)}}},[t._v("@"+t._s(t.n.account.acct))]),t._v(" "+t._s(t.$t("notifications.sentA"))+" "),i("router-link",{staticClass:"font-weight-bold",attrs:{to:"/i/web/direct/thread/"+t.n.account.id}},[t._v(t._s(t.$t("notifications.dm")))]),t._v(".\n\t\t\t")],1)]):"group.join.approved"==t.n.type?i("div",[i("p",{staticClass:"my-0"},[t._v("\n\t\t\t\t"+t._s(t.$t("notifications.yourApplication"))+" "),i("a",{staticClass:"font-weight-bold text-dark text-break",attrs:{href:t.n.group.url,title:t.n.group.name}},[t._v(t._s(t.truncate(t.n.group.name)))]),t._v(" "+t._s(t.$t("notifications.applicationApproved"))+"\n\t\t\t")])]):"group.join.rejected"==t.n.type?i("div",[i("p",{staticClass:"my-0"},[t._v("\n\t\t\t\t"+t._s(t.$t("notifications.yourApplication"))+" "),i("a",{staticClass:"font-weight-bold text-dark text-break",attrs:{href:t.n.group.url,title:t.n.group.name}},[t._v(t._s(t.truncate(t.n.group.name)))]),t._v(" "+t._s(t.$t("notifications.applicationRejected"))+"\n\t\t\t")])]):i("div",[i("p",{staticClass:"my-0 d-flex justify-content-between align-items-center"},[i("span",{staticClass:"font-weight-bold"},[t._v("Notification")]),t._v(" "),i("span",{staticStyle:{"font-size":"8px"}},[t._v("e_"+t._s(t.n.type)+"::"+t._s(t.n.id))])])]),t._v(" "),i("div",{staticClass:"align-items-center"},[i("span",{staticClass:"small text-muted",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:t.n.created_at}},[t._v(t._s(t.timeAgo(t.n.created_at)))])])]),t._v(" "),i("div",[t.n.status&&t.n.status&&t.n.status.media_attachments&&t.n.status.media_attachments.length?i("div",[i("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.getPostUrl(t.n.status)}}},[i("img",{attrs:{src:t.n.status.media_attachments[0].preview_url,width:"32px",height:"32px"}})])]):t.n.status&&t.n.status.parent&&t.n.status.parent.media_attachments&&t.n.status.parent.media_attachments.length?i("div",[i("a",{attrs:{href:t.n.status.parent.url}},[i("img",{attrs:{src:t.n.status.parent.media_attachments[0].preview_url,width:"32px",height:"32px"}})])]):t._e()])])},n=[]}}]); |