diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx index 2d4fb8d8..8fa60fca 100644 --- a/web/src/components/MemoEditor/index.tsx +++ b/web/src/components/MemoEditor/index.tsx @@ -5,10 +5,9 @@ import { toast } from "react-hot-toast"; import { useTranslation } from "react-i18next"; import useLocalStorage from "react-use/lib/useLocalStorage"; import { TAB_SPACE_WIDTH, UNKNOWN_ID, VISIBILITY_SELECTOR_ITEMS } from "@/helpers/consts"; -import { clearContentQueryParam } from "@/helpers/utils"; import useCurrentUser from "@/hooks/useCurrentUser"; import { getMatchedNodes } from "@/labs/marked"; -import { useFilterStore, useGlobalStore, useMemoStore, useResourceStore, useTagStore } from "@/store/module"; +import { useGlobalStore, useMemoStore, useResourceStore, useTagStore } from "@/store/module"; import { useUserV1Store } from "@/store/v1"; import { Resource } from "@/types/proto/api/v2/resource_service"; import { UserSetting, User_Role } from "@/types/proto/api/v2/user_service"; @@ -52,7 +51,6 @@ const MemoEditor = (props: Props) => { state: { systemStatus }, } = useGlobalStore(); const userV1Store = useUserV1Store(); - const filterStore = useFilterStore(); const memoStore = useMemoStore(); const tagStore = useTagStore(); const resourceStore = useResourceStore(); @@ -324,10 +322,8 @@ const MemoEditor = (props: Props) => { resourceIdList: state.resourceList.map((resource) => resource.id), relationList: state.relationList, }); - filterStore.clearFilter(); } editorRef.current?.setContent(""); - clearContentQueryParam(); } catch (error: any) { console.error(error); toast.error(error.response.data.message); diff --git a/web/src/components/MemoList.tsx b/web/src/components/MemoList.tsx index b8784cbe..5883701a 100644 --- a/web/src/components/MemoList.tsx +++ b/web/src/components/MemoList.tsx @@ -64,7 +64,7 @@ const MemoList: React.FC = () => { return shouldShow; }) : memos - ).filter((memo) => memo.creatorUsername === username && memo.rowStatus === "NORMAL" && !memo.parent); + ).filter((memo) => memo.creatorUsername === username && memo.rowStatus === "NORMAL"); const pinnedMemos = shownMemos.filter((m) => m.pinned); const unpinnedMemos = shownMemos.filter((m) => !m.pinned); diff --git a/web/src/components/Settings/PreferencesSection.tsx b/web/src/components/Settings/PreferencesSection.tsx index 759dc202..3ff7ad72 100644 --- a/web/src/components/Settings/PreferencesSection.tsx +++ b/web/src/components/Settings/PreferencesSection.tsx @@ -1,13 +1,14 @@ import { Button, Divider, Input, Option, Select } from "@mui/joy"; import { useState } from "react"; import { toast } from "react-hot-toast"; +import { Link } from "react-router-dom"; import { VISIBILITY_SELECTOR_ITEMS } from "@/helpers/consts"; import { useGlobalStore } from "@/store/module"; import { useUserV1Store } from "@/store/v1"; import { UserSetting } from "@/types/proto/api/v2/user_service"; import { useTranslate } from "@/utils/i18n"; import AppearanceSelect from "../AppearanceSelect"; -import LearnMore from "../LearnMore"; +import Icon from "../Icon"; import LocaleSelect from "../LocaleSelect"; import VisibilityIcon from "../VisibilityIcon"; import WebhookSection from "./WebhookSection"; @@ -103,25 +104,36 @@ const PreferencesSection = () => { -
-
- {t("setting.preference-section.telegram-user-id")} - +
+
+
+ {t("setting.preference-section.telegram-user-id")} +
+ +
+ handleTelegramUserIdChanged(event.target.value)} + placeholder={t("setting.preference-section.telegram-user-id-placeholder")} + /> +
+ + {t("common.learn-more")} + +
-
- handleTelegramUserIdChanged(event.target.value)} - placeholder={t("setting.preference-section.telegram-user-id-placeholder")} - /> diff --git a/web/src/components/Settings/SystemSection.tsx b/web/src/components/Settings/SystemSection.tsx index b119fa00..0310fae8 100644 --- a/web/src/components/Settings/SystemSection.tsx +++ b/web/src/components/Settings/SystemSection.tsx @@ -9,7 +9,6 @@ import { useTranslate } from "@/utils/i18n"; import { showCommonDialog } from "../Dialog/CommonDialog"; import showDisablePasswordLoginDialog from "../DisablePasswordLoginDialog"; import Icon from "../Icon"; -import LearnMore from "../LearnMore"; import showUpdateCustomizedProfileDialog from "../UpdateCustomizedProfileDialog"; import "@/less/settings/system-section.less"; @@ -319,10 +318,6 @@ const SystemSection = () => {
{t("setting.system-section.telegram-bot-token")} -