diff --git a/packages/apps/board/src/auto-imports.d.ts b/packages/apps/board/src/auto-imports.d.ts index f976a326..9c32a07b 100644 --- a/packages/apps/board/src/auto-imports.d.ts +++ b/packages/apps/board/src/auto-imports.d.ts @@ -13,6 +13,8 @@ declare global { const EffectScope: typeof import('vue')['EffectScope'] const LastBlockDisplayType: typeof import('./composables/type')['LastBlockDisplayType'] const Pagination: typeof import('./composables/pagination')['Pagination'] + const RATING_DATA_HOST: typeof import('./composables/constant')['RATING_DATA_HOST'] + const RATING_TITLE_SUFFIX: typeof import('./composables/constant')['RATING_TITLE_SUFFIX'] const RESOLVER_TITLE_SUFFIX: typeof import('./composables/constant')['RESOLVER_TITLE_SUFFIX'] const TITLE_SUFFIX: typeof import('./composables/constant')['TITLE_SUFFIX'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] @@ -335,6 +337,8 @@ declare module 'vue' { readonly EffectScope: UnwrapRef readonly LastBlockDisplayType: UnwrapRef readonly Pagination: UnwrapRef + readonly RATING_DATA_HOST: UnwrapRef + readonly RATING_TITLE_SUFFIX: UnwrapRef readonly RESOLVER_TITLE_SUFFIX: UnwrapRef readonly TITLE_SUFFIX: UnwrapRef readonly asyncComputed: UnwrapRef @@ -643,6 +647,8 @@ declare module '@vue/runtime-core' { readonly EffectScope: UnwrapRef readonly LastBlockDisplayType: UnwrapRef readonly Pagination: UnwrapRef + readonly RATING_DATA_HOST: UnwrapRef + readonly RATING_TITLE_SUFFIX: UnwrapRef readonly RESOLVER_TITLE_SUFFIX: UnwrapRef readonly TITLE_SUFFIX: UnwrapRef readonly asyncComputed: UnwrapRef diff --git a/packages/apps/board/src/components.d.ts b/packages/apps/board/src/components.d.ts index 3308c12d..45d9d8bf 100644 --- a/packages/apps/board/src/components.d.ts +++ b/packages/apps/board/src/components.d.ts @@ -35,6 +35,7 @@ declare module 'vue' { ProblemBlock: typeof import('./components/board/ProblemBlock.vue')['default'] ProblemInfoModal: typeof import('./components/board/ProblemInfoModal.vue')['default'] Progress: typeof import('./components/board/Progress.vue')['default'] + RatingIndexUI: typeof import('./components/RatingIndexUI.vue')['default'] RightArrowIcon: typeof import('./components/icon/RightArrowIcon.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] diff --git a/packages/apps/board/src/components/RatingIndexUI.vue b/packages/apps/board/src/components/RatingIndexUI.vue new file mode 100644 index 00000000..617ffe71 --- /dev/null +++ b/packages/apps/board/src/components/RatingIndexUI.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/packages/apps/board/src/composables/constant.ts b/packages/apps/board/src/composables/constant.ts index 6972f343..6a2eef8e 100644 --- a/packages/apps/board/src/composables/constant.ts +++ b/packages/apps/board/src/composables/constant.ts @@ -1,4 +1,5 @@ export const TITLE_SUFFIX = "Board - XCPCIO"; +export const RATING_TITLE_SUFFIX = "Rating - XCPCIO"; export const BALLOON_TITLE_SUFFIX = "Balloon - XCPCIO"; export const RESOLVER_TITLE_SUFFIX = "Resolver - XCPCIO"; export const COUNTDOWN_TITLE_SUFFIX = "Countdown - XCPCIO"; @@ -19,6 +20,11 @@ export const DATA_HOST = computed(() => { return window.DATA_HOST; }); +export const RATING_DATA_HOST = computed(() => { + const dataHost = DATA_HOST.value; + return dataHost.replace("/data/", "/rating-data/"); +}); + export const DATA_REGION = computed(() => { if (!window) { return ""; diff --git a/packages/apps/board/src/pages/rating/index.vue b/packages/apps/board/src/pages/rating/index.vue new file mode 100644 index 00000000..492caf99 --- /dev/null +++ b/packages/apps/board/src/pages/rating/index.vue @@ -0,0 +1,86 @@ + + + + + +meta: + layout: index-layout + diff --git a/packages/apps/board/vite.config.ts b/packages/apps/board/vite.config.ts index 5af5d97f..3ed8ff3e 100644 --- a/packages/apps/board/vite.config.ts +++ b/packages/apps/board/vite.config.ts @@ -20,6 +20,12 @@ import { createHtmlPlugin } from "vite-plugin-html"; import packageJSON from "./package.json"; +const proxyConfig = { + // target: "https://board.xcpcio.com", + target: "http://127.0.0.1:8080", + changeOrigin: true, +}; + export default defineConfig({ resolve: { alias: { @@ -185,11 +191,8 @@ export default defineConfig({ server: { host: true, proxy: { - "/data": { - // target: "https://board.xcpcio.com", - target: "http://127.0.0.1:8080", - changeOrigin: true, - }, + "/data": proxyConfig, + "/rating-data": proxyConfig, }, },