@xcpcio/board-app 0.24.3 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/about.html +2 -2
  2. package/dist/assets/{DataSourceInput.vue_vue_type_script_setup_true_lang-bdd603c5.js → DataSourceInput.vue_vue_type_script_setup_true_lang-7dd754fb.js} +1 -1
  3. package/dist/assets/{TheInput.vue_vue_type_script_setup_true_lang-19d39372.js → TheInput.vue_vue_type_script_setup_true_lang-bd7b9fe6.js} +1 -1
  4. package/dist/assets/{_...all_-65bba7d0.css → _...all_-16dbd7b8.css} +1 -1
  5. package/dist/assets/{_...all_-76798627.js → _...all_-d6af1410.js} +3 -3
  6. package/dist/assets/{_name_-82a33e88.js → _name_-94d749aa.js} +1 -1
  7. package/dist/assets/{about-6cc32222.js → about-f01d587e.js} +1 -1
  8. package/dist/assets/{app-a6c41ce5.js → app-b6bf8dd1.js} +13 -13
  9. package/dist/assets/{board-layout-a5587489.js → board-layout-52e96f00.js} +1 -1
  10. package/dist/assets/en-644e039f.js +1 -0
  11. package/dist/assets/{headless-13d3a223.js → headless-e8cc73cd.js} +1 -1
  12. package/dist/assets/{home-6560de4b.js → home-334a9895.js} +1 -1
  13. package/dist/assets/index-43dadeef.js +1 -0
  14. package/dist/assets/{index-da8e69bb.css → index-7f7e6de0.css} +2 -2
  15. package/dist/assets/{index-layout-f4d3ebfe.js → index-layout-ad419356.js} +1 -1
  16. package/dist/assets/{test-4090a9c4.js → test-27f85731.js} +1 -1
  17. package/dist/assets/{user-5e01721a.js → user-b8ba5adf.js} +1 -1
  18. package/dist/assets/{virtual_pwa-register-af30bbb9.js → virtual_pwa-register-698ae235.js} +1 -1
  19. package/dist/assets/{zh-CN-534ed2df.js → zh-CN-44b801f0.js} +1 -1
  20. package/dist/balloon.html +1 -1
  21. package/dist/index.html +1 -1
  22. package/dist/sitemap.xml +1 -1
  23. package/dist/ssr-manifest.json +133 -129
  24. package/dist/sw.js +1 -1
  25. package/dist/test.html +1 -1
  26. package/package.json +3 -3
  27. package/src/components/Balloon.vue +2 -2
  28. package/src/components/BalloonBlock.vue +5 -6
  29. package/src/components/board/Board.vue +7 -1
  30. package/src/components/board/BoardTab.vue +35 -0
  31. package/src/components/board/Progress.vue +9 -7
  32. package/src/components.d.ts +1 -0
  33. package/dist/assets/en-4a3e0074.js +0 -1
  34. package/dist/assets/index-4ddb0930.js +0 -1
@@ -7,9 +7,8 @@ const props = defineProps<{
7
7
  balloon: Balloon,
8
8
  }>();
9
9
 
10
- const balloon = computed(() => {
11
- return props.balloon;
12
- });
10
+ const index = computed(() => props.index);
11
+ const balloon = computed(() => props.balloon);
13
12
 
14
13
  const el = ref(null);
15
14
  const isVisible = useElementVisibility(el);
@@ -42,18 +41,18 @@ function getColor(c: ThemeColor): string {
42
41
  h-24
43
42
  flex flex-row gap-x-4
44
43
  font-mono text-4xl
45
- :class="[props.index % 2 === 0 ? 'bg-resolver-bg-zero' : 'bg-resolver-bg-one']"
44
+ :class="[index % 2 === 0 ? 'bg-resolver-bg-zero' : 'bg-resolver-bg-one']"
46
45
  >
47
46
  <div
48
47
  w-20
49
48
  flex flex-shrink-0 justify-center items-center
50
49
  :style="{
51
- backgroundColor: getColor(balloon.problem!.balloonColor!.background_color),
50
+ backgroundColor: getColor(balloon.problem?.balloonColor?.background_color ?? 'rgba(0, 0, 0, 0.5)'),
52
51
  }"
