@xcpcio/board-app 0.52.1 → 0.53.1

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 (149) hide show
  1. package/dist/404.html +1 -1
  2. package/dist/assets/Board-CdRX5Jlm.js +1 -0
  3. package/dist/assets/Board-_AOcbImO.css +1 -0
  4. package/dist/assets/ContestStateBadge-7wQzxk8G.js +1 -0
  5. package/dist/assets/ContestStateBadge-yOXRkC0c.css +1 -0
  6. package/dist/assets/DataSourceInput.vue_vue_type_script_setup_true_lang-Bn95nFBm.js +1 -0
  7. package/dist/assets/Footer.vue_vue_type_script_setup_true_lang-DKX0udaw.js +1 -0
  8. package/dist/assets/NavBar-K1-1c5jR.css +1 -0
  9. package/dist/assets/NavBar-u32CnGNs.js +1 -0
  10. package/dist/assets/RightArrowIcon-C0kFrdwD.js +1 -0
  11. package/dist/assets/TheInput.vue_vue_type_script_setup_true_lang-JUZCaDDe.js +1 -0
  12. package/dist/assets/Tooltip-VVqtpO6L.css +1 -0
  13. package/dist/assets/Tooltip.vue_vue_type_script_setup_true_lang-BDZrFekD.js +27 -0
  14. package/dist/assets/_...all_-BQGY1hVe.js +1 -0
  15. package/dist/assets/{_...all_-efc1d81f.js → _...all_-DWAxHlYz.js} +2 -2
  16. package/dist/assets/_name_-9a9T81bP.js +1 -0
  17. package/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
  18. package/dist/assets/about-4fkjm2Q9.js +5 -0
  19. package/dist/assets/board-layout-iVgXr9cV.js +1 -0
  20. package/dist/assets/board-loNE7y_y.js +1 -0
  21. package/dist/assets/constant-BloPFjTg.js +1 -0
  22. package/dist/assets/default-Dfp7T80x.js +1 -0
  23. package/dist/assets/en-DDlXf_8q.js +1 -0
  24. package/dist/assets/headless-mKevhAWY.js +1 -0
  25. package/dist/assets/home-DtVjeLJy.js +1 -0
  26. package/dist/assets/index-7LWkxGEA.js +1 -0
  27. package/dist/assets/index-B6LpxvNH.js +1 -0
  28. package/dist/assets/{index-241beb5a.css → index-BP90wE2A.css} +1 -1
  29. package/dist/assets/index-BerApwlM.css +1 -0
  30. package/dist/assets/index-BjCWriHl.css +5 -0
  31. package/dist/assets/index-BjMqMJ9d.js +5 -0
  32. package/dist/assets/index-CJmQltjE.js +1 -0
  33. package/dist/assets/index-CLjAIeOP.js +25 -0
  34. package/dist/assets/index-D5ZO7j9A.js +1 -0
  35. package/dist/assets/{index-5271d2f0.css → index-DRiWpQTB.css} +1 -1
  36. package/dist/assets/index-DXoiO_9Q.js +50 -0
  37. package/dist/assets/index-De6dfmWB.css +1 -0
  38. package/dist/assets/index-T0V7hFOw.js +1 -0
  39. package/dist/assets/index-layout-DcvtlPA2.js +1 -0
  40. package/dist/assets/index-w4oLejMc.js +198 -0
  41. package/dist/assets/pagination-EiFUbGj_.js +3 -0
  42. package/dist/assets/route-block-B_A1xBdJ.js +1 -0
  43. package/dist/assets/test-_7cPDLJE.js +1 -0
  44. package/dist/assets/use-vmodel-CkMPj1sw.js +1 -0
  45. package/dist/assets/useQueryBoardData-DQ09XmE8.js +1 -0
  46. package/dist/assets/user-CAaqMJHl.js +1 -0
  47. package/dist/assets/virtual_pwa-register-Dafkmfjm.js +1 -0
  48. package/dist/assets/workbox-window.prod.es5-D5gOYdM7.js +2 -0
  49. package/dist/assets/zh-CN-CNJkghp4.js +1 -0
  50. package/dist/index.html +1 -1
  51. package/dist/sw.js +1 -1
  52. package/package.json +50 -49
  53. package/src/auto-imports.d.ts +4 -2
  54. package/src/components/Balloon.vue +3 -2
  55. package/src/components/BalloonBlock.vue +1 -1
  56. package/src/components/ContestIndexUI.vue +3 -3
  57. package/src/components/Countdown.vue +3 -3
  58. package/src/components/NavBar.vue +1 -1
  59. package/src/components/Resolver.vue +3 -3
  60. package/src/components/SearchInput.vue +1 -1
  61. package/src/components/TheCheckbox.vue +1 -1
  62. package/src/components/TheCounter.vue +1 -1
  63. package/src/components/TheInput.vue +3 -3
  64. package/src/components/battle-of-giants/GiantsOptions.vue +5 -5
  65. package/src/components/battle-of-giants/GiantsScoreBoard.vue +1 -1
  66. package/src/components/board/AnimatedSubmissionBlock.vue +2 -2
  67. package/src/components/board/AnimatedSubmissionsModal.vue +1 -1
  68. package/src/components/board/Badge.vue +2 -2
  69. package/src/components/board/Board.vue +17 -12
  70. package/src/components/board/BoardTab.vue +1 -1
  71. package/src/components/board/BottomStatistics.vue +1 -1
  72. package/src/components/board/ContestStateBadge.vue +3 -3
  73. package/src/components/board/Export.vue +5 -5
  74. package/src/components/board/Modal.vue +4 -4
  75. package/src/components/board/ModalMenu.vue +2 -2
  76. package/src/components/board/OptionsModal.vue +4 -4
  77. package/src/components/board/ProblemBlock.vue +2 -2
  78. package/src/components/board/ProblemInfoModal.vue +3 -3
  79. package/src/components/board/Progress.vue +12 -9
  80. package/src/components/board/SecondLevelMenu.vue +2 -2
  81. package/src/components/board/Standings.less +4 -4
  82. package/src/components/board/Standings.vue +5 -5
  83. package/src/components/board/Statistics.vue +3 -3
  84. package/src/components/board/SubmissionsTable.vue +15 -15
  85. package/src/components/board/SubmissionsTableModal.vue +4 -4
  86. package/src/components/board/TeamAwards.vue +3 -3
  87. package/src/components/board/TeamInfoModal.vue +5 -5
  88. package/src/components/board/TeamProblemBlock.vue +5 -5
  89. package/src/components/board/TeamUI.vue +3 -3
  90. package/src/components/flowbite/Tooltip.vue +2 -2
  91. package/src/components/rating/Rating.vue +1 -1
  92. package/src/components/rating/RatingBadge.vue +1 -1
  93. package/src/components/rating/RatingIndexUI.vue +3 -3
  94. package/src/components/rating/RatingInfoModal.vue +4 -4
  95. package/src/components/rating/RatingTable.vue +4 -4
  96. package/src/components/rating/RatingUserUI.vue +2 -2
  97. package/src/components/table/TablePagination.vue +1 -1
  98. package/src/components.d.ts +1 -1
  99. package/src/composables/color.ts +2 -2
  100. package/src/composables/logo/index.ts +1 -1
  101. package/src/composables/pagination.ts +2 -2
  102. package/src/composables/rating.ts +1 -1
  103. package/src/composables/statistics.ts +1 -1
  104. package/src/composables/type.ts +4 -4
  105. package/src/composables/useQueryBoardData.ts +3 -2
  106. package/src/main.ts +9 -8
  107. package/src/modules/README.md +1 -1
  108. package/src/modules/i18n.ts +1 -1
  109. package/src/modules/nprogress.ts +1 -1
  110. package/src/modules/pinia.ts +1 -1
  111. package/src/modules/pwa.ts +1 -1
  112. package/src/modules/toast.ts +2 -2
  113. package/src/pages/index.vue +6 -6
  114. package/src/pages/rating/index.vue +2 -2
  115. package/src/shims.d.ts +10 -8
  116. package/src/styles/color.css +10 -0
  117. package/src/styles/markdown.css +8 -11
  118. package/src/typed-router.d.ts +33 -0
  119. package/src/types.ts +1 -1
  120. package/tsconfig.json +18 -19
  121. package/vite.config.ts +32 -30
  122. package/dist/assets/Board-b5bf1828.js +0 -1
  123. package/dist/assets/Board-f05c0366.css +0 -1
  124. package/dist/assets/DataSourceInput.vue_vue_type_script_setup_true_lang-47ff726d.js +0 -1
  125. package/dist/assets/TheInput.vue_vue_type_script_setup_true_lang-9cc92a14.js +0 -1
  126. package/dist/assets/_...all_-80d9c58d.js +0 -1
  127. package/dist/assets/_name_-5f588c5c.js +0 -1
  128. package/dist/assets/about-86489903.js +0 -11
  129. package/dist/assets/board-428898fa.js +0 -1
  130. package/dist/assets/board-layout-f4b42426.js +0 -1
  131. package/dist/assets/en-c9a8dbb5.js +0 -1
  132. package/dist/assets/headless-464cd216.js +0 -1
  133. package/dist/assets/home-1c2da293.js +0 -1
  134. package/dist/assets/index-1426f0a6.js +0 -1
  135. package/dist/assets/index-8a3db893.js +0 -1
  136. package/dist/assets/index-accb347c.css +0 -1
  137. package/dist/assets/index-ae8b398e.css +0 -5
  138. package/dist/assets/index-c4a296e0.js +0 -25
  139. package/dist/assets/index-f813b721.js +0 -236
  140. package/dist/assets/index-fe6090d1.js +0 -1
  141. package/dist/assets/index-layout-6dbef8c0.js +0 -1
  142. package/dist/assets/pagination-959b8075.js +0 -3
  143. package/dist/assets/query-8d6474f1.js +0 -1
  144. package/dist/assets/test-ce57205f.js +0 -1
  145. package/dist/assets/user-5e4a4fb1.js +0 -1
  146. package/dist/assets/virtual_pwa-register-ab60e448.js +0 -1
  147. package/dist/assets/workbox-window.prod.es5-c46a1faa.js +0 -2
  148. package/dist/assets/zh-CN-8e545f66.js +0 -1
  149. /package/dist/assets/{_...all_-c60acc8c.css → _..-8Wh-Y8sB.css} +0 -0
