PageSourceSearch

https://analytics.opensensors.com/assets/Projects-DD17vcjs.js

js opensensors.com collected 2026-09-25 05:22:19 UTC 2,740 bytes, 1 lines download raw bytes

1import{d as T,k as I,u as R,l as E,m as L,b as l,c as a,e as t,t as u,F as f,p as g,f as S,v as U,q as _,g as A,h as n,s as B,w as N,x as D,y as z,z as d,A as F}from"./index-CWG47DYw.js";const M={class:"flex items-center flex-col"},V={class:"w-1/2"},q={class:"text-4xl font-display font-semibold my-9"},O={key:0},$={class:"card-pane h-full px-6 pt-6 pb-3 flex flex-col gap-4"},G={class:"flex flex-row gap-2"},H=["onClick"],J={class:"relative mt-1 text-sm font-medium"},K={key:0},Q={class:"text-lg font-medium"},Z=T({__name:"Projects",setup(W){const p=[{title:"Active",getProjects:()=>c.value.filter(e=>d.isEmpty(e.tags))},{title:"Demo",getProjects:()=>c.value.filter(e=>e.tags?.includes("demo"))},{title:"Archived",getProjects:()=>c.value.filter(e=>e.tags?.includes("archived"))}],m=I(),v=R(),o=A({selectedIndex:0,searchText:""});y();async function y(){await m.getProjects()}const j=n(()=>!d.isEmpty(c.value)&&c.value.length>1),h=n(()=>x.value?"live":"workspace-overview"),x=n(()=>v.currentRoute.value.name==="live-projects"),b=n(()=>x.value?"Live view":"Analytics dashboards"),c=n(()=>{const{projects:e}=F(m);return e.value}),w=n(()=>{const e=d.sortBy(p[o.selectedIndex].getProjects(),s=>s.name.toLocaleLowerCase());return d.isEmpty(o.searchText)?e:e.filter(s=>s.name.match(new RegExp(o.searchText,"i")))}),k=n(()=>p.filter(e=>e.getProjects().length>0));function P(e){o.selectedIndex=e}return E(c,e=>{e&&e.length===1&&v.push({name:h.value,params:{projectUri:e[0].URI}})}),(e,s)=>{const C=L("router-link");return l(),a("div",M,[t("div",V,[t("div",q,u(b.value),1),j.value?(l(),a("div",O,[t("div",$,[t("ul",G,[(l(!0),a(f,null,g(k.value,(r,i)=>(l(),a("li",{key:r.title,class:B(["cursor-pointer border-solid border-b-2 py-2 px-3",i===o.selectedIndex?"text-light-text border-primary-300":"text-link-color border-transparent"])},[t("a",{onClick:N(X=>P(i),["prevent"])},u(r.title)+" ("+u(r.getProjects().length)+")",9,H)],2))),128))]),t("div",J,[s[1]||(s[1]=t("div",{class:"pointer-events-none absolute flex pl-3 mt-1.5"},[t("span",{class:"material-symbols-rounded text-light-text"},"search")],-1)),S(t("input",{"onUpdate:modelValue":s[0]||(s[0]=r=>o.searchText=r),class:"block pl-10 w -full rounded-sm border border-gray-300 bg-white py-2 pr-12 focus:outline-none placeholder-light-text",placeholder:"Search projects"},null,512),[[U,o.searchText]])]),t("ul",null,[(l(!0),a(f,null,g(w.value,(r,i)=>(l(),a("li",{key:r.URI},[i!==0?(l(),a("hr",K)):_("",!0),D(C,{to:{name:h.value,params:{projectUri:r.URI}},class:"flex justify-between my-4"},{default:z(()=>[t("span",Q,u(r.name),1),s[2]||(s[2]=t("span",{class:"material-symbols-rounded text-light-text"},"chevron_right",-1))]),_:2},1032,["to"])]))),128))])])])):_("",!0)])])}}});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.