PageSourceSearch

https://ashkelon.news/assets/admin.index-CUEyQti_.js

js ashkelon.news collected 2026-09-25 13:36:40 UTC 16,104 bytes, 2 lines download raw bytes

1import{D as R,j as e,E as y,B as p,L as a,F as w,e as h,H as T,I as E}from"./index-XdNrAOOz.js";import{A as f}from"./daily-chart-DKD1GmVA.js";import{S as v,N as $}from"./new-article-button-DBtv0Rin.js";import{u as F,A as H,a as B,b as j,c as V,U as b,M as N,d as u,e as k,f as d,g as r,F as A,T as D,I,L as C,h as q,N as O,C as W}from"./ui-dLtj3b-W.js";import{R as _}from"./radio-CFL5cf_C.js";import{E as J}from"./eye-CHI6UiNa.js";import{A as S}from"./arrow-up-left-DGRs6IEI.js";import{P as Q}from"./plus-glUKNg7k.js";import"./index-CIzbjd9p.js";const Z=[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]],G=R("file-pen",Z),X=[{key:"articles",label:"כתבות",description:"עריכה, פרסום וניהול תוכן",to:"/admin/articles",icon:O,countKey:"articles",detail:i=>`${i.published} באתר · ${i.unpublished} טיוטות`},{key:"authors",label:"כותבים",description:"פרופילים וקרדיטים",to:"/admin/authors",icon:b,countKey:"authors"},{key:"categories",label:"קטגוריות",description:"מפתחות וסיווג",to:"/admin/categories",icon:C,countKey:"categories"},{key:"frontpage",label:"עמוד ראשי",description:"בלוקים וסידור",to:"/admin/frontpage",icon:A,countKey:"frontpage"},{key:"sport",label:"ספורט",description:"בפיתוח - ליגות, קבוצות ושחקנים",to:"/admin/sport",icon:D,countKey:"competitions"},{key:"ads",label:"מודעות",description:"יחידות פרסום",to:"/admin/ads",icon:N,countKey:"ads",detail:i=>`${i.adsActive} פעילות`},{key:"weather",label:"מזג אוויר",description:"תחנות ותחזית",to:"/admin/weather",icon:T,countKey:"weather"},{key:"cinema",label:"קולנוע",description:"הקרנות מסונכרנות",to:"/admin/cinema",icon:W,countKey:"cinemaUpcoming",detail:i=>`${i.cinemaUpcoming} קרובות`},{key:"tips",label:"טיפים",description:"תור ידיעות מהאתר",to:"/admin/tips",icon:I,countKey:"tips",detail:i=>i.tipsUnread>0?`${i.tipsUnread} לא נקראו`:"אין חדשות"}];function L(i){return new Date(i).toLocaleString("he-IL",{timeZone:"Asia/Jerusalem",day:"numeric",month:"short",hour:"2-digit",minute:"2-digit",hour12:!1})}function Y(i,t,l){return w(t,l)?"שידור חי":i==="published"?"מפורסם":"טיוטה"}function ee(i,t,l){return w(t,l)?"text-red-300":i==="published"?"text-emerald-300/90":"text-white/40"}function ie({stats:i,categories:t}){const{currentUser:l}=F(),n=l?.name?.trim()||l?.email?.split("@")[0]||null,x=i.articles>0?Math.round(i.published/i.articles*100):0,o=i.analytics.adImpressions7d>0?Math.round(i.analytics.adClicks7d/i.analytics.adImpressions7d*1e3)/10:0;return e.jsxs(H,{children:[e.jsx(B,{title:"לוח בקרה",description:n?`שלום ${n}. מצב התוכן ב-${y}.`:`מצב התוכן ב-${y}.`,actions:e.jsxs(e.Fragment,{children:[e.jsx(p,{asChild:!0,size:"sm",variant:"outline",className:j,children:e.jsx(a,{to:"/admin/analytics",children:"אנליטיקס"})}),e.jsx(p,{asChild:!0,size:"sm",variant:"outline",className:V,children:e.jsxs(a,{to:"/admin/articles/$id",params:{id:"new"},search:{template:"alert"},children:[e.jsx(v,{className:"size-3.5"}),"צבע אדום"]})}),e.jsx($,{categories:t})]})}),e.jsxs("div",{className:"grid min-w-0 gap-px bg-white/10 [&>*]:min-w-0 sm:grid-cols-2 xl:grid-cols-4",children:[e.jsx(m,{label:"סה״כ כתבות",value:i.articles,hint:`${x}% באתר · ${i.images} תמונות`}),e.jsx(m,{label:"באתר",value:i.published,hint:`${i.unpublished} טיוטות`,accent:"emerald"}),e.jsx(m,{label:"שידור חי",value:i.live,hint:i.live>0?"פעיל כעת":"אין שידורים",accent:i.live>0?"red":void 0,icon:_}),e.jsx(m,{label:`מבקרים ייחודיים · ${i.analytics.windowDays} ימים`,value:i.analytics.uniqueVisitors7d,hint:`${i.analytics.pageViews7d.toLocaleString("he-IL")} צפיות`,icon:b}),e.jsx(m,{label:`צפיות בכתבות · ${i.analytics.windowDays} ימים`,value:i.analytics.articleViews7d,hint:`${i.analytics.searches7d} חיפושים`,icon:J}),e.jsx(m,{label:`ניוזלטר · ${i.analytics.windowDays} ימים`,value:i.analytics.newsletter7d,hint:"הרשמות"}),e.jsxs("section",{className:"bg-black p-4 sm:col-span-2 sm:p-5 md:p-6 xl:col-span-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("p",{className:"text-[10px] text-white/35",children:["מודעות · ",i.analytics.windowDays," ימים"]}),e.jsx(N,{className:"size-3.5 text-white/30"})]}),e.jsxs("div",{className:"mt-3 grid grid-cols-2 divide-x divide-y divide-white/10 sm:grid-cols-4 sm:divide-y-0",children:[e.jsxs("div",{className:"flex items-baseline gap-2 pe-3 pb-3 sm:pe-3 sm:pb-0 md:pe-4",children:[e.jsx("p",{className:"text-3xl font-semibold tracking-tight text-white",children:i.adsActive.toLocaleStr
1ing("he-IL")}),e.jsxs("p",{className:"text-[11px] text-white/40",children:["פעילות · ",i.ads," סה״כ"]})]}),e.jsxs("div",{className:"flex items-baseline gap-2 px-3 pb-3 sm:px-3 sm:pb-0 md:px-4",children:[e.jsx("p",{className:"text-3xl font-semibold tracking-tight text-white",children:i.analytics.adImpressions7d.toLocaleString("he-IL")}),e.jsx("p",{className:"text-[11px] text-white/40",children:"הוצגות"})]}),e.jsxs("div",{className:"flex items-baseline gap-2 px-3 pt-3 pe-3 sm:px-3 sm:pt-0 md:px-4",children:[e.jsx("p",{className:"text-3xl font-semibold tracking-tight text-white",children:i.analytics.adClicks7d.toLocaleString("he-IL")}),e.jsx("p",{className:"text-[11px] text-white/40",children:"לחיצות"})]}),e.jsxs("div",{className:"flex items-baseline gap-2 ps-3 pt-3 sm:ps-3 sm:pt-0 md:ps-4",children:[e.jsxs("p",{className:"text-3xl font-semibold tracking-tight text-white",children:[o.toLocaleString("he-IL",{minimumFractionDigits:o%1===0?0:1,maximumFractionDigits:1}),e.jsx("span",{className:"text-lg text-white/50",children:"%"})]}),e.jsx("p",{className:"text-[11px] text-white/40",children:"CTR"})]})]})]}),e.jsx(f,{title:"מבקרים וצפיות לפי יום",subtitle:`${i.analytics.chartDays} הימים האחרונים`,data:i.analytics.visitorsPerDay,primaryLabel:"מבקרים",secondary:{data:i.analytics.viewsPerDay,label:"צפיות"},summary:`${i.analytics.uniqueVisitors7d.toLocaleString("he-IL")} מבקרים ב-${i.analytics.windowDays} ימים`}),e.jsx(f,{title:"כתבות באתר לפי יום",subtitle:"180 הימים האחרונים",data:i.publishedPerDay,primaryLabel:"כתבות"}),e.jsxs("section",{className:"flex min-h-0 flex-col bg-black sm:col-span-2 xl:col-span-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-white/10 px-4 py-4 md:px-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-medium text-white",children:"כתבות מובילות"}),e.jsxs("p",{className:"mt-0.5 text-[11px] text-white/35",children:["לפי צפיות ב-",i.analytics.windowDays," הימים האחרונים"]})]}),e.jsx(p,{asChild:!0,size:"sm",variant:"outline",className:j,children:e.jsx(a,{to:"/admin/articles",children:"כל הכתבות"})})]}),i.analytics.topArticles.length===0?e.jsx("div",{className:"px-4 py-10 md:px-6",children:e.jsx(u,{title:"אין נתונים עדיין",description:"צפיות בכתבות יופיעו כאן אחרי שגולשים יבקרו באתר."})}):e.jsxs(k,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx(d,{children:"כותרת"}),e.jsx(d,{className:"w-24",children:"צפיות"}),e.jsx(d,{className:"w-28",children:"מבקרים"}),e.jsx(d,{className:"w-10"})]})}),e.jsx("tbody",{children:i.analytics.topArticles.map(s=>e.jsxs("tr",{className:"hover:bg-white/[0.02]",children:[e.jsx(r,{children:e.jsx(a,{to:"/admin/articles/$id",params:{id:s.id},className:"line-clamp-1 font-medium text-white hover:underline",children:s.title})}),e.jsx(r,{children:e.jsx("span",{className:"text-[11px] text-white/70",dir:"ltr",children:s.views.toLocaleString("he-IL")})}),e.jsx(r,{children:e.jsx("span",{className:"text-[11px] text-white/40",dir:"ltr",children:s.visitors.toLocaleString("he-IL")})}),e.jsx(r,{children:e.jsx(a,{to:"/admin/articles/$id",params:{id:s.id},className:"inline-flex text-white/35 hover:text-white","aria-label":"עריכה",children:e.jsx(S,{className:"size-3.5"})})})]},s.id))})]})]}),e.jsxs("section",{className:"flex min-h-0 flex-col bg-black sm:col-span-2 xl:col-span-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-white/10 px-4 py-4 md:px-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-medium text-white",children:"טיוטות"}),e.jsx("p",{className:"mt-0.5 text-[11px] text-white/35",children:i.draftArticles.length>0?`${i.draftArticles.length} טיוטות · ${i.draftWindowDays} הימים האחרונים`:`עודכנו ב-${i.draftWindowDays} הימים האחרונים`})]}),i.unpublished>0?e.jsx(p,{asChild:!0,size:"sm",variant:"outline",className:j,children:e.jsx(a,{to:"/admin/articles",search:{status:"unpublished"},children:"כל הטיוטות"})}):e.jsx($,{categories:t})]}),i.draftArticles.length===0?e.jsx("div",{className:"px-4 py-10 md:px-6",children:e.jsx(u,{title:"אין טיוטות עדכניות",description:i.unpublished>0?`אין טיוטות שעודכנו ב-${i.draftWindowDays} הימים האחרונים. טיוטות ישנות יותר זמינות ברשימת הכתבות.`:"כל הכתבות פורסמו. צרו כתבה חדשה כדי להתחיל.",actionHref:i.unpublished>0?"/admin/articles?status=unpublished":"/admin/articles/new",actionLabel:i.unpublished>0?"כל הטיוטות":"כתבה חדשה"})}):e.jsxs(k,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx(d,{children:"כותרת"}),e.jsx(d,{className:"w-36",children:"עודכן"}),e.jsx(d,{className:"w-10"})]})}),e.jsx("tbody",{children:i.draftArticles.map(s=>e.jsxs("tr",{className:"hover:bg-white/[0.02]",children:[e.jsxs(r,{children:[e.jsx(a,{to:"/admin/articles/$id",params:{id:s.id},className:"line-clamp-1 font-medium text-white hover:underline",children:s.title}),w(s.live,s.date)?e.jsx("p",{className:"mt-0.5 text-[11px] text-red-300",children:"שידור חי"}):null]}),e.jsx(r,{children:e.jsx("span",{className:"text-[11px] text-white/40",children:L(s.updatedAt)})}),e.jsx(r,{children:e.jsx(a,{to:"/admin/articles/$id",params:{id:s.id},className:"inline-flex text-white/35 hover:text-white","aria-label":"עריכה",children:e.jsx(G,{className:"size-3.5"})})})]},s.id))})]})]}),e.jsxs("section",{className:"flex min-h-0 flex-col bg-black sm:col-span-2 xl:col-span-2",children:[e.jsx("div",{className:"flex items-center justify-between gap-3 border-b border-white/10 px-4 py-4 md:px-6",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-medium text-white",children:"פורסמו לאחרונה"}),e.jsx("p",{className:"mt-0.5 text-[11px] text-white/35",children:"כתבות באתר לפי זמן פרסום"})]})}),i.recentArticles.length===0?e.jsx("div",{className:"px-4 py-8 md:px-6",children:e.jsx(u,{title:"אין כתבות באתר",description:"פרסמו כתבה ראשונה כדי שתופיע כאן.",actionHref:"/admin/articles/new",actionLabel:"כתבה חדשה"})}):e.jsx("ul",{className:"divide-y divide-white/10",children:i.recentArticles.map(s=>e.jsx("li",{children:e.jsxs(a,{to:"/admin/articles/$id",params:{id:s.id},className:"block px-4 py-3 transition hover:bg-white/[0.03] md:px-6",children:[e.jsx("p",{className:"line-clamp-2 text-sm text-white",children:s.title}),e.jsxs("p",{className:h("mt-1 text-[11px]",ee(s.status,s.live,s.date)),children:[Y(s.status,s.live,s.date),e.jsxs("span",{className:"text-white/35",children:[" · ",L(s.date)]})]})]})},s.id))})]}),e.jsxs("section",{className:"flex flex-col bg-black sm:col-span-2 xl:col-span-2",children:[e.jsxs("div",{className:"border-b border-white/10 px-4 py-4 md:px-6",children:[e.jsx("h2",{className:"text-sm font-medium text-white",children:"פעולות מהירות"}),e.jsx("p",{className:"mt-0.5 text-[11px] text-white/35",children:"קיצורי דרך נפוצים"})]}),e.jsxs("ul",{className:"divide-y divide-white/10",children:[e.jsx(c,{to:"/admin/articles/$id",params:{id:"new"},search:{template:"alert"},label:"צבע אדום",hint:"מבזק חירום מהיר",icon:v,accent:"red"}),e.jsx(c,{to:"/admin/articles/$id",params:{id:"new"},label:"כתבה חדשה",hint:"יצירת תוכן",icon:Q}),e.jsx(c,{to:"/admin/frontpage",label:"עמוד ראשי",hint:`${i.frontpage} בלוקים`,icon:A}),e.jsx(c,{to:"/admin/sport",label:"ספורט",hint:"בפיתוח",icon:D}),e.jsx(c,{to:"/admin/tips",label:"טיפים",hint:i.tipsUnread>0?`${i.tipsUnread} לא נקראו`:`${i.tips} ידיעות`,icon:I}),e.jsx(c,{to:"/admin/ads",label:"מודעות",hint:`${i.adsActive} פעילות`,icon:N}),e.jsx(c,{to:"/admin/authors",label:"כותבים",hint:`${i.authors} פרופילים`,icon:b}),e.jsx(c,{to:"/admin/categories",label:"קטגוריות",hint:`${i.categories} קטגוריות`,icon:C}),e.jsxs("li",{className:"flex items-start gap-3 px-4 py-3.5 md:px-6",children:[e.jsx(q,{className:"mt-0.5 size-3.5 shrink-0 text-white/35"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-sm text-white/80",children:"מדיה"}),e.jsxs("p",{className:"mt-0.5 text-[11px] text-white/35",children:[i.images," תמונות בקטלוג"]})]})]})]})]}),e.jsxs("div",{className:"col-span-full bg-black px-4 py-4 md:px-6",children:[e.jsx("h2",{className:"text-sm font-medium text-white",children:"מודולים"}),e.jsx("p",{className:"mt-0.5 text-[11px] text-white/35",children:"ניהול כל אזורי המערכת"})]}),X.map(({key:s,label:z,description:U,to:K,icon:M,countKey:P,detail
1:g})=>e.jsxs(a,{to:K,className:"group flex flex-col gap-4 bg-black p-5 transition hover:bg-white/[0.03] xl:col-span-2",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-white",children:z}),e.jsx("p",{className:"mt-1 text-[11px] text-white/35",children:U})]}),e.jsx(M,{className:"size-4 shrink-0 text-white/35 transition group-hover:text-white/70"})]}),e.jsxs("div",{className:"mt-auto flex items-end justify-between gap-3",children:[e.jsx("p",{className:"text-2xl font-semibold tracking-tight text-white",children:i[P]}),e.jsx("p",{className:"text-[11px] text-white/40",children:g?g(i):"מעבר לניהול ←"})]})]},s))]})]})}function m({label:i,value:t,hint:l,accent:n,icon:x}){return e.jsxs("div",{className:"bg-black p-4 sm:p-5 md:p-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-[10px] text-white/35",children:i}),x?e.jsx(x,{className:h("size-3.5",n==="red"?"text-red-300":"text-white/30")}):null]}),e.jsx("p",{className:h("mt-3 text-3xl font-semibold tracking-tight",n==="emerald"&&"text-emerald-300",n==="red"&&"text-red-300",!n&&"text-white"),children:t.toLocaleString("he-IL")}),e.jsx("p",{className:"mt-2 text-[11px] text-white/40",children:l})]})}function c({to:i,params:t,search:l,label:n,hint:x,icon:o,accent:s}){return e.jsx("li",{children:e.jsxs(a,{to:i,params:t,search:l,className:"flex items-start gap-3 px-4 py-3.5 transition hover:bg-white/[0.03] md:px-6",children:[e.jsx(o,{className:h("mt-0.5 size-3.5 shrink-0",s==="red"?"text-red-300":"text-white/35")}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:h("text-sm",s==="red"?"text-red-200":"text-white"),children:n}),e.jsx("p",{className:"mt-0.5 text-[11px] text-white/35",children:x})]}),e.jsx(S,{className:"mt-0.5 size-3.5 shrink-0 text-white/25"})]})})}function me(){const{stats:i,categories:t}=E.useLoaderData();return e.jsx(ie,{stats:i,categories:t})}export{me as component};
2//# sourceMappingURL=admin.index-CUEyQti_.js.map

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.