<div class="notificationSettingsState">
<label>
<input type="checkbox" id="settings_{@$event->eventID}" name="settings[{@$event->eventID}][enabled]" class="jsCheckboxNotificationSettingsState" value="1" data-object-id="{@$event->eventID}"{if !$settings[$event->eventID][enabled]|empty} checked{/if}>
- <span class="icon icon24 fa-bell green pointer"></span>
- <span class="icon icon24 fa-bell-slash red pointer"></span>
+ {icon size=24 name='bell'}
+ {icon size=24 name='bell-slash'}
</label>
</div>
<div class="notificationSettingsEmail">
{if $event->supportsEmailNotification()}
<input type="hidden" id="settings_{$event->eventID}_mailNotificationType" name="settings[{@$event->eventID}][mailNotificationType]" value="{$settings[$event->eventID][mailNotificationType]}">
<a href="#" class="notificationSettingsEmailType jsTooltip{if $settings[$event->eventID][enabled]|empty} disabled{/if}" role="button" title="{lang}wcf.user.notification.mailNotificationType.{@$settings[$event->eventID][mailNotificationType]}{/lang}" data-object-id="{@$event->eventID}">
- {if $settings[$event->eventID][mailNotificationType] === 'none'}
- <span class="icon icon24 fa-times red jsIconNotificationSettingsEmailType"></span>
- {else}
- <span class="icon icon24 {if $settings[$event->eventID][mailNotificationType] === 'instant'}fa-flash{else}fa-clock-o{/if} green jsIconNotificationSettingsEmailType"></span>
- {/if}
+ <span class="jsIconNotificationSettingsEmailType">
+ {if $settings[$event->eventID][mailNotificationType] === 'none'}
+ {icon size=24 name='xmark' type='solid'}
+ {else if $settings[$event->eventID][mailNotificationType] === 'instant'}
+ {icon size=24 name='bolt' type='solid'}
+ {else}
+ {icon size=24 name='clock'}
+ {/if}
+ </span>
{icon size=16 name='caret-down' type='solid'}
</a>
{/if}
) as HTMLLIElement;
button.title = Language.get(`wcf.user.notification.mailNotificationType.${value}`);
- const icon = button.querySelector(".jsIconNotificationSettingsEmailType") as HTMLSpanElement;
- icon.classList.remove("fa-clock-o", "fa-flash", "fa-times", "green", "red");
-
+ const icon = button.querySelector(".jsIconNotificationSettingsEmailType fa-icon") as FaIcon;
switch (value) {
case "daily":
- icon.classList.add("fa-clock-o", "green");
+ icon.setIcon("clock", false);
break;
case "instant":
- icon.classList.add("fa-flash", "green");
+ icon.setIcon("bolt", true);
break;
case "none":
- icon.classList.add("fa-times", "red");
+ icon.setIcon("xmark", true);
break;
}
getCurrentEmailTypeInputElement().value = value;
const button = document.querySelector(`.notificationSettingsEmailType[data-object-id="${_objectId}"]`);
button.title = Language.get(`wcf.user.notification.mailNotificationType.${value}`);
- const icon = button.querySelector(".jsIconNotificationSettingsEmailType");
- icon.classList.remove("fa-clock-o", "fa-flash", "fa-times", "green", "red");
+ const icon = button.querySelector(".jsIconNotificationSettingsEmailType fa-icon");
switch (value) {
case "daily":
- icon.classList.add("fa-clock-o", "green");
+ icon.setIcon("clock", false);
break;
case "instant":
- icon.classList.add("fa-flash", "green");
+ icon.setIcon("bolt", true);
break;
case "none":
- icon.classList.add("fa-times", "red");
+ icon.setIcon("xmark", true);
break;
}
_objectId = 0;
display: inline-flex;
height: var(--icon-size);
justify-content: center;
+ pointer-events: none;
width: calc(var(--icon-size) * 1.25);
&:not(:upgraded) {
.notificationSettingsEvent:hover + .notificationSettingsState,
.notificationSettingsState > label:hover {
- .fa-bell,
- .fa-bell-slash {
+ fa-icon {
transform: scale(1.2);
}
}
margin: 0 10px;
}
+ label {
+ cursor: pointer;
+ }
+
input[type="checkbox"] {
opacity: 0;
position: absolute;
transform: scale(1.2);
}
- &:not(:checked) + .fa-bell {
+ &:not(:checked) + fa-icon[name="bell"] {
display: none;
}
- &:checked ~ .fa-bell-slash {
+ &:checked ~ fa-icon[name="bell-slash"] {
display: none;
}
}
+
+ fa-icon[name="bell"] {
+ color: rgba(0, 153, 0, 1);
+ }
+
+ fa-icon[name="bell-slash"] {
+ color: rgba(204, 0, 0, 1);
+ }
}
.notificationSettingsEmail {
filter: grayscale(1);
opacity: 0.75;
}
+
+ fa-icon[name="xmark"] {
+ color: rgba(204, 0, 0, 1);
+ }
+
+ fa-icon[name="bolt"],
+ fa-icon[name="clock"] {
+ color: rgba(0, 153, 0, 1);
+ }
}