mirror of
https://github.com/mue/mue.git
synced 2026-07-28 03:01:10 +02:00
chore: update events
This commit is contained in:
@@ -19,7 +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');
|
||||
window.analytics.postEvent('feature', 'Background favourite');
|
||||
} else {
|
||||
const url = document.getElementById('backgroundImage').style.backgroundImage.replace('url("', '').replace('")', '');
|
||||
|
||||
@@ -38,7 +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');
|
||||
window.analytics.postEvent('feature', 'Background unfavourite');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,14 +44,14 @@ export default class Maximise extends React.PureComponent {
|
||||
});
|
||||
|
||||
this.setAttribute(0, 100);
|
||||
window.analytics.postEvent('featureUpdate', 'Feature background maximise used');
|
||||
window.analytics.postEvent('feature', 'Background maximise');
|
||||
} else {
|
||||
this.setState({
|
||||
hidden: false
|
||||
});
|
||||
|
||||
this.setAttribute(localStorage.getItem('blur'), localStorage.getItem('brightness'), true);
|
||||
window.analytics.postEvent('featureUpdate', 'Feature background unmaximise used');
|
||||
window.analytics.postEvent('feature', 'Background unmaximise');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ const downloadImage = async (info) => {
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
window.analytics.postEvent('featureUpdate', 'Feature background download used');
|
||||
window.analytics.postEvent('feature', 'Background download');
|
||||
};
|
||||
|
||||
export default function PhotoInformation(props) {
|
||||
|
||||
@@ -25,7 +25,7 @@ export default class Notes extends React.PureComponent {
|
||||
};
|
||||
|
||||
pin() {
|
||||
window.analytics.postEvent('featureUpdate', 'Feature notes pin used');
|
||||
window.analytics.postEvent('feature', 'Notes pin');
|
||||
document.getElementById('noteContainer').classList.toggle('visibilityshow');
|
||||
|
||||
if (localStorage.getItem('notesPinned') === 'true') {
|
||||
@@ -36,7 +36,7 @@ export default class Notes extends React.PureComponent {
|
||||
}
|
||||
|
||||
copy() {
|
||||
window.analytics.postEvent('featureUpdate', 'Feature notes copy used');
|
||||
window.analytics.postEvent('feature', 'Notes copied');
|
||||
// this.state.notes doesnt work for some reason
|
||||
navigator.clipboard.writeText(localStorage.getItem('notes'));
|
||||
toast(window.language.toasts.notes);
|
||||
|
||||
@@ -32,7 +32,7 @@ export default class QuickLinks extends React.PureComponent {
|
||||
items: data
|
||||
});
|
||||
|
||||
window.analytics.postEvent('featureUpdate', 'Feature delete quicklink used');
|
||||
window.analytics.postEvent('feature', 'Quicklink delete');
|
||||
}
|
||||
|
||||
addLink = () => {
|
||||
@@ -75,7 +75,7 @@ export default class QuickLinks extends React.PureComponent {
|
||||
url: ''
|
||||
});
|
||||
|
||||
window.analytics.postEvent('featureUpdate', 'Feature add quicklink used');
|
||||
window.analytics.postEvent('feature', 'Quicklink add');
|
||||
|
||||
this.toggleAdd();
|
||||
}
|
||||
|
||||
@@ -150,13 +150,13 @@ export default class Quote extends React.PureComponent {
|
||||
}
|
||||
|
||||
copyQuote = () => {
|
||||
window.analytics.postEvent('featureUpdate', 'Feature quote copy used');
|
||||
window.analytics.postEvent('feature', 'Quote copied');
|
||||
navigator.clipboard.writeText(`${this.state.quote} - ${this.state.author}`);
|
||||
toast(window.language.toasts.quote);
|
||||
}
|
||||
|
||||
tweetQuote = () => {
|
||||
window.analytics.postEvent('featureUpdate', 'Feature quote tweet used');
|
||||
window.analytics.postEvent('feature', 'Quote tweet');
|
||||
window.open(`https://twitter.com/intent/tweet?text=${this.state.quote} - ${this.state.author} on @getmue`, '_blank').focus();
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ export default class Quote extends React.PureComponent {
|
||||
});
|
||||
}
|
||||
|
||||
window.analytics.postEvent('featureUpdate', 'Feature quote favourite used');
|
||||
window.analytics.postEvent('feature', 'Quote favourite');
|
||||
}
|
||||
|
||||
init() {
|
||||
|
||||
@@ -44,7 +44,7 @@ export default class Search extends React.PureComponent {
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
window.analytics.postEvent('featureUpdate', 'Feature voice search used');
|
||||
window.analytics.postEvent('feature', 'Voice search');
|
||||
window.location.href = this.state.url + `?${this.state.query}=` + searchText.value;
|
||||
}, 1000);
|
||||
};
|
||||
@@ -59,7 +59,7 @@ export default class Search extends React.PureComponent {
|
||||
value = document.getElementById('searchtext').value || 'mue fast';
|
||||
}
|
||||
|
||||
window.analytics.postEvent('featureUpdate', 'Feature search used');
|
||||
window.analytics.postEvent('feature', 'Search');
|
||||
window.location.href = this.state.url + `?${this.state.query}=` + value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user