2017-09-27 02:33:08 +08:00
|
|
|
import { PLUGIN_ID } from './send-reminders-constants';
|
2017-09-07 07:19:48 +08:00
|
|
|
|
2017-09-27 02:33:08 +08:00
|
|
|
export const name = 'SendRemindersThreadListExtension';
|
2017-09-07 07:19:48 +08:00
|
|
|
|
|
|
|
export function cssClassNamesForThreadListItem(thread) {
|
2017-09-27 02:33:08 +08:00
|
|
|
const { shouldNotify } = thread.metadataForPluginId(PLUGIN_ID) || {};
|
2017-09-07 07:19:48 +08:00
|
|
|
if (shouldNotify) {
|
2017-09-27 02:33:08 +08:00
|
|
|
return 'thread-list-reminder-item';
|
2017-09-07 07:19:48 +08:00
|
|
|
}
|
2017-09-27 02:33:08 +08:00
|
|
|
return '';
|
2017-09-07 07:19:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export function cssClassNamesForThreadListIcon(thread) {
|
2017-09-27 02:33:08 +08:00
|
|
|
const { expiration, shouldNotify } = thread.metadataForPluginId(PLUGIN_ID) || {};
|
2017-09-07 07:19:48 +08:00
|
|
|
if (shouldNotify) {
|
2017-09-27 02:33:08 +08:00
|
|
|
return 'thread-icon-reminder-triggered';
|
2017-09-07 07:19:48 +08:00
|
|
|
}
|
2017-09-26 06:44:20 +08:00
|
|
|
if (expiration) {
|
2017-09-27 02:33:08 +08:00
|
|
|
return 'thread-icon-reminder-pending';
|
2017-09-07 07:19:48 +08:00
|
|
|
}
|
2017-09-27 02:33:08 +08:00
|
|
|
return '';
|
2017-09-07 07:19:48 +08:00
|
|
|
}
|