统一导入
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import http from "utils/http"
|
||||
import { Profile, Tag } from "~/utils/types"
|
||||
import { Profile, Tag } from "utils/types"
|
||||
|
||||
export function login(data: { username: string; password: string }) {
|
||||
return http.post("login", data)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getAuthors } from "~/oj/api"
|
||||
import { getAuthors } from "oj/api"
|
||||
|
||||
interface Props {
|
||||
all?: boolean
|
||||
|
||||
@@ -4,7 +4,7 @@ import { python } from "@codemirror/lang-python"
|
||||
import { EditorView } from "@codemirror/view"
|
||||
import { Codemirror } from "vue-codemirror"
|
||||
import type { Extension } from "@codemirror/state"
|
||||
import { LANGUAGE } from "~/utils/types"
|
||||
import { LANGUAGE } from "utils/types"
|
||||
import { oneDark } from "../themes/oneDark"
|
||||
import { smoothy } from "../themes/smoothy"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ContestType } from "~/utils/constants"
|
||||
import { Contest } from "~/utils/types"
|
||||
import { ContestType } from "utils/constants"
|
||||
import { Contest } from "utils/types"
|
||||
|
||||
interface Props {
|
||||
contest: Contest
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { Icon } from "@iconify/vue"
|
||||
import { copyToClipboard } from "~/utils/functions"
|
||||
import { copyToClipboard } from "utils/functions"
|
||||
|
||||
defineProps<{ value: string }>()
|
||||
const [copied, toggle] = useToggle()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { Icon } from "@iconify/vue"
|
||||
import { RouterLink } from "vue-router"
|
||||
import { isDesktop, isMobile } from "~/shared/composables/breakpoints"
|
||||
import { toggleLogin, toggleSignup } from "~/shared/composables/modal"
|
||||
import { screenMode, switchScreenMode } from "~/shared/composables/switchScreen"
|
||||
import { avatar } from "~/utils/constants"
|
||||
import { isDesktop, isMobile } from "shared/composables/breakpoints"
|
||||
import { toggleLogin, toggleSignup } from "shared/composables/modal"
|
||||
import { screenMode, switchScreenMode } from "shared/composables/switchScreen"
|
||||
import { avatar } from "utils/constants"
|
||||
import { logout } from "../api"
|
||||
import { useConfigStore } from "../store/config"
|
||||
import { useUserStore } from "../store/user"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { isDesktop } from "~/shared/composables/breakpoints"
|
||||
import { isDesktop } from "shared/composables/breakpoints"
|
||||
|
||||
interface Props {
|
||||
total: number
|
||||
|
||||
@@ -4,7 +4,7 @@ import { python } from "@codemirror/lang-python"
|
||||
import { EditorView } from "@codemirror/view"
|
||||
import { Codemirror } from "vue-codemirror"
|
||||
import type { Extension } from "@codemirror/state"
|
||||
import { LANGUAGE } from "~/utils/types"
|
||||
import { LANGUAGE } from "utils/types"
|
||||
import { oneDark } from "../themes/oneDark"
|
||||
import { smoothy } from "../themes/smoothy"
|
||||
import { useCodeSync, SYNC_ERROR_CODES } from "../composables/sync"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</n-tooltip>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { copyToClipboard } from "~/utils/functions"
|
||||
import { copyToClipboard } from "utils/functions"
|
||||
|
||||
const message = useMessage()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { filterEmptyValue } from "~/utils/functions"
|
||||
import { filterEmptyValue } from "utils/functions"
|
||||
|
||||
export interface PaginationQuery {
|
||||
page: number
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ScreenMode } from "~/utils/constants"
|
||||
import { ScreenMode } from "utils/constants"
|
||||
|
||||
export const { state: screenMode, next: switchScreenMode } = useCycleList(
|
||||
Object.values(ScreenMode),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { RouterLink } from "vue-router"
|
||||
import { STORAGE_KEY } from "~/utils/constants"
|
||||
import storage from "~/utils/storage"
|
||||
import { STORAGE_KEY } from "utils/constants"
|
||||
import storage from "utils/storage"
|
||||
import { useUserStore } from "../store/user"
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { getWebsiteConfig } from "~/oj/api"
|
||||
import { WebsiteConfig } from "~/utils/types"
|
||||
import { getWebsiteConfig } from "oj/api"
|
||||
import { WebsiteConfig } from "utils/types"
|
||||
|
||||
export const useConfigStore = defineStore("config", () => {
|
||||
const config = ref<WebsiteConfig>({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { PROBLEM_PERMISSION, STORAGE_KEY, USER_TYPE } from "utils/constants"
|
||||
import storage from "utils/storage"
|
||||
import { Profile, User } from "~/utils/types"
|
||||
import { Profile, User } from "utils/types"
|
||||
import { getProfile } from "../api"
|
||||
import { useConfigStore } from "./config"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user