53
52
  >
54
53
  <div
55
54
  :style="{
56
- color: getColor(balloon.problem!.balloonColor!.color),
55
+ color: getColor(balloon.problem?.balloonColor?.color ?? '#fff'),
57
56
  }"
58
57
  >
59
58
  {{ balloon.problem.label }}
@@ -325,9 +325,15 @@ const widthClass = "sm:w-[1260px] xl:w-screen";
325
325
  </div>
326
326
  </div>
327
327
 
328
+ <div mt-1>
329
+ <BoardTab
330
+ :rank="rank"
331
+ />
332
+ </div>
333
+
328
334
  <div
329
335
  :class="[widthClass]"
330
- mt-4
336
+ mt-1
331
337
  flex flex-row justify-center
332
338
  >
333
339
  <div class="w-[92%]">
@@ -0,0 +1,35 @@
1
+ <script setup lang="ts">
2
+ import type { Rank } from "@xcpcio/core";
3
+
4
+ const props = defineProps<{
5
+ rank: Rank,
6
+ }>();
7
+
8
+ const rank = computed(() => props.rank);
9
+
10
+ const { t } = useI18n();
11
+ </script>
12
+
13
+ <template>
14
+ <div>
15
+ <VTooltip
16
+ w-inherit
17
+ >
18
+ <div
19
+ text-lg
20
+ >
21
+ <div i-material-symbols-info-outline text-lg />
22
+ </div>
23
+
24
+ <template #popper>
25
+ <div
26
+ flex
27
+ >
28
+ <div>
29
+ {{ t("standings.options.calculation_of_penalty") }}: {{ t(`standings.options.${rank.contest.options?.calculationOfPenalty}`) }}
30
+ </div>
31
+ </div>
32
+ </template>
33
+ </VTooltip>
34
+ </div>
35
+ </template>
@@ -146,13 +146,15 @@ function barWidthInStyle() {
146
146
  }
147
147
 
