feat: 自行开发设计 ui样式优化 超管端-控制台 相关的页面
This commit is contained in:
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { writeClipboardText } from '../../../helpers/clipboard';
|
||||
import React, { useEffect, useState, useCallback, useRef } from 'react';
|
||||
import { API, showError } from '../../../helpers';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -361,14 +362,14 @@ const DocumentRenderer = ({
|
||||
a.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
const url = `${window.location.origin}${window.location.pathname}#${id}`;
|
||||
if (navigator.clipboard) {
|
||||
navigator.clipboard.writeText(url).catch(() => {});
|
||||
}
|
||||
writeClipboardText(url).catch(() => {
|
||||
showError(t('复制失败,请手动复制'));
|
||||
});
|
||||
history.replaceState(null, '', `#${id}`);
|
||||
});
|
||||
h.prepend(a);
|
||||
});
|
||||
}, [isEmbedded, loading, content, processedHtmlContent]);
|
||||
}, [isEmbedded, loading, content, processedHtmlContent, t]);
|
||||
|
||||
// 文档内容样式(prose)—— 同时兼顾浅色与深色
|
||||
const proseClass = `prose prose-base dark:prose-invert max-w-none
|
||||
|
||||
Reference in New Issue
Block a user