PageSourceSearch

https://mentorspace.ai/build/assets/SharedEntryPage-Dzm195S6.js

js mentorspace.ai collected 2026-10-05 13:30:54 UTC 7,300 bytes, 1 lines download raw bytes

1import{o as a,h as o,a as e,p as B,s as E,e as d,w as h,g,f as x,$ as H,t as i,V,i as b,F as q,y as D,r as u,k as F,m as R,A as S,B as U,l as $}from"./app-WAKmHpkM.js";function P(T,w){return a(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"})])}const I={class:"min-h-screen bg-gray-50 dark:bg-gray-900"},G={class:"max-w-2xl mx-auto py-12 px-4 sm:px-6 lg:px-8"},K={key:0,class:"text-center py-16"},Z={key:1,class:"min-h-[80vh] flex flex-col items-center justify-center text-center"},z={class:"w-16 h-16 bg-yellow-100 rounded-full flex items-center justify-center mx-auto mb-4"},J={class:"flex flex-col items-center gap-3"},O={class:"text-sm text-gray-500 dark:text-gray-400"},Q={key:2,class:"text-center py-16"},W={class:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-4"},X={class:"text-lg font-medium text-gray-900 dark:text-white mb-2"},Y={class:"text-gray-600 dark:text-gray-400 mb-6"},ee={key:3},te={class:"mb-6 text-center"},se={class:"text-sm text-gray-500 dark:text-gray-400"},re={key:0,class:"bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-200 dark:border-gray-700 p-6 mb-4"},ae={class:"flex items-center gap-2 mb-3"},oe={class:"w-8 h-8 rounded-full bg-gray-900 flex items-center justify-center"},ne={class:"text-sm text-gray-700 dark:text-gray-300 leading-relaxed"},le={class:"bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-200 dark:border-gray-700 p-6 mb-4"},ie={class:"flex items-start gap-3 mb-4"},de={class:"w-10 h-10 rounded-full bg-gray-200 dark:bg-gray-700 flex items-center justify-center overflow-hidden flex-shrink-0"},ue=["src","alt"],ce={key:1,class:"text-gray-600 dark:text-gray-300 font-medium"},ge={class:"flex-1 min-w-0"},me={class:"font-medium text-gray-900 dark:text-white"},he={class:"text-xs text-gray-500 dark:text-gray-400"},xe=["innerHTML"],ye={key:1,class:"space-y-3 ml-6"},ve={class:"flex items-start gap-3 mb-3"},_e={class:"w-8 h-8 rounded-full bg-gray-200 dark:bg-gray-700 flex items-center justify-center overflow-hidden flex-shrink-0"},fe=["src","alt"],pe={key:1,class:"text-gray-600 dark:text-gray-300 font-medium text-sm"},ke={class:"flex-1 min-w-0"},be={class:"font-medium text-gray-900 dark:text-white text-sm"},we={class:"text-xs text-gray-500 dark:text-gray-400"},Le=["innerHTML"],Me={__name:"SharedEntryPage",setup(T){const w=B(),y=R();$();const v=u(!0),c=u(null),m=u("Error"),r=u(null),L=u(""),_=u(!1),f=u(null),p=S(()=>r.value?r.value.user?.name||r.value.persona?.name||"Unknown":""),C=S(()=>p.value.charAt(0).toUpperCase()),k=n=>n.user?.name||n.persona?.name||"Unknown",A=n=>k(n).charAt(0).toUpperCase(),j=n=>n?new Date(n).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"",M=n=>U(n),N=async()=>{v.value=!0,c.value=null,_.value=!1;const{usernameSlug:n,secretKey:t}=y.params;try{const s=await w.get(`/api/shared/${n}/${t}`);r.value=s.data.entry,L.value=s.data.shared_by?.name||"Someone",f.value=s.data.summary||null}catch(s){console.error("Failed to fetch shared entry:",s);const l=s.response?.data?.code;s.response?.status===404?(m.value="Not Found",c.value="This share link does not exist or has been removed."):s.response?.status===4
110?(m.value="Link Expired",c.value="This share link has expired."):s.response?.status===401&&l==="auth_required"?_.value=!0:(m.value="Error",c.value=s.response?.data?.error||"Failed to load shared entry.")}finally{v.value=!1}};return E(()=>{N()}),(n,t)=>{const s=F("router-link");return a(),o("div",I,[e("div",G,[v.value?(a(),o("div",K,[...t[0]||(t[0]=[e("div",{class:"animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 dark:border-white mx-auto mb-4"},null,-1),e("p",{class:"text-gray-600 dark:text-gray-400"},"Loading shared entry...",-1)])])):_.value?(a(),o("div",Z,[d(s,{to:"/",class:"inline-block mb-8"},{default:h(()=>[...t[1]||(t[1]=[e("img",{src:"/images/logo.svg",alt:"Mentorspace",class:"h-8 dark:invert dark:brightness-200"},null,-1)])]),_:1}),e("div",z,[d(g(P),{class:"w-8 h-8 text-yellow-600"})]),t[5]||(t[5]=e("h3",{class:"text-lg font-medium text-gray-900 dark:text-white mb-2"},"Login Required",-1)),t[6]||(t[6]=e("p",{class:"text-gray-600 dark:text-gray-400 mb-6"},"This content is only available to logged-in users.",-1)),e("div",J,[d(s,{to:{name:"login",query:{redirect:g(y).fullPath}},class:"px-6 py-2.5 bg-gray-900 text-white rounded-full hover:bg-gray-800 transition-colors font-medium inline-block"},{default:h(()=>[...t[2]||(t[2]=[x(" Log In ",-1)])]),_:1},8,["to"]),e("p",O,[t[4]||(t[4]=x(" Don't have an account? ",-1)),d(s,{to:{name:"signup",query:{redirect:g(y).fullPath}},class:"text-gray-900 dark:text-white font-medium hover:text-gray-600 dark:hover:text-gray-300 transition-colors"},{default:h(()=>[...t[3]||(t[3]=[x(" Sign up ",-1)])]),_:1},8,["to"])])])])):c.value?(a(),o("div",Q,[e("div",W,[d(g(H),{class:"w-8 h-8 text-red-600"})]),e("h3",X,i(m.value),1),e("p",Y,i(c.value),1),d(s,{to:"/",class:"px-5 py-2.5 bg-gray-900 text-white rounded-full hover:bg-gray-800 transition-colors font-medium inline-block"},{default:h(()=>[...t[7]||(t[7]=[x(" Go Home ",-1)])]),_:1})])):r.value?(a(),o("div",ee,[e("div",te,[e("p",se,"Shared by "+i(L.value),1)]),f.value?(a(),o("div",re,[e("div",ae,[e("div",oe,[d(g(V),{class:"w-4 h-4 text-white"})]),t[8]||(t[8]=e("span",{class:"text-sm font-bold text-gray-900 dark:text-white"},"Summary",-1))]),e("p",ne,i(f.value),1)])):b("",!0),e("div",le,[e("div",ie,[e("div",de,[r.value.user?.headshot_url||r.value.persona?.profile_image_url?(a(),o("img",{key:0,src:r.value.user?.headshot_url||r.value.persona?.profile_image_url,alt:p.value,class:"w-full h-full object-cover"},null,8,ue)):(a(),o("span",ce,i(C.value),1))]),e("div",ge,[e("p",me,i(p.value),1),e("p",he,i(j(r.value.created_at)),1)])]),e("div",{class:"prose prose-sm max-w-none text-gray-700 dark:text-gray-300",innerHTML:M(r.value.content)},null,8,xe)]),r.value.replies&&r.value.replies.length>0?(a(),o("div",ye,[(a(!0),o(q,null,D(r.value.replies,l=>(a(),o("div",{key:l.id,class:"bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-200 dark:border-gray-700 p-5"},[e("div",ve,[e("div",_e,[l.user?.headshot_url||l.persona?.profile_image_url?(a(),o("img",{key:0,src:l.user?.headshot_url||l.persona?.profile_image_url,alt:k(l),class:"w-full h-full object-cover"},null,8,fe)):(a(),o("span",pe,i(A(l)),1))]),e("div",ke,[e("p",be,i(k(l)),1),e("p",we,i(j(l.created_at)),1)])]),e("div",{class:"prose prose-sm max-w-none text-gray-700 dark:text-gray-300",innerHTML:M(l.content)},null,8,Le)]))),128))])):b("",!0),t[9]||(t[9]=e("div",{class:"mt-8 text-center"},[e("a",{href:"/",class:"inline-flex items-center text-sm text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300 transition-colors"},[e("span",{class:"mr-2"},"Powered by"),e("img",{src:"/images/logo.svg",alt:"Mentorspace",class:"h-5 dark:invert dark:brightness-200"})])],-1))])):b("",!0)])])}}};export{Me 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.