848b2d82a1
no issue This pull request removes the `suppressionList` feature flag and all its dependencies from the codebase. It makes the suppression list feature the default and consistent behavior for all email events and newsletters. It simplifies the UI, logic, and data related to email events and newsletters. It affects several files in the `ghost/admin/app`, `ghost/core/core`, and `ghost/members-api` directories.
37 lines
1.2 KiB
JavaScript
37 lines
1.2 KiB
JavaScript
import Component from '@glimmer/component';
|
|
import {action} from '@ember/object';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class ActivityFeed extends Component {
|
|
@service feature;
|
|
|
|
linkScrollerTimeout = null; // needs to be global so can be cleared when needed across functions
|
|
excludedEventTypes = ['aggregated_click_event'];
|
|
|
|
@action
|
|
enterLinkURL(event) {
|
|
event.stopPropagation();
|
|
const parent = event.target;
|
|
const child = event.target.querySelector('span');
|
|
|
|
clearTimeout(this.linkScrollerTimeout);
|
|
if (child.offsetWidth > parent.offsetWidth) {
|
|
this.linkScrollerTimeout = setTimeout(() => {
|
|
parent.classList.add('scroller');
|
|
child.style.transform = `translateX(-${(child.offsetWidth - parent.offsetWidth) + 8}px)`;
|
|
}, 100);
|
|
}
|
|
}
|
|
|
|
@action
|
|
leaveLinkURL(event) {
|
|
event.stopPropagation();
|
|
clearTimeout(this.linkScrollerTimeout);
|
|
const parent = event.target;
|
|
const child = event.target.querySelector('span');
|
|
|
|
child.style.transform = 'translateX(0)';
|
|
parent.classList.remove('scroller');
|
|
}
|
|
}
|