PageSourceSearch

https://wpressninja.com/build/assets/Index-Ce72znvM.js

js wpressninja.com collected 2026-10-09 23:51:01 UTC 6,781 bytes, 6 lines download raw bytes

1import{d as y,c as o,a,u as r,h as w,w as n,b as e,l as x,e as b,f as d,F as f,g as m,t as l,p as E,n as h,i as C,J as p}from"./app-CqbOMvUx.js";import{_ as D}from"./AppLayout.vue_vue_type_script_setup_true_lang-DGhC2BDa.js";import{_ as u}from"./Button.vue_vue_type_script_setup_true_lang-CwQgyPq0.js";import{P as F}from"./plus-BFajy855.js";import{E as P}from"./eye-BfglJr0z.js";import{c as B}from"./createLucideIcon-ycY0zbnc.js";import{P as S}from"./pencil-D6DenfYB.js";import{T as L}from"./trash-2-DpyZulcv.js";import"./index-CIiWasEK.js";import"./VisuallyHidden-B71WcTOf.js";import"./useForwardExpose-Bgh7_mYR.js";import"./RovingFocusGroup-BfBOSlh1.js";import"./useArrowNavigation-C6Y-ieo6.js";import"./index-CxHIEzKO.js";import"./x-DxtVOdel.js";import"./AppLogoIcon.vue_vue_type_script_setup_true_lang-CwIf7n71.js";import"./file-text-CYzpFlMe.js";import"./book-open-DR3XsM6m.js";/**
2 * @license lucide-vue-next v0.468.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const M=B("ExternalLinkIcon",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),N={class:"flex h-full flex-1 flex-col gap-4 overflow-x-auto rounded-xl p-4"},T={class:"mb-6 flex items-center justify-between"},V={class:"mb-6 flex gap-4"},$=["value"],z=["value"],j=["value"],q={class:"overflow-hidden rounded-lg border border-[#e3e3e0] bg-white shadow-sm dark:border-[#3E3E3A] dark:bg-[#161615]"},H={class:"min-w-full divide-y divide-[#e3e3e0] dark:divide-[#3E3E3A]"},I={class:"divide-y divide-[#e3e3e0] dark:divide-[#3E3E3A]"},J={class:"px-6 py-4"},U={class:"text-sm font-medium text-[#1b1b18] dark:text-[#EDEDEC]"},G={class:"text-xs text-[#706f6c] dark:text-[#A1A09A]"},K={class:"px-6 py-4 text-sm text-[#706f6c] dark:text-[#A1A09A]"},O={key:0},Q={key:1,class:"text-[#A1A09A]"},R={class:"px-6 py-4"},W={class:"px-6 py-4 text-sm text-[#706f6c] dark:text-[#A1A09A]"},X={class:"flex items-center gap-1"},Y={class:"px-6 py-4 text-sm text-[#706f6c] dark:text-[#A1A09A]"},Z={class:"px-6 py-4 text-right text-sm font-medium"},ee={class:"flex items-center justify-end gap-2"},te={key:0,class:"border-t border-[#e3e3e0] bg-[#FDFDFC] px-6 py-4 dark:border-[#3E3E3A] dark:bg-[#0f0f0f]"},se={class:"flex items-center justify-between"},ae={class:"text-sm text-[#706f6c] dark:text-[#A1A09A]"},re={class:"flex gap-2"},ye=y({__name:"Index",props:{posts:{},categories:{},filters:{}},setup(i){const k=c=>{confirm("Are you sure you want to delete this post?")&&p.delete(`/admin/blog/${c}`,{preserveScroll:!0})},v=c=>{p.get("/admin/blog",{status:c},{preserveState:!0})},A=c=>{p.get("/admin/blog",{category:c||void 0},{preserveState:!0})},_=[{title:"Blog Posts",href:"/admin/blog"}];return(c,s)=>(d(),o(f,null,[a(r(w),{title:"Blog Posts"}),a(D,{breadcrumbs:_},{default:n(()=>[e("div",N,[e("div",T,[s[3]||(s[3]=e("div",null,[e("h1",{class:"text-2xl font-bold text-[#1b1b18] dark:text-[#EDEDEC]"}," Blog Posts "),e("p",{class:"mt-1 text-sm text-[#706f6c] dark:text-[#A1A09A]"}," Manage your blog content ")],-1)),a(u,{"as-child":""},{default:n(()=>[a(r(x),{href:"/admin/blog/create"},{default:n(()=>[a(r(F),{class:"mr-2 h-4 w-4"}),s[2]||(s[2]=b(" New Post ",-1))]),_:1})]),_:1})]),e("div",V,[e("select",{value:i.filters.status,onChange:s[0]||(s[0]=t=>v(t.target.value)),class:"rounded-md border border-[#e3e3e0] bg-white px-3 py-2 text-sm dark:border-[#3E3E3A] dark:bg-[#161615]"},[...s[4]||(s[4]=[e("option",{value:""},"All Status",-1),e("option",{value:"draft"},"Draft",-1),e("option",{value:"published"},"Published",-1)])],40,$),e("select",{value:i.filters.category,onChange:s[1]||(s[1]=t=>A(Number(t.target.value)||null)),class:"rounded-md border border-[#e3e3e0] bg-white px-3 py-2 text-sm dark:border-[#3E3E3A] dark:bg-[#161615]"},[s[5]||(s[5]=e("option",{value:""},"All Categories",-1)),(d(!0),o(f,null,m(i.categories,t=>(d(),o("option",{key:t.id,value:t.id},l(t.name),9,j))),128))],40,z)]),e("div",q,[e("table",H,[s[6]||(s[6]=e("thead",{class:"bg-[#FDFDFC] dark:bg-[#0f0f0f]"},[e("tr",null,[e("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-[#706f6c] dark:text-[#A1A09A]"}," Title "),e("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-[#706f6c] dark:text-[#A1A09A]"}," Category "),e("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-[#706f6c] dark:text-[#A1A09A]"}," Status "),e("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-[#706f6c] dark:text-[#A1A09A]"}," Views "),e("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-[#706f6c] dark:text-[#A1A09A]"}," Date "),e("th",{class:"px-6 py-3 text-right text-xs font-medium uppercase tracking-wider text-[#706f6c] dark:text-[#A1A09A]"}," Actions ")])],-1)),e("tbody",I,[(d(!0),o(f,null,m(i.posts.data,t=>(d(),o("tr",{key:t.id,class:"hover:bg-[#FDFDFC] dark:hover:bg-[#0f0f0f]"}
6,[e("td",J,[e("div",U,l(t.title),1),e("div",G," by "+l(t.user.name),1)]),e("td",K,[t.categories.length>0?(d(),o("span",O,l(t.categories.map(g=>g.name).join(", ")),1)):(d(),o("span",Q,"Uncategorized"))]),e("td",R,[e("span",{class:h(["inline-flex rounded-full px-2 py-1 text-xs font-semibold",{"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400":t.status==="published","bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400":t.status==="draft"}])},l(t.status),3)]),e("td",W,[e("div",X,[a(r(P),{class:"h-4 w-4"}),b(" "+l(t.views),1)])]),e("td",Y,l(new Date(t.created_at).toLocaleDateString()),1),e("td",Z,[e("div",ee,[a(u,{"as-child":"",variant:"outline",size:"sm"},{default:n(()=>[a(r(x),{href:`/blog/${t.slug}`,target:"_blank"},{default:n(()=>[a(r(M),{class:"h-4 w-4"})]),_:1},8,["href"])]),_:2},1024),a(u,{"as-child":"",variant:"outline",size:"sm"},{default:n(()=>[a(r(x),{href:`/admin/blog/${t.id}/edit`},{default:n(()=>[a(r(S),{class:"h-4 w-4"})]),_:1},8,["href"])]),_:2},1024),a(u,{variant:"destructive",size:"sm",onClick:g=>k(t.id)},{default:n(()=>[a(r(L),{class:"h-4 w-4"})]),_:1},8,["onClick"])])])]))),128))])]),i.posts.last_page>1?(d(),o("div",te,[e("div",se,[e("div",ae," Page "+l(i.posts.current_page)+" of "+l(i.posts.last_page),1),e("div",re,[(d(!0),o(f,null,m(i.posts.links,t=>(d(),C(r(x),{key:t.label,href:t.url,class:h(["rounded-md px-3 py-1 text-sm",t.active?"bg-[#f53003] text-white dark:bg-[#FF4433]":"bg-white text-[#1b1b18] hover:bg-[#FDFDFC] dark:bg-[#161615] dark:text-[#EDEDEC] dark:hover:bg-[#1C1C1A]",!t.url&&"pointer-events-none opacity-50"]),innerHTML:t.label},null,8,["href","class","innerHTML"]))),128))])])])):E("",!0)])])]),_:1})],64))}});export{ye 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.