PageSourceSearch

https://skarptech.org/build/assets/Show-Cq4amzRY.js

js skarptech.org collected 2026-10-02 02:05:03 UTC 10,969 bytes, 1 lines download raw bytes

1import{p as w,q as A,u as N,c as L,b as u,g as e,t as l,a as x,l as a,m as p,j as d,d as n,e as c,f as i,n as C,F as f,k as D,v as R,x as T,y as v}from"./app-BE5FaFC1.js";import{_ as V}from"./AdminLayout-CGYQh10X.js";import{_ as $}from"./FormLabel-DRDva2xL.js";import{_ as F}from"./FormTextarea-DD2S3dCs.js";import{_ as I}from"./FormButton-Try7hZlQ.js";import"./ThemeToggle-D4ZpV9wH.js";const S={class:"overflow-hidden rounded-xl border border-line bg-surface shadow-card"},B={class:"flex flex-wrap items-center justify-between gap-3 border-b border-line px-5 py-3"},E={class:"font-semibold text-ink"},P={class:"flex gap-2"},j={class:"p-5"},M={key:0,class:"mb-4 rounded-card border border-success/40 bg-success/10 px-4 py-3 text-sm text-ink"},U={key:1,class:"mb-4 rounded-card border border-danger/40 bg-danger/10 px-4 py-3 text-sm text-ink"},q={class:"grid gap-6 lg:grid-cols-2"},z={class:"overflow-hidden rounded-xl border border-line"},G={class:"divide-y divide-line text-sm"},H={class:"flex gap-4 px-4 py-2"},K={class:"text-ink"},O={key:0,class:"flex gap-4 px-4 py-2"},Z={class:"text-ink"},J={class:"flex gap-4 px-4 py-2"},Q={class:"flex gap-4 px-4 py-2"},W={class:"text-ink"},X={class:"flex gap-4 px-4 py-2"},Y={class:"text-ink"},ee={key:1,class:"rounded-pill bg-surface-muted px-2 py-0.5 text-xs text-subtle"},se={class:"flex gap-4 px-4 py-2"},te={class:"text-ink"},ie={class:"flex gap-4 px-4 py-2"},ne={class:"text-ink"},le={key:0,class:"rounded-pill bg-danger/15 px-2 py-0.5 text-xs text-danger"},de={key:1,class:"rounded-pill bg-info/15 px-2 py-0.5 text-xs text-info"},oe={class:"flex gap-4 px-4 py-2"},ae={class:"text-ink"},re={class:"flex gap-4 px-4 py-2"},ce={class:"break-all text-ink"},ue={class:"overflow-hidden rounded-xl border border-line"},xe={class:"divide-y divide-line text-sm"},be={class:"flex gap-4 px-4 py-2"},fe={class:"text-ink"},me={key:0},pe={key:1,class:"rounded-pill bg-accent/15 px-2 py-0.5 text-xs text-accent"},ve={class:"flex gap-4 px-4 py-2"},ge={class:"min-w-0"},ye=["title"],he={key:1,class:"text-subtle"},ke={class:"flex gap-4 px-4 py-2"},_e={class:"text-ink"},we={key:0,class:"border-t border-line p-4"},Ae={class:"mt-6 overflow-hidden rounded-xl border border-line"},Ne={class:"p-4"},Le={key:0,readonly:"",rows:"3",class:"w-full rounded-lg border border-line bg-canvas/40 px-3 py-2 font-mono text-xs text-ink"},Ce={key:1,class:"rounded-card border border-accent/40 bg-accent/10 px-4 py-3 text-sm text-ink"},De={class:"mt-6 overflow-hidden rounded-xl border border-line"},Re={class:"p-4"},Te={key:0,class:"overflow-x-auto"},Ve={class:"w-full border-collapse text-left text-sm"},$e={class:"px-3 py-2 text-ink"},Fe={class:"px-3 py-2 text-ink"},Ie={class:"px-3 py-2"},Se=["title"],Be={key:1,class:"rounded-card border border-info/40 bg-info/10 px-4 py-3 text-sm text-ink"},Ee={class:"mt-6 overflow-hidden rounded-xl border-2 border-danger"},Pe={class:"space-y-4 p-4"},je={key:0,class:"flex items-center gap-2 text-sm text-ink"},Me={key:1,class:"rounded-card border border-line bg-surface-muted px-4 py-3 text-sm text-ink"},Ze={__name:"Show",props:{license:{type:Object,required:!0}},setup(t){const m=t,g=w(),b=A(()=>g.props.flash??{}),r=N({reason:"",notify_user:!1});function y(){window.confirm("Are you sure you want to revoke this license? This action cannot be undone. All device registrations will be cleared.")&&r.post(`/admin/licenses/${m.license.id}/revoke`)}function h(){window.confirm("Re-sign this license with the current RSA key?")&&v.post(`/admin/licenses/${m.license.id}/resign`)}function k(){window.confirm("Are you absolutely sure you want to permanently delete this license? This cannot be undone.")&&v.delete(`/admin/licenses/${m.license.id}/delist`)}return(Ue,s)=>(i(),L(V,null,{default:u(()=>[e("div",S,[e("div",B,[e("h1",E,"License Details #"+l(t.license.id),1),e("div",P,[x(a(p),{href:`/admin/licenses/${t.license.id}/edit`,class:"rounded-pill bg-cobalt-400 px-4 py-1.5 text-sm font-semibold text-white transition-colors hover:bg-cobalt-500"},{default:u(()=>[...s[2]||(s[2]=[e("i",{class:"fas fa-edit mr-1","aria-hidden":"true"},null,-1),d("Edit License ",-1)])]),_:1},8,["href"]),x(a(p),{href:"/admin/licenses",class:"rounded-pill border-2 border-line px-4 py-1.5 text-sm font-semibold text-ink transition-colors hover:bg-surface-muted"},{default:u(()=>[...s[3]||(s[3]=[e("i",{class:"fas fa-arrow-left mr-1","aria-hidden":"true"},null,-1),d("Back ",-1)])]),_:1})])]),e("div",j,[b.value.success?(i(),n("div",M,l(b.value.success),1)):c("",!0),b.value.error?(i(),n("div",U,l(b.value.error),1)):c("",!0),e("div",q,[e("div",z,[s[13]||(s[13]=e("div",{class:"border-b border-line bg-surface-muted px-4 py-2"},[e("h2",{class:"font-semibold text-ink"},"License Information")],-1)),e("dl",G,[e("div",H,[s[4]||(s[4]=e("dt",{class:"w-2/
15 text-subtle"},"License Key:",-1)),e("dd",null,[e("code",K,l(t.license.license_key),1)])]),t.license.activation_code?(i(),n("div",O,[s[5]||(s[5]=e("dt",{class:"w-2/5 text-subtle"},"Activation Code:",-1)),e("dd",null,[e("code",Z,l(t.license.activation_code),1)])])):c("",!0),e("div",J,[s[6]||(s[6]=e("dt",{class:"w-2/5 text-subtle"},"Status:",-1)),e("dd",null,[e("span",{class:C(["rounded-pill px-2 py-0.5 text-xs font-semibold",t.license.is_active?"bg-success/15 text-success":"bg-danger/15 text-danger"])},l(t.license.is_active?"Active":"Inactive"),3)])]),e("div",Q,[s[7]||(s[7]=e("dt",{class:"w-2/5 text-subtle"},"License Type:",-1)),e("dd",W,l(t.license.type_name),1)]),e("div",X,[s[8]||(s[8]=e("dt",{class:"w-2/5 text-subtle"},"User:",-1)),e("dd",Y,[t.license.user_name?(i(),n(f,{key:0},[d(l(t.license.user_name)+" ("+l(t.license.user_email)+")",1)],64)):(i(),n("span",ee,"Guest"))])]),e("div",se,[s[9]||(s[9]=e("dt",{class:"w-2/5 text-subtle"},"Purchased:",-1)),e("dd",te,l(t.license.purchased_at),1)]),e("div",ie,[s[10]||(s[10]=e("dt",{class:"w-2/5 text-subtle"},"Expires:",-1)),e("dd",ne,[t.license.expires_at?(i(),n(f,{key:0},[d(l(t.license.expires_at)+" ",1),t.license.is_expired?(i(),n("span",le,"Expired")):c("",!0)],64)):(i(),n("span",de,"Never"))])]),e("div",oe,[s[11]||(s[11]=e("dt",{class:"w-2/5 text-subtle"},"Invoice Number:",-1)),e("dd",ae,l(t.license.invoice_number||"N/A"),1)]),e("div",re,[s[12]||(s[12]=e("dt",{class:"w-2/5 text-subtle"},"Transaction ID:",-1)),e("dd",ce,l(t.license.transaction_id||"N/A"),1)])])]),e("div",ue,[s[19]||(s[19]=e("div",{class:"border-b border-line bg-surface-muted px-4 py-2"},[e("h2",{class:"font-semibold text-ink"},"Activation Information")],-1)),e("dl",xe,[e("div",be,[s[15]||(s[15]=e("dt",{class:"w-2/5 text-subtle"},"Activation Status:",-1)),e("dd",fe,[t.license.activated_at?(i(),n("span",me,[s[14]||(s[14]=e("span",{class:"rounded-pill bg-success/15 px-2 py-0.5 text-xs text-success"},"Activated",-1)),d(" on "+l(t.license.activated_at),1)])):(i(),n("span",pe,"Not Activated"))])]),e("div",ve,[s[16]||(s[16]=e("dt",{class:"w-2/5 text-subtle"},"Machine Fingerprint:",-1)),e("dd",ge,[t.license.machine_fingerprint?(i(),n("code",{key:0,class:"block truncate text-xs text-ink",title:t.license.machine_fingerprint},l(t.license.machine_fingerprint),9,ye)):(i(),n("span",he,"Not bound to any machine"))])]),e("div",ke,[s[17]||(s[17]=e("dt",{class:"w-2/5 text-subtle"},"Activation Count:",-1)),e("dd",_e,l(t.license.activation_count),1)])]),t.license.machine_fingerprint?(i(),n("div",we,[e("button",{type:"button",class:"rounded-pill border-2 border-accent px-4 py-2 text-sm font-semibold text-accent transition-colors hover:bg-accent/10",onClick:h},[...s[18]||(s[18]=[e("i",{class:"fas fa-signature mr-1","aria-hidden":"true"},null,-1),d("Re-sign License ",-1)])])])):c("",!0)])]),e("div",Ae,[s[20]||(s[20]=e("div",{class:"border-b border-line bg-surface-muted px-4 py-2"},[e("h2",{class:"font-semibold text-ink"},"Digital Signature")],-1)),e("div",Ne,[t.license.digital_signature?(i(),n("textarea",Le,l(t.license.digital_signature),1)):(i(),n("div",Ce,"No digital signature has been generated for this license."))])]),e("div",De,[s[22]||(s[22]=e("div",{class:"border-b border-line bg-surface-muted px-4 py-2"},[e("h2",{class:"font-semibold text-ink"},"Activation History")],-1)),e("div",Re,[t.license.activation_history.length?(i(),n("div",Te,[e("table",Ve,[s[21]||(s[21]=e("thead",null,[e("tr",{class:"border-b border-line text-subtle"},[e("th",{class:"px-3 py-2 font-semibold"},"Date"),e("th",{class:"px-3 py-2 font-semibold"},"IP Address"),e("th",{class:"px-3 py-2 font-semibold"},"Machine Fingerprint")])],-1)),e("tbody",null,[(i(!0),n(f,null,D(t.license.activation_history,(o,_)=>(i(),n("tr",{key:_,class:"border-b border-line/60"},[e("td",$e,l(o.timestamp),1),e("td",Fe,l(o.ip_address),1),e("td",Ie,[e("code",{class:"block max-w-xs truncate text-xs text-ink",title:o.machine_fingerprint},l(o.machine_fingerprint),9,Se)])]))),128))])])])):(i(),n("div",Be,"No activation history available."))])]),e("div",Ee,[s[30]||(s[30]=e("div",{class:"bg-danger px-4 py-3"},[e("h2",{class:"font-semibold text-white"},[e("i",{class:"fas fa-exclamation-triangle mr-2","aria-hidden":"true"}),d("Danger Zone")])],-1)),e("div",Pe,[t.license.is_active?(i(),n(f,{key:0},[s[25]||(s[25]=e("p",{class:"text-subtle"},"Revoking this license will deactivate it and clear all device registrations. The user will no longer be able to activate the softw
1are.",-1)),e("div",null,[x($,{for:"reason"},{default:u(()=>[...s[23]||(s[23]=[d("Reason for revocation ",-1),e("span",{class:"font-normal text-subtle"},"(optional)",-1)])]),_:1}),x(F,{id:"reason",modelValue:a(r).reason,"onUpdate:modelValue":s[0]||(s[0]=o=>a(r).reason=o),rows:2,placeholder:"e.g. Refund issued, license abuse, test cleanup..."},null,8,["modelValue"])]),t.license.user_name?(i(),n("label",je,[R(e("input",{"onUpdate:modelValue":s[1]||(s[1]=o=>a(r).notify_user=o),type:"checkbox",class:"h-4 w-4 rounded border-line text-gold-400 focus:ring-gold-400/40"},null,512),[[T,a(r).notify_user]]),d(" Notify user via email ("+l(t.license.user_email)+") ",1)])):c("",!0),x(I,{variant:"danger",disabled:a(r).processing,onClick:y},{default:u(()=>[...s[24]||(s[24]=[e("i",{class:"fas fa-ban mr-1","aria-hidden":"true"},null,-1),d("Revoke License ",-1)])]),_:1},8,["disabled"])],64)):(i(),n("div",Me,[...s[26]||(s[26]=[e("i",{class:"fas fa-info-circle mr-2","aria-hidden":"true"},null,-1),d("This license is already inactive. No further action needed. ",-1)])])),s[28]||(s[28]=e("hr",{class:"border-line"},null,-1)),s[29]||(s[29]=e("p",{class:"text-sm text-subtle"},[e("i",{class:"fas fa-skull mr-2","aria-hidden":"true"}),e("strong",{class:"text-ink"},"Delist License"),d(" — Permanently remove this license from the database. "),e("span",{class:"text-danger"},"This cannot be undone.")],-1)),e("button",{type:"button",class:"rounded-pill border-2 border-danger px-5 py-2 font-semibold text-danger transition-colors hover:bg-danger/10",onClick:k},[...s[27]||(s[27]=[e("i",{class:"fas fa-trash mr-2","aria-hidden":"true"},null,-1),d("Delist License ",-1)])])])])])])]),_:1}))}};export{Ze 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.