mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Toast on log copy
This commit is contained in:
parent
e741bd5e0a
commit
3a9534c5ba
3 changed files with 5 additions and 8 deletions
|
@ -15,6 +15,7 @@ import {
|
|||
} from '@mui/material';
|
||||
import { ContentCopy, FileDownload } from '@mui/icons-material';
|
||||
import globalize from 'lib/globalize';
|
||||
import toast from 'components/toast/toast';
|
||||
|
||||
export const Component = () => {
|
||||
const { file: fileName } = useParams();
|
||||
|
@ -30,6 +31,7 @@ export const Component = () => {
|
|||
const copyToClipboard = useCallback(async () => {
|
||||
if ('clipboard' in navigator && log) {
|
||||
await navigator.clipboard.writeText(log);
|
||||
toast({ text: globalize.translate('CopyLogSuccess') });
|
||||
}
|
||||
}, [log]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue