mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #28126 from overleaf/ii-domain-capture-join-success-message
[web] Notification message for joining group via domain capture GitOrigin-RevId: 67ef924b2d80afb5e1de75fb6aab147263c0f33c
This commit is contained in:
@@ -1722,6 +1722,7 @@
|
||||
"subscription_will_remain_active_until_end_of_billing_period_x": "",
|
||||
"subscription_will_remain_active_until_end_of_trial_period_x": "",
|
||||
"success_sso_set_up": "",
|
||||
"success_youve_successfully_join_group": "",
|
||||
"suggest_a_different_fix": "",
|
||||
"suggest_fix": "",
|
||||
"suggested": "",
|
||||
|
||||
+26
-4
@@ -1,24 +1,46 @@
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useTranslation, Trans } from 'react-i18next'
|
||||
import Notification from '../../../../../shared/components/notification'
|
||||
import getMeta from '../../../../../utils/meta'
|
||||
|
||||
function GroupSsoSetupSuccess() {
|
||||
const { t } = useTranslation()
|
||||
const wasSuccess = getMeta('ol-groupSsoSetupSuccess')
|
||||
const joinedGroupName = getMeta('ol-joinedGroupName')
|
||||
const viaDomainCapture = getMeta('ol-viaDomainCapture')
|
||||
|
||||
if (!wasSuccess) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
if (!viaDomainCapture) {
|
||||
return (
|
||||
<li className="notification-entry">
|
||||
<Notification
|
||||
type="success"
|
||||
content={t('success_sso_set_up')}
|
||||
isDismissible
|
||||
/>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
|
||||
return joinedGroupName ? (
|
||||
<li className="notification-entry">
|
||||
<Notification
|
||||
type="success"
|
||||
content={t('success_sso_set_up')}
|
||||
content={
|
||||
<Trans
|
||||
i18nKey="success_youve_successfully_join_group"
|
||||
components={[<b />]} // eslint-disable-line react/jsx-key
|
||||
values={{ groupName: joinedGroupName }}
|
||||
shouldUnescape
|
||||
tOptions={{ interpolation: { escapeValue: true } }}
|
||||
/>
|
||||
}
|
||||
isDismissible
|
||||
/>
|
||||
</li>
|
||||
)
|
||||
) : null
|
||||
}
|
||||
|
||||
export default GroupSsoSetupSuccess
|
||||
|
||||
@@ -168,6 +168,7 @@ export interface Meta {
|
||||
'ol-itm_campaign': string
|
||||
'ol-itm_content': string
|
||||
'ol-itm_referrer': string
|
||||
'ol-joinedGroupName': string
|
||||
'ol-labs': boolean
|
||||
'ol-labsExperiments': ActiveExperiment[] | undefined
|
||||
'ol-languages': SpellCheckLanguage[]
|
||||
@@ -298,6 +299,7 @@ export interface Meta {
|
||||
'ol-usersEmail': string | undefined
|
||||
'ol-usersSubscription': { personal: boolean; group: boolean }
|
||||
'ol-validationStatus': ValidationStatus
|
||||
'ol-viaDomainCapture': boolean
|
||||
'ol-wikiEnabled': boolean
|
||||
'ol-writefullCssUrl': string
|
||||
'ol-writefullEnabled': boolean
|
||||
|
||||
Reference in New Issue
Block a user