@@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next'
3
3
import { faFolderOpen } from '@fortawesome/free-solid-svg-icons'
4
4
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
5
5
import ContentCopyIcon from '@mui/icons-material/ContentCopy'
6
+ import { Done } from '@mui/icons-material'
6
7
import { UpdateComponent } from 'frontend/components/UI'
7
8
import SettingsContext from '../../SettingsContext'
8
9
import './index.css'
@@ -64,6 +65,7 @@ export default function LogSettings() {
64
65
const [ logFileExist , setLogFileExist ] = useState < boolean > ( false )
65
66
const [ defaultLast , setDefaultLast ] = useState < boolean > ( false )
66
67
const [ refreshing , setRefreshing ] = useState < boolean > ( true )
68
+ const [ copiedLog , setCopiedLog ] = useState < boolean > ( false )
67
69
const { appName, isDefault } = useContext ( SettingsContext )
68
70
69
71
const getLogContent = ( ) => {
@@ -163,6 +165,10 @@ export default function LogSettings() {
163
165
< a
164
166
onClick = { ( ) => {
165
167
navigator . clipboard . writeText ( logFileContent )
168
+ setCopiedLog ( true )
169
+ setTimeout ( ( ) => {
170
+ setCopiedLog ( false )
171
+ } , 3000 )
166
172
} }
167
173
title = { t (
168
174
'setting.log.copy-to-clipboard' ,
@@ -172,7 +178,7 @@ export default function LogSettings() {
172
178
>
173
179
< div className = "button-icontext-flex" >
174
180
< div className = "button-icon-flex" >
175
- < ContentCopyIcon />
181
+ { copiedLog ? < Done /> : < ContentCopyIcon /> }
176
182
</ div >
177
183
< span className = "button-icon-text" >
178
184
{ t (
0 commit comments