-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7509 from pavinduLakshan/branding_push_auth
- Loading branch information
Showing
11 changed files
with
228 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@wso2is/common.branding.v1": minor | ||
"@wso2is/admin.branding.v1": minor | ||
"@wso2is/identity-apps-core": patch | ||
"@wso2is/i18n": patch | ||
--- | ||
|
||
Introduce branding support for push authentication screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
features/admin.branding.v1/components/preview/sign-in-box/fragments/push-auth-fragment.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/** | ||
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com). | ||
* | ||
* WSO2 LLC. licenses this file to you under the Apache License, | ||
* Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { IdentifiableComponentInterface } from "@wso2is/core/models"; | ||
import React, { FunctionComponent, ReactElement } from "react"; | ||
import { CustomTextPreferenceConstants } from "../../../../constants/custom-text-preference-constants"; | ||
import useBrandingPreference from "../../../../hooks/use-branding-preference"; | ||
|
||
/** | ||
* Proptypes for the push authentication fragment of login screen skeleton. | ||
*/ | ||
export type PushAuthFragmentInterface = IdentifiableComponentInterface; | ||
|
||
/** | ||
* PushAuthFragment fragment component for the branding preview of Sign In box. | ||
* | ||
* @param props - Props injected to the component. | ||
* @returns PushAuthFragment fragment component. | ||
*/ | ||
const PushAuthFragment: FunctionComponent<PushAuthFragmentInterface> = ({ | ||
["data-componentid"]: componentId = "branding-preview-push-auth-fragment" | ||
} : PushAuthFragmentInterface): ReactElement => { | ||
const { i18n } = useBrandingPreference(); | ||
|
||
return ( | ||
<div data-componentid={ componentId }> | ||
<h3 className="ui header text-center"> | ||
{ i18n(CustomTextPreferenceConstants.TEXT_BUNDLE_KEYS.PUSH_AUTH.HEADING, "Verify Your Identity") } | ||
</h3> | ||
|
||
<div className="segment-form"> | ||
<form method="post" id="pushAuthForm" className="ui large form"> | ||
<p className="text-center" id="instruction"> | ||
{ | ||
i18n(CustomTextPreferenceConstants.TEXT_BUNDLE_KEYS.PUSH_AUTH.BODY, | ||
"A push notification has been sent to your device. " + | ||
"Please respond to the request to continue." | ||
) | ||
} | ||
</p> | ||
|
||
<div className="ui divider hidden"></div> | ||
<div className="ui divider hidden"></div> | ||
<div> | ||
<input | ||
type="submit" | ||
id="subButton" | ||
value="00:57" | ||
className="ui primary fluid large button disabled" | ||
/> | ||
</div> | ||
<div className="text-center mt-1"></div> | ||
</form> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
|
||
export default PushAuthFragment; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.