Skip to content

Commit

Permalink
Update License, About, Icon, Privacy, and Footer.
Browse files Browse the repository at this point in the history
  • Loading branch information
ccxzhang committed Aug 22, 2024
1 parent f2acc53 commit b305290
Show file tree
Hide file tree
Showing 6 changed files with 175 additions and 58 deletions.
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
BSD 2-Clause License

Copyright (c) 2024, Chenxiao (Charlie) Zhang
Copyright (c) 2024, Global Financing Facility

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down
Binary file modified resources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions src/renderer/src/components/Accordion.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React, { useState } from 'react'

// eslint-disable-next-line react/prop-types
export const Accordion = ({ title, children, isOpen, toggleAccordion }) => {
return (
<div className={`${isOpen ? 'border-t-0' : 'border-t'} border-x border-b border-gray-300`}>
<button
onClick={toggleAccordion}
className="w-full px-4 py-3 text-left bg-gff-green text-white font-semibold flex justify-between items-center"
>
{title}
<span>{isOpen ? '▲' : '▼'}</span>
</button>
{isOpen && <div className="p-4 bg-white text-gray-800">{children}</div>}
</div>
)
}

// eslint-disable-next-line react/prop-types
export const AccordionGroup = ({ children }) => {
const [openAccordionId, setOpenAccordionId] = useState(null)

const toggleAccordion = (id) => {
if (openAccordionId === id) {
setOpenAccordionId(null) // Close this accordion if it's already open
} else {
setOpenAccordionId(id) // Open the clicked accordion and close others
}
}

// Clone each child and inject the open state and toggle function
const childrenWithProps = React.Children.map(children, (child, index) =>
React.cloneElement(child, {
isOpen: openAccordionId === index,
toggleAccordion: () => toggleAccordion(index)
})
)

return <div>{childrenWithProps}</div>
}
158 changes: 121 additions & 37 deletions src/renderer/src/pages/About.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useState } from 'react'
import { Accordion, AccordionGroup } from '../components/Accordion'

