2022-04-25 07:04:55 -04:00
|
|
|
import EmailsSection from '../../js/features/settings/components/emails-section'
|
|
|
|
import { SSOAlert } from '../../js/features/settings/components/emails/sso-alert'
|
|
|
|
|
2022-05-31 05:08:49 -04:00
|
|
|
export const Info = () => {
|
2022-04-25 07:04:55 -04:00
|
|
|
window.metaAttributesCache = new Map()
|
|
|
|
window.metaAttributesCache.set('ol-institutionLinked', {
|
|
|
|
universityName: 'Overleaf University',
|
|
|
|
})
|
|
|
|
return <SSOAlert />
|
|
|
|
}
|
|
|
|
|
2022-05-31 05:08:49 -04:00
|
|
|
export const InfoWithEntitlement = () => {
|
2022-04-25 07:04:55 -04:00
|
|
|
window.metaAttributesCache = new Map()
|
|
|
|
window.metaAttributesCache.set('ol-institutionLinked', {
|
|
|
|
universityName: 'Overleaf University',
|
|
|
|
hasEntitlement: true,
|
|
|
|
})
|
|
|
|
return <SSOAlert />
|
|
|
|
}
|
|
|
|
|
2022-05-31 05:08:49 -04:00
|
|
|
export const NonCanonicalEmail = () => {
|
2022-04-25 07:04:55 -04:00
|
|
|
window.metaAttributesCache = new Map()
|
|
|
|
window.metaAttributesCache.set('ol-institutionLinked', {
|
|
|
|
universityName: 'Overleaf University',
|
|
|
|
})
|
|
|
|
window.metaAttributesCache.set(
|
|
|
|
'ol-institutionEmailNonCanonical',
|
|
|
|
'user@example.com'
|
|
|
|
)
|
|
|
|
return <SSOAlert />
|
|
|
|
}
|
|
|
|
|
2022-05-31 05:08:49 -04:00
|
|
|
export const Error = () => {
|
2022-04-25 07:04:55 -04:00
|
|
|
window.metaAttributesCache = new Map()
|
|
|
|
window.metaAttributesCache.set('ol-samlError', {
|
|
|
|
translatedMessage: 'There was an Error',
|
|
|
|
})
|
|
|
|
return <SSOAlert />
|
|
|
|
}
|
|
|
|
|
2022-05-31 05:08:49 -04:00
|
|
|
export const ErrorTranslated = () => {
|
2022-04-25 07:04:55 -04:00
|
|
|
window.metaAttributesCache = new Map()
|
|
|
|
window.metaAttributesCache.set('ol-samlError', {
|
|
|
|
translatedMessage: 'Translated Error Message',
|
|
|
|
message: 'There was an Error',
|
|
|
|
})
|
|
|
|
return <SSOAlert />
|
|
|
|
}
|
|
|
|
|
2022-05-31 05:08:49 -04:00
|
|
|
export const ErrorWithTryAgain = () => {
|
2022-04-25 07:04:55 -04:00
|
|
|
window.metaAttributesCache = new Map()
|
|
|
|
window.metaAttributesCache.set('ol-samlError', {
|
|
|
|
message: 'There was an Error',
|
|
|
|
tryAgain: true,
|
|
|
|
})
|
|
|
|
return <SSOAlert />
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Account Settings / SSO Alerts',
|
|
|
|
component: EmailsSection,
|
|
|
|
}
|