PageSourceSearch

https://user.bitfocus.io/assets/index-CDXAsAIv.js

js bitfocus.io collected 2026-10-03 22:10:16 UTC 3,442 bytes, 1 lines download raw bytes

1import{x as P,r as s,y as k,u as E,b as j,H as L,c as w,g as C,a6 as A,j as e,l as h,P as D}from"./index-4TxqAkyO.js";import{P as R}from"./PageTitle-Dhu30r7N.js";import{g as N}from"./selectors-DduQa44e.js";import{B as $}from"./ButtonGroup-CwBsc8Wd.js";import{A as H}from"./Alert-DFo8t4QC.js";import{T as I,a as O,d as W,b as _,c as y}from"./TableRow-rcckUy-m.js";const F=P(s.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})),M=k(i=>({root:{width:"100%",maxWidth:1400},table:{minWidth:650}}));function z({packages:i,isLoading:c}){const[n,l]=s.useState({});return s.useEffect(()=>{const a={};i.forEach(t=>{t.version&&(a[t.version]===void 0?a[t.version]={version:t.version,packages:[t],date:t.published}:a[t.version].packages.push(t))}),console.log(a),l(a)},[i]),e.jsxs(e.Fragment,{children:[e.jsx(I,{component:D,children:e.jsx(O,{children:e.jsx(W,{children:Object.keys(n).map(a=>{const t=n[a];return t?e.jsxs(_,{children:[e.jsxs(y,{align:"left",children:[e.jsx("h3",{style:{margin:0},children:a.replace(/-(beta|develop|main)-.+$/,"").replace(/0.0.0\+/,"").replace(/(.{7,})\-[0-9]{1,2}-[0-9]{1,2}-[0-9]{1,2}$/,"$1").replace(/\+(\d+)-[a-f0-9]{5,}/,"+$1")}),t.date.replace(/T.+$/,"")]}),e.jsx(y,{align:"right",children:t.packages.sort((r,p)=>r.target.localeCompare(p.target)).map(r=>e.jsx("div",{style:{display:"inline-block",backgroundColor:"#ddd",padding:"1px 10px",borderRadius:5,marginBottom:5,marginRight:5},children:e.jsx("a",{href:r.uri,target:"_blank",rel:"noreferrer",style:{color:"#222",textDecoration:"none",cursor:"pointer"},children:r.target})},r.target))})]},a):e.jsx(e.Fragment,{})})})})}),n&&Object.keys(n).length===0&&e.jsx("div",{style:{textAlign:"center",marginTop:0,fontWeight:"bold",backgroundColor:"#f0f0f0",padding:20,borderRadius:5},children:c?"Loading builds from server...":"No releases"})]})}const G=150,Y=()=>{var b;const i=E(),[c,n]=s.useState([]),l=j(N),a=j(L),t=w(),[r,p]=s.useState(null),[v,m]=s.useState([]),[o,f]=s.useState("beta"),[T,g]=s.useState(!0),d=location.pathname.split("/")[2];s.useEffect(()=>{a&&i(C())},[]),s.useEffect(()=>{g(!0),A.getPackagesByProject(d,o,G).then(u=>{g(!1),console.log(u.data.packages),m(u.data.packages)})},[r,o]),s.useEffect(()=>{l&&n(l)},[l]),s.useEffect(()=>{if(c&&d){const u=c.find(B=>{var x;return((x=B.metadata)==null?void 0:x.project)===d});p(u)}},[c,d]);const S=M();return e.jsx("div",{className:S.root,children:r&&e.jsxs("div",{children:[e.jsxs(R,{children:["Builds - Bitfocus ",(b=r==null?void 0:r.metadata)==null?void 0:b.name]}),e.jsxs($,{"aria-label":"contained primary button group",style:{marginTop:15},children:[e.jsxs(h,{color:"primary",onClick:()=>{t.push("/download")},children:[e.jsx(F,{})," Downloads"]}),e.jsx(h,{color:o==="stable"?"primary":"default",variant:o==="stable"?"contained":"outlined",onClick:()=>{o!=="stable"&&m([]),f("stable")},children:"Stable"}),e.jsx(h,{color:o==="beta"?"primary":"default",variant:o==="beta"?"contained":"outlined",onClick:()=>{o!=="beta"&&m([]),f("beta")},children:"Beta"})]}),o==="experimental"&&e.jsx("div",{style:{marginTop:15},children:e.jsx(H,{severity:"error",children:"Never use experimental builds in production. They are not tested, and may very well contain serious bugs and end up corrupting your config files, etc. Back up your data, and use at your own risk."})}),e.jsx("div",{style:{marginTop:15},children:e.jsx(z,{packages:v,isLoading:T})})]})})};export{Y 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.