diff --git a/client/src/components/About/index.jsx b/client/src/components/About/index.jsx index 823ed74..6eee38d 100644 --- a/client/src/components/About/index.jsx +++ b/client/src/components/About/index.jsx @@ -6,443 +6,429 @@ import { COMMIT_SHA } from '@/config/env'; import apiUrlGenerator from '@/api/generator'; import styles from './styles.module.scss'; -class About extends Component { - constructor(props) { - super(props); - this.state = { - roomId: props.roomId, - abuseReported: false, - }; - } +const About = ({ roomId: roomIdProp }) => { + const [roomId, setRoomId] = React.useState(roomIdProp); + const [abuseReported, setAbuseReported] = React.useState(false); - handleUpdateRoomId(evt) { - this.setState({ - roomId: evt.target.value, - }); - } + const handleUpdateRoomId = evt => { + setRoomId(evt.target.value); + }; - handleReportAbuse(evt) { + const handleReportAbuse = evt => { evt.preventDefault(); - fetch(`${apiUrlGenerator('abuse')}/${this.state.roomId}`, { + fetch(`${apiUrlGenerator('abuse')}/${roomId}`, { method: 'POST', }); - this.setState({ - abuseReported: true, - }); - } + setAbuseReported(true); + }; - render() { - return ( -
-
-
- Version -
-
- Software -
-
- Report Abuse -
-
- Acceptable Use Policy -
-
- Disclaimer -
-
- Terms of Service -
-
- Contact -
-
- Donate -
+ return ( +
+
+
+ Version
+
+ Software +
+
+ Report Abuse +
+
+ Acceptable Use Policy +
+
+ Disclaimer +
+
+ Terms of Service +
+
+ Contact +
+
+ Donate +
+
-
-

Version

-

- Commit SHA:{' '} - - {COMMIT_SHA} - -

-
+
+

Version

+

+ Commit SHA:{' '} + + {COMMIT_SHA} + +

+
-
-

Software

-

- This software uses the{' '} - - Web Cryptography API - {' '} - to encrypt data which is transferred using{' '} - - secure WebSockets - - . Messages are never stored on a server or sent over the wire in plain-text. -

-

- We believe in privacy and transparency.   - - View the source code and documentation on GitHub. - -

-
+
+

Software

+

+ This software uses the{' '} + + Web Cryptography API + {' '} + to encrypt data which is transferred using{' '} + + secure WebSockets + + . Messages are never stored on a server or sent over the wire in plain-text. +

+

+ We believe in privacy and transparency.   + + View the source code and documentation on GitHub. + +

+
-
-

Report Abuse

-

- We encourage you to report problematic content to us. Please keep in mind that to help ensure the safety, - confidentiality and security of your messages, we do not have the contents of messages available to us, - which limits our ability to verify the report and take action. -

-

- When needed, you can take a screenshot of the content and share it, along with any available contact info, - with appropriate law enforcement authorities. -

-

- To report any content, email us at abuse[at]darkwire.io or submit the room ID below to report anonymously. -

-
- {this.state.abuseReported &&
Thank you!
} -
-
- -
- -
+
+

Report Abuse

+

+ We encourage you to report problematic content to us. Please keep in mind that to help ensure the safety, + confidentiality and security of your messages, we do not have the contents of messages available to us, which + limits our ability to verify the report and take action. +

+

+ When needed, you can take a screenshot of the content and share it, along with any available contact info, + with appropriate law enforcement authorities. +

+

+ To report any content, email us at abuse[at]darkwire.io or submit the room ID below to report anonymously. +

+ + {abuseReported &&
Thank you!
} +
+
+ +
+
- -
-

If you feel you or anyone else is in immediate danger, please contact your local emergency services.

-

- If you receive content from someone who wishes to hurt themselves, and you're concerned for their safety, - please contact your local emergency services or a{' '} - suicide prevention hotline. -

-

- If you receive or encounter content indicating abuse or exploitation of a child, please contact the{' '} - National Center for Missing and Exploited Children (NCMEC). -

-
+
+ +
+

If you feel you or anyone else is in immediate danger, please contact your local emergency services.

+

+ If you receive content from someone who wishes to hurt themselves, and you're concerned for their safety, + please contact your local emergency services or a{' '} + suicide prevention hotline. +

+

+ If you receive or encounter content indicating abuse or exploitation of a child, please contact the{' '} + National Center for Missing and Exploited Children (NCMEC). +

+
-
-

Acceptable Use Policy

-

- This Acceptable Use Policy (this “Policy”) describes prohibited uses of the web services offered by Darkwire - and its affiliates (the “Services”) and the website located at https://darkwire.io (the “Darkwire Site”). - The examples described in this Policy are not exhaustive. We may modify this Policy at any time by posting a - revised version on the Darkwire Site. By using the Services or accessing the Darkwire Site, you agree to the - latest version of this Policy. If you violate the Policy or authorize or help others to do so, we may - suspend or terminate your use of the Services. -

- No Illegal, Harmful, or Offensive Use or Content -

- You may not use, or encourage, promote, facilitate or instruct others to use, the Services or Darkwire Site - for any illegal, harmful, fraudulent, infringing or offensive use, or to transmit, store, display, - distribute or otherwise make available content that is illegal, harmful, fraudulent, infringing or - offensive. Prohibited activities or content include: -

-
    -
  • - Illegal, Harmful or Fraudulent Activities. Any activities that are illegal, that violate - the rights of others, or that may be harmful to others, our operations or reputation, including - disseminating, promoting or facilitating child pornography, offering or disseminating fraudulent goods, - services, schemes, or promotions, make-money-fast schemes, ponzi and pyramid schemes, phishing, or - pharming. -
  • +
    +

    Acceptable Use Policy

    +

    + This Acceptable Use Policy (this “Policy”) describes prohibited uses of the web services offered by Darkwire + and its affiliates (the “Services”) and the website located at https://darkwire.io (the “Darkwire Site”). The + examples described in this Policy are not exhaustive. We may modify this Policy at any time by posting a + revised version on the Darkwire Site. By using the Services or accessing the Darkwire Site, you agree to the + latest version of this Policy. If you violate the Policy or authorize or help others to do so, we may suspend + or terminate your use of the Services. +

    + No Illegal, Harmful, or Offensive Use or Content +

    + You may not use, or encourage, promote, facilitate or instruct others to use, the Services or Darkwire Site + for any illegal, harmful, fraudulent, infringing or offensive use, or to transmit, store, display, distribute + or otherwise make available content that is illegal, harmful, fraudulent, infringing or offensive. Prohibited + activities or content include: +

    +
      +
    • + Illegal, Harmful or Fraudulent Activities. Any activities that are illegal, that violate + the rights of others, or that may be harmful to others, our operations or reputation, including + disseminating, promoting or facilitating child pornography, offering or disseminating fraudulent goods, + services, schemes, or promotions, make-money-fast schemes, ponzi and pyramid schemes, phishing, or pharming. +
    • -
    • - Infringing Content. Content that infringes or misappropriates the intellectual property - or proprietary rights of others. -
    • +
    • + Infringing Content. Content that infringes or misappropriates the intellectual property or + proprietary rights of others. +
    • -
    • - Offensive Content. Content that is defamatory, obscene, abusive, invasive of privacy, or - otherwise objectionable, including content that constitutes child pornography, relates to bestiality, or - depicts non-consensual sex acts. -
    • +
    • + Offensive Content. Content that is defamatory, obscene, abusive, invasive of privacy, or + otherwise objectionable, including content that constitutes child pornography, relates to bestiality, or + depicts non-consensual sex acts. +
    • -
    • - Harmful Content. Content or other computer technology that may damage, interfere with, - surreptitiously intercept, or expropriate any system, program, or data, including viruses, Trojan horses, - worms, time bombs, or cancelbots. -
    • -
    - No Security Violations -
    - You may not use the Services to violate the security or integrity of any network, computer or communications - system, software application, or network or computing device (each, a “System”). Prohibited activities - include: -
      -
    • - Unauthorized Access. Accessing or using any System without permission, including - attempting to probe, scan, or test the vulnerability of a System or to breach any security or - authentication measures used by a System. -
    • +
    • + Harmful Content. Content or other computer technology that may damage, interfere with, + surreptitiously intercept, or expropriate any system, program, or data, including viruses, Trojan horses, + worms, time bombs, or cancelbots. +
    • +
    + No Security Violations +
    + You may not use the Services to violate the security or integrity of any network, computer or communications + system, software application, or network or computing device (each, a “System”). Prohibited activities include: +
      +
    • + Unauthorized Access. Accessing or using any System without permission, including attempting + to probe, scan, or test the vulnerability of a System or to breach any security or authentication measures + used by a System. +
    • -
    • - Interception. Monitoring of data or traffic on a System without permission. -
    • +
    • + Interception. Monitoring of data or traffic on a System without permission. +
    • -
    • - Falsification of Origin. Forging TCP-IP packet headers, e-mail headers, or any part of a - message describing its origin or route. The legitimate use of aliases and anonymous remailers is not - prohibited by this provision. -
    • -
    - No Network Abuse -
    - You may not make network connections to any users, hosts, or networks unless you have permission to - communicate with them. Prohibited activities include: -
      -
    • - Monitoring or Crawling. Monitoring or crawling of a System that impairs or disrupts the - System being monitored or crawled. -
    • +
    • + Falsification of Origin. Forging TCP-IP packet headers, e-mail headers, or any part of a + message describing its origin or route. The legitimate use of aliases and anonymous remailers is not + prohibited by this provision. +
    • +
    + No Network Abuse +
    + You may not make network connections to any users, hosts, or networks unless you have permission to communicate + with them. Prohibited activities include: +
      +
    • + Monitoring or Crawling. Monitoring or crawling of a System that impairs or disrupts the + System being monitored or crawled. +
    • -
    • - Denial of Service (DoS). Inundating a target with communications requests so the target - either cannot respond to legitimate traffic or responds so slowly that it becomes ineffective. -
    • +
    • + Denial of Service (DoS). Inundating a target with communications requests so the target + either cannot respond to legitimate traffic or responds so slowly that it becomes ineffective. +
    • -
    • - Intentional Interference. Interfering with the proper functioning of any System, - including any deliberate attempt to overload a system by mail bombing, news bombing, broadcast attacks, or - flooding techniques. -
    • +
    • + Intentional Interference. Interfering with the proper functioning of any System, including + any deliberate attempt to overload a system by mail bombing, news bombing, broadcast attacks, or flooding + techniques. +
    • -
    • - Operation of Certain Network Services. Operating network services like open proxies, open - mail relays, or open recursive domain name servers. -
    • +
    • + Operation of Certain Network Services. Operating network services like open proxies, open + mail relays, or open recursive domain name servers. +
    • -
    • - Avoiding System Restrictions. Using manual or electronic means to avoid any use - limitations placed on a System, such as access and storage restrictions. -
    • -
    - No E-Mail or Other Message Abuse -
    - You will not distribute, publish, send, or facilitate the sending of unsolicited mass e-mail or other - messages, promotions, advertising, or solicitations (like “spam”), including commercial advertising and - informational announcements. You will not alter or obscure mail headers or assume a sender’s identity without - the sender’s explicit permission. You will not collect replies to messages sent from another internet service - provider if those messages violate this Policy or the acceptable use policy of that provider. - Our Monitoring and Enforcement -
    - We reserve the right, but do not assume the obligation, to investigate any violation of this Policy or misuse - of the Services or Darkwire Site. We may: -
      -
    • investigate violations of this Policy or misuse of the Services or Darkwire Site; or
    • -
    • - remove, disable access to, or modify any content or resource that violates this Policy or any other - agreement we have with you for use of the Services or the Darkwire Site. -
    • -
    • - We may report any activity that we suspect violates any law or regulation to appropriate law enforcement - officials, regulators, or other appropriate third parties. Our reporting may include disclosing - appropriate customer information. We also may cooperate with appropriate law enforcement agencies, - regulators, or other appropriate third parties to help with the investigation and prosecution of illegal - conduct by providing network and systems information related to alleged violations of this Policy. -
    • -
    - Reporting of Violations of this Policy -
    - If you become aware of any violation of this Policy, you will immediately notify us and provide us with - assistance, as requested, to stop or remedy the violation. To report any violation of this Policy, please - follow our abuse reporting process. -
    +
  • + Avoiding System Restrictions. Using manual or electronic means to avoid any use limitations + placed on a System, such as access and storage restrictions. +
  • +
+ No E-Mail or Other Message Abuse +
+ You will not distribute, publish, send, or facilitate the sending of unsolicited mass e-mail or other messages, + promotions, advertising, or solicitations (like “spam”), including commercial advertising and informational + announcements. You will not alter or obscure mail headers or assume a sender’s identity without the sender’s + explicit permission. You will not collect replies to messages sent from another internet service provider if + those messages violate this Policy or the acceptable use policy of that provider. + Our Monitoring and Enforcement +
+ We reserve the right, but do not assume the obligation, to investigate any violation of this Policy or misuse of + the Services or Darkwire Site. We may: +
    +
  • investigate violations of this Policy or misuse of the Services or Darkwire Site; or
  • +
  • + remove, disable access to, or modify any content or resource that violates this Policy or any other + agreement we have with you for use of the Services or the Darkwire Site. +
  • +
  • + We may report any activity that we suspect violates any law or regulation to appropriate law enforcement + officials, regulators, or other appropriate third parties. Our reporting may include disclosing appropriate + customer information. We also may cooperate with appropriate law enforcement agencies, regulators, or other + appropriate third parties to help with the investigation and prosecution of illegal conduct by providing + network and systems information related to alleged violations of this Policy. +
  • +
+ Reporting of Violations of this Policy +
+ If you become aware of any violation of this Policy, you will immediately notify us and provide us with + assistance, as requested, to stop or remedy the violation. To report any violation of this Policy, please follow + our abuse reporting process. +
-
-

Terms of Service ("Terms")

-

Last updated: December 11, 2017

-

- Please read these Terms of Service ("Terms", "Terms of Service") carefully before using the - https://darkwire.io website (the "Service") operated by Darkwire ("us", "we", or "our"). -

-

- Your access to and use of the Service is conditioned on your acceptance of and compliance with these Terms. - These Terms apply to all visitors, users and others who access or use the Service. -

-

- By accessing or using the Service you agree to be bound by these Terms. If you disagree with any part of the - terms then you may not access the Service. -

- Links To Other Web Sites -

- Our Service may contain links to third-party web sites or services that are not owned or controlled by - Darkwire. -

-

- Darkwire has no control over, and assumes no responsibility for, the content, privacy policies, or practices - of any third party web sites or services. You further acknowledge and agree that Darkwire shall not be - responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or - in connection with use of or reliance on any such content, goods or services available on or through any - such web sites or services. -

-

- We strongly advise you to read the terms and conditions and privacy policies of any third-party web sites or - services that you visit. -

- Termination -

- We may terminate or suspend access to our Service immediately, without prior notice or liability, for any - reason whatsoever, including without limitation if you breach the Terms. -

-

- All provisions of the Terms which by their nature should survive termination shall survive termination, - including, without limitation, ownership provisions, warranty disclaimers, indemnity and limitations of - liability. -

- Governing Law -

- These Terms shall be governed and construed in accordance with the laws of New York, United States, without - regard to its conflict of law provisions. -

-

- Our failure to enforce any right or provision of these Terms will not be considered a waiver of those - rights. If any provision of these Terms is held to be invalid or unenforceable by a court, the remaining - provisions of these Terms will remain in effect. These Terms constitute the entire agreement between us - regarding our Service, and supersede and replace any prior agreements we might have between us regarding the - Service. -

-
+
+

Terms of Service ("Terms")

+

Last updated: December 11, 2017

+

+ Please read these Terms of Service ("Terms", "Terms of Service") carefully before using the + https://darkwire.io website (the "Service") operated by Darkwire ("us", "we", or "our"). +

+

+ Your access to and use of the Service is conditioned on your acceptance of and compliance with these Terms. + These Terms apply to all visitors, users and others who access or use the Service. +

+

+ By accessing or using the Service you agree to be bound by these Terms. If you disagree with any part of the + terms then you may not access the Service. +

+ Links To Other Web Sites +

+ Our Service may contain links to third-party web sites or services that are not owned or controlled by + Darkwire. +

+

+ Darkwire has no control over, and assumes no responsibility for, the content, privacy policies, or practices + of any third party web sites or services. You further acknowledge and agree that Darkwire shall not be + responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in + connection with use of or reliance on any such content, goods or services available on or through any such web + sites or services. +

+

+ We strongly advise you to read the terms and conditions and privacy policies of any third-party web sites or + services that you visit. +

+ Termination +

+ We may terminate or suspend access to our Service immediately, without prior notice or liability, for any + reason whatsoever, including without limitation if you breach the Terms. +

+

+ All provisions of the Terms which by their nature should survive termination shall survive termination, + including, without limitation, ownership provisions, warranty disclaimers, indemnity and limitations of + liability. +

+ Governing Law +

+ These Terms shall be governed and construed in accordance with the laws of New York, United States, without + regard to its conflict of law provisions. +

+

+ Our failure to enforce any right or provision of these Terms will not be considered a waiver of those rights. + If any provision of these Terms is held to be invalid or unenforceable by a court, the remaining provisions of + these Terms will remain in effect. These Terms constitute the entire agreement between us regarding our + Service, and supersede and replace any prior agreements we might have between us regarding the Service. +

+
-
-

Disclaimer

-

- WARNING: Darkwire does not mask IP addresses nor can verify the integrity of parties recieving messages. -  Proceed with caution and always confirm recipients beforre starting a chat session. -

-

- Please also note that ALL CHATROOMS are public.  Anyone can guess your room URL. If - you need a more-private room, use the lock feature or set the URL manually by entering a room ID after - "darkwire.io/". -

-
- No Warranties; Exclusion of Liability; Indemnification -

- - OUR WEBSITE IS OPERATED BY Darkwire ON AN "AS IS," "AS AVAILABLE" BASIS, WITHOUT REPRESENTATIONS OR - WARRANTIES OF ANY KIND. TO THE FULLEST EXTENT PERMITTED BY LAW, Darkwire SPECIFICALLY DISCLAIMS ALL - WARRANTIES AND CONDITIONS OF ANY KIND, INCLUDING ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT FOR OUR WEBSITE AND ANY CONTRACTS AND SERVICES - YOU PURCHASE THROUGH IT. Darkwire SHALL NOT HAVE ANY LIABILITY OR RESPONSIBILITY FOR ANY ERRORS OR - OMISSIONS IN THE CONTENT OF OUR WEBSITE, FOR CONTRACTS OR SERVICES SOLD THROUGH OUR WEBSITE, FOR YOUR - ACTION OR INACTION IN CONNECTION WITH OUR WEBSITE OR FOR ANY DAMAGE TO YOUR COMPUTER OR DATA OR ANY OTHER - DAMAGE YOU MAY INCUR IN CONNECTION WITH OUR WEBSITE. YOUR USE OF OUR WEBSITE AND ANY CONTRACTS OR SERVICES - ARE AT YOUR OWN RISK. IN NO EVENT SHALL EITHER Darkwire OR THEIR AGENTS BE LIABLE FOR ANY DIRECT, - INDIRECT, PUNITIVE, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN ANY WAY CONNECTED - WITH THE USE OF OUR WEBSITE, CONTRACTS AND SERVICES PURCHASED THROUGH OUR WEBSITE, THE DELAY OR INABILITY - TO USE OUR WEBSITE OR OTHERWISE ARISING IN CONNECTION WITH OUR WEBSITE, CONTRACTS OR RELATED SERVICES, - WHETHER BASED ON CONTRACT, TORT, STRICT LIABILITY OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF ANY - SUCH DAMAGES. IN NO EVENT SHALL Darkwire’s LIABILITY FOR ANY DAMAGE CLAIM EXCEED THE AMOUNT PAID BY YOU TO - Darkwire FOR THE TRANSACTION GIVING RISE TO SUCH DAMAGE CLAIM. - -

-

- - SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE - ABOVE EXCLUSION MAY NOT APPLY TO YOU. - -

-

- - WITHOUT LIMITING THE FOREGOING, Darkwire DO NOT REPRESENT OR WARRANT THAT THE INFORMATION ON THE WEBITE IS - ACCURATE, COMPLETE, RELIABLE, USEFUL, TIMELY OR CURRENT OR THAT OUR WEBSITE WILL OPERATE WITHOUT - INTERRUPTION OR ERROR. - -

-

- - YOU AGREE THAT ALL TIMES, YOU WILL LOOK TO ATTORNEYS FROM WHOM YOU PURCHASE SERVICES FOR ANY CLAIMS OF ANY - NATURE, INCLUDING LOSS, DAMAGE, OR WARRANTY. Darkwire AND THEIR RESPECTIVE AFFILIATES MAKE NO - REPRESENTATION OR GUARANTEES ABOUT ANY CONTRACTS AND SERVICES OFFERED THROUGH OUR WEBSITE. - -

-

- - Darkwire MAKES NO REPRESENTATION THAT CONTENT PROVIDED ON OUR WEBSITE, CONTRACTS, OR RELATED SERVICES ARE - APPLICABLE OR APPROPRIATE FOR USE IN ALL JURISDICTIONS. - -

- Indemnification -

- You agree to defend, indemnify and hold Darkwire harmless from and against any and all claims, damages, - costs and expenses, including attorneys' fees, arising from or related to your use of our Website or any - Contracts or Services you purchase through it. -

- Changes -

- We reserve the right, at our sole discretion, to modify or replace these Terms at any time. If a revision is - material we will try to provide at least 30 days notice prior to any new terms taking effect. What - constitutes a material change will be determined at our sole discretion. -

-

- By continuing to access or use our Service after those revisions become effective, you agree to be bound by - the revised terms. If you do not agree to the new terms, please stop using the Service. -

- Contact Us -

If you have any questions about these Terms, please contact us at hello[at]darkwire.io.

-
+
+

Disclaimer

+

+ WARNING: Darkwire does not mask IP addresses nor can verify the integrity of parties recieving messages. +  Proceed with caution and always confirm recipients beforre starting a chat session. +

+

+ Please also note that ALL CHATROOMS are public.  Anyone can guess your room URL. If you + need a more-private room, use the lock feature or set the URL manually by entering a room ID after + "darkwire.io/". +

+
+ No Warranties; Exclusion of Liability; Indemnification +

+ + OUR WEBSITE IS OPERATED BY Darkwire ON AN "AS IS," "AS AVAILABLE" BASIS, WITHOUT REPRESENTATIONS OR + WARRANTIES OF ANY KIND. TO THE FULLEST EXTENT PERMITTED BY LAW, Darkwire SPECIFICALLY DISCLAIMS ALL + WARRANTIES AND CONDITIONS OF ANY KIND, INCLUDING ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT FOR OUR WEBSITE AND ANY CONTRACTS AND SERVICES + YOU PURCHASE THROUGH IT. Darkwire SHALL NOT HAVE ANY LIABILITY OR RESPONSIBILITY FOR ANY ERRORS OR OMISSIONS + IN THE CONTENT OF OUR WEBSITE, FOR CONTRACTS OR SERVICES SOLD THROUGH OUR WEBSITE, FOR YOUR ACTION OR + INACTION IN CONNECTION WITH OUR WEBSITE OR FOR ANY DAMAGE TO YOUR COMPUTER OR DATA OR ANY OTHER DAMAGE YOU + MAY INCUR IN CONNECTION WITH OUR WEBSITE. YOUR USE OF OUR WEBSITE AND ANY CONTRACTS OR SERVICES ARE AT YOUR + OWN RISK. IN NO EVENT SHALL EITHER Darkwire OR THEIR AGENTS BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, + INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN ANY WAY CONNECTED WITH THE USE OF OUR + WEBSITE, CONTRACTS AND SERVICES PURCHASED THROUGH OUR WEBSITE, THE DELAY OR INABILITY TO USE OUR WEBSITE OR + OTHERWISE ARISING IN CONNECTION WITH OUR WEBSITE, CONTRACTS OR RELATED SERVICES, WHETHER BASED ON CONTRACT, + TORT, STRICT LIABILITY OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF ANY SUCH DAMAGES. IN NO EVENT + SHALL Darkwire’s LIABILITY FOR ANY DAMAGE CLAIM EXCEED THE AMOUNT PAID BY YOU TO Darkwire FOR THE + TRANSACTION GIVING RISE TO SUCH DAMAGE CLAIM. + +

+

+ + SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE + ABOVE EXCLUSION MAY NOT APPLY TO YOU. + +

+

+ + WITHOUT LIMITING THE FOREGOING, Darkwire DO NOT REPRESENT OR WARRANT THAT THE INFORMATION ON THE WEBITE IS + ACCURATE, COMPLETE, RELIABLE, USEFUL, TIMELY OR CURRENT OR THAT OUR WEBSITE WILL OPERATE WITHOUT + INTERRUPTION OR ERROR. + +

+

+ + YOU AGREE THAT ALL TIMES, YOU WILL LOOK TO ATTORNEYS FROM WHOM YOU PURCHASE SERVICES FOR ANY CLAIMS OF ANY + NATURE, INCLUDING LOSS, DAMAGE, OR WARRANTY. Darkwire AND THEIR RESPECTIVE AFFILIATES MAKE NO REPRESENTATION + OR GUARANTEES ABOUT ANY CONTRACTS AND SERVICES OFFERED THROUGH OUR WEBSITE. + +

+

+ + Darkwire MAKES NO REPRESENTATION THAT CONTENT PROVIDED ON OUR WEBSITE, CONTRACTS, OR RELATED SERVICES ARE + APPLICABLE OR APPROPRIATE FOR USE IN ALL JURISDICTIONS. + +

+ Indemnification +

+ You agree to defend, indemnify and hold Darkwire harmless from and against any and all claims, damages, costs + and expenses, including attorneys' fees, arising from or related to your use of our Website or any Contracts + or Services you purchase through it. +

+ Changes +

+ We reserve the right, at our sole discretion, to modify or replace these Terms at any time. If a revision is + material we will try to provide at least 30 days notice prior to any new terms taking effect. What constitutes + a material change will be determined at our sole discretion. +

+

+ By continuing to access or use our Service after those revisions become effective, you agree to be bound by + the revised terms. If you do not agree to the new terms, please stop using the Service. +

+ Contact Us +

If you have any questions about these Terms, please contact us at hello[at]darkwire.io.

+
-
-

Contact

-

Questions/comments? Email us at hello[at]darkwire.io

-

- Found a bug or want a new feature?{' '} - - Open a ticket on Github - - . -

-
+
+

Contact

+

Questions/comments? Email us at hello[at]darkwire.io

+

+ Found a bug or want a new feature?{' '} + + Open a ticket on Github + + . +

+
- -
- ); - } -} + +
+ ); +}; About.propTypes = { roomId: PropTypes.string.isRequired, diff --git a/client/src/components/Connecting/index.jsx b/client/src/components/Connecting/index.jsx index 9f01d4e..d255871 100644 --- a/client/src/components/Connecting/index.jsx +++ b/client/src/components/Connecting/index.jsx @@ -1,7 +1,5 @@ -import React, { Component } from 'react'; +const Connecting = () => { + return
Please wait while we secure a connection to Darkwire...
; +}; -export default class Connecting extends Component { - render() { - return
Please wait while we secure a connection to Darkwire...
; - } -} +export default Connecting; diff --git a/client/src/components/Home/Home.jsx b/client/src/components/Home/Home.jsx index 00af475..36f1083 100644 --- a/client/src/components/Home/Home.jsx +++ b/client/src/components/Home/Home.jsx @@ -316,7 +316,7 @@ const User = ({ createUser, username, ...rest }) => { setLoaded(true); }; - if (!loaded && !loading.current) { + if (!loaded) { loading.current = true; createUserLocal(); } diff --git a/client/src/components/Message/index.jsx b/client/src/components/Message/index.jsx index aff45d2..e01902f 100644 --- a/client/src/components/Message/index.jsx +++ b/client/src/components/Message/index.jsx @@ -1,34 +1,31 @@ -import React, { Component } from 'react'; import PropTypes from 'prop-types'; import moment from 'moment'; import Linkify from 'react-linkify'; import Username from '@/components/Username'; -class Message extends Component { - render() { - const msg = decodeURI(this.props.message); +const Message = ({ message, timestamp, sender }) => { + const msg = decodeURI(message); - return ( -
-
- - {moment(this.props.timestamp).format('LT')} -
-
- - {msg} - -
+ return ( +
+
+ + {moment(timestamp).format('LT')}
- ); - } -} +
+ + {msg} + +
+
+ ); +}; Message.propTypes = { sender: PropTypes.string.isRequired, diff --git a/client/src/components/RoomLink/index.jsx b/client/src/components/RoomLink/index.jsx index af06b72..2b8f514 100644 --- a/client/src/components/RoomLink/index.jsx +++ b/client/src/components/RoomLink/index.jsx @@ -4,15 +4,10 @@ import { Copy } from 'react-feather'; import Clipboard from 'clipboard'; import $ from 'jquery'; -class RoomLink extends Component { - constructor(props) { - super(props); - this.state = { - roomUrl: `${window.location.origin}/${props.roomId}`, - }; - } +const RoomLink = ({ roomId, translations }) => { + const roomUrl = `${window.location.origin}/${roomId}`; - componentDidMount() { + React.useEffect(() => { const clip = new Clipboard('.copy-room'); clip.on('success', () => { @@ -27,36 +22,34 @@ class RoomLink extends Component { trigger: 'manual', }); }); - } - componentWillUnmount() { - if ($('.copy-room').tooltip) $('.copy-room').tooltip('hide'); - } + return () => { + if ($('.copy-room').tooltip) $('.copy-room').tooltip('hide'); + }; + }, []); - render() { - return ( -
-
-
- -
- -
+ return ( + +
+
+ +
+
- - ); - } -} +
+ + ); +}; RoomLink.propTypes = { roomId: PropTypes.string.isRequired, diff --git a/client/src/components/RoomLocked/index.jsx b/client/src/components/RoomLocked/index.jsx index f6b0a92..e396873 100644 --- a/client/src/components/RoomLocked/index.jsx +++ b/client/src/components/RoomLocked/index.jsx @@ -1,7 +1,5 @@ -import React, { Component } from 'react'; +const RoomLocked = ({ modalContent }) => { + return
{modalContent}
; +}; -export default class RoomLocked extends Component { - render() { - return
{this.props.modalContent}
; - } -} +export default RoomLocked; diff --git a/client/src/components/T/T.jsx b/client/src/components/T/T.jsx index 3a0ff32..ae98933 100644 --- a/client/src/components/T/T.jsx +++ b/client/src/components/T/T.jsx @@ -1,4 +1,3 @@ -import React, { Component } from 'react'; import PropTypes from 'prop-types'; import _ from 'lodash'; @@ -6,24 +5,25 @@ import { getTranslations } from '@/i18n'; const regex = /{(.*?)}/g; -class T extends Component { - render() { - const t = getTranslations(this.props.language); - const englishT = getTranslations('en'); - const str = _.get(t, this.props.path, '') || _.get(englishT, this.props.path, ''); - let string = str.split(regex); - if (this.props.data) { - string = string.map(word => { - if (this.props.data[word]) { - return this.props.data[word]; - } - return word; - }); - return {string}; - } - return string; +const T = ({ language, path, data }) => { + const t = getTranslations(language); + const englishT = getTranslations('en'); + const str = _.get(t, path, '') || _.get(englishT, path, ''); + + let string = str.split(regex); + + // Data for string interpolation + if (data) { + string = string.map(word => { + if (data[word]) { + return data[word]; + } + return word; + }); + return {string}; } -} + return string; +}; T.propTypes = { path: PropTypes.string.isRequired, diff --git a/client/src/components/Username/index.jsx b/client/src/components/Username/index.jsx index 03025ac..3f451a5 100644 --- a/client/src/components/Username/index.jsx +++ b/client/src/components/Username/index.jsx @@ -1,16 +1,13 @@ -import React, { Component } from 'react'; import PropTypes from 'prop-types'; import randomColor from 'randomcolor'; -class Username extends Component { - render() { - return ( - - {this.props.username} - - ); - } -} +const Username = ({ username }) => { + return ( + + {username} + + ); +}; Username.propTypes = { username: PropTypes.string.isRequired,