PageSourceSearch

https://snapbox.ai/assets/Room-IxO06uox.js

js snapbox.ai collected 2026-10-05 12:39:38 UTC 2,125 bytes, 1 lines download raw bytes

1import{_ as k,A as M,r as y,B as x,o as C,c as i,b as t,h as R,F as v,f as T,u as b,j as B,g as u,k as D,t as d,i as P,E as Y}from"./index-GRB8Jcml.js";import{M as $}from"./MessageService-MQvOYdOu.js";import{T as w}from"./top-DaACZfYm.js";import"./ContentsService-DKa2qyOq.js";const F={name:"RoomPage",components:{TOP:w},setup(){const g=M.type(),o=y([]),_=y(""),n=b(),f=e=>{var a;return e.last_message&&(e.last_message.updated_at=Y(e.last_message.updated_at).format("YYYY-MM-DD HH:mm:ss"),e.last_message.type==="image"&&(e.last_message.contents="이미지 파일")),(a=e.info)!=null&&a.profile&&(e.profile_style=`background-image: url(${e.info.profile}); background-position: center`),e},m=async()=>{try{const{data:e}=await $.rooms();o.value=e.map(f).sort((a,r)=>{var l,h;return(((l=r.last_message)==null?void 0:l.id)||0)-(((h=a.last_message)==null?void 0:h.id)||0)})}catch(e){console.error("Failed to fetch rooms:",e)}},p=e=>n.push(`/message/${e}`),s=x(()=>{const e=_.value.trim().toLowerCase();return e?o.value.filter(a=>{var r,l;return(l=(r=a.info)==null?void 0:r.nickname)==null?void 0:l.toLowerCase().includes(e)}):o.value}),c=e=>{_.value=e.target.value};return C(()=>{m()}),{type:g,rooms:s,changeText:c,getRooms:m,toMessage:p}}},L={class:"header",id:"main_header"},N={class:"subpage"},O={class:"search_msg"},S={class:"msg_list"},V=["onClick"],j={key:0,class:"num"};function A(g,o,_,n,f,m){const p=B("TOP");return u(),i(v,null,[t("div",L,[R(p)]),t("section",null,[t("div",N,[t("div",O,[t("input",{type:"text",onInput:o[0]||(o[0]=s=>n.changeText(s)),placeholder:"검색어를 입력하세요"},null,32)])]),t("div",S,[t("ul",null,[(u(!0),i(v,null,T(n.rooms,s=>{var c,e,a;return u(),i("li",{key:s.id,onClick:r=>n.toMessage(s.id),style:{cursor:"pointer"}},[t("div",{style:D(s.profile_style)},null,4),t("h2",null,d(((c=s.info)==null?void 0:c.nickname)||""),1),t("p",null,d(((e=s.last_message)==null?void 0:e.contents)||""),1),t("span",null,d(((a=s.last_message)==null?void 0:a.updated_at)||""),1),s.unread>0?(u(),i("span",j,d(s.unread),1)):P("",!0)],8,V)}),128))])])])],64)}const I=k(F,[["render",A]]);export{I 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.