@xcpcio/board-app
Version:
XCPCIO Board App
2 lines (1 loc) • 1.6 kB
JavaScript
import{a as x}from"./index-BYh7ktqe.js";import{C as h}from"./index-BNZRV8LR.js";import{d as y,u as S,A as k,m as N,p as d,C as w,c as o,o as n,h as t,b as a,s as T,k as r,n as _}from"./index-CYsJ2gG-.js";import{b as m}from"./constant-2MSuUQN9.js";import{u as E}from"./query-DfOnN8jV.js";import{_ as I}from"./_plugin-vue_export-helper-DlAUqK2U.js";const b={class:"bg-[#323443]","text-gray-200":"","w-screen":"","h-screen":""},B={key:0},D={flex:"","flex-col":"","justify-center":"","items-center":"","w-screen":"","h-screen":"","text-xl":"",italic:""},U={key:0},j={key:1},F={flex:"","flex-col":"","items-center":"","justify-center":"","font-mono":""},L={key:0},O={key:1},P=y({__name:"Countdown",props:{dataSourceUrl:null},setup(u){const f=u,{t:p}=S(),v=k(m),s=N(),e=d({}),l=d(!1),{data:c,isError:C,error:g}=E(f.dataSourceUrl,s);return w(c,async()=>{var i;c.value===null||c.value===void 0||(e.value=x((i=c.value)==null?void 0:i.contest),v.value=`${e.value.name} | ${m}`,l.value=!0)},{immediate:!0}),(i,V)=>(n(),o("div",b,[t(l)?(n(),o("div",j,[a("div",F,[a("div",{"mt-20":"","text-6xl":"",class:_([t(e).getContestState(t(s)).toString()])},r(t(e).getContestState(t(s))),3),a("div",{"mt-20":"",class:_(["text-[320px]",[t(e).getContestState(t(s)).toString()]])},[t(e).getContestState(t(s))===t(h).PENDING?(n(),o("div",L,r(t(e).getContestPendingTime(t(s))),1)):(n(),o("div",O,r(t(e).getContestElapsedTime(t(s))),1))],2)])])):(n(),o("div",B,[a("div",D,[a("div",null,r(t(p)("common.loading"))+"... ",1),t(C)?(n(),o("div",U,r(t(g)),1)):T("",!0)])]))]))}}),X=I(P,[["__scopeId","data-v-2d2a8baf"]]);export{X as _};