Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: update import path (#1477)

boojackcc23f69f6648
diff --git a/web/src/labs/marked/parser/Image.tsx b/web/src/labs/marked/parser/Image.tsx
index b9dc835e0..96437c56a 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 e1492c23a..f36dab595 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 ee707b306..cbd4aace5 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 052af42ad..8c1577dc1 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 ffd8a88ea..af42b93c2 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 661305c33..7a27ff341 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 eb971deb0..b1a8d67cf 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