diff --git a/src/routes/chat/Layout/DnDTip.tsx b/src/routes/chat/Layout/DnDTip.tsx
new file mode 100644
index 00000000..da489708
--- /dev/null
+++ b/src/routes/chat/Layout/DnDTip.tsx
@@ -0,0 +1,25 @@
+// import { useEffect } from "react";
+import { ChatPrefixes } from "../../../app/config";
+import { useTranslation } from "react-i18next";
+type Props = {
+ context: "user" | "channel",
+ name: string
+};
+const DnDTip = ({ context, name }: Props) => {
+ const { t } = useTranslation("chat");
+
+ return (
+
+
+
+
{`${t("send_to")} ${ChatPrefixes[context]}${name}`}
+ Photos accept jpg, png, max size limit to 10M.
+
+
+
+ );
+};
+
+export default DnDTip;
diff --git a/src/routes/chat/Layout/LicenseOutdatedTip.tsx b/src/routes/chat/Layout/LicenseOutdatedTip.tsx
index 121e9093..33dff1b0 100644
--- a/src/routes/chat/Layout/LicenseOutdatedTip.tsx
+++ b/src/routes/chat/Layout/LicenseOutdatedTip.tsx
@@ -1,28 +1,7 @@
// import { useEffect } from "react";
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
-import styled from "styled-components";
import Button from "../../../common/component/styled/Button";
-const Styled = styled.div`
- display: flex;
- align-items: center;
- justify-content: space-between;
- background: #ef4444;
- border-radius: var(--br);
- width: 100%;
- width: -webkit-fill-available;
- padding: 12px 16px;
- .txt {
- font-weight: 500;
- font-size: 16px;
- line-height: 16px;
- color: #fff;
- .hand {
- font-size: 20px;
- margin-right: 10px;
- }
- }
-`;
// type Props = {};
const LicenseUpgradeTip = () => {
@@ -33,13 +12,13 @@ const LicenseUpgradeTip = () => {
};
return (
-
-
- 🚨
+
+
+ 🚨
{t("license_tip")}
-
+
);
};
diff --git a/src/routes/chat/Layout/Operations.tsx b/src/routes/chat/Layout/Operations.tsx
index 59c27e9b..5616cf4f 100644
--- a/src/routes/chat/Layout/Operations.tsx
+++ b/src/routes/chat/Layout/Operations.tsx
@@ -1,5 +1,4 @@
import { FC, useState } from "react";
-import styled from "styled-components";
import { useKey } from "rooks";
import toast from "react-hot-toast";
import useDeleteMessage from "../../../common/hook/useDeleteMessage";
@@ -13,33 +12,6 @@ import ForwardModal from "../../../common/component/ForwardModal";
import DeleteMessageConfirmModal from "../../../common/component/DeleteMessageConfirm";
import { useAppDispatch, useAppSelector } from "../../../app/store";
-const Styled = styled.div`
- position: relative;
- padding: 16px;
- display: flex;
- gap: 32px;
- align-items: center;
- justify-content: center;
- box-shadow: 0px -1px 0px rgba(0, 0, 0, 0.05);
- .opt {
- padding: 8px;
- background: #f2f4f7;
- border-radius: var(--br);
- &:disabled svg path {
- fill: #ccc;
- }
- &:hover {
- background: #eaecf0;
- }
- }
- .close {
- cursor: pointer;
- position: absolute;
- right: 20px;
- top: 50%;
- transform: translateY(-50%);
- }
-`;
type Props = {
context: "user" | "channel";
id: number;
@@ -83,20 +55,21 @@ const Operations: FC = ({ context, id }) => {
});
const canDel = canDelete(mids);
+ // const
return (
<>
-
-
>
diff --git a/src/routes/chat/Layout/styled.tsx b/src/routes/chat/Layout/styled.tsx
index d833c6ae..0df32d43 100644
--- a/src/routes/chat/Layout/styled.tsx
+++ b/src/routes/chat/Layout/styled.tsx
@@ -100,46 +100,6 @@ const Styled = styled.article`
}
}
}
- .drag_tip {
- display: flex;
- justify-content: center;
- align-items: center;
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.5);
- visibility: hidden;
- &.visible {
- visibility: visible;
- }
- .box {
- padding: 16px;
- filter: drop-shadow(0px 25px 50px rgba(31, 41, 55, 0.25));
- border-radius: 8px;
- background: #52edff;
- .inner {
- padding: 16px;
- padding-top: 64px;
- border: 2px dashed #a5f3fc;
- border-radius: 6px;
- display: flex;
- flex-direction: column;
- align-items: center;
- color: #fff;
- .head {
- font-weight: 600;
- font-size: 20px;
- line-height: 30px;
- }
- .intro {
- font-weight: normal;
- font-size: 14px;
- line-height: 20px;
- }
- }
- }
- }
+
`;
export default Styled;