PageSourceSearch

https://drophighlight.com/assets/SuperadminVideosFallback-B7CnPRTS.js

js drophighlight.com collected 2026-09-30 06:38:29 UTC 2,130 bytes, 1 lines download raw bytes

1import{a as c,r as t,j as e,C as x,h as b,i as h,k as j,l as g,B as f,J as o,s as v}from"./index-P0N1Je5T.js";import{I as F}from"./input-1tKBwIjz.js";import{L as k}from"./label-CoHN_xq2.js";import{F as y}from"./film-DYmoxHh6.js";import{L as C}from"./loader-circle-BQs4OzSl.js";function I(){const{t:a}=c(),[r,m]=t.useState(""),[l,i]=t.useState(!1),[d,u]=t.useState(null),p=async()=>{if(!r.trim()){o.error(a("superadmin.videosFallback.tool.missingIdToast"));return}i(!0);try{const{data:s,error:n}=await v.functions.invoke("reencode-gallery-item",{body:{gallery_item_id:r.trim()}});if(n)throw n;if(s!=null&&s.error)throw new Error(s.error);u((s==null?void 0:s.job_id)??null),o.success(a("superadmin.videosFallback.tool.successToast"))}catch(s){console.error("reencode error:",s),o.error(a("superadmin.videosFallback.tool.failToast").replace("{message}",s.message??String(s)))}finally{i(!1)}};return e.jsxs(x,{children:[e.jsxs(b,{children:[e.jsxs(h,{className:"flex items-center gap-2",children:[e.jsx(y,{className:"h-5 w-5"}),a("superadmin.videosFallback.tool.title")]}),e.jsx(j,{children:a("superadmin.videosFallback.tool.description")})]}),e.jsxs(g,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(k,{htmlFor:"gallery-item-id",children:a("superadmin.videosFallback.tool.galleryItemIdLabel")}),e.jsx(F,{id:"gallery-item-id",value:r,onChange:s=>m(s.target.value),placeholder:"uuid",disabled:l})]}),e.jsx(f,{onClick:p,disabled:l,children:l?e.jsxs(e.Fragment,{children:[e.jsx(C,{className:"mr-2 h-4 w-4 animate-spin"}),a("superadmin.videosFallback.tool.submitting")]}):a("superadmin.videosFallback.tool.submit")}),d&&e.jsxs("p",{className:"text-sm text-muted-foreground",children:[a("superadmin.videosFallback.tool.lastJob"),": ",e.jsx("code",{children:d})]})]})]})}const T=()=>{const{t:a}=c();return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold",children:a("superadmin.videosFallback.title")}),e.jsx("p",{className:"text-muted-foreground",children:a("superadmin.videosFallback.subtitle")})]}),e.jsx(I,{})]})};export{T 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.