This repository has been archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* set default value of searchPortalConsent to true * change success notification to toast w/o backdrop * add notification * fix bool error
- Loading branch information
1 parent
5c71a49
commit 8a6b2e8
Showing
11 changed files
with
282 additions
and
29 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,54 @@ | ||
/* | ||
* Corona-Warn-App / cwa-quick-test-frontend | ||
* | ||
* (C) 2021, T-Systems International GmbH | ||
* | ||
* Deutsche Telekom AG and all other contributors / | ||
* copyright owners license 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 React from 'react'; | ||
import { Image, Toast, ToastHeader } from 'react-bootstrap' | ||
|
||
import '../../i18n'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
import successIcon from '../../assets/images/icon_success.svg'; | ||
|
||
|
||
const NotificationToast = (props: any) => { | ||
|
||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<div className='toast-container'> | ||
<Toast className='qt-notification' | ||
show={props.show} | ||
delay={3000} | ||
autohide | ||
onClose={() => props.setNotificationShow(false)} | ||
> | ||
<ToastHeader closeButton={false} className='qt-notification-header'> | ||
<Image src={successIcon} className='mr-3 my-3' /> | ||
<p className='qt-notification-text my-auto mx-1'> | ||
{t('translation:successfull-transferred')} | ||
</p> | ||
</ToastHeader> | ||
</Toast> | ||
</div> | ||
) | ||
} | ||
|
||
export default NotificationToast; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import React from 'react'; | ||
import { Button, Card, Col, Modal, Row, Image, Container } from 'react-bootstrap'; | ||
|
||
import '../../i18n'; | ||
import { Trans, useTranslation } from 'react-i18next'; | ||
|
||
import SpeechBubbleImage from '../../assets/images/Sprechblase_i.svg'; | ||
import { FormGroupConsentCkb } from './form-group.component'; | ||
|
||
|
||
const DisclamerButton = (props: any) => { | ||
|
||
const { t } = useTranslation(); | ||
const [show, setShow] = React.useState(false); | ||
|
||
React.useEffect(() => { | ||
setShow(props.firstTimeShow); | ||
props.onInit(); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, []) | ||
|
||
return ( | ||
<> | ||
<Image | ||
src={SpeechBubbleImage} | ||
className='speech-bubble' | ||
onClick={() => { setShow(true) }} | ||
/> | ||
|
||
<Modal | ||
contentClassName='data-modal' | ||
show={show} | ||
backdrop={true} | ||
onHide={() => { setShow(false) }} | ||
keyboard={false} | ||
centered | ||
> | ||
<Modal.Header id='data-header' className='pb-0' > | ||
<Row> | ||
<Col > | ||
<Card.Title className='m-0 jcc-xs-jcfs-md' as={'h2'} > | ||
{t('translation:disclaimer-title')}</Card.Title> | ||
</Col> | ||
</Row> | ||
</Modal.Header> | ||
|
||
<Modal.Body className='bg-light py-0'> | ||
<hr /> | ||
<h5 className='disclaimer-text'> | ||
<Trans>{props.disclaimerText}</Trans> | ||
</h5> | ||
|
||
<hr /> | ||
|
||
<FormGroupConsentCkb controlId='formDoNotShowCheckbox' title={t('translation:disclaimer-do-not-show')} | ||
onChange={(evt: any) => props.onCheckChange(evt.currentTarget.checked)} | ||
type='checkbox' | ||
checked={props.checked} | ||
/> | ||
</Modal.Body> | ||
|
||
<Modal.Footer id='data-footer'> | ||
<Container className='p-0'> | ||
<Row className='justify-content-end'> | ||
<Col xs='6' className='p-0'> | ||
<Button | ||
className='py-0' | ||
block | ||
onClick={() => { setShow(false) }} | ||
> | ||
{t('translation:ok')} | ||
</Button> | ||
</Col> | ||
</Row> | ||
</Container> | ||
</Modal.Footer> | ||
</Modal> | ||
</> | ||
) | ||
} | ||
|
||
export default DisclamerButton; |
Oops, something went wrong.