mirror of
https://github.com/mue/mue.git
synced 2026-07-17 14:04:09 +02:00
feat: add opt-in umami analytics (WIP)
This commit is contained in:
@@ -19,6 +19,7 @@ export default class Favourite extends React.PureComponent {
|
||||
this.setState({
|
||||
favourited: <StarIcon2 onClick={this.favourite} className='topicons' />
|
||||
});
|
||||
window.analytics.postEvent('featureUpdate', 'Feature background favourite used');
|
||||
} else {
|
||||
const url = document.getElementById('backgroundImage').style.backgroundImage.replace('url("', '').replace('")', '');
|
||||
|
||||
@@ -37,6 +38,7 @@ export default class Favourite extends React.PureComponent {
|
||||
this.setState({
|
||||
favourited: <StarIcon onClick={this.favourite} className='topicons' />
|
||||
});
|
||||
window.analytics.postEvent('featureUpdate', 'Feature background unfavourite used');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,12 +44,14 @@ export default class Maximise extends React.PureComponent {
|
||||
});
|
||||
|
||||
this.setAttribute(0, 100);
|
||||
window.analytics.postEvent('featureUpdate', 'Feature background maximise used');
|
||||
} else {
|
||||
this.setState({
|
||||
hidden: false
|
||||
});
|
||||
|
||||
this.setAttribute(localStorage.getItem('blur'), localStorage.getItem('brightness'), true);
|
||||
window.analytics.postEvent('featureUpdate', 'Feature background unmaximise used');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ const downloadImage = async (info) => {
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
window.analytics.postEvent('featureUpdate', 'Feature background download used');
|
||||
};
|
||||
|
||||
export default function PhotoInformation(props) {
|
||||
|
||||
Reference in New Issue
Block a user