PageSourceSearch

https://www.troqueedevolva.com.br/_nuxt/BvfCmXCo.js

js troqueedevolva.com.br collected 2026-09-28 06:09:41 UTC 5,246 bytes, 1 lines download raw bytes

1import{_ as N}from"./u-AidC9v.js";import{_ as $}from"./BbL4sElL.js";import{_ as j}from"./EaYp-9EI.js";import{_ as M}from"./DwOJjtSi.js";import{r as g,l as T,c as n,a as e,b as l,t as r,f as o,w as i,i as v,F as h,g as b,o as d,d as c,n as k}from"./YWD3m3ew.js";import{u as U}from"./CAzAjfUZ.js";import"./CldtFRSc.js";import"./zBmQXuha.js";import"./Dq3ANapq.js";import"./D5q7Adi4.js";import"./Dp3hn8zC.js";import"./Bhgm5efZ.js";const F={class:"flex items-center justify-between mb-6"},H={class:"text-sm text-gray-500"},S={class:"mb-4"},q={class:"bg-white rounded-xl border border-gray-200 overflow-hidden"},A={key:0,class:"p-6 animate-pulse space-y-3"},I={key:1,class:"p-8 text-center text-gray-500"},O={key:2,class:"w-full"},P={class:"divide-y divide-gray-100"},G={class:"px-4 py-3"},J={class:"px-4 py-3 hidden sm:table-cell"},K={class:"px-4 py-3 text-sm text-gray-500 hidden md:table-cell"},Q={class:"px-4 py-3 hidden md:table-cell"},W={class:"px-4 py-3 text-right"},X={class:"flex items-center justify-end gap-2"},Y={class:"p-6"},Z={class:"text-sm text-gray-600 mb-6"},ee={class:"flex justify-end gap-3"},xe={__name:"index",setup(te){const u=g(""),p=g(!1),x=g(null),f=g(!1),{data:y,refresh:w,pending:C}=U("/api/admin/releases",{default:()=>[],lazy:!0},"$hocVpfvuOR"),_=T(()=>{if(!u.value)return y.value;const a=u.value.toLowerCase();return y.value.filter(t=>t.title.toLowerCase().includes(a))}),V=a=>new Date(a).toLocaleDateString("pt-BR",{day:"2-digit",month:"short",year:"numeric"}),E=a=>{x.value=a,p.value=!0},D=async()=>{if(x.value){f.value=!0;try{await $fetch(`/api/admin/releases/${x.value.id}`,{method:"DELETE"}),p.value=!1,await w()}catch{alert("Erro ao excluir release")}finally{f.value=!1}}};return(a,t)=>{const m=N,R=$,z=j,B=M;return d(),n("div",null,[e("div",null,[e("div",F,[e("div",null,[t[3]||(t[3]=e("h2",{class:"text-xl font-semibold text-gray-800"},"Releases",-1)),e("p",H,r(o(y).length)+" releases",1)]),l(m,{to:"/admin/releases/new",color:"primary",size:"lg"},{default:i(()=>t[4]||(t[4]=[c(" + Novo Release ")])),_:1})]),e("div",S,[l(R,{modelValue:o(u),"onUpdate:modelValue":t[0]||(t[0]=s=>v(u)?u.value=s:null),placeholder:"Buscar por título...",icon:"i-heroicons-magnifying-glass",size:"lg"},null,8,["modelValue"])]),e("div",q,[o(C)?(d(),n("div",A,[(d(),n(h,null,b(5,s=>e("div",{key:s,class:"h-10 bg-gray-100 rounded"})),64))])):o(_).length===0?(d(),n("div",I,r(o(u)?"Nenhum release encontrado":"Nenhum release criado ainda"),1)):(d(),n("table",O,[t[7]||(t[7]=e("thead",{class:"bg-gray-50 border-b border-gray-200"},[e("tr",null,[e("th",{class:"text-left px-4 py-3 text-xs font-medium text-gray-500 uppercase"},"Título"),e("th",{class:"text-left px-4 py-3 text-xs font-medium text-gray-500 uppercase hidden sm:table-cell"},"Categoria"),e("th",{class:"text-left px-4 py-3 text-xs font-medium text-gray-500 uppercase hidden md:table-cell"},"Data"),e("th",{class:"text-left px-4 py-3 text-xs font-medium text-gray-500 uppercase hidden md:table-cell"},"Status"),e("th",{class:"text-right px-4 py-3 text-xs font-medium text-gray-500 uppercase"},"Ações")])],-1)),e("tbody",P,[(d(!0),n(h,null,b(o(_),s=>(d(),n("tr",{key:s.id,class:"hover:bg-gray-50"},[e("td",G,[l(z,{to:`/admin/releases/${s.id}`,class:"text-sm font-medium text-gray-900 hover:text-tpurple-600"},{default:i(()=>[c(r(s.title),1)]),_:2},1032,["to"])]),e("td",J,[e("span",{class:k(["text-xs px-2 py-0.5 rounded",s.category==="Novos Recursos"?"bg-green-50 text-green-700":"bg-blue-50 text-blue-700"])},r(s.category),3)]),e("td",K,r(V(s.date)),1),e("td",Q,[e("span",{class:k([s.published?"text-green-600":"text-gray-400","text-xs"])},r(s.published?"Publicado":"Rascunho"),3)]),e("td",W,[e("div",X,[l(m,{to:`/admin/releases/${s.id}`,variant:"ghost",color:"gray",size:"xs",title:"Editar"},{default:i(()=>t[5]||(t[5]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)])),_:2},1032,["to"]),l(m,{onClick:L=>E(s),variant:"ghost",color:"red",size:"xs",title:"Excluir"},{default:i(()=>t[6]||(t[6]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])),_:2},1032,["onClick"])])])]))),128))])]))]),l(B,{modelValue:o(p),"onUpdate:modelValue":t[2]||(t[2]=s=>v(p)?p.value=s:null)},{default:i(()=>{var s;return[e("div",Y,[t[12]||(t[12]=e("h3",{class:"text-lg font-semibold text-gray-900 mb-2"},"Excluir release",-1)),e("p",Z,[t[8]||(t[8]=c(' Tem certeza que deseja excluir "')),e("strong",null,r((s=o(x))==null?void 0:s.title),1),t[9]||(t[9]=c('"? Esta ação não pode ser desfeita. '))]),e("div",ee,[l(m,{variant:"ghost",color:"gray",onClick:t[1]||(t[1]=L=>p.value=!1)},{default:i(()=>t[10]||(t[10]=[c("Cancelar")])),_:1}),l(m,{color:"red",loading:o(f),onClick:D},{default:i(()=>t[11]||(t[11]=[c("Excluir")])),_:1},8,["loading"])])])]}),_:1},8,["modelValue"])])])}}};export{xe 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.