;
This commit is contained in:
1 parent
d749df607f
commit
f0c67b00c2
24 files changed
+23
-23
No files matched your search
+1
@@ -0,0 +1 @@
|
||||
import{V as O,a as J,f as K,b as Q,N as W}from"./news-list-51db00ac.js";import{A as X,_ as P,a_ as Z,r as _,a$ as Y,b0 as ee,aN as C,w as S,Z as te,C as p,T as b,F as e,E as l,L as m,W as U,U as j,K as h,Q as A,I as B,G as i,J as D,M as ae,aO as ne,af as I,D as L,b8 as le,X as r,S as oe,R as g,V as N,N as se,aG as R,ae as E,O as ie,b1 as ce,b2 as re,aE as de,a0 as ue}from"./index-747c3254.js";import{V as y,a as me}from"./VBtn-2da327ef.js";import{b as pe,f as ge,a as fe,e as q,h as _e,i as ve,c as H}from"./VTextarea-358f0413.js";import"./VContainer-2256b24a.js";import"./VInput-760b02c9.js";import"./VChip-ef639bc3.js";const M=X(),he={components:{myHelper:Z},setup(){const d=_([]);Y(()=>{d.value=[]});const s=_([]),f=_(!1),n=ne.slice(0,-1),w=_(""),V=_(0),t=_(1),u=_(2),a=ee();let v=`api/navigation/news/?name=${a.path}&page=${t.value-1}&selected=${u.value}`;a.path=="/news"&&"id"in a.query&&(v=`api/navigation/news/?name=${a.path}&page=${t.value-1}&selected=${u.value}&id=${a.query.id}`),C(v,s);const T=(o,c)=>{I.post("api/navigation/news/",{news:o,scores:c}).then(k=>{s.value.result[s.value.result.findIndex(x=>x.id==o)].scores=k.data})},z=()=>{I.post("api/navigation/news/",{news:V.value,text:w.value}).then(o=>{f.value=!f.value,s.value.result[s.value.result.findIndex(c=>c.id==o.data.news)].comment=o.data.comment}),w.value=""},F=(o,c)=>{I.post("api/navigation/news/",{delid:o,news:c}).then(k=>{s.value.result[s.value.result.findIndex(x=>x.id==k.data.news)].comment=k.data.comment})},G=()=>{C(`api/navigation/news/?name=${a.path}&page=${t.value-1}&selected=${u.value}`,s)};return S(()=>a.query,(o,c)=>{o&&(v=`api/navigation/news/?name=${a.path}&page=${t.value-1}&selected=${u.value}`,C(v,s))},{deep:!0}),S(()=>u,(o,c)=>{o&&C(`api/navigation/news/?name=${a.path}&page=${t.value-1}&selected=${o.value}`,s)},{deep:!0}),S(()=>M.cod2user,(o,c)=>{o&&C(`api/navigation/news/?name=${a.path}&page=${t.value-1}&selected=${u.value}`,s)},{deep:!0}),{newss:s,burl:n,limitText:o=>{const c=o.split(" ").slice(0,25);return`${o.split(" ").slice(0,25).join(" ")} ${c.length<25?"":"..."}`},toggleIncrementLike:T,dialogCommentShow:f,accountStore:M,dateformat:o=>K(new Date(o),"dd.MM.yyyy HH:mm"),splitname:o=>o.familyname+" "+o.name[0]+"."+o.parentname[0]+".",textcomment:w,openComent:o=>{f.value=!f.value,V.value=o},addComment:z,idnews:V,deletComment:F,pagelistNews:G,divs:d,page:t,selecnews:u,checkremote:te,route:a}}},$=d=>(ce("data-v-e5198507"),d=d(),re(),d),we={class:"d-flex flex-column py-3"},Ve={class:"justify-self-end"},Ce={class:"subheading me-2"},be=$(()=>g("span",{class:"me-1"},"·",-1)),ke={class:"subheading me-2"},xe=$(()=>g("span",{class:"me-1"},"·",-1)),Se=["onClick"],Ie={key:0},Ne=$(()=>g("div",{class:"text-subtitle-2"},null,-1));function ye(d,s,f,n,w,V){return p(),b("div",we,[e(h,null,{default:l(()=>[e(m,{class:"bg-red pa-0 overflow-auto"},{default:l(()=>[(p(!0),b(U,null,j(n.newss.result,(t,u)=>(p(),L(A,{class:"rounded-0",key:u},{default:l(()=>[e(q,{class:"w-100 pl-4 py-2 pt-3"},{prepend:l(()=>[e(le,{color:"loading_avatar",image:n.checkremote(`${d.spravURL}${t.author.login}.jpg`)},null,8,["image"])]),default:l(()=>[e(_e,null,{default:l(()=>[i(r(t.author.fio),1)]),_:2},1024),e(ve,null,{default:l(()=>[i("Участник")]),_:1})]),_:2},1024),e(B,{class:"pt-0 pb-1"},{default:l(()=>[i(r(t.title),1)]),_:2},1024),e(oe,{src:`${n.burl}${t.link}`,height:"350px",width:"96%",class:"mx-auto",cover:""},null,8,["src"]),e(q,{class:"w-100"},{append:l(()=>[g("div",Ve,[e(N,{class:"me-1",icon:t.scores.filter(a=>a.user==n.accountStore.user.login&&a.score==!0).length>0?"mdi-thumb-up":"mdi-thumb-up-outline",onClick:a=>n.toggleIncrementLike(t.id,!0)},null,8,["icon","onClick"]),g("span",Ce,r(t.scores.filter(a=>a.score==!0).length),1),be,e(N,{class:"me-1",icon:t.scores.filter(a=>a.user==n.accountStore.user.login&&a.score==!1).length>0?"mdi-thumb-down":"mdi-thumb-down-outline",onClick:a=>n.toggleIncrementLike(t.id,!1)},null,8,["icon","onClick"]),g("span",ke,r(t.scores.filter(a=>a.score==!1).length),1),xe,e(N,{class:"me-1",icon:"mdi-message-text-outline",onClick:a=>n.openComent(t.id)},null,8,["onClick"]),g("span",{onClick:a=>t.showComment=!t.showComment,class:"pointer subheading"},r(t.comment.length),9,Se)])]),_:2},1024),g("div",null,[e(H),e(D,null,{default:l(()=>[i(r(t.text),1)]),_:2},1024),e(H),e(me,null,{default:l(()=>[t.comment.length>0?se((p(),b("div",Ie,[(p(!0),b(U,null,j(t.comment,(a,v)=>(p(),b("div",{key:v,class:"d-flex flex-column pa-3"},[e(h,{class:R(["justify-space-between ma-0 align-center bgchat mr-7",n.accountStore.user.login==a.author.login?"bgchatnot":"bgchat"])},{default:l(()=>[e(m,{class:"flex-grow-1 text-subtitle-2 pl-2 pa-0"},{default:l(()=>[i(r(n.accountStore.user.login==a.author.login?"":n.splitname(a.author)),1)]),_:2},1024),e(m,{class:"pa-0 text-center text-subtitle-2"},{default:l(()=>[i(r(n.dateformat(a.cdate)),1)]),_:2},1024),e(m,{class:"pa-0 pr-2 text-end text-subtitle-2"},{default:l(()=>[i(r(n.accountStore.user.login!=a.author.login?"":n.spLine truncated
|
||||
Reference in new issue
Block a user