PageSourceSearch

https://bci-edu-6qu8apwz.manus.space/assets/AdminSeoSettings-BtI8ak5y.js

js bci-edu-6qu8apwz.manus.space collected 2026-10-03 05:00:59 UTC 11,553 bytes, 1 lines download raw bytes

1import{j as e}from"./trpc-vendor-Bv0iaNDN.js";import{r as d}from"./react-vendor-CGOjsTCb.js";import{A as S}from"./AdminLayout-BvvhRFUw.js";import{t as l,i as r,G as b,S as h,b as f}from"./index-Bp5xQ-En.js";import{I as y,Z as A}from"./zap-BTeD7t6F.js";import{R as m}from"./refresh-cw-DS2mrj9R.js";import{K as j}from"./key-Dj26-VJd.js";import{C as N}from"./circle-alert-pNYLLSE0.js";import{S as v}from"./save-BXh8PPUG.js";import"./bell-DDfP3iQl.js";import"./image-NXvCck6X.js";import"./message-square-D7ASK-H8.js";import"./graduation-cap-DtyfmjZD.js";import"./phone-call-DR-uxlHF.js";import"./radix-vendor-BsQgJgbQ.js";import"./charts-DUKIMxkY.js";function F(){const[a,n]=d.useState({indexnow_key:"",baidu_token:"",site_domain:"",auto_submit:"true",daily_limit:"10"}),[g,c]=d.useState(!1),{data:i,isLoading:x,refetch:u}=l.seoAdmin.getConfig.useQuery(),o=l.seoAdmin.saveConfig.useMutation({onSuccess:()=>{r.success("SEO configuration saved!"),c(!0),u(),setTimeout(()=>c(!1),3e3)},onError:()=>r.error("Failed to save configuration.")});d.useEffect(()=>{i&&n({indexnow_key:i.indexnow_key??"",baidu_token:i.baidu_token??"",site_domain:i.site_domain??"bci-edu-6qu8apwz.manus.space",auto_submit:i.auto_submit??"true",daily_limit:i.daily_limit??"10"})},[i]);const p=()=>o.mutate(a);return e.jsx(S,{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:43",title:"SEO Settings",children:e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:44",className:"space-y-5 max-w-3xl",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:46",children:[e.jsx("h1",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:47",className:"text-xl font-bold text-gray-900",children:"SEO Settings"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:48",className:"text-sm text-gray-500 mt-0.5",children:"Configure search engine submission APIs and global SEO options."})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:52",className:"bg-blue-50 border border-blue-200 rounded-xl p-4 text-sm text-blue-800 flex items-start gap-2",children:[e.jsx(y,{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:53",size:16,className:"mt-0.5 shrink-0 text-blue-500"}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:54",children:[e.jsx("strong",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:55",children:"How it works:"})," Configure your IndexNow API key and Baidu token here. These 
1credentials are used by the SEO Articles and Search Submission modules to automatically notify search engines when new content is published."]})]}),x?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:60",className:"flex items-center gap-2 text-gray-400 text-sm py-8",children:[e.jsx(m,{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:61",size:16,className:"animate-spin"})," Loading settings…"]}):e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:64",className:"space-y-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:66",className:"bg-white rounded-xl border border-gray-200 shadow-sm p-6",children:[e.jsxs("h2",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:67",className:"font-semibold text-gray-900 mb-1 flex items-center gap-2",children:[e.jsx(b,{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:68",size:16,className:"text-bci"})," Site Configuration"]}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:70",className:"text-xs text-gray-400 mb-5",children:"Your website's public domain used for generating sitemap and submission URLs."}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:71",children:[e.jsx("label",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:72",className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Site Domain"}),e.jsx("input",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:73",type:"text",value:a.site_domain,onChange:s=>n(t=>({...t,site_domain:s.target.value})),placeholder:"bci-edu-6qu8apwz.manus.space",className:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-bci/30 focus:border-bci"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:80",className:"text-xs text-gray-400 mt-1",children:"Do not include https:// or trailing slash."})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:85",className:"bg-white rounded-xl border border-gray-200 shadow-sm p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:86",className:"flex items-center gap-2 mb-1",children:[e.jsx(A,{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:87",size:16,className:"text-yellow-500"}),e.jsx("h2",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:88",className:"font-semibold text-gray-900",children:"IndexNow (Bing / Yandex)"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:89",className:"ml-auto text-xs bg-green-100 text-green-700 px-2 py-0.5 rounded-full font-medium",children:"Recommended"})]}),e.jsxs("p",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:91",className:"text-xs text-gray-400 mb-5",children:["One push notifies Bing, Yandex, and other IndexNow-compatible engines simultaneously."," ",e.jsx("a",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:93",href:"https://www.bing.com/webmasters",target:"_blank",rel:"noopener noreferrer",className:"text-bci hover:underline",children:"Get your key →"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:95",children:[e.jsx("label",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:96",className:"block text-sm font-medium text-gray-700 mb-1.5",children:"IndexNow API Key"}),e.jsx("input",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:97",type:"text",value:a.indexnow_key,onChange:s=>n(t=>({...t,indexnow_key:s.target.value})),placeholder:"Enter your IndexNow key from Bing Webmaster Tools",className:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm font-mono focus:outline-none focus:ring-2 focus:ring-bci/30 focus:border-bci"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:108",className:"bg-white rounded-xl border border-gray-200 shadow-sm p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:109",className:"flex items-center gap-2 mb-1",children:[e.jsx(j,{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:110",size:16,className:"text-red-500"}),e.jsx("h2",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:111",className:"font-semibold text-gray-900",children:"Baidu (百度) Push API"})]}),e.jsxs("p",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:113",className:"text-xs text-gray-400 mb-5",children:["For Chinese audience — submit URLs to Baidu Search Resource Platform for faster indexing."," ",e.jsx("a",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:115",href:"https://ziyuan.baidu.com/linksubmit/index",target:"_blank",rel:"noopener noreferrer",className:"text-bci hover:underline",children:"Get your token →"})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:117",children:[e.jsx("label",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:118",className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Baidu Push Token"}),e.jsx("input",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:119",type:"text",value:a.baidu_token,onChange:s=>n(t=>({...t,baidu_token:s.target.value})),placeholder:"Enter your Baidu push token",className:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm font-mono focus:outline-none focus:ring-2 focus:ring-bci/30 focus:border-bci"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:130",className:"bg-white rounded-xl border border-gray-200 shadow-sm p-6",children:[e.jsxs("h2",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:131",className:"font-semibold text-gray-900 mb-1 flex items-center gap-2",children:[e.jsx(h,{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:132",size:16,className:"text-bci"})," Auto-Submit Settings"]}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:134",className:"text-xs text-gray-400 mb-5",children:"Control automatic submission behaviour when articles are published."}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:135",className:"grid grid-cols-2 gap-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:136",children:[e.jsx("label",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:137",className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Auto-submit on publish"}),e.jsxs("select",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:138",value:a.auto_
1submit,onChange:s=>n(t=>({...t,auto_submit:s.target.value})),className:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-bci/30 focus:border-bci",children:[e.jsx("option",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:143",value:"true",children:"Enabled"}),e.jsx("option",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:144",value:"false",children:"Disabled"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:147",children:[e.jsx("label",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:148",className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Daily submission limit"}),e.jsx("input",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:149",type:"number",min:1,max:100,value:a.daily_limit,onChange:s=>n(t=>({...t,daily_limit:s.target.value})),className:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-bci/30 focus:border-bci"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:162",className:"bg-amber-50 border border-amber-200 rounded-xl p-4 flex items-start gap-2",children:[e.jsx(N,{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:163",size:14,className:"text-amber-500 mt-0.5 shrink-0"}),e.jsxs("p",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:164",className:"text-xs text-amber-800",children:["After saving your IndexNow key, place a verification file at"," ",e.jsxs("code",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:166",className:"bg-amber-100 px-1 rounded",children:["/public/","{your-key}",".txt"]})," ","containing only the key value. This is required by Bing for domain ownership verification."]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:172",className:"flex items-center gap-3",children:[e.jsxs("button",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:173",onClick:p,disabled:o.isPending,className:"flex items-center gap-2 px-5 py-2.5 bg-bci hover:bg-bci/90 disabled:opacity-50 text-white text-sm font-medium rounded-lg transition-colors",children:[o.isPending?e.jsx(m,{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:178",size:14,className:"animate-spin"}):e.jsx(v,{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:178",size:14}),"Save Configuration"]}),g&&e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:182",className:"flex items-center gap-1.5 text-green-600 text-sm",children:[e.jsx(f,{"data-loc":"client/src/pages/admin/AdminSeoSettings.tsx:183",size:14})," Saved successfully"]})]})]})]})})}export{F 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.