feat: add customized logo in share dialog (#969)

* feat: add qrcode in share dialog

* update: change the color

* feat: add customized logo in share dialog

* update: import order

Co-authored-by: boojack <stevenlgtm@gmail.com>
pull/973/head
Zeng1998 2 years ago committed by GitHub
parent 9ed503fd6d
commit 12fda38520
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,7 +5,7 @@ import { useTranslation } from "react-i18next";
import copy from "copy-to-clipboard";
import { toLower } from "lodash";
import toImage from "../labs/html2image";
import { useMemoStore, useUserStore } from "../store/module";
import { useGlobalStore, useMemoStore, useUserStore } from "../store/module";
import { VISIBILITY_SELECTOR_ITEMS } from "../helpers/consts";
import * as utils from "../helpers/utils";
import { getMemoStats } from "../helpers/api";
@ -32,7 +32,9 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
const { t } = useTranslation();
const userStore = useUserStore();
const memoStore = useMemoStore();
const globalStore = useGlobalStore();
const user = userStore.state.user as User;
const { systemStatus } = globalStore.state;
const [state, setState] = useState<State>({
memoAmount: 0,
memoVisibility: propsMemo.visibility,
@ -139,7 +141,7 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
</div>
<div className="watermark-container">
<div className="logo-container">
<img className="logo-img" src="/logo.png" alt="" />
<img className="logo-img" src={`${systemStatus.customizedProfile.logoUrl || "/logo.png"}`} alt="" />
</div>
<div className="userinfo-container">
<span className="name-text">{user.nickname || user.username}</span>

Loading…
Cancel
Save