From cc23f69f6648a16fa8ec37ec95a144424f0730d6 Mon Sep 17 00:00:00 2001 From: boojack Date: Wed, 5 Apr 2023 23:31:15 +0800 Subject: [PATCH] chore: update import path (#1477) --- web/src/labs/marked/parser/Image.tsx | 2 +- web/src/store/module/global.ts | 8 ++++---- web/src/store/module/memo.ts | 4 ++-- web/src/store/module/resource.ts | 4 ++-- web/src/store/module/shortcut.ts | 2 +- web/src/store/module/tag.ts | 2 +- web/src/store/module/user.ts | 8 ++++---- web/src/utils/{convertLanguageCodeToLocale.ts => i18n.ts} | 0 8 files changed, 15 insertions(+), 15 deletions(-) rename web/src/utils/{convertLanguageCodeToLocale.ts => i18n.ts} (100%) diff --git a/web/src/labs/marked/parser/Image.tsx b/web/src/labs/marked/parser/Image.tsx index b9dc835e..96437c56 100644 --- a/web/src/labs/marked/parser/Image.tsx +++ b/web/src/labs/marked/parser/Image.tsx @@ -1,4 +1,4 @@ -import { absolutifyLink } from "../../../helpers/utils"; +import { absolutifyLink } from "@/helpers/utils"; import { matcher } from "../matcher"; export const IMAGE_REG = /!\[.*?\]\((.+?)\)/; diff --git a/web/src/store/module/global.ts b/web/src/store/module/global.ts index e1492c23..f36dab59 100644 --- a/web/src/store/module/global.ts +++ b/web/src/store/module/global.ts @@ -1,9 +1,9 @@ -import * as api from "../../helpers/api"; -import * as storage from "../../helpers/storage"; +import * as api from "@/helpers/api"; +import * as storage from "@/helpers/storage"; +import i18n from "@/i18n"; +import { convertLanguageCodeToLocale } from "@/utils/i18n"; import store, { useAppSelector } from "../"; import { setAppearance, setGlobalState, setLocale } from "../reducer/global"; -import i18n from "../../i18n"; -import { convertLanguageCodeToLocale } from "../../utils/convertLanguageCodeToLocale"; export const initialGlobalState = async () => { const defaultGlobalState = { diff --git a/web/src/store/module/memo.ts b/web/src/store/module/memo.ts index ee707b30..cbd4aace 100644 --- a/web/src/store/module/memo.ts +++ b/web/src/store/module/memo.ts @@ -1,6 +1,6 @@ import { omit } from "lodash-es"; -import * as api from "../../helpers/api"; -import { DEFAULT_MEMO_LIMIT } from "../../helpers/consts"; +import * as api from "@/helpers/api"; +import { DEFAULT_MEMO_LIMIT } from "@/helpers/consts"; import { useUserStore } from "./"; import store, { useAppSelector } from "../"; import { createMemo, deleteMemo, patchMemo, setIsFetching, upsertMemos } from "../reducer/memo"; diff --git a/web/src/store/module/resource.ts b/web/src/store/module/resource.ts index 052af42a..8c1577dc 100644 --- a/web/src/store/module/resource.ts +++ b/web/src/store/module/resource.ts @@ -1,7 +1,7 @@ +import * as api from "@/helpers/api"; +import { DEFAULT_MEMO_LIMIT } from "@/helpers/consts"; import store, { useAppSelector } from "../"; import { patchResource, setResources, deleteResource, upsertResources } from "../reducer/resource"; -import * as api from "../../helpers/api"; -import { DEFAULT_MEMO_LIMIT } from "../../helpers/consts"; const MAX_FILE_SIZE = 32 << 20; diff --git a/web/src/store/module/shortcut.ts b/web/src/store/module/shortcut.ts index ffd8a88e..af42b93c 100644 --- a/web/src/store/module/shortcut.ts +++ b/web/src/store/module/shortcut.ts @@ -1,6 +1,6 @@ +import * as api from "@/helpers/api"; import store, { useAppSelector } from "../"; import { createShortcut, deleteShortcut, patchShortcut, setShortcuts } from "../reducer/shortcut"; -import * as api from "../../helpers/api"; const convertResponseModelShortcut = (shortcut: Shortcut): Shortcut => { return { diff --git a/web/src/store/module/tag.ts b/web/src/store/module/tag.ts index 661305c3..7a27ff34 100644 --- a/web/src/store/module/tag.ts +++ b/web/src/store/module/tag.ts @@ -1,5 +1,5 @@ +import * as api from "@/helpers/api"; import store, { useAppSelector } from ".."; -import * as api from "../../helpers/api"; import { deleteTag, setTags, upsertTag } from "../reducer/tag"; import { useUserStore } from "./"; diff --git a/web/src/store/module/user.ts b/web/src/store/module/user.ts index eb971deb..b1a8d67c 100644 --- a/web/src/store/module/user.ts +++ b/web/src/store/module/user.ts @@ -1,9 +1,9 @@ import { camelCase } from "lodash-es"; +import * as api from "@/helpers/api"; +import * as storage from "@/helpers/storage"; +import { UNKNOWN_ID } from "@/helpers/consts"; +import { getSystemColorScheme } from "@/helpers/utils"; import store, { useAppSelector } from ".."; -import * as api from "../../helpers/api"; -import * as storage from "../../helpers/storage"; -import { UNKNOWN_ID } from "../../helpers/consts"; -import { getSystemColorScheme } from "../../helpers/utils"; import { setAppearance, setLocale } from "../reducer/global"; import { setUser, patchUser, setHost, setUserById } from "../reducer/user"; diff --git a/web/src/utils/convertLanguageCodeToLocale.ts b/web/src/utils/i18n.ts similarity index 100% rename from web/src/utils/convertLanguageCodeToLocale.ts rename to web/src/utils/i18n.ts