@@ -1,14 +1,14 @@
1
1
  <script setup lang="ts">
2
- import { ModelSelect } from "vue-search-select";
3
- import { useToast } from "vue-toast-notification";
2
+ import type { Rank } from "@xcpcio/core";
3
+ import { CodeforcesGymGhostDATConverter, GeneralExcelConverter, ICPCStandingsCsvConverter } from "@xcpcio/core";
4
4
  import FileSaver from "file-saver";
5
5
  import sleep from "sleep-promise";
6
6
 
7
- import type { Rank } from "@xcpcio/core";
8
- import { CodeforcesGymGhostDATConverter, GeneralExcelConverter, ICPCStandingsCsvConverter } from "@xcpcio/core";
7
+ import { ModelSelect } from "vue-search-select";
8
+ import { useToast } from "vue-toast-notification";
9
9
 
10
10
  const props = defineProps<{
11
- rank: Rank,
11
+ rank: Rank;
12
12
  }>();
13
13
 
14
14
  const $toast = useToast();
@@ -2,11 +2,11 @@
2
2
  import { useMagicKeys } from "@vueuse/core";
3
3
 
4
4
  const props = defineProps<{
5
- isHidden: boolean,
5
+ isHidden: boolean;
6
6
 
7
- title?: string,
8
- width?: string,
9
- mt?: string,
7
+ title?: string;
8
+ width?: string;
9
+ mt?: string;
10
10
  }>();
