mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
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>
This commit is contained in:
@ -5,7 +5,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import copy from "copy-to-clipboard";
|
import copy from "copy-to-clipboard";
|
||||||
import { toLower } from "lodash";
|
import { toLower } from "lodash";
|
||||||
import toImage from "../labs/html2image";
|
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 { VISIBILITY_SELECTOR_ITEMS } from "../helpers/consts";
|
||||||
import * as utils from "../helpers/utils";
|
import * as utils from "../helpers/utils";
|
||||||
import { getMemoStats } from "../helpers/api";
|
import { getMemoStats } from "../helpers/api";
|
||||||
@ -32,7 +32,9 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const memoStore = useMemoStore();
|
const memoStore = useMemoStore();
|
||||||
|
const globalStore = useGlobalStore();
|
||||||
const user = userStore.state.user as User;
|
const user = userStore.state.user as User;
|
||||||
|
const { systemStatus } = globalStore.state;
|
||||||
const [state, setState] = useState<State>({
|
const [state, setState] = useState<State>({
|
||||||
memoAmount: 0,
|
memoAmount: 0,
|
||||||
memoVisibility: propsMemo.visibility,
|
memoVisibility: propsMemo.visibility,
|
||||||
@ -139,7 +141,7 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="watermark-container">
|
<div className="watermark-container">
|
||||||
<div className="logo-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>
|
||||||
<div className="userinfo-container">
|
<div className="userinfo-container">
|
||||||
<span className="name-text">{user.nickname || user.username}</span>
|
<span className="name-text">{user.nickname || user.username}</span>
|
||||||
|
Reference in New Issue
Block a user