diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 05d4804bc..c65f1e1c6 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1593,6 +1593,60 @@ "setup_upgrade_button_go": { "message": "Set Me Up" }, + "hub_home_page_title": { + "message": "Ghostery Hub - Home" + }, + "hub_home_header_text": { + "message": "Ghostery is ready!" + }, + "hub_home_header_tagline": { + "message": "You are now protected with our default settings." + }, + "hub_home_header_tagline_2": { + "message": "Start Browsing!" + }, + "hub_home_header_checkbox_label": { + "message": "Share analytics and Human Web data to improve Ghostery’s performance. " + }, + "hub_home_header_checkbox_link": { + "message": "Learn More." + }, + "hub_home_subheader_optimize": { + "message": "Optimize your Ghostery experience" + }, + "hub_home_subheader_create_account": { + "message": "Create Account" + }, + "hub_home_feature_tutorial_title": { + "message": "Take a Tutorial" + }, + "hub_home_feature_tutorial_text": { + "message": "Walk through Ghostery's main features." + }, + "hub_home_feature_tutorial_button": { + "message": "Start" + }, + "hub_home_feature_tutorial_button_alt": { + "message": "Tutorial Complete" + }, + "hub_home_feature_setup_title": { + "message": "Customize Setup" + }, + "hub_home_feature_setup_text": { + "message": "Edit your settings and blocking preferences." + }, + "hub_home_feature_setup_button": { + "message": "Edit Setup" + }, + "hub_home_feature_setup_button_alt": { + "message": "Custom Setup Complete" + }, + "hub_home_feature_supporter_text": { + "message": "Become a Ghostery Supporter and unlock special features." + }, + "hub_home_feature_supporter_button": { + "message": "Become a Supporter" + }, "hub_setup_page_title": { "message": "Ghostery Hub - Setup" }, diff --git a/app/hub/components/App.jsx b/app/hub/App.jsx similarity index 89% rename from app/hub/components/App.jsx rename to app/hub/App.jsx index 1dd755e9a..cee8caa14 100644 --- a/app/hub/components/App.jsx +++ b/app/hub/App.jsx @@ -14,7 +14,7 @@ */ import React, { Component } from 'react'; -import SideNavigation from './SideNavigation'; +import SideNavigation from './Views/SideNavigationView'; /** * @class Implements the container App for the Ghostery Hub @@ -33,10 +33,10 @@ class App extends Component { location: 'list', type: 'link', href: '/', icon: 'home', text: 'Home' }, { - location: 'list', type: 'link', href: '/setup/1', icon: 'home', text: 'Customize Setup' + location: 'list', type: 'link', href: '/setup', icon: 'home', text: 'Customize Setup' }, { - location: 'list', type: 'link', href: '/tutorial/1', icon: 'home', text: 'Visit Tutorial' + location: 'list', type: 'link', href: '/tutorial', icon: 'home', text: 'Visit Tutorial' }, { location: 'list', type: 'link', href: '/supporter', icon: 'home', text: 'Become a Ghostery Supporter' diff --git a/app/hub/Views/HomeView/HomeView.jsx b/app/hub/Views/HomeView/HomeView.jsx index 1dc179ba9..584ca0d06 100644 --- a/app/hub/Views/HomeView/HomeView.jsx +++ b/app/hub/Views/HomeView/HomeView.jsx @@ -9,42 +9,137 @@ * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0 - * - * ToDo: Update this file. */ -import React, { Component } from 'react'; +import React from 'react'; +import ClassNames from 'classnames'; +import PropTypes from 'prop-types'; +import { NavLink } from 'react-router-dom'; +import { ToggleCheckbox } from '../../../shared-components'; /** - * @class Implement the Home View for the Ghostery Hub - * @extends Component + * A Functional React component for rendering the Home View + * @return {JSX} JSX for rendering the Home View of the Hub app * @memberof HubComponents */ -class HomeView extends Component { - constructor(props) { - super(props); - - this.state = { - title: '' - }; - } +const HomeView = (props) => { + const { + justInstalled, + setup_complete, + tutorial_complete, + enable_human_web, + changeHumanWeb, + account_text, + account_link, + } = props; + const tutorialFeatureClassNames = ClassNames('HomeView__onboardingFeature columns flex-container align-middle flex-dir-column', { + 'feature-tutorial-complete': tutorial_complete, + 'feature-tutorial': !tutorial_complete, + }); + const tutorialButtonClassNames = ClassNames('HomeView__featureButton button primary', { + hollow: tutorial_complete, + }); + const setupFeatureClassNames = ClassNames('HomeView__onboardingFeature columns flex-container align-middle flex-dir-column', { + 'feature-setup-complete': setup_complete, + 'feature-setup': !setup_complete, + }); + const setupButtonClassNames = ClassNames('HomeView__featureButton button primary', { + hollow: setup_complete, + }); - /** - * Lifecycle Event - */ - componentWillMount() { - const { title } = this.state; - window.document.title = title; - } + return ( +