chore: updates

This commit is contained in:
Tristan Yang
2023-11-21 21:53:04 +08:00
parent abf0ced2f9
commit eb53322bbc
3 changed files with 11 additions and 22 deletions
+2 -18
View File
@@ -9,27 +9,11 @@
</head>
<body class="w-sreen h-screen flex-center bg-slate-800 text-stone-50">
<div class="w-96 flex flex-col gap-2">
<div class="flex flex-col gap-1">
<h2 class="text-gray-100">S3:</h2>
<video class="w-full h-full object-cover" controls>
<source src="https://s.voce.chat/demo/how_to_install_vocechat.mp4" type="video/mp4" />
</video>
</div>
<div class="flex flex-col gap-1">
<h2 class="text-gray-100">VoceChat:</h2>
<video class="w-full h-full object-cover" controls>
<source
src="https://dev.voce.chat/api/resource/file?file_path=2022%2F12%2F29%2F6803d8ad-8857-464b-a0a3-5d0f45bc1682"
type="video/mp4"
/>
</video>
</div>
</div>
demo
</body>
<script
src="/widget.js"
data-auto-reg="true"
data-login-token="414fe2d2edcd74c9d6433655efbf5eef29f3bb05d8bf98ee21a73edb7c2206547b22757365726964223a2268656c6f6f222c22757365726e616d65223a22776f726c64222c22657870697265645f6174223a22323032332d31312d32315431323a33373a33352e3734313636343134325a227d"
data-host-id="1"
data-theme-color="#eee"
async
+3 -1
View File
@@ -8,6 +8,7 @@ import URLPreview from "./Message/URLPreview";
type Props = {
url?: boolean;
linkPreview?: boolean;
mention?: boolean;
mentionTextOnly?: boolean;
mentionPopOver?: boolean;
@@ -20,6 +21,7 @@ const LinkifyText = ({
mention = true,
mentionTextOnly = false,
mentionPopOver = true,
linkPreview = true,
text,
cid
}: Props) => {
@@ -45,7 +47,7 @@ const LinkifyText = ({
<a className="text-primary-500" target="_blank" href={link} rel="noreferrer">
{content}
</a>
<URLPreview url={link} />
{linkPreview && <URLPreview url={link} />}
</>
);
},
+6 -3
View File
@@ -10,6 +10,7 @@ import Button from "../../components/styled/Button";
import Input from "../../components/styled/Input";
import useCopy from "../../hooks/useCopy";
import { shallowEqual } from "react-redux";
import LinkifyText from "@/components/LinkifyText";
const Row = ({
paramKey,
@@ -30,7 +31,9 @@ const Row = ({
paramDefault
)}
</td>
<td className="text-sm font-light px-6 py-4 whitespace-nowrap">{remarks}</td>
<td className="text-sm font-light px-6 py-4">
<LinkifyText linkPreview={false} text={remarks} mention={false} />
</td>
</tr>
);
};
@@ -54,7 +57,7 @@ export default function Widget() {
<SyntaxHighlighter id="code" language="html" style={vscDarkPlus} className="rounded">
{`<!-- ${t(
"code_comment"
)} -->\n<script \n data-host-id="${loginUid}" \n data-auto-reg="false" \n data-login-token="xxxxxxxx" \n data-theme-color="#1fe1f9" \n data-close-width="48" \n data-close-height="48" \n data-open-width="380" \n data-open-height="680" \n data-welcome="Your custom welcome text" \n src="${
)} -->\n<script \n data-host-id="${loginUid}" \n data-auto-reg="false" \n data-login-token="xxxxxxxx" \n data-theme-color="#1fe1f9" \n data-close-width="48" \n data-close-height="48" \n data-open-width="380" \n data-open-height="680" \n data-welcome="Your custom welcome text" \n src="${
location.origin
}/widget.js" \n async \n></script>`}
</SyntaxHighlighter>
@@ -97,7 +100,7 @@ export default function Widget() {
},
{
paramKey: "login-token",
paramDefault: "",
paramDefault: `-`,
remarks: t("param_login_token")
},
{