mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-08-06 11:00:05 +02:00

* Update Reconfirm Affiliation (Pug) in Portal page Change the notification so it directs users to the settings page instead of triggering an email confirmation with token-link * Update Reconfirm Affiliation (React) in Settings page Update the component so it sends the 6-digits code and opens the modal to enter it * Update Reconfirm Affiliation (React) in Projects page Update the component so it sends the 6-digits code and opens the modal to enter it * `cleanup_unused_locales` * `bin/run web npm run extract-translations` * Update tests * Minor updates in tests * Update Pug notifications with the notification mixin * De-center the "reconfirmed notification" * Update "Learn more" links to "Learn more about institutional email reconfirmation" * Update tests GitOrigin-RevId: cb65623e209217614786eec56f7f5d28b9e8cec5
38 lines
1.2 KiB
Text
38 lines
1.2 KiB
Text
//- to be kept in sync with frontend/js/shared/components/notification.tsx
|
|
include ./material_symbol
|
|
|
|
mixin notificationIcon(type)
|
|
if type === 'info'
|
|
+material-symbol('info')
|
|
else if type === 'success'
|
|
+material-symbol('check_circle')
|
|
else if type === 'error'
|
|
+material-symbol('error')
|
|
else if type === 'warning'
|
|
+material-symbol('warning')
|
|
|
|
mixin notification(options)
|
|
- var {ariaLive, id, type, title, content, disclaimer, className} = options
|
|
- var classNames = `notification notification-type-${type} ${className ? className : ''} ${isActionBelowContent ? 'notification-cta-below-content' : ''}`
|
|
|
|
div(aria-live=ariaLive role='alert' id=id class=classNames)
|
|
.notification-icon
|
|
+notificationIcon(type)
|
|
.notification-content-and-cta
|
|
.notification-content
|
|
if title
|
|
p
|
|
b #{title}
|
|
| !{content}
|
|
block
|
|
//- TODO: handle action
|
|
//- if action
|
|
//- .notification-cta
|
|
if disclaimer
|
|
.notification-disclaimer #{disclaimer}
|
|
//- TODO: handle dismissible notifications
|
|
//- TODO: handle onDismiss
|
|
//- if isDismissible
|
|
//- .notification-close-btn
|
|
//- button(aria-label=translate('close'))
|
|
//- +material-symbol("close")
|