From e4fbba34054eba13b2bc4b4ca30febcac4c9266d Mon Sep 17 00:00:00 2001 From: Ritwik Saha Date: Fri, 8 Mar 2019 15:40:28 +0530 Subject: [PATCH] Using Github API on ABout Page & Some Twicks --- .gitignore | 1 - .../apps/_common/components/SettingsComp.js | 2 +- .../apps/extra/components/CreadentialsForm.js | 5 ++++ client/src/apps/extra/pages/About.js | 21 ++++++++++++---- .../src/apps/extra/pages/PrivacyPolicyPage.js | 24 +++++++++---------- client/src/apps/extra/pages/ResetPass.js | 2 +- server/src/services/nodemailer.js | 4 ++-- server/src/templates/mailer_v1.js | 3 +++ 8 files changed, 41 insertions(+), 21 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ab1891c..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -database \ No newline at end of file diff --git a/client/src/apps/_common/components/SettingsComp.js b/client/src/apps/_common/components/SettingsComp.js index 81c93fb..aacd237 100644 --- a/client/src/apps/_common/components/SettingsComp.js +++ b/client/src/apps/_common/components/SettingsComp.js @@ -72,7 +72,7 @@ const SettingsComp = (props) => {
-

Version - 2.0.0

+

Version - 2.0.0-beta.1

diff --git a/client/src/apps/extra/components/CreadentialsForm.js b/client/src/apps/extra/components/CreadentialsForm.js index 16bc6b1..f8c7cac 100644 --- a/client/src/apps/extra/components/CreadentialsForm.js +++ b/client/src/apps/extra/components/CreadentialsForm.js @@ -56,6 +56,11 @@ const CreadentialsForm = ({ pathName }, context) => { {errorMsg && (

{errorMsg}

)} + {errorMsg === 'Incorrect email or password' && ( +

+ Forgot password? - Reset It +

+ )}
{ e.preventDefault(); diff --git a/client/src/apps/extra/pages/About.js b/client/src/apps/extra/pages/About.js index 27790d7..4667923 100644 --- a/client/src/apps/extra/pages/About.js +++ b/client/src/apps/extra/pages/About.js @@ -1,8 +1,21 @@ -import React from 'react'; +import React, { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; import { GoMarkGithub, GoStar, GoRepoForked } from 'react-icons/go'; +import axios from 'axios'; const AboutPage = () => { + const [ forks, setForks ] = useState(0); + const [ starts, setStars ] = useState(0); + + useEffect(() => { + axios.get('https://api.github.com/repos/ritwik310/scheduler/forks').then(({ data }) => { + setForks(data.length); + }); + axios.get('https://api.github.com/repos/ritwik310/scheduler/stargazers').then(({ data }) => { + setStars(data.length); + }); + }, []); + return (

Schedule your work in Style

@@ -31,7 +44,7 @@ const AboutPage = () => {

- Version 2.0 - Report any bugs {' '} + Version 2.0.0-beta.1 - Report any bugs {' '} here @@ -47,7 +60,7 @@ const AboutPage = () => { style={{ margin: '5px 0px', padding: '10px' }} className="Theme-Btn-Black-99 Theme-Btn-Shadow-99" > - 27 + {forks}

@@ -60,7 +73,7 @@ const AboutPage = () => { style={{ margin: '5px 0px', padding: '10px' }} className="Theme-Btn-Black-99 Theme-Btn-Shadow-99" > - 105 + {starts}
diff --git a/client/src/apps/extra/pages/PrivacyPolicyPage.js b/client/src/apps/extra/pages/PrivacyPolicyPage.js index fcc48fb..7401a00 100644 --- a/client/src/apps/extra/pages/PrivacyPolicyPage.js +++ b/client/src/apps/extra/pages/PrivacyPolicyPage.js @@ -6,18 +6,18 @@ const PrivacyPolicyPage = () => {

Privacy Policy

-  At Schedular, accessible from{' '} - - https://schedular.ritwiksaha.com +  At Scheduler, accessible from{' '} + + https://scheduler.ritwiksaha.com , one of our main priorities is the privacy of our visitors. This Privacy Policy document - contains types of information that is collected and recorded by Schedular and how we use it. If you + contains types of information that is collected and recorded by Scheduler and how we use it. If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us through email at{' '} ritwik.codehard@gmail.com

Log Files

-   Log Files Schedular follows a standard procedure of using log files. These files log visitors +   Log Files Scheduler follows a standard procedure of using log files. These files log visitors when they visit websites. All hosting companies do this and a part of hosting services' analytics. The information collected by log files include internet protocol (IP) addresses, browser type, Internet Service Provider (ISP), date and time stamp, referring/exit pages, and possibly the number @@ -28,7 +28,7 @@ const PrivacyPolicyPage = () => {

Cookies and Web Beacons

-   Like any other website, Schedular uses 'cookies'. These cookies are used to store information +   Like any other website, Scheduler uses 'cookies'. These cookies are used to store information including visitors' preferences, and the pages on the website that the visitor accessed or visited. The information is used to optimize the users' experience by customizing our web page content based on visitors' browser type and/or other information. @@ -37,24 +37,24 @@ const PrivacyPolicyPage = () => {

Privacy Policies

  You may consult this list to find the Privacy Policy for each of the advertising partners of - Schedular. Our Privacy Policy was created with the help of the GDPR Privacy Policy Generator and the + Scheduler. Our Privacy Policy was created with the help of the GDPR Privacy Policy Generator and the Terms and Conditions Template.

  Third-party ad servers or ad networks uses technologies like cookies, JavaScript, or Web - Beacons that are used in their respective advertisements and links that appear on Schedular, which + Beacons that are used in their respective advertisements and links that appear on Scheduler, which are sent directly to users' browser. They automatically receive your IP address when this occurs. These technologies are used to measure the effectiveness of their advertising campaigns and/or to personalize the advertising content that you see on websites that you visit.

-   Note that Schedular has no access to or control over these cookies that are used by +   Note that Scheduler has no access to or control over these cookies that are used by third-party advertisers.

Third Pary Privacy Policies

-   Schedular's Privacy Policy does not apply to other advertisers or websites. Thus, we are +   Scheduler's Privacy Policy does not apply to other advertisers or websites. Thus, we are advising you to consult the respective Privacy Policies of these third-party ad servers for more detailed information. It may include their practices and instructions about how to opt-out of certain options. You may find a complete list of these Privacy Policies and their links here: @@ -73,7 +73,7 @@ const PrivacyPolicyPage = () => { activity.

-   Schedular does not knowingly collect any Personal Identifiable Information from children +   Scheduler does not knowingly collect any Personal Identifiable Information from children under the age of 13. If you think that your child provided this kind of information on our website, we strongly encourage you to contact us immediately and we will do our best efforts to promptly remove such information from our records. @@ -82,7 +82,7 @@ const PrivacyPolicyPage = () => {

Online Privacy Policy Only

  This Privacy Policy applies only to our online activities and is valid for visitors to our - website with regards to the information that they shared and/or collect in Schedular. This policy is + website with regards to the information that they shared and/or collect in Scheduler. This policy is not applicable to any information collected offline or via channels other than this website.

diff --git a/client/src/apps/extra/pages/ResetPass.js b/client/src/apps/extra/pages/ResetPass.js index 6e036a4..3dd8c3b 100644 --- a/client/src/apps/extra/pages/ResetPass.js +++ b/client/src/apps/extra/pages/ResetPass.js @@ -16,7 +16,7 @@ const ResetPassPage = () => { try { await axios.post('/auth/password_reset', { token: urlParams.get('token'), password: password1 }); - window.location.replace('/calendar'); + window.location.replace('/login'); } catch (error) { setProgressBar(false); if (error.response.status === 422) setErrorMsg('Unable to change password'); diff --git a/server/src/services/nodemailer.js b/server/src/services/nodemailer.js index f87dbd1..8ff8520 100644 --- a/server/src/services/nodemailer.js +++ b/server/src/services/nodemailer.js @@ -26,8 +26,8 @@ module.exports = (req, res, next) => { let mailOptions = { from: keys.mail_sender_address, to: recieverEmail, - subject: 'Reset Password - My Calendar', - // text: 'My Calendar', + subject: 'Scheduler - Reset Password', + text: 'Scheduler', html: outputTemp, auth: { user: keys.mail_sender_address, diff --git a/server/src/templates/mailer_v1.js b/server/src/templates/mailer_v1.js index 05756c8..5944f1f 100644 --- a/server/src/templates/mailer_v1.js +++ b/server/src/templates/mailer_v1.js @@ -1,5 +1,8 @@ module.exports = (link) => { return ` + +

From scheduler app..

Reset your password here

+ `; };