doc: de lang
This commit is contained in:
@@ -26,7 +26,7 @@ import { PlateEditor } from "@udecode/plate-common";
|
||||
|
||||
const Modes = {
|
||||
text: "text",
|
||||
markdown: "markdown"
|
||||
markdown: "markdown",
|
||||
};
|
||||
interface IProps {
|
||||
context?: ChatContext;
|
||||
@@ -35,20 +35,20 @@ interface IProps {
|
||||
const Send: FC<IProps> = ({
|
||||
// 发给谁,或者是 channel,或者是 user
|
||||
context = "channel",
|
||||
id
|
||||
id,
|
||||
}) => {
|
||||
const editorRef = useRef<PlateEditor | null>(null);
|
||||
|
||||
const { t } = useTranslation("chat");
|
||||
const { unblockThisContact, blocked, isChannelOwner } = useUserOperation({
|
||||
uid: context == "dm" ? id : undefined,
|
||||
cid: context == "channel" ? id : undefined
|
||||
cid: context == "channel" ? id : undefined,
|
||||
});
|
||||
const { resetStageFiles } = useUploadFile({ context, id });
|
||||
const { getDraft, getUpdateDraft } = useDraft({ context, id });
|
||||
const [msg, setMsg] = useState<MessageWithMentions>({
|
||||
text: "",
|
||||
mentions: []
|
||||
mentions: [],
|
||||
});
|
||||
const [markdownEditor, setMarkdownEditor] = useState(null);
|
||||
const [markdownFullscreen, setMarkdownFullscreen] = useState(false);
|
||||
@@ -95,7 +95,7 @@ const Send: FC<IProps> = ({
|
||||
type: "text",
|
||||
content: text,
|
||||
from_uid,
|
||||
properties
|
||||
properties,
|
||||
});
|
||||
}
|
||||
// send files
|
||||
@@ -112,10 +112,10 @@ const Send: FC<IProps> = ({
|
||||
content_type: type,
|
||||
name,
|
||||
size,
|
||||
local_id: ts
|
||||
local_id: ts,
|
||||
},
|
||||
from_uid,
|
||||
sending: true
|
||||
sending: true,
|
||||
};
|
||||
addLocalFileMessage(tmpMsg);
|
||||
});
|
||||
@@ -129,7 +129,7 @@ const Send: FC<IProps> = ({
|
||||
type: "markdown",
|
||||
content,
|
||||
from_uid,
|
||||
properties: { local_id: +new Date() }
|
||||
properties: { local_id: +new Date() },
|
||||
});
|
||||
};
|
||||
const toggleMode = () => {
|
||||
@@ -213,7 +213,7 @@ const Send: FC<IProps> = ({
|
||||
<MarkdownEditor
|
||||
updateDraft={getUpdateDraft("markdown")}
|
||||
initialValue={getDraft("markdown")}
|
||||
height={markdownFullscreen ? `calc(100vh - 168px)` : `30vh`}
|
||||
height={markdownFullscreen ? `calc(100dvh - 168px)` : `30vh`}
|
||||
placeholder={placeholder}
|
||||
setEditorInstance={setMarkdownEditor}
|
||||
sendMarkdown={sendMarkdown}
|
||||
|
||||
@@ -5,14 +5,13 @@ import "dayjs/locale/ja";
|
||||
import "dayjs/locale/fr";
|
||||
import "dayjs/locale/pt";
|
||||
import "dayjs/locale/tr";
|
||||
import "dayjs/locale/de";
|
||||
import "dayjs/locale/es";
|
||||
import duration from "dayjs/plugin/duration";
|
||||
import isToday from "dayjs/plugin/isToday";
|
||||
import isYesterday from "dayjs/plugin/isYesterday";
|
||||
import relativeTime from "dayjs/plugin/relativeTime";
|
||||
|
||||
// import i18n from '../i18n';
|
||||
|
||||
dayjs.extend(duration);
|
||||
dayjs.extend(relativeTime);
|
||||
dayjs.extend(isToday);
|
||||
|
||||
@@ -5,13 +5,14 @@ import SettingBlock from "@/components/SettingBlock";
|
||||
import StyledRadio from "@/components/styled/Radio";
|
||||
|
||||
// type Props = {}
|
||||
export type LanguageType = "en" | "zh" | "jp" | "tr" | "pt" | "es" | "fr" | "ru";
|
||||
export type LanguageType = "en" | "zh" | "jp" | "tr" | "pt" | "es" | "fr" | "ru" | "de";
|
||||
export const LangMap: Record<LanguageType, string> = {
|
||||
en: "English",
|
||||
zh: "中文",
|
||||
tr: "Türkçe",
|
||||
jp: "日本語",
|
||||
pt: "Portuguese",
|
||||
de: "Deutsch",
|
||||
fr: "Français",
|
||||
es: "Español",
|
||||
ru: "Русский",
|
||||
|
||||
@@ -5,13 +5,14 @@ import SettingBlock from "@/components/SettingBlock";
|
||||
import StyledRadio from "@/components/styled/Radio";
|
||||
|
||||
// type Props = {}
|
||||
export type LanguageType = "en" | "zh" | "jp" | "tr" | "pt" | "es" | "fr" | "ru";
|
||||
export type LanguageType = "en" | "zh" | "jp" | "tr" | "pt" | "es" | "fr" | "ru" | "de";
|
||||
export const LangMap: Record<LanguageType, string> = {
|
||||
en: "English",
|
||||
zh: "中文",
|
||||
tr: "Türkçe",
|
||||
jp: "日本語",
|
||||
pt: "Portuguese",
|
||||
de: "Deutsch",
|
||||
fr: "Français",
|
||||
es: "Español",
|
||||
ru: "Русский",
|
||||
|
||||
@@ -33,7 +33,7 @@ const Index = ({ handleClose, hostId }: Props) => {
|
||||
"flex flex-col bg-white dark:bg-gray-700 rounded-md overflow-hidden",
|
||||
embed
|
||||
? "w-full h-full"
|
||||
: `w-full h-full md:max-w-lg md:h-[calc(100vh_-_20px)] m-auto md:my-2 md:shadow-lg rounded-none md:rounded-md`
|
||||
: `w-full h-full md:max-w-lg md:h-[calc(100dvh_-_20px)] m-auto md:my-2 md:shadow-lg rounded-none md:rounded-md`
|
||||
)}
|
||||
>
|
||||
<Header handleClose={handleClose} />
|
||||
|
||||
Reference in New Issue
Block a user