148
148
  onMounted(() => {
149
- scroll.value.onmouseenter = () => {
150
- tooltip.value.classList.add("in");
151
- };
152
-
153
- scroll.value.onmouseleave = () => {
154
- tooltip.value.classList.remove("in");
155
- };
149
+ if (props.needScroll === true) {
150
+ scroll.value.onmouseenter = () => {
151
+ tooltip.value.classList.add("in");
152
+ };
153
+
154
+ scroll.value.onmouseleave = () => {
155
+ tooltip.value.classList.remove("in");
156
+ };
157
+ }
156
158
 
157
159
  if (progressRatio.value !== -1) {
158
160
  pauseUpdate.value = true;
@@ -11,6 +11,7 @@ declare module 'vue' {
11
11
  Balloon: typeof import('./components/Balloon.vue')['default']
12
12
  BalloonBlock: typeof import('./components/BalloonBlock.vue')['default']
13
13
  Board: typeof import('./components/board/Board.vue')['default']
14
+ BoardTab: typeof import('./components/board/BoardTab.vue')['default']
14
15
  BottomStatistics: typeof import('./components/board/BottomStatistics.vue')['default']
15
16
  ContestIndexUI: typeof import('./components/ContestIndexUI.vue')['default']
16
17
  ContestStateBadge: typeof import('./components/board/ContestStateBadge.vue')['default']
@@ -1 +0,0 @@
1
- const t={button:{about:n=>{const{normalize:r}=n;return r(["About"])},back:n=>{const{normalize:r}=n;return r(["Back"])},go:n=>{const{normalize:r}=n;return r(["GO"])},home:n=>{const{normalize:r}=n;return r(["Home"])},confirm:n=>{const{normalize:r}=n;return r(["Confirm"])},cancel:n=>{const{normalize:r}=n;return r(["Cancel"])},toggle_dark:n=>{const{normalize:r}=n;return r(["Toggle dark mode"])},toggle_langs:n=>{const{normalize:r}=n;return r(["Change languages"])}},intro:{desc:n=>{const{normalize:r}=n;return r(["Opinionated Vite Starter Template"])},"dynamic-route":n=>{const{normalize:r}=n;return r(["Demo of dynamic route"])},hi:n=>{const{normalize:r,interpolate:e,named:o}=n;return r(["Hi, ",e(o("name")),"!"])},aka:n=>{const{normalize:r}=n;return r(["Also known as"])},"whats-your-name":n=>{const{normalize:r}=n;return r(["What's your name?"])}},"not-found":n=>{const{normalize:r}=n;return r(["Not found"])},common:{loading:n=>{const{normalize:r}=n;return r(["Loading"])},colon:n=>{const{normalize:r}=n;return r([":"])}},index:{start:n=>{const{normalize:r}=n;return r(["StartTime"])},duration:n=>{const{normalize:r}=n;return r(["Duration"])}},type_menu:{rank:n=>{const{normalize:r}=n;return r(["Rank"])},submissions:n=>{const{normalize:r}=n;return r(["Submissions"])},statistics:n=>{const{normalize:r}=n;return r(["Statistics"])},balloon:n=>{const{normalize:r}=n;return r(["Balloon"])},export:n=>{const{normalize:r}=n;return r(["Export"])},resolver:n=>{const{normalize:r}=n;return r(["Resolver"])},options:n=>{const{normalize:r}=n;return r(["Options"])},awards:n=>{const{normalize:r}=n;return r(["Awards"])},utility:n=>{const{normalize:r}=n;return r(["Utility"])}},standings:{start_time:n=>{const{normalize:r}=n;return r(["Start"])},end_time:n=>{const{normalize:r}=n;return r(["End"])},elapsed:n=>{const{normalize:r}=n;return r(["Elapsed"])},remaining:n=>{const{normalize:r}=n;return r(["Remaining"])},place:n=>{const{normalize:r}=n;return r(["Place"])},team:n=>{const{normalize:r}=n;return r(["Team"])},solved:n=>{const{normalize:r}=n;return r(["Solved"])},penalty:n=>{const{normalize:r}=n;return r(["Penalty"])},dirt:n=>{const{normalize:r}=n;return r(["Dirt"])},statistics:{submitted:n=>{const{normalize:r}=n;return r(["Submitted"])},attempted:n=>{const{normalize:r}=n;return r(["Attempted"])},accepted:n=>{const{normalize:r}=n;return r(["Accepted"])},dirt:n=>{const{normalize:r}=n;return r(["Dirt"])},first_solved:n=>{const{normalize:r}=n;return r(["First Solved"])},last_solved:n=>{const{normalize:r}=n;return r(["Last Solved"])},head_data:{problems:n=>{const{normalize:r}=n;return r(["Problems"])},teams:n=>{const{normalize:r}=n;return r(["Teams"])},submissions:n=>{const{normalize:r}=n;return r(["Submissions"])}}}},submissions:{total_submissions:n=>{const{normalize:r}=n;return r(["Total Submissions"])}}};export{t as default};
@@ -1 +0,0 @@
1
- import{g,h as D,i as c,u as V,o,c as n,j as t,n as E,d as a,k as w,t as v,l as h,m as F,p as R,B as $,q as A,w as O,s as q,v as M,x as Q,y as X,F as S,z as G,A as H,R as J,b as y,a as K,C}from"./app-a6c41ce5.js";import{u as P,g as W,_ as Y}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-bdd603c5.js";import"./TheInput.vue_vue_type_script_setup_true_lang-19d39372.js";const Z={flex:"","flex-1":"","flex-col":"","justify-center":"","items-start":""},ee={class:"resolver-team-name",truncate:"","overflow-hidden":""},te=a("div",{flex:"","flex-row":"","text-sm":"","items-start":"","gap-x-2":""},null,-1),oe={"w-32":"",flex:"","flex-shrink-0":"","flex-row":"","justify-start":"","items-center":""},ne=g({__name:"BalloonBlock",props:{index:null,balloon:null},setup(d){const l=d,s=D(()=>l.balloon),m=c(null),i=V(m);function r(e){return[e.location,e.organization,e.name].filter(x=>x).join(" - ")}function f(e){return typeof e=="string"?e:F&&(e!=null&&e.dark)?e.dark:e.light}return(e,p)=>(o(),n("div",{ref_key:"el",ref:m,"h-24":""},[t(i)?(o(),n("div",{key:0,"h-24":"",flex:"","flex-row":"","gap-x-4":"","font-mono":"","text-4xl":"",class:E([l.index%2===0?"bg-resolver-bg-zero":"bg-resolver-bg-one"])},[a("div",{"w-20":"",flex:"","flex-shrink-0":"","justify-center":"","items-center":"",style:w({backgroundColor:f(t(s).problem.balloonColor.background_color)})},[a("div",{style:w({color:f(t(s).problem.balloonColor.color)})},v(t(s).problem.label),5)],4),a("div",Z,[a("div",ee,v(r(t(s).team)),1),te]),a("div",oe,v(t(s).submission.timestampToMinute),1)],2)):h("",!0)],512))}}),se={class:"bg-[#323443]","text-gray-200":""},ae={key:0},le={flex:"","flex-col":"","justify-center":"","items-center":"","w-screen":"","h-screen":"","text-xl":"",italic:""},re={key:0},ce={key:1},ie={flex:"","flex-col":"","justify-between":""},ue=g({__name:"Balloon",props:{dataSourceUrl:null},setup(d){const l=d,s=R($),{t:m}=A(),i=c(!1),r=c({}),f=c([]),e=c([]),p=c({}),x=c(new Date);function j(){const _=new J(r.value,f.value,e.value);_.buildBalloons(),p.value=_}const{data:u,isError:N,error:T}=P(l.dataSourceUrl,x);O(u,async()=>{var _,k,b;u.value===null||u.value===void 0||(r.value=q((_=u.value)==null?void 0:_.contest),s.value=`${r.value.name} | ${$}`,f.value=M((k=u.value)==null?void 0:k.teams),e.value=Q((b=u.value)==null?void 0:b.submissions),j(),i.value=!0)});const U=D(()=>p.value.balloons),z=setInterval(()=>{x.value=new Date},1e3);return X(()=>{clearInterval(z)}),(_,k)=>{const b=ne;return o(),n("div",se,[t(i)?(o(),n("div",ce,[a("div",ie,[(o(!0),n(S,null,G(t(U),(B,L)=>(o(),H(b,{key:B.key,index:L,balloon:B},null,8,["index","balloon"]))),128))])])):(o(),n("div",ae,[a("div",le,[a("div",null,v(t(m)("common.loading"))+"... ",1),t(N)?(o(),n("div",re,v(t(T)),1)):h("",!0)])]))])}}}),_e={key:0},de={"mt-20":""},me={key:1},fe=g({__name:"CustomBalloon",setup(d){const l=W();return(s,m)=>{const i=Y,r=ue;return o(),n(S,null,[t(l).length===0?(o(),n("div",_e,[a("div",de,[y(i)])])):h("",!0),t(l).length>0?(o(),n("div",me,[y(r,{"data-source-url":t(l)},null,8,["data-source-url"])])):h("",!0)],64)}}}),I={};function ve(d,l){const s=fe;return o(),n("div",null,[y(s)])}typeof C=="function"&&C(I);const he=K(I,[["render",ve]]);export{he as default};