feat: Update new files notification banner styles (#33197)

Uses the updated styles for the notification based on the new designs.
Includes a button to open view the files directly in the notification.

This also fix a bug where the notification was not appearing when paste
a whole Unit.
This commit is contained in:
Yusuf Musleh
2023-09-15 18:58:50 +03:00
committed by GitHub
parent 0d15ca7240
commit 3eb4e0ce9c
9 changed files with 101 additions and 19 deletions

View File

@@ -13,7 +13,7 @@
// create Notification.Warning, Notification.Confirmation, etc
var capitalCamel, intents, miniOptions;
capitalCamel = _.compose(str.capitalize, str.camelize);
intents = ['warning', 'error', 'confirmation', 'announcement', 'step-required', 'help', 'mini'];
intents = ['warning', 'error', 'confirmation', 'announcement', 'step-required', 'help', 'mini', 'info'];
_.each(intents, function(intent) {
var subclass;
subclass = Notification.extend({

View File

@@ -10,7 +10,7 @@
>
<div class="<%- type %> <%- intent %> <% if(obj.actions) { %>has-actions<% } %>">
<% if(obj.icon) { %>
<% var iconClass = {"warning": "warning", "confirmation": "check", "error": "warning", "announcement": "bullhorn", "step-required": "exclamation-circle", "help": "question", "mini": "cog"} %>
<% var iconClass = {"warning": "warning", "confirmation": "check", "error": "warning", "announcement": "bullhorn", "step-required": "exclamation-circle", "help": "question", "mini": "cog", "info": "info-circle"} %>
<span class="feedback-symbol fa fa-<%- iconClass[intent] %>" aria-hidden="true"></span>
<% } %>
@@ -30,7 +30,7 @@
<% if(actions.secondary) {
_.each(actions.secondary, function(secondary) { %>
<li class="nav-item">
<button class="action-secondary <%- secondary.class %>"><%- secondary.text %></button>
<a class="action-secondary <%- secondary.class %>" tabindex="0"><%- secondary.text %></a>
</li>
<% });
} %>