You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixelfed/public/js/direct.js

1 line
40 KiB
JavaScript

(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[6205],{517:(t,e,a)=>{"use strict";a.r(e);var s=a(36346),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},4878:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(27943),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},6916:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return e("div",[t.loaded&&"browse"==t.page?e("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"50vh"}},[e("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[e("div",{staticClass:"card shadow-none border mt-4"},[e("div",{staticClass:"card-header bg-white py-4"},[e("span",{staticClass:"h4 font-weight-bold mb-0"},[t._v("Direct Messages")]),t._v(" "),e("span",{staticClass:"float-right"},[e("a",{staticClass:"btn btn-outline-primary font-weight-bold py-0 rounded-pill",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goto("add")}}},[t._v("New Message")])])]),t._v(" "),e("div",{staticClass:"card-header bg-white"},[e("ul",{staticClass:"nav nav-pills nav-fill"},[e("li",{staticClass:"nav-item"},[e("a",{class:["inbox"==t.tab?"nav-link px-4 font-weight-bold rounded-pill active":"nav-link px-4 font-weight-bold rounded-pill"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchTab("inbox")}}},[t._v("Inbox")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("a",{class:["sent"==t.tab?"nav-link px-4 font-weight-bold rounded-pill active":"nav-link px-4 font-weight-bold rounded-pill"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchTab("sent")}}},[t._v("Sent")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("a",{class:["filtered"==t.tab?"nav-link px-4 font-weight-bold rounded-pill active":"nav-link px-4 font-weight-bold rounded-pill"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchTab("filtered")}}},[t._v("Filtered")])])])]),t._v(" "),"inbox"==t.tab?e("ul",{staticClass:"list-group list-group-flush"},[t.messages.inbox.length?t._l(t.messages.inbox,(function(a,s){return e("div",{key:"dm_inbox"+s},[e("a",{staticClass:"list-group-item text-dark text-decoration-none border-left-0 border-right-0 border-top-0",attrs:{href:"/account/direct/t/"+a.id}},[e("div",{staticClass:"media d-flex align-items-center"},[t._o(e("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:a.avatar,width:"32",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg';"}}),0,"dm_inbox"+s),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"font-weight-bold text-truncate"},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(a.name)+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),e("span",{staticClass:"pl-1 text-muted small text-truncate",staticStyle:{"font-weight":"500"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(a.isLocal?"@"+a.username:a.username)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),e("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"13px","font-weight":"500"}},[t._m(0,!0),t._v(" "),e("span",{staticClass:"pl-1 pr-3"},[t._v("\n\t\t\t\t\t\t\t\t\t\tReceived\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),e("span",[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(a.timeAgo)+"\n\t\t\t\t\t\t\t\t\t")])])]),t._v(" "),t._m(1,!0)])])])})):e("div",{staticClass:"list-group-item d-flex justify-content-center align-items-center",staticStyle:{"min-height":"40vh"}},[e("p",{staticClass:"lead mb-0"},[t._v("No messages found :(")])])],2):t._e(),t._v(" "),"sent"==t.tab?e("ul",{staticClass:"list-group list-group-flush"},[t.messages.sent.length?t._l(t.messages.sent,(function(a,s){return e("div",{key:"dm_sent"+s},[e("a",{staticClass:"list-group-item text-dark text-decoration-none border-left-0 border-right-0 border-top-0",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.loadMessage(a.id)}}},[e("div",{staticClass:"media d-flex align-items-center"},[t._o(e("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:a.avatar,width:"32",onerror:"this.onerror=null;this.sr