11
11
 
12
12
  const emit = defineEmits(["update:isHidden"]);
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  const props = defineProps<{
3
- currentType: string,
4
- types: Array<string>,
3
+ currentType: string;
4
+ types: Array<string>;
5
5
  }>();
6
6
 
7
7
  const emit = defineEmits(["update:currentType"]);
@@ -1,13 +1,13 @@
1
1
  <script setup lang="ts">
2
+ import type { Rank, RankOptions, SelectOptionItem } from "@xcpcio/core";
2
3
  import _ from "lodash";
3
4
  import { MultiSelect } from "vue-search-select";
4
- import type { Rank, RankOptions, SelectOptionItem } from "@xcpcio/core";
5
5
 
6
6
  const props = defineProps<{
7
- isHidden: boolean,
7
+ isHidden: boolean;
8
8
 
9
- rank: Rank,
10
- rankOptions: RankOptions,
9
+ rank: Rank;
10
+ rankOptions: RankOptions;
11
11
  }>();
12
12
 
13
13
  const emit = defineEmits([
@@ -2,8 +2,8 @@
2
2
  import type { Problem, Rank } from "@xcpcio/core";
3
3
 
4
4
  const props = defineProps<{
5
- rank: Rank,
6
- problem: Problem
5
+ rank: Rank;
6
+ problem: Problem;
7
7
  }>();
8
8
 
9
9
  const hiddenModal = ref(true);
@@ -2,10 +2,10 @@
2
2
  import type { Problem, Rank } from "@xcpcio/core";
3
3
 
4
4
  const props = defineProps<{
5
- isHidden: boolean,
5
+ isHidden: boolean;
6
6
 
7
- rank: Rank,
8
- problem: Problem
7
+ rank: Rank;
8
+ problem: Problem;
9
9
  }>();
10
10
 
11
11
  const emit = defineEmits(["update:isHidden"]);
@@ -1,16 +1,16 @@
1
1
  <script setup lang="ts">
2
- import { ContestState } from "@xcpcio/types";
3
- import { useRouteQuery } from "@vueuse/router";
4
2
  import type { Rank, RankOptions } from "@xcpcio/core";
3
+ import { useRouteQuery } from "@vueuse/router";
5
4
  import { createDayJS, getTimeDiff } from "@xcpcio/core";
5
+ import { ContestState } from "@xcpcio/types";
6
6
 
7
7
  const props = defineProps<{
8
- width: number,
9
- state: ContestState,
10
- needScroll?: boolean,
11
- rank?: Rank,
12
- rankOptions?: RankOptions,
13
- elapsedTime?: string,
8
+ width: number;
9
+ state: ContestState;
10
+ needScroll?: boolean;
11
+ rank?: Rank;
12
+ rankOptions?: RankOptions;
13
+ elapsedTime?: string;
14
14
  }>();
15
15
  const emit = defineEmits(["update:rank-options"]);
16
16
 
@@ -33,7 +33,10 @@ const barClass = computed(() => {
33
33
  return "am-progress-bar-danger";
34
34
  case ContestState.FINISHED:
35
35
  return "am-progress-bar-primary";
36
+ case ContestState.PAUSED:
37
+ return "am-progress-bar-danger";
36
38
  }
39
+ return "";
37
40
  });
38
41
 
39
42
  const pauseUpdate = ref(false);
@@ -105,7 +108,7 @@ function startDrag(event: MouseEvent) {
105
108
  progressRatio.value = dragWidth.value;
106
109
  rankOptions.value?.setWidth(dragWidth.value, props.rank!.contest);
107
110
  } else {
108
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
111
+ // eslint-disable-next-line ts/ban-ts-comment
109
112
  // @ts-expect-error
110
113
  progressRatio.value = undefined;
111
114
  rankOptions.value?.disableFilterSubmissionByTimestamp();
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { useRouteQuery } from "@vueuse/router";
3
2
  import type { Lang } from "@xcpcio/types";
3
+ import { useRouteQuery } from "@vueuse/router";
4
4
 
5
5
  export interface Item {
6
6
  title?: string;
@@ -21,7 +21,7 @@ const props = defineProps<{
21
21
  currentItem: string;
22
22
  queryParamName: string;
23
23
  reverseOrder?: boolean;
24
- // eslint-disable-next-line unused-imports/no-unused-vars
24
+
25
25
  onChange?: (current: string) => void;
26
26
  }>();
27
27
 
@@ -287,19 +287,19 @@ td.o00 {
287
287
  }
288
288
 
289
289
  td.stand00 {
290
- background-color: #e0e0ff;
290
+ background-color: var(--theme-standings-00);
291
291
  }
292
292
 
293
293
  td.stand01 {
294
- background-color: #e8e8ff;
294
+ background-color: var(--theme-standings-01);
295
295
  }
296
296
 
297
297
  td.stand10 {
298
- background-color: #f8f8f8;
298
+ background-color: var(--theme-standings-10);
299
299
  }
300
300
 
301
301
  td.stand11 {
302
- background-color: #f2f2f2;
302
+ background-color: var(--theme-standings-11);
303
303
  }
304
304
 
305
305
  // another style
@@ -3,7 +3,7 @@ import type { Rank } from "@xcpcio/core";
3
3
  import { GiantsType, Team } from "@xcpcio/core";
4
4
 
5
5
  const props = defineProps<{
6
- rank: Rank,
6
+ rank: Rank;
7
7
  }>();
8
8
 
9
9
  const { t } = useI18n();
@@ -31,8 +31,8 @@ const filterTeams = computed(() => {
31
31
  });
32
32
 
33
33
  interface GiantTeam {
34
- team: Team,
35
- giantsType: GiantsType,
34
+ team: Team;
35
+ giantsType: GiantsType;
36
36
  }
37
37
 
38
38
  const giantTeams = computed(() => {
@@ -49,7 +49,7 @@ const giantTeams = computed(() => {
49
49
  const giantsType = (() => {
50
50
  if (
51
51
  blueTeam.filterOrganizationMap.has(t.organization)
52
- || blueTeam.filterTeamMap.has(t.id)
52
+ || blueTeam.filterTeamMap.has(t.id)
53
53
  ) {
54
54
  if (blueCnt >= battleOfGiants.topX) {
55
55
  return null;
@@ -61,7 +61,7 @@ const giantTeams = computed(() => {
61
61
 
62
62
  if (
63
63
  redTeam.filterOrganizationMap.has(t.organization)
64
- || redTeam.filterTeamMap.has(t.id)
64
+ || redTeam.filterTeamMap.has(t.id)
65
65
  ) {
66
66
  if (redCnt >= battleOfGiants.topX) {
67
67
  return null;
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
- import { Chart } from "highcharts-vue";
3
-
4
2
  import type { Rank } from "@xcpcio/core";
5
3
 
4
+ import { Chart } from "highcharts-vue";
5
+
6
6
  const props = defineProps<{
7
- rank: Rank,
7
+ rank: Rank;
8
8
  }>();
9
9
 
10
10
  const { t } = useI18n();
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
- import { MultiSelect } from "vue-search-select";
3
-
4
2
  import type { Rank, SelectOptionItem, Submissions } from "@xcpcio/core";
5
- import { Submission } from "@xcpcio/core";
3
+
6
4
  import type { SubmissionReaction, SubmissionStatus } from "@xcpcio/types";
5
+ import { Submission } from "@xcpcio/core";
7
6
  import { SubmissionStatusToString } from "@xcpcio/types";
7
+ import { MultiSelect } from "vue-search-select";
8
8
 
9
9
  import { Pagination } from "~/composables/pagination";
10
10
 
@@ -18,18 +18,18 @@ interface FilterOptions {
18
18
  }
19
19
 
20
20
  interface EnableFilterOptions {
21
- organization?: boolean,
22
- team?: boolean,
23
- language?: boolean,
24
- status?: boolean,
21
+ organization?: boolean;
22
+ team?: boolean;
23
+ language?: boolean;
24
+ status?: boolean;
25
25
  }
26
26
 
27
27
  const props = defineProps<{
28
- rank: Rank,
29
- submissions: Submissions,
30
- pageSize?: number,
31
- removeBorder?: boolean,
32
- enableFilter?: EnableFilterOptions,
28
+ rank: Rank;
29
+ submissions: Submissions;
30
+ pageSize?: number;
31
+ removeBorder?: boolean;
32
+ enableFilter?: EnableFilterOptions;
33
33
  }>();
34
34
 
35
35
  const rank = computed(() => props.rank);
@@ -145,9 +145,9 @@ const submissions = computed(() => {
145
145
  const o = filterOptions.value;
146
146
 
147
147
  if (o.orgNames.length === 0
148
- && o.teamIds.length === 0
149
- && o.languages.length === 0
150
- && o.statuses.length === 0
148
+ && o.teamIds.length === 0
149
+ && o.languages.length === 0
150
+ && o.statuses.length === 0
151
151
  ) {
152
152
  return true;
153
153
  }
@@ -2,11 +2,11 @@
2
2
  import type { Rank, Team, TeamProblemStatistics } from "@xcpcio/core";
3
3
 
4
4
  const props = defineProps<{
5
- isHidden: boolean,
5
+ isHidden: boolean;
6
6
 
7
- rank: Rank,
8
- team: Team,
9
- p: TeamProblemStatistics,
7
+ rank: Rank;
8
+ team: Team;
9
+ p: TeamProblemStatistics;
10
10
  }>();
11
11
 
12
12
  const emit = defineEmits(["update:isHidden"]);
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
- import { MedalType } from "@xcpcio/core";
3
2
  import type { Rank, Team } from "@xcpcio/core";
3
+ import { MedalType } from "@xcpcio/core";
4
4
 
5
5
  const props = defineProps<{
6
- team: Team,
7
- rank: Rank,
6
+ team: Team;
7
+ rank: Rank;
8
8
  }>();
9
9
 
10
10
  const team = computed(() => props.team);
@@ -1,13 +1,13 @@
1
1
  <script setup lang="ts">
2
- import { Chart } from "highcharts-vue";
3
-
4
2
  import type { Rank, Team } from "@xcpcio/core";
5
3
 
4
+ import { Chart } from "highcharts-vue";
5
+
6
6
  const props = defineProps<{
7
- isHidden: boolean,
7
+ isHidden: boolean;
8
8
 
9
- rank: Rank,
10
- team: Team,
9
+ rank: Rank;
10
+ team: Team;
11
11
  }>();
12
12
 
13
13
  const emit = defineEmits(["update:isHidden"]);
@@ -2,9 +2,9 @@
2
2
  import type { Rank, Team, TeamProblemStatistics } from "@xcpcio/core";
3
3
 
4
4
  const props = defineProps<{
5
- rank: Rank,
6
- team: Team,
7
- p: TeamProblemStatistics,
5
+ rank: Rank;
6
+ team: Team;
7
+ p: TeamProblemStatistics;
8
8
  }>();
9
9
 
10
10
  const hiddenModal = ref(true);
@@ -40,8 +40,8 @@ function getProblemShow(p: TeamProblemStatistics): string {
40
40
  }
41
41
 
42
42
  if ((p.isSolved && rank.value.contest.statusTimeDisplay.correct)
43
- || (p.isPending && rank.value.contest.statusTimeDisplay.pending)
44
- || (p.isWrongAnswer && rank.value.contest.statusTimeDisplay.incorrect)) {
43
+ || (p.isPending && rank.value.contest.statusTimeDisplay.pending)
44
+ || (p.isWrongAnswer && rank.value.contest.statusTimeDisplay.incorrect)) {
45
45
  res += `/${Math.floor(p.lastSubmitTimestamp / 60)}`;
46
46
  }
47
47
 
@@ -3,9 +3,9 @@ import type { Rank, Team } from "@xcpcio/core";
3
3
  import { GiantsType, MedalType } from "@xcpcio/core";
4
4
 
5
5
  const props = defineProps<{
6
- ix: number,
7
- rank: Rank,
8
- team: Team,
6
+ ix: number;
7
+ rank: Rank;
8
+ team: Team;
9
9
  isFilter?: boolean;
10
10
  giantsType?: GiantsType;
11
11
  }>();
@@ -1,11 +1,11 @@
1
1
  <script setup lang="ts">
2
- import { Tooltip } from "flowbite";
3
2
  import type { TooltipInterface, TooltipOptions } from "flowbite";
3
+ import { Tooltip } from "flowbite";
4
4
 
5
5
  import "./Tooltip.css";
6
6
 
7
7
  const props = defineProps<{
8
- placement?: "left" | "right" | "top" | "bottom" | "auto",
8
+ placement?: "left" | "right" | "top" | "bottom" | "auto";
9
9
  }>();
10
10
 
11
11
  const tooltipTargetEl = ref(null);
@@ -3,7 +3,7 @@ import { useFetch } from "@vueuse/core";
3
3
  import { Rating } from "@xcpcio/core";
4
4
 
5
5
  const props = defineProps<{
6
- id: string
6
+ id: string;
7
7
  }>();
8
8
 
9
9
  const id = computed(() => props.id);
@@ -4,7 +4,7 @@ import { RatingLevelToString, RatingUtility } from "@xcpcio/core";
4
4
  import "./rating.less";
5
5
 
6
6
  const props = defineProps<{
7
- rating: number
7
+ rating: number;
8
8
  }>();
9
9
 
10
10
  const rating = computed(() => props.rating);
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
- import { useElementVisibility } from "@vueuse/core";
3
-
4
2
  import type { IRatingIndex } from "@xcpcio/types/index";
5
3
 
4
+ import { useElementVisibility } from "@vueuse/core";
5
+
6
6
  const props = defineProps<{
7
- ratingIndex: IRatingIndex
7
+ ratingIndex: IRatingIndex;
8
8
  }>();
9
9
 
10
10
  const ratingIndex = computed(() => props.ratingIndex);
@@ -1,14 +1,14 @@
1
1
  <script setup lang="ts">
2
- import { Chart } from "highcharts-vue";
3
-
4
2
  import type { RatingUser } from "@xcpcio/core";
5
3
 
4
+ import { Chart } from "highcharts-vue";
5
+
6
6
  import "./rating.less";
7
7
 
8
8
  const props = defineProps<{
9
- isHidden: boolean,
9
+ isHidden: boolean;
10
10
 
11
- ratingUser: RatingUser,
11
+ ratingUser: RatingUser;
12
12
  }>();
13
13
 
14
14
  const emit = defineEmits(["update:isHidden"]);
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import { MultiSelect } from "vue-search-select";
3
-
4
2
  import type { Rating, SelectOptionItem } from "@xcpcio/core";
5
3
 
4
+ import { MultiSelect } from "vue-search-select";
5
+
6
6
  import { Pagination } from "~/composables/pagination";
7
7
 
8
8
  interface FilterOptions {
@@ -11,7 +11,7 @@ interface FilterOptions {
11
11
  }
12
12
 
13
13
  const props = defineProps<{
14
- rating: Rating,
14
+ rating: Rating;
15
15
  pageSize?: number;
16
16
  removeBorder?: boolean;
17
17
  }>();
@@ -75,7 +75,7 @@ const users = computed(() => {
75
75
  const o = filterOptions.value;
76
76
 
77
77
  if (o.organizations.length === 0
78
- && o.members.length === 0) {
78
+ && o.members.length === 0) {
79
79
  return true;
80
80
  }
81
81
 
@@ -5,8 +5,8 @@ import { RatingUtility } from "@xcpcio/core";
5
5
  import "./rating.less";
6
6
 
7
7
  const props = defineProps<{
8
- ix: number,
9
- ratingUser: RatingUser,
8
+ ix: number;
9
+ ratingUser: RatingUser;
10
10
  }>();
11
11
 
12
12
  const u = computed(() => props.ratingUser);
@@ -2,7 +2,7 @@
2
2
  import type { Pagination } from "~/composables/pagination";
3
3
 
4
4
  const props = defineProps<{
5
- pagination: Pagination,
5
+ pagination: Pagination;
6
6
  }>();
7
7
  const emit = defineEmits(["update:pagination"]);
8
8
 
@@ -1,10 +1,10 @@
1
1
  /* eslint-disable */
2
- /* prettier-ignore */
3
2
  // @ts-nocheck
4
3
  // Generated by unplugin-vue-components
5
4
  // Read more: https://github.com/vuejs/core/pull/3399
6
5
  export {}
7
6
 
7
+ /* prettier-ignore */
8
8
  declare module 'vue' {
9
9
  export interface GlobalComponents {
10
10
  AnimatedSubmissionBlock: typeof import('./components/board/AnimatedSubmissionBlock.vue')['default']
@@ -1,7 +1,7 @@
1
- import { MedalType } from "@xcpcio/core";
2
1
  import type { Submission, Team } from "@xcpcio/core";
2
+ import { MedalType } from "@xcpcio/core";
3
3
 
4
- export function getMedalColor(team: Team): { backgroundColor: string, color: string } | undefined {
4
+ export function getMedalColor(team: Team): { backgroundColor: string; color: string } | undefined {
5
5
  const color = {
6
6
  backgroundColor: "#fff",
7
7
  color: "#000",
@@ -1,8 +1,8 @@
1
1
  import type { Image } from "@xcpcio/types";
2
2
 
3
- import { GET_LOGO_ICPC } from "./icpc";
4
3
  import { GET_LOGO_CCPC } from "./ccpc";
5
4
  import { GET_LOGO_HUNAN_CPC } from "./hunan-cpc";
5
+ import { GET_LOGO_ICPC } from "./icpc";
6
6
 
7
7
  export function getLogoFromPreset(image: Image): Image {
8
8
  if (!image.preset) {
@@ -56,8 +56,8 @@ export class Pagination {
56
56
  }
57
57
 
58
58
  onPageChange(options: {
59
- to?: number,
60
- diff?: number,
59
+ to?: number;
60
+ diff?: number;
61
61
  }) {
62
62
  const totalPage = this.totalPage;
63
63
 
@@ -1,5 +1,5 @@
1
- import { RatingLevelToString, RatingUtility } from "@xcpcio/core";
2
1
  import type { RatingUser } from "@xcpcio/core";
2
+ import { RatingLevelToString, RatingUtility } from "@xcpcio/core";
3
3
 
4
4
  interface RatingGraphData {
5
5
  x: number;
@@ -1,4 +1,4 @@
1
- import { type Rank, type Team, getTimeDiff } from "@xcpcio/core";
1
+ import { getTimeDiff, type Rank, type Team } from "@xcpcio/core";
2
2
 
3
3
  function getChartObj(title: string, xText: string, yText: string, cat: any, series: any, colors: any) {
4
4
  return {
@@ -1,10 +1,10 @@
1
1
  import type { Problem, Submission, Team } from "@xcpcio/core";
2
2
 
3
3
  export interface AnimatedSubmissionBlockItem {
4
- submission: Submission,
5
- team: Team,
6
- problem: Problem,
7
- displayName: string,
4
+ submission: Submission;
5
+ team: Team;
6
+ problem: Problem;
7
+ displayName: string;
8
8
  }
9
9
 
10
10
  export enum LastBlockDisplayType {
@@ -1,5 +1,5 @@
1
- import { useQuery } from "@tanstack/vue-query";
2
1
  import type { Contest, Submissions, Teams } from "@xcpcio/types";
2
+ import { useQuery } from "@tanstack/vue-query";
3
3
  import { DATA_REGION } from "./constant";
4
4
 
5
5
  const RETRY = 3;
@@ -34,7 +34,8 @@ async function fetcher(target: string, timestamp?: number): Promise<BoardData> {
34
34
  const p = Promise.all([
35
35
  contestResp.json(),
36
36
  teamsResp.json(),
37
- submissionsResp.json()]).then((res) => {
37
+ submissionsResp.json(),
38
+ ]).then((res) => {
38
39
  return {
39
40
  contest: res[0],
40
41
  teams: res[1],
package/src/main.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { ViteSSG } from "vite-ssg";
2
- import { setupLayouts } from "virtual:generated-layouts";
1
+ import type { UserModule } from "./types";
2
+ import { VueQueryPlugin } from "@tanstack/vue-query";
3
3
 
4
4
  import FloatingVue from "floating-vue";
5
- import { VueQueryPlugin } from "@tanstack/vue-query";
6
5
 
6
+ import { setupLayouts } from "virtual:generated-layouts";
7
+ import { ViteSSG } from "vite-ssg";
8
+ import { routes } from "vue-router/auto-routes";
7
9
  // import Previewer from 'virtual:vue-component-preview'
8
10
  import App from "./App.vue";
9
- import type { UserModule } from "./types";
10
- import generatedRoutes from "~pages";
11
11
 
12
12
  import "floating-vue/dist/style.css";
13
13
  import "vue-search-select/dist/VueSearchSelect.css";
@@ -18,12 +18,13 @@ import "uno.css";
18
18
 
19
19
  import "./styles/main.css";
20
20
 
21
- const routes = setupLayouts(generatedRoutes);
22
-
23
21
  // https://github.com/antfu/vite-ssg
24
22
  export const createApp = ViteSSG(
25
23
  App,
26
- { routes, base: import.meta.env.BASE_URL },
24
+ {
25
+ routes: setupLayouts(routes),
26
+ base: import.meta.env.BASE_URL,
27
+ },
27
28
  (ctx) => {
28
29
  // install all modules under `modules/`
29
30
  Object.values(import.meta.glob<{ install: UserModule }>("./modules/*.ts", { eager: true }))
@@ -3,7 +3,7 @@
3
3
  A custom user module system. Place a `.ts` file with the following template, it will be installed automatically.
4
4
 
5
5
  ```ts
6
- import { type UserModule } from "~/types";
6
+ import type { UserModule } from "~/types";
7
7
 
8
8
  export const install: UserModule = ({ app, router, isClient }) => {
9
9
  // do something
@@ -1,6 +1,6 @@
1
1
  import type { Locale } from "vue-i18n";
2
2
  import { createI18n } from "vue-i18n";
3
- import { type UserModule } from "~/types";
3
+ import type { UserModule } from "~/types";
4
4
 
5
5
  // Import i18n resources
6
6
  // https://vitejs.dev/guide/features.html#glob-import
@@ -1,5 +1,5 @@
1
1
  import NProgress from "nprogress";
2
- import { type UserModule } from "~/types";
2
+ import type { UserModule } from "~/types";
3
3
 
4
4
  export const install: UserModule = ({ isClient, router }) => {
5
5
  if (isClient) {