src/plugin/iframe_root/modules/components/notification.js
/**
         * Renders controls for dismissing/marking a notification seen.
         */
Renders controls for dismissing/marking a notification seen.
Renders controls for dismissing / marking a notification seen .
renderControl() {
            let seenBtn = '';
            let icon = this.note.seen ? 'eye-slash' : 'eye';
            let text = this.note.seen ? 'unseen' : 'seen';
            if (this.toggleSeenFn) {
                seenBtn = span(
                    {
                        class: 'feed-seen'
                    },
                    i({
                        class: 'fa fa-' + icon,
                        dataToggle: 'tooltip',
                        dataPlacement: 'left',
                        title: 'Mark ' + text,
                        style: 'cursor: pointer'
                    })
                );
            }
            let expBtn = '';
            if (this.expireNoteFn) {
                expBtn = span(
                    {
                        class: 'feed-expire'
                    },
                    i({
                        class: 'fa fa-times',
                        dataToggle: 'tooltip',
                        dataPlacement: 'left',
                        title: 'Expire this notification',
                        style: 'cursor: pointer'
                    })
                );
            }
            return [seenBtn, expBtn];
        }
renderControl ( ) { let seenBtn = '' ; let icon = this . note . seen ? 'eye-slash' : 'eye' ; let text = this . note . seen ? 'unseen' : 'seen' ; if ( this . toggleSeenFn ) { seenBtn = span ( { class : 'feed-seen' } , i ( { class : 'fa fa-' + icon , dataToggle : 'tooltip' , dataPlacement : 'left' , title : 'Mark ' + text , style : 'cursor: pointer' } ) ) ; } let expBtn = '' ; if ( this . expireNoteFn ) { expBtn = span ( { class : 'feed-expire' } , i ( { class : 'fa fa-times' , dataToggle : 'tooltip' , dataPlacement : 'left' , title : 'Expire this notification' , style : 'cursor: pointer' } ) ) ; } return [ seenBtn , expBtn ] ; }
Renders controls for dismissing/marking a notification seen.
Renders controls for dismissing / marking a notification seen .