klioso
Version:
Multi-Service Provider Management System for WordPress and Web Development with Enhanced Scanner
2 lines (1 loc) • 3.54 kB
JavaScript
import{j as e,L as l}from"./app-DZ07njAd.js";import{A as r}from"./AuthenticatedLayout-BKOGad_C.js";import{B as i}from"./Button-D6Jcp-tA.js";import{B as d}from"./BackButton-DWEPPwYa.js";import{D as n}from"./DeleteButton-BGbjowl2.js";import"./ApplicationLogo-GDc3W5ND.js";import"./transition-BCwV6od8.js";function p({plugin:s,websites:a}){return e.jsx(r,{header:e.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Plugin Details"}),children:e.jsxs("div",{className:"max-w-4xl mx-auto space-y-6 mt-8",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx(d,{fallbackRoute:"/plugins"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(i,{as:l,href:`/plugins/${s.id}/edit`,children:"Edit Plugin"}),e.jsx(n,{resource:s,resourceName:"plugin",deleteRoute:`/plugins/${s.id}`})]})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[e.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Plugin Information"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Name"}),e.jsx("p",{className:"mt-1 text-sm text-gray-900",children:s.name})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Type"}),e.jsx("span",{className:`mt-1 inline-flex px-2 py-1 text-xs font-semibold rounded-full ${s.is_paid?"bg-orange-100 text-orange-800":"bg-green-100 text-green-800"}`,children:s.is_paid?"Paid":"Free"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Install Source"}),e.jsx("p",{className:"mt-1 text-sm text-gray-900",children:s.install_source||"-"})]}),s.is_paid&&s.purchase_url&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Purchase URL"}),e.jsx("p",{className:"mt-1 text-sm",children:e.jsx("a",{href:s.purchase_url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:s.purchase_url})})]}),s.description&&e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Description"}),e.jsx("p",{className:"mt-1 text-sm text-gray-900",children:s.description})]})]})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[e.jsxs("h3",{className:"text-lg font-semibold mb-4",children:["Websites Using This Plugin (",a.length,")"]}),a.length>0?e.jsx("div",{className:"space-y-3",children:a.map(t=>e.jsx("div",{className:"border rounded-lg p-4",children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"font-medium",children:e.jsx(l,{href:`/websites/${t.id}`,className:"text-blue-600 hover:underline",children:t.domain_name})}),e.jsxs("div",{className:"flex gap-4 mt-2 text-sm",children:[e.jsxs("span",{children:[e.jsx("strong",{children:"Version:"})," ",t.pivot.version||"Not specified"]}),e.jsx("span",{className:`px-2 py-1 rounded text-xs ${t.pivot.is_active?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:t.pivot.is_active?"Active":"Inactive"})]})]}),e.jsx("div",{className:"ml-4",children:e.jsx(i,{as:l,href:`/websites/${t.id}`,size:"sm",variant:"outline",children:"View Website"})})]})},t.id))}):e.jsx("div",{className:"text-center py-8 text-gray-500",children:e.jsx("p",{children:"This plugin is not currently used by any websites."})})]})]})})}export{p as default};