PageSourceSearch

https://flightscan.com/build/assets/Index-BCxBWY_f.js

js flightscan.com collected 2026-09-25 11:09:30 UTC 4,616 bytes, 1 lines download raw bytes

1import{b as C,a as l,j as e,H as S,r as x}from"./app-CMNUi8hz.js";import{A as I}from"./AdminLayout-DQ9WC4xq.js";import{C as k,c as A}from"./Card-BGYEdFTS.js";import{B as c}from"./Button-BJrQXHQm.js";import{I as _}from"./Input-mERZ7Uzh.js";import{K as P}from"./key-round-CbMiDTv9.js";import{S as z}from"./send-C_kPMSD-.js";import{C as E}from"./circle-check-9IdvnHme.js";import{C as F}from"./circle-x-BsjEoNGl.js";import{T as L}from"./trash-2-BnCjByad.js";import"./createLucideIcon-9FmARqOf.js";import"./dollar-sign-CMad3K74.js";import"./x-HdgbVzKN.js";import"./tag-BiZU32zi.js";import"./users-DBUr9X9C.js";import"./mail-ckbZOLpZ.js";import"./file-text-BYn6y269.js";import"./shield-alert-BELcVVaG.js";function Z({credentials:g=[],indexingStatus:n}){const{flash:r}=C().props,[a,d]=l.useState({}),[f,p]=l.useState(null),[v,u]=l.useState(null),[j,h]=l.useState(!1),b=g.reduce((t,i)=>{var s;return(t[s=i.group]??(t[s]=[])).push(i),t},{}),w=t=>{var s;const i=(s=a[t.id])==null?void 0:s.trim();i&&(p(t.id),x.put(`/admin/credentials/${t.id}`,{value:i},{preserveScroll:!0,onSuccess:()=>d(o=>({...o,[t.id]:""})),onFinish:()=>p(null)}))},N=t=>{confirm(`Clear the stored ${t.label}? Services using it will fall back to .env (if set) or stop working.`)&&(u(t.id),x.delete(`/admin/credentials/${t.id}`,{preserveScroll:!0,onFinish:()=>u(null)}))},y=()=>{h(!0),x.post("/admin/credentials/submit-indexing",{},{preserveScroll:!0,onFinish:()=>h(!1)})};return e.jsxs(I,{children:[e.jsx(S,{title:"API Credentials"}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-extrabold text-white tracking-tight flex items-center gap-2",children:[e.jsx(P,{className:"w-6 h-6 text-primary-400"})," API Credentials"]}),e.jsx("p",{className:"text-xs text-slate-400 mt-1 max-w-2xl",children:"Manage every external API key this platform depends on directly — no .env edits or redeploys needed. A saved value here takes priority over .env immediately. Values are encrypted at rest and never sent back to the browser once saved; each field shows only a masked preview."})]}),(r==null?void 0:r.success)&&e.jsx("div",{className:"rounded-lg border border-green-500/30 bg-green-500/10 px-4 py-3 text-sm text-green-300",children:r.success}),(r==null?void 0:r.error)&&e.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-300",children:r.error}),Object.entries(b).map(([t,i])=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h2",{className:"text-sm font-bold text-slate-300 uppercase tracking-wide",children:t}),t==="SEO & Indexing"&&e.jsxs(c,{variant:"outline",size:"sm",isLoading:j,disabled:!n.indexnow&&!n.google,onClick:y,title:!n.indexnow&&!n.google?"Add an IndexNow or Google credential first":"Submit unindexed pages with fare data now, instead of waiting for the next cron run",children:[e.jsx(z,{className:"w-3.5 h-3.5 mr-1.5"})," Submit for Indexing Now"]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:i.map(s=>{var o;return e.jsxs(k,{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-sm font-bold text-white",children:s.label}),s.has_value?e.jsxs("span",{className:"flex items-center gap-1 text-xs text-green-400",children:[e.jsx(E,{className:"w-3.5 h-3.5"})," Configured"]}):e.jsxs("span",{className:"flex items-center gap-1 text-xs text-slate-500",children:[e.jsx(F,{className:"w-3.5 h-3.5"})," Not configured"]})]}),s.description&&e.jsx("p",{className:"text-xs text-slate-500 mb-2",children:s.description}),s.preview&&e.jsxs("p",{className:"text-xs text-slate-400 font-mono mb-3",children:["Current: ",s.preview]}),e.jsxs("div",{className:"space-y-2",children:[s.field_type==="json"?e.jsx("textarea",{rows:4,placeholder:"Paste the full service account JSON here",value:a[s.id]??"",onChange:m=>d({...a,[s.id]:m.target.value}),className:A("input-field font-mono text-xs w-full resize-y")}):e.jsx(_,{type:s.field_type==="password"?"password":"text",placeholder:s.has_value?"Enter a new value to replace it":"Not set",value:a[s.id]??"",onChange:m=>d({...a,[s.id]:m.target.value}),autoComplete:"off"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(c,{variant:"accent",size:"sm",isLoading:f===s.id,disabled:!((o=a[s.id])!=null&&o.trim()),onClick:()=>w(s),children:"Save"}),s.has_value&&e.jsxs(c,{variant:"ghost",size:"sm",isLoading:v===s.id,onClick:()=>N(s),children:[e.jsx(L,{className:"w-3.5 h-3.5 mr-1"})," Clear"]})]})]})]},s.id)})})]},t))]})]})}export{Z 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.