更新首页列表

This commit is contained in:
2023-11-01 19:03:01 +08:00
parent 9cf73331ea
commit 710f4b5eb9
35 changed files with 261 additions and 241 deletions

View File

@@ -39,7 +39,7 @@ watch(
() => props.modelValue,
(v) => {
code.value = v
}
},
)
const emit = defineEmits(["update:modelValue"])

View File

@@ -10,7 +10,7 @@ interface Props {
const props = defineProps<Props>()
const isPrivate = computed(
() => props.contest.contest_type === ContestType.private
() => props.contest.contest_type === ContestType.private,
)
</script>

View File

@@ -6,7 +6,10 @@ import { isDark, toggleDark } from "~/shared/composables/dark"
import { toggleLogin, toggleSignup } from "~/shared/composables/modal"
import { RouterLink } from "vue-router"
import { isDesktop, isMobile } from "~/shared/composables/breakpoints"
import { screenSwitchLabel, switchScreenMode } from "~/shared/composables/switchScreen"
import {
screenSwitchLabel,
switchScreenMode,
} from "~/shared/composables/switchScreen"
import { code } from "~/shared/composables/learn"
import { useLearnStore } from "~/learn/store"

View File

@@ -22,7 +22,7 @@ export function loadChart() {
Colors,
Title,
Tooltip,
Legend
Legend,
)
isLoaded.value = true
}

View File

@@ -26,7 +26,7 @@ const options: MenuOption[] = [
h(
RouterLink,
{ to: "/admin/problem/list" },
{ default: () => "题目列表" }
{ default: () => "题目列表" },
),
key: "admin problem list",
},
@@ -35,7 +35,7 @@ const options: MenuOption[] = [
h(
RouterLink,
{ to: "/admin/problem/create" },
{ default: () => "新建题目" }
{ default: () => "新建题目" },
),
key: "admin problem create",
},
@@ -50,7 +50,7 @@ const options: MenuOption[] = [
h(
RouterLink,
{ to: "/admin/user/generate" },
{ default: () => "批量生成" }
{ default: () => "批量生成" },
),
key: "admin user generate",
},
@@ -60,7 +60,7 @@ const options: MenuOption[] = [
h(
RouterLink,
{ to: "/admin/contest/list" },
{ default: () => "比赛列表" }
{ default: () => "比赛列表" },
),
key: "admin contest list",
},
@@ -69,7 +69,7 @@ const options: MenuOption[] = [
h(
RouterLink,
{ to: "/admin/contest/create" },
{ default: () => "新建比赛" }
{ default: () => "新建比赛" },
),
key: "admin contest create",
},
@@ -84,7 +84,7 @@ const options: MenuOption[] = [
h(
RouterLink,
{ to: "/admin/announcement" },
{ default: () => "公告配置" }
{ default: () => "公告配置" },
),
key: "admin announcement",
},

View File

@@ -11,13 +11,13 @@ export const useUserStore = defineStore("user", () => {
const isAdminRole = computed(
() =>
user.value?.admin_type === USER_TYPE.ADMIN ||
user.value?.admin_type === USER_TYPE.SUPER_ADMIN
user.value?.admin_type === USER_TYPE.SUPER_ADMIN,
)
const isSuperAdmin = computed(
() => user.value?.admin_type === USER_TYPE.SUPER_ADMIN
() => user.value?.admin_type === USER_TYPE.SUPER_ADMIN,
)
const hasProblemPermission = computed(
() => user.value?.problem_permission !== PROBLEM_PERMISSION.NONE
() => user.value?.problem_permission !== PROBLEM_PERMISSION.NONE,
)
async function getMyProfile() {

View File

@@ -100,7 +100,7 @@ export const createTheme = ({
},
{
dark: variant === "dark",
}
},
)
const highlightStyle = HighlightStyle.define(styles)

View File

@@ -92,7 +92,7 @@ const oneDarkTheme = EditorView.theme(
},
},
},
{ dark: true }
{ dark: true },
)
/// The highlighting style for code in the One Dark theme.