UNPKG

@runeya/runeya

Version:

Monitor processes as a stack

2 lines (1 loc) 2.05 kB
import{r as _,j as h,Y as w,a as r,o as s,b as l,e as b,f as g,F as v,q as x,u as y,x as L,d as R}from"./index-CXxIspfv.js";import{_ as $}from"./_plugin-vue_export-helper-DlAUqK2U.js";const T={props:{lowResources:{default:!1}},setup(i){const n=_([]),p=t=>{const o=Math.floor(t*100/5/100),m=Math.floor(100*100/5/100),M=t*100/5%100,B=o*100/m,d=Math.floor(Math.random()*40),z=Math.random()>.5?M+d:M-d;return{top:(Math.random()>.5?B+d:B-d)+"%",left:z+"%",backgroundColor:"rgba(255, 255, 255, 0.6)",boxShadow:"0 0 10px 1px white"}};h(()=>n.value=Array(100).fill("").map((t,o)=>p(o)));const c=10,u=t=>({bottom:"0",top:t*100/c+"%",width:Math.random()*50+"%"}),f=t=>({right:"0",top:t*100/c+"%",width:Math.random()*50+"%"}),a=_([]),e=_([]);h(()=>setTimeout(()=>a.value=Array(10).fill("").map((t,o)=>u(o)))),h(()=>setTimeout(()=>e.value=Array(10).fill("").map((t,o)=>f(o))));let k;return i.lowResources||(k=setInterval(()=>{n.value.map(t=>{const o=Math.random()/3+.3333333333333333;t.backgroundColor=`rgba(255, 255, 255, ${o})`})},300)),w(()=>clearInterval(k)),{barsLeft:a,barsRight:e,stars:n}}},C={class:"background-root"},I={class:"stars"},S={class:"bars left"},q={class:"bars right"};function A(i,n,p,c,u,f){return s(),r("div",C,[l("div",I,[b(L,{name:"appear"},{default:g(()=>[(s(!0),r(v,null,x(c.stars,(a,e)=>(s(),r("div",{class:"star",key:"star-"+e,style:y({...a})},null,4))),128))]),_:1})]),l("div",S,[b(L,{name:"appear"},{default:g(()=>[(s(!0),r(v,null,x(c.barsLeft,(a,e)=>(s(),r("div",{class:"bar",key:"bar-left"+e,style:y({...a})},null,4))),128))]),_:1})]),l("div",q,[b(L,{name:"appear"},{default:g(()=>[(s(!0),r(v,null,x(c.barsRight,(a,e)=>(s(),r("div",{class:"bar",key:"bar-right"+e,style:y({...a})},null,4))),128))]),_:1})])])}const U=$(T,[["render",A],["__scopeId","data-v-750299bb"]]),N="/assets/rocket-Cqyxqx2p.png",P={},V={class:"left"};function F(i,n,p,c,u,f){return s(),r("div",V,n[0]||(n[0]=[l("div",{class:"logo"},[l("img",{src:N,alt:""}),R(" Runeya ")],-1)]))}const Y=$(P,[["render",F],["__scopeId","data-v-c6f9ad9a"]]);export{U as B,Y as L};