diff options
Diffstat (limited to 'FrontEnd/src/pages')
-rw-r--r-- | FrontEnd/src/pages/setting/index.tsx | 4 | ||||
-rw-r--r-- | FrontEnd/src/pages/timeline/TimelineCard.tsx | 4 | ||||
-rw-r--r-- | FrontEnd/src/pages/timeline/TimelinePostCreateView.tsx | 5 | ||||
-rw-r--r-- | FrontEnd/src/pages/timeline/TimelinePostView.tsx | 5 |
4 files changed, 8 insertions, 10 deletions
diff --git a/FrontEnd/src/pages/setting/index.tsx b/FrontEnd/src/pages/setting/index.tsx index d2333134..25434339 100644 --- a/FrontEnd/src/pages/setting/index.tsx +++ b/FrontEnd/src/pages/setting/index.tsx @@ -10,10 +10,10 @@ import classNames from "classnames"; import { useUser, userService } from "~src/services/user"; import { getHttpUserClient } from "~src/http/user"; -import { pushAlert } from "~src/services/alert"; import { useC, Text } from "~src/common"; +import { pushAlert } from "~src/components/alert"; import { useDialog, DialogProvider, @@ -192,7 +192,7 @@ function RegisterCodeSettingItem() { onClick={(event) => { void navigator.clipboard.writeText(registerCode).then(() => { pushAlert({ - type: "create", + color: "create", message: "settings.myRegisterCodeCopied", }); }); diff --git a/FrontEnd/src/pages/timeline/TimelineCard.tsx b/FrontEnd/src/pages/timeline/TimelineCard.tsx index 44dfbf9e..1e0e9b75 100644 --- a/FrontEnd/src/pages/timeline/TimelineCard.tsx +++ b/FrontEnd/src/pages/timeline/TimelineCard.tsx @@ -2,11 +2,11 @@ import { useState } from "react"; import { HubConnectionState } from "@microsoft/signalr"; import { useUser } from "~src/services/user"; -import { pushAlert } from "~src/services/alert"; import { HttpTimelineInfo } from "~src/http/timeline"; import { getHttpBookmarkClient } from "~src/http/bookmark"; +import { pushAlert } from "~src/components/alert"; import { useMobile } from "~src/components/hooks"; import { Dialog, DialogProvider, useDialog } from "~src/components/dialog"; import UserAvatar from "~src/components/user/UserAvatar"; @@ -89,7 +89,7 @@ export default function TimelineCard(props: TimelinePageCardProps) { message: timeline.isBookmark ? "timeline.removeBookmarkFail" : "timeline.addBookmarkFail", - type: "danger", + color: "danger", }); }); }} diff --git a/FrontEnd/src/pages/timeline/TimelinePostCreateView.tsx b/FrontEnd/src/pages/timeline/TimelinePostCreateView.tsx index 3bc4dab3..70925cd9 100644 --- a/FrontEnd/src/pages/timeline/TimelinePostCreateView.tsx +++ b/FrontEnd/src/pages/timeline/TimelinePostCreateView.tsx @@ -10,10 +10,9 @@ import { HttpTimelinePostPostRequestData, } from "~src/http/timeline"; -import { pushAlert } from "~src/services/alert"; - import base64 from "~src/utilities/base64"; +import { pushAlert } from "~src/components/alert"; import BlobImage from "~src/components/BlobImage"; import LoadingButton from "~src/components/button/LoadingButton"; import PopupMenu from "~src/components/menu/PopupMenu"; @@ -141,7 +140,7 @@ function TimelinePostEdit(props: TimelinePostEditProps) { const onPostError = (): void => { pushAlert({ - type: "danger", + color: "danger", message: "timeline.sendPostFailed", }); }; diff --git a/FrontEnd/src/pages/timeline/TimelinePostView.tsx b/FrontEnd/src/pages/timeline/TimelinePostView.tsx index 5de09b28..b09fe6f8 100644 --- a/FrontEnd/src/pages/timeline/TimelinePostView.tsx +++ b/FrontEnd/src/pages/timeline/TimelinePostView.tsx @@ -5,8 +5,7 @@ import { HttpTimelinePostInfo, } from "~src/http/timeline"; -import { pushAlert } from "~src/services/alert"; - +import { pushAlert } from "~src/components/alert"; import { useClickOutside } from "~src/components/hooks"; import UserAvatar from "~src/components/user/UserAvatar"; import { DialogProvider, useDialog } from "~src/components/dialog"; @@ -44,7 +43,7 @@ export default function TimelinePostView(props: TimelinePostViewProps) { .deletePost(post.timelineOwnerV2, post.timelineNameV2, post.id) .then(onDeleted, () => { pushAlert({ - type: "danger", + color: "danger", message: "timeline.deletePostFailed", }); }); |