|
| 1 | +import { h, Component } from 'preact'; |
| 2 | +import style from './footer.less'; |
| 3 | +import Label from '../../label/label'; |
| 4 | +import Button from '../../button/button'; |
| 5 | + |
| 6 | +class LocalLabel extends Label { |
| 7 | + static defaultProps = {}; |
| 8 | +} |
| 9 | + |
| 10 | +export default class IntroFooter extends Component { |
| 11 | + |
| 12 | + static defaultProps = {}; |
| 13 | + |
| 14 | + state = { |
| 15 | + showFull: false |
| 16 | + }; |
| 17 | + |
| 18 | + handleShow = () => { |
| 19 | + this.setState({ |
| 20 | + showFull: !this.state.showFull |
| 21 | + }); |
| 22 | + } |
| 23 | + render(props, state) { |
| 24 | + |
| 25 | + const { showFull } = this.state; |
| 26 | + |
| 27 | + const { |
| 28 | + localization, |
| 29 | + onShowPurposes, |
| 30 | + onAcceptAll |
| 31 | + } = props; |
| 32 | + |
| 33 | + return ( |
| 34 | + <div> |
| 35 | + {!showFull && |
| 36 | + <div class={style.base}> |
| 37 | + <span name="ctrl" class={style.icon} onClick={this.handleShow}></span> |
| 38 | + <LocalLabel providedValue={localization && localization.footer ? localization.footer.message : ''} localizeKey='footer.message' class={style.message}>Read more about access and use of information on your device for various purposes</LocalLabel> |
| 39 | + </div>} |
| 40 | + {showFull && <div class={style.container}> |
| 41 | + <div class={style.infoHeader}> |
| 42 | + <span name="ctrl" class={style.iconDown} onClick={this.handleShow}></span> |
| 43 | + <LocalLabel providedValue={localization && localization.footer ? localization.footer.deviceInformationHeader : ''} localizeKey='footer.deviceInformationHeader' class={style.headerMessage}>Information that may be used</LocalLabel> |
| 44 | + </div> |
| 45 | + |
| 46 | + <div class={style.content}> |
| 47 | + <LocalLabel providedValue={localization && localization.footer ? localization.footer.deviceInformationHeader : ''} localizeKey='footer.deviceInformationHeader' class={style.message2}>Information that may be used:</LocalLabel> |
| 48 | + <LocalLabel providedValue={localization && localization.footer ? localization.footer.deviceInformation : ''} localizeKey='footer.deviceInformation' class={style.message}> |
| 49 | + <ul> |
| 50 | + <li>Type of browser and its settings</li> |
| 51 | + <li>Information about the device's operating system</li> |
| 52 | + <li>Cookie information</li> |
| 53 | + <li>Information about other identifiers assigned to the device</li> |
| 54 | + <li>The IP address from which the device accesses a client's website or mobile application</li> |
| 55 | + <li>Information about the user's activity on that device, including web pages and mobile apps visited or used</li> |
| 56 | + <li>Information about the geographic location of the device when it accesses a website or mobile application</li> |
| 57 | + </ul> |
| 58 | + </LocalLabel> |
| 59 | + |
| 60 | + <LocalLabel providedValue={localization && localization.footer ? localization.footer.purposesHeader : ''} localizeKey='footer.purposesHeader' class={style.message2}>Purposes for storing information:</LocalLabel> |
| 61 | + <LocalLabel providedValue={localization && localization.footer ? localization.footer.purposes : ''} localizeKey='footer.purposes' class={style.message}> |
| 62 | + <ul> |
| 63 | + <li>Storage and access of information</li> |
| 64 | + <li>Ad selection and delivery</li> |
| 65 | + <li>Content selection and delivery</li> |
| 66 | + <li>Personalisation</li> |
| 67 | + <li>Measurement</li> |
| 68 | + </ul> |
| 69 | + </LocalLabel> |
| 70 | + </div> |
| 71 | + |
| 72 | + <div class={style.infoFooter}> |
| 73 | + <Button |
| 74 | + class={style.rejectAll} |
| 75 | + invert={true} |
| 76 | + onClick={onShowPurposes} |
| 77 | + > |
| 78 | + <LocalLabel providedValue={localization && localization.intro ? localization.intro.showPurposes : ''} localizeKey='intro.showPurposes'>Learn more</LocalLabel> |
| 79 | + </Button> |
| 80 | + <Button |
| 81 | + class={style.acceptAll} |
| 82 | + onClick={onAcceptAll} |
| 83 | + > |
| 84 | + <LocalLabel providedValue={localization && localization.intro ? localization.intro.acceptAll : ''} localizeKey='intro.acceptAll'>OK, Continue to site</LocalLabel> |
| 85 | + </Button> |
| 86 | + </div> |
| 87 | + </div>} |
| 88 | + </div> |
| 89 | + ); |
| 90 | + }; |
| 91 | +} |
0 commit comments