const AboutPage = () => {
const [emailContent, setEmailContent] = useState('')
Expand All @@ -17,53 +18,136 @@ const AboutPage = () => {

return (
<div className="about-page flex flex-col min-h-screen">
<div className="flex-grow px-5 py-8 mx-auto max-w-4xl text-gray-800">
<section className="header text-center mb-12">
<h1 className="text-5xl font-bold text-gray-900 mb-6">Overview</h1>
<div className="flex-grow mx-auto max-w-4xl px-5 py-8">
<section className="mb-12 text-center">
<h1 className="mb-6 text-5xl font-bold text-gray-900">Overview</h1>
</section>

<section className="content mt-10">
<p className="text-xl leading-relaxed text-gray-600">
Welcome to the FASTR Data Downloader, your go-to solution for easily extracting data
from DHIS-2 data systems. Whether you are a health ministry official, researcher, NGOs,
or donor agency, the FASTR Data Downloader is designed to facilitate a streamlined
process for downloading DHIS2 data.
Welcome to the FASTR DHIS2 Data Downloader, your go-to solution for easily extracting
data from DHIS2 data systems. Whether you are a health ministry official, researcher,
NGOs, or donor agency, the FASTR DHIS2 Data Downloader is designed to facilitate a
streamlined process for downloading DHIS2 data.
</p>
</section>

<section className="contact-info mt-10">
<h2 className="text-3xl font-semibold text-gray-900 mb-4">Contact Us</h2>
<p className="text-xl text-gray-600">
If you have any questions or need support, please don't hesitate to reach out:
</p>
<ul className="list-none">
<li>
Email:{' '}
<a href="mailto:[email protected]" className="text-blue-500 hover:underline">
[email protected]
</a>
</li>
<li>Phone: (123) 456-7890</li>
</ul>
<section className="feature-info mt-10">
<h2 className="text-2xl font-medium text-gray-800 mb-6">Features</h2>
<AccordionGroup>
<Accordion title="Downloading Data from DHIS2">
<p className="mb-4">
Download DHIS2 data by selecting date ranges, data elements/indicators, organization
levels, units, and disaggregated dimensions. Data is downloaded in CSV format.
</p>
Using the FASTR DHIS2 Data Downloader requires:
<ul className="list-disc pl-5 text-gray-700 mb-4">
<li>URL of the DHIS2 instance</li>
<li>Valid username</li>
<li>Valid password</li>
</ul>
<p className="mb-4 text-sm">
Note: FASTR DHIS2 Data Downloader is not responsible for registering account for any
DHIS2 system and can only access to DHIS2 systems for which you have already
processed valid credentials. The Downloader will not transmit or store your DHIS2
credentials to any places other than your laptop.
</p>
</Accordion>
<Accordion title="Data Dictionary">
<p className="mb-4">
Search for data elements/indicators by name or JSON ID. Access additional metadata
and download it as a CSV file.
</p>
</Accordion>
<Accordion title="Managing Download History">
<p className="mb-4">
Record successful downloads, add notes, and quickly re-download past records. Option
to keep or erase history upon logging out.
</p>
</Accordion>
</AccordionGroup>
</section>

<section className="contact-form mt-8">
<h2 className="text-3xl font-semibold text-gray-900 mb-4">Send us a message</h2>
<form onSubmit={handleSubmit} className="space-y-4">
<textarea
className="w-full p-4 text-gray-700 border-2 border-gray-300 rounded-lg focus:outline-none focus:border-blue-500 transition-colors"
rows="4"
placeholder="Type your message here..."
value={emailContent}
onChange={handleEmailChange}
></textarea>
<button
type="submit"
className="px-6 py-3 bg-blue-600 text-white font-bold rounded-lg hover:bg-blue-700 transition-colors"
<section className="Resources-info mt-10">
<h2 className="text-3xl font-semibold text-gray-900 mb-4">Additional Resources</h2>
<p>
Learn more about how to use the FASTR DHIS2 Data Downloader by visiting our{' '}
<a
href="https://gffklportal.org/"
target="_blank"
rel="noreferrer"
className="text-blue-500 hover:underline"
>
Training Resources
</a>
.
</p>
<p>
The code is accessible via{' '}
<a
href="https://github.com/ccxzhang/dhis2-downloader"
target="_blank"
rel="noreferrer"
className="text-blue-500 hover:underline"
>
Send Email
</button>
</form>
GitHub
</a>{' '}
under BSD-2 License.
</p>
</section>

<section className="team-info mt-10">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">Our Team</h2>
<p>
The FASTR DHIS2 Data Downloader was developed by the Results and Learning team at the
Global Financing Facility for Women, Children and Adolescents (GFF). The Frequent
Assessments and System Tools for Resilience (FASTR) initiative, aims to enable
rapid-cycle monitoring for strengthening PHC systems and improving RMNCAH-N outcomes
through the timely and high-frequency analysis and use of data.
</p>
</section>

<section className="contact-info mt-10 flex flex-col md:flex-row">
<div className="flex-1">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">Get In Touch</h2>
<p className="text-gray-700">For support feedbacks or inquiries, contact us at:</p>
<ul className="list-none m-4">
<li>
Email:{' '}
<a href="mailto:[email protected]" className="text-blue-500 hover:underline">
[email protected]
</a>
</li>
<li>Phone: (123) 456-7890</li>
</ul>
</div>
<div className="flex-1">
<h3 className="text-2xl font-semibold text-gray-900 mb-4">Send us a message</h3>
<form onSubmit={handleSubmit} className="space-y-4">
<textarea
className="w-full p-4 text-gray-700 border-2 border-gray-300 rounded-lg focus:outline-none focus:border-blue-500 transition-colors"
rows="4"
placeholder="Type your message here..."
value={emailContent}
onChange={handleEmailChange}
></textarea>
<button
type="submit"
className="px-6 py-3 bg-blue-600 text-white font-bold rounded-lg hover:bg-blue-700 transition-colors"
>
Send Email
</button>
</form>
</div>
</section>

{/* Acknowledgements */}
<section>
<h2 className="text-3xl font-semibold text-gray-900 mb-4">Acknowledgements</h2>
<p>
We would like to thank Damola Sheriff Olajide with the West African Health Organization
who provided the software prototype for the FASTR DHIS2 Data Downloader.
</p>
</section>
</div>
</div>
Expand Down
8 changes: 0 additions & 8 deletions src/renderer/src/pages/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ const Footer = () => {
</a>
</div>
<div className="right-side flex items-center space-x-10">
<a
href="https://github.com/ccxzhang/dhis2-downloader"
target="_blank"
rel="noreferrer"
className="hover:text-gray-300"
>
Resources
</a>
<a
href="https://www.worldbank.org/en/about/legal/terms-and-conditions"
target="_blank"
Expand Down
26 changes: 13 additions & 13 deletions src/renderer/src/pages/Privacy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ const PrivacyPolicy = () => {
<p className="text-sm text-gray-600 mb-2">Last updated: [Date]</p>
<h2 className="text-lg font-semibold mb-3">Introduction</h2>
<p className="mb-3">
Thank you for choosing to use [App Name]. We take your privacy seriously. This Privacy
Policy explains the types of information we do not collect through your use of [App Name],
and how we ensure your privacy is maintained.
Thank you for choosing to use FASTR DHIS2 Downloader ("We", "us", "the Downloader"). We take
your privacy seriously. This Privacy Policy explains the types of information we collect
through your use of the Downloader, and how we ensure your privacy is maintained.
</p>
<h2 className="text-lg font-semibold mb-3">Information We Do Not Collect</h2>
<h2 className="text-lg font-semibold mb-3">Information We Collect</h2>
<p className="mb-3">
[App Name] does not collect or store any personal information from its users. The
application serves solely as a conduit for data transmission from our servers to your
device.
We <b>do not collect or store</b> any personal information from users. The application
serves solely as a conduit for data transmission from DHIS2 servers to your device.
</p>
<h2 className="text-lg font-semibold mb-3">Data Transmission</h2>
<p className="mb-3">
While [App Name] does not collect personal information, it facilitates the downloading of
data from our servers. This data is not stored, processed, or analyzed by the application,
and we ensure that all transmissions are secure and encrypted using the latest protocols.
While we do not collect personal information, we facilitate the downloading of data from
DHIS2 servers. Some data is tempoararily stored, processed, or analyzed by the application
locally, and we ensure that all transmissions are secure and encrypted using the latest
protocols.
</p>
<h2 className="text-lg font-semibold mb-3">Security</h2>
<p className="mb-3">
We are committed to ensuring the security of data transmissions through [App Name]. We
implement a variety of security measures to maintain the safety of your data during
transmission, including encryption and secure channels.
We are committed to ensuring the security of data transmissions. We implement a variety of
security measures to maintain the safety of your data during transmission, including
encryption and secure channels.
</p>
<h2 className="text-lg font-semibold mb-3">Changes to This Privacy Policy</h2>
<p className="mb-3">
Expand Down

0 comments on commit b305290

Please sign in to comment.