@xcpcio/board-app 0.52.1 → 0.53.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.
- package/dist/404.html +1 -1
- package/dist/assets/{Board-f05c0366.css → Board--Fj0eIxn.css} +1 -1
- package/dist/assets/Board-DVycq7Hb.js +1 -0
- package/dist/assets/ContestStateBadge-SaSIRVZw.js +1 -0
- package/dist/assets/ContestStateBadge-yOXRkC0c.css +1 -0
- package/dist/assets/DataSourceInput.vue_vue_type_script_setup_true_lang-ButnX5NG.js +1 -0
- package/dist/assets/Footer.vue_vue_type_script_setup_true_lang-DtriOyxw.js +1 -0
- package/dist/assets/NavBar-CTO09sVc.js +1 -0
- package/dist/assets/NavBar-K1-1c5jR.css +1 -0
- package/dist/assets/RightArrowIcon-93I3m1Dg.js +1 -0
- package/dist/assets/TheInput.vue_vue_type_script_setup_true_lang-Bstp0Uq6.js +1 -0
- package/dist/assets/Tooltip-VVqtpO6L.css +1 -0
- package/dist/assets/Tooltip.vue_vue_type_script_setup_true_lang-IVJ6kO8Y.js +27 -0
- package/dist/assets/{_...all_-efc1d81f.js → _...all_-CajB1u6j.js} +2 -2
- package/dist/assets/_...all_-DkFLHLY4.js +1 -0
- package/dist/assets/_name_-CKcXFscu.js +1 -0
- package/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
- package/dist/assets/about-Bt1E61e1.js +5 -0
- package/dist/assets/board-BuZxK-RS.js +1 -0
- package/dist/assets/board-layout-BDGSSQnD.js +1 -0
- package/dist/assets/constant-D5AETBoS.js +1 -0
- package/dist/assets/default-g2FZdb_E.js +1 -0
- package/dist/assets/en-DDlXf_8q.js +1 -0
- package/dist/assets/headless-AGI21K3d.js +1 -0
- package/dist/assets/home-CIo2SGx9.js +1 -0
- package/dist/assets/index-B0AiC33S.js +1 -0
- package/dist/assets/index-BJlHNlHk.js +198 -0
- package/dist/assets/{index-241beb5a.css → index-BP90wE2A.css} +1 -1
- package/dist/assets/index-BVqqkkh8.js +25 -0
- package/dist/assets/index-BerApwlM.css +1 -0
- package/dist/assets/index-Bqug296L.js +50 -0
- package/dist/assets/index-ByBDbX-Q.js +1 -0
- package/dist/assets/index-CDb5YJlm.js +1 -0
- package/dist/assets/index-Ci3FURub.css +5 -0
- package/dist/assets/index-CsD1PvIl.js +5 -0
- package/dist/assets/{index-5271d2f0.css → index-DRiWpQTB.css} +1 -1
- package/dist/assets/index-De6dfmWB.css +1 -0
- package/dist/assets/index-DtIE9gnq.js +1 -0
- package/dist/assets/index-eEOWm26O.js +1 -0
- package/dist/assets/index-layout-B9ZsHAPN.js +1 -0
- package/dist/assets/pagination-SF0231GF.js +3 -0
- package/dist/assets/route-block-B_A1xBdJ.js +1 -0
- package/dist/assets/test-BmgsMNrG.js +1 -0
- package/dist/assets/use-vmodel-DKmkNt1c.js +1 -0
- package/dist/assets/useQueryBoardData-MYqwKv9X.js +1 -0
- package/dist/assets/user-DVMgLOCG.js +1 -0
- package/dist/assets/virtual_pwa-register-G08q8i_v.js +1 -0
- package/dist/assets/workbox-window.prod.es5-D5gOYdM7.js +2 -0
- package/dist/assets/zh-CN-CNJkghp4.js +1 -0
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +50 -49
- package/src/auto-imports.d.ts +4 -2
- package/src/components/Balloon.vue +3 -2
- package/src/components/BalloonBlock.vue +1 -1
- package/src/components/ContestIndexUI.vue +3 -3
- package/src/components/Countdown.vue +3 -3
- package/src/components/NavBar.vue +1 -1
- package/src/components/Resolver.vue +3 -3
- package/src/components/SearchInput.vue +1 -1
- package/src/components/TheCheckbox.vue +1 -1
- package/src/components/TheCounter.vue +1 -1
- package/src/components/TheInput.vue +3 -3
- package/src/components/battle-of-giants/GiantsOptions.vue +5 -5
- package/src/components/battle-of-giants/GiantsScoreBoard.vue +1 -1
- package/src/components/board/AnimatedSubmissionBlock.vue +2 -2
- package/src/components/board/AnimatedSubmissionsModal.vue +1 -1
- package/src/components/board/Badge.vue +2 -2
- package/src/components/board/Board.vue +8 -8
- package/src/components/board/BoardTab.vue +1 -1
- package/src/components/board/BottomStatistics.vue +1 -1
- package/src/components/board/ContestStateBadge.vue +3 -3
- package/src/components/board/Export.vue +5 -5
- package/src/components/board/Modal.vue +4 -4
- package/src/components/board/ModalMenu.vue +2 -2
- package/src/components/board/OptionsModal.vue +4 -4
- package/src/components/board/ProblemBlock.vue +2 -2
- package/src/components/board/ProblemInfoModal.vue +3 -3
- package/src/components/board/Progress.vue +12 -9
- package/src/components/board/SecondLevelMenu.vue +2 -2
- package/src/components/board/Standings.vue +5 -5
- package/src/components/board/Statistics.vue +3 -3
- package/src/components/board/SubmissionsTable.vue +15 -15
- package/src/components/board/SubmissionsTableModal.vue +4 -4
- package/src/components/board/TeamAwards.vue +3 -3
- package/src/components/board/TeamInfoModal.vue +5 -5
- package/src/components/board/TeamProblemBlock.vue +5 -5
- package/src/components/board/TeamUI.vue +3 -3
- package/src/components/flowbite/Tooltip.vue +2 -2
- package/src/components/rating/Rating.vue +1 -1
- package/src/components/rating/RatingBadge.vue +1 -1
- package/src/components/rating/RatingIndexUI.vue +3 -3
- package/src/components/rating/RatingInfoModal.vue +4 -4
- package/src/components/rating/RatingTable.vue +4 -4
- package/src/components/rating/RatingUserUI.vue +2 -2
- package/src/components/table/TablePagination.vue +1 -1
- package/src/components.d.ts +1 -1
- package/src/composables/color.ts +2 -2
- package/src/composables/logo/index.ts +1 -1
- package/src/composables/pagination.ts +2 -2
- package/src/composables/rating.ts +1 -1
- package/src/composables/statistics.ts +1 -1
- package/src/composables/type.ts +4 -4
- package/src/composables/useQueryBoardData.ts +3 -2
- package/src/main.ts +9 -8
- package/src/modules/README.md +1 -1
- package/src/modules/i18n.ts +1 -1
- package/src/modules/nprogress.ts +1 -1
- package/src/modules/pinia.ts +1 -1
- package/src/modules/pwa.ts +1 -1
- package/src/modules/toast.ts +2 -2
- package/src/pages/index.vue +6 -6
- package/src/pages/rating/index.vue +2 -2
- package/src/shims.d.ts +10 -8
- package/src/styles/markdown.css +8 -11
- package/src/typed-router.d.ts +33 -0
- package/src/types.ts +1 -1
- package/tsconfig.json +18 -19
- package/vite.config.ts +32 -30
- package/dist/assets/Board-b5bf1828.js +0 -1
- package/dist/assets/DataSourceInput.vue_vue_type_script_setup_true_lang-47ff726d.js +0 -1
- package/dist/assets/TheInput.vue_vue_type_script_setup_true_lang-9cc92a14.js +0 -1
- package/dist/assets/_...all_-80d9c58d.js +0 -1
- package/dist/assets/_name_-5f588c5c.js +0 -1
- package/dist/assets/about-86489903.js +0 -11
- package/dist/assets/board-428898fa.js +0 -1
- package/dist/assets/board-layout-f4b42426.js +0 -1
- package/dist/assets/en-c9a8dbb5.js +0 -1
- package/dist/assets/headless-464cd216.js +0 -1
- package/dist/assets/home-1c2da293.js +0 -1
- package/dist/assets/index-1426f0a6.js +0 -1
- package/dist/assets/index-8a3db893.js +0 -1
- package/dist/assets/index-accb347c.css +0 -1
- package/dist/assets/index-ae8b398e.css +0 -5
- package/dist/assets/index-c4a296e0.js +0 -25
- package/dist/assets/index-f813b721.js +0 -236
- package/dist/assets/index-fe6090d1.js +0 -1
- package/dist/assets/index-layout-6dbef8c0.js +0 -1
- package/dist/assets/pagination-959b8075.js +0 -3
- package/dist/assets/query-8d6474f1.js +0 -1
- package/dist/assets/test-ce57205f.js +0 -1
- package/dist/assets/user-5e4a4fb1.js +0 -1
- package/dist/assets/virtual_pwa-register-ab60e448.js +0 -1
- package/dist/assets/workbox-window.prod.es5-c46a1faa.js +0 -2
- package/dist/assets/zh-CN-8e545f66.js +0 -1
- /package/dist/assets/{_...all_-c60acc8c.css → _..-8Wh-Y8sB.css} +0 -0
|
@@ -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,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
|
|
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
|
-
|
|
24
|
+
|
|
25
25
|
onChange?: (current: string) => void;
|
|
26
26
|
}>();
|
|
27
27
|
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
-
|
|
44
|
-
|
|
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);
|
|
@@ -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
|
-
|
|
78
|
+
&& o.members.length === 0) {
|
|
79
79
|
return true;
|
|
80
80
|
}
|
|
81
81
|
|
package/src/components.d.ts
CHANGED
|
@@ -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']
|
package/src/composables/color.ts
CHANGED
|
@@ -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
|
|
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) {
|
package/src/composables/type.ts
CHANGED
|
@@ -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()
|
|
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 {
|
|
2
|
-
import {
|
|
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
|
-
{
|
|
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 }))
|
package/src/modules/README.md
CHANGED
|
@@ -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 {
|
|
6
|
+
import type { UserModule } from "~/types";
|
|
7
7
|
|
|
8
8
|
export const install: UserModule = ({ app, router, isClient }) => {
|
|
9
9
|
// do something
|
package/src/modules/i18n.ts
CHANGED
package/src/modules/nprogress.ts
CHANGED
package/src/modules/pinia.ts
CHANGED
package/src/modules/pwa.ts
CHANGED
package/src/modules/toast.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ToastPlugin from "vue-toast-notification";
|
|
2
|
-
import "
|
|
2
|
+
import type { UserModule } from "~/types";
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import "vue-toast-notification/dist/theme-sugar.css";
|
|
5
5
|
|
|
6
6
|
export const install: UserModule = ({ app }) => {
|
|
7
7
|
app.use(ToastPlugin, {
|
package/src/pages/index.vue
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { ContestIndexList } from "@xcpcio/core";
|
|
3
|
+
|
|
2
4
|
import { useFetch } from "@vueuse/core";
|
|
3
5
|
import { useRouteQuery } from "@vueuse/router";
|
|
4
|
-
|
|
5
6
|
import { createContestIndexList } from "@xcpcio/core";
|
|
6
|
-
import type { ContestIndexList } from "@xcpcio/core";
|
|
7
7
|
|
|
8
|
-
import { TITLE_SUFFIX } from "~/composables/constant";
|
|
9
|
-
import SearchInput from "~/components/SearchInput.vue";
|
|
10
8
|
import ContestIndexUI from "~/components/ContestIndexUI.vue";
|
|
9
|
+
import SearchInput from "~/components/SearchInput.vue";
|
|
10
|
+
import { TITLE_SUFFIX } from "~/composables/constant";
|
|
11
11
|
|
|
12
12
|
const { t } = useI18n();
|
|
13
13
|
useTitle(TITLE_SUFFIX);
|
|
@@ -42,8 +42,8 @@ function onSearch() {
|
|
|
42
42
|
s.value = searchText.value;
|
|
43
43
|
|
|
44
44
|
if (c.contest.name.includes(searchText.value)
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
|| c.contest.name.toLowerCase().includes(searchText.value.toLowerCase())
|
|
46
|
+
|| c.boardLink.toLocaleLowerCase().includes(searchText.value.toLowerCase())) {
|
|
47
47
|
return true;
|
|
48
48
|
}
|
|
49
49
|
|