github.com/minio/console@v1.4.1/web-app/src/screens/Console/License/LicenseConsentModal.tsx (about) 1 // This file is part of MinIO Console Server 2 // Copyright (c) 2022 MinIO, Inc. 3 // 4 // This program is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU Affero General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // This program is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU Affero General Public License for more details. 13 // 14 // You should have received a copy of the GNU Affero General Public License 15 // along with this program. If not, see <http://www.gnu.org/licenses/>. 16 17 import React from "react"; 18 import ModalWrapper from "../Common/ModalWrapper/ModalWrapper"; 19 20 import { AGPLV3DarkLogo, Box, Button } from "mds"; 21 import { setLicenseConsent } from "./utils"; 22 import LicenseLink from "./LicenseLink"; 23 import LicenseFAQ from "./LicenseFAQ"; 24 25 const LicenseConsentModal = ({ 26 isOpen, 27 onClose, 28 }: { 29 onClose: () => void; 30 isOpen: boolean; 31 }) => { 32 const recordAgplConsent = () => { 33 setLicenseConsent(); //to Local storage. 34 onClose(); 35 }; 36 37 return ( 38 <ModalWrapper 39 modalOpen={isOpen} 40 title="License" 41 onClose={() => { 42 onClose(); 43 }} 44 > 45 <Box 46 sx={{ 47 display: "flex", 48 flexFlow: "column", 49 "& .link-text": { 50 color: "#2781B0", 51 fontWeight: 600, 52 }, 53 }} 54 > 55 <Box 56 sx={{ 57 display: "flex", 58 alignItems: "center", 59 marginBottom: "40px", 60 justifyContent: "center", 61 "& .min-icon": { 62 fill: "blue", 63 width: "188px", 64 height: "62px", 65 }, 66 }} 67 > 68 <AGPLV3DarkLogo /> 69 </Box> 70 <Box 71 sx={{ 72 marginBottom: "27px", 73 }} 74 > 75 By using this software, you acknowledge that MinIO software is 76 licensed under the <LicenseLink />, for which, the full text can be 77 found here:{" "} 78 <a 79 href={`https://www.gnu.org/licenses/agpl-3.0.html`} 80 rel="noopener" 81 className={"link-text"} 82 > 83 https://www.gnu.org/licenses/agpl-3.0.html. 84 </a> 85 </Box> 86 <Box 87 sx={{ 88 paddingBottom: "23px", 89 }} 90 > 91 Please review the terms carefully and ensure you are in compliance 92 with the obligations of the license. If you are not able to satisfy 93 the license obligations, we offer a commercial license which is 94 available here:{" "} 95 <a 96 href={`https://min.io/signup?ref=con`} 97 rel="noopener" 98 className={"link-text"} 99 > 100 https://min.io/signup. 101 </a> 102 </Box> 103 104 <LicenseFAQ /> 105 106 <Box 107 sx={{ 108 marginTop: "19px", 109 display: "flex", 110 alignItems: "center", 111 justifyContent: "center", 112 }} 113 > 114 <Button 115 id={"confirm"} 116 type="button" 117 variant="callAction" 118 onClick={recordAgplConsent} 119 label={"Acknowledge"} 120 /> 121 </Box> 122 </Box> 123 </ModalWrapper> 124 ); 125 }; 126 127 export default LicenseConsentModal;