index.tsx 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import React, { useEffect, useState } from "react";
  2. import Head from "@docusaurus/Head";
  3. import { BlogFooter } from "@site/src/refine-theme/blog-footer";
  4. import { CommonHeader } from "@site/src/refine-theme/common-header";
  5. import { CommonLayout } from "@site/src/refine-theme/common-layout";
  6. import clsx from "clsx";
  7. const Roadmap: React.FC = () => {
  8. const [milestones, setMilestones] = useState<any[]>([]);
  9. useEffect(() => {
  10. const fetchMilestones = async () => {
  11. try {
  12. const response = await fetch("https://api.github.com/repos/stefanpejcic/openpanel/milestones");
  13. const data = await response.json();
  14. setMilestones(data);
  15. } catch (error) {
  16. console.error("Error fetching milestones:", error);
  17. }
  18. };
  19. fetchMilestones();
  20. }, []);
  21. const calculateProgress = (milestone) => {
  22. const totalIssues = milestone.open_issues + milestone.closed_issues;
  23. const progress = (milestone.closed_issues / totalIssues) * 100;
  24. return progress.toFixed(2);
  25. };
  26. const formatDueDate = (dueDate) => {
  27. const options = { year: 'numeric', month: 'long', day: 'numeric' };
  28. return new Date(dueDate).toLocaleDateString(undefined, options);
  29. };
  30. return (
  31. <CommonLayout>
  32. <Head title="ROADMAP | OpenPanel">
  33. <html data-page="roadmap" data-customized="true" />
  34. </Head>
  35. <div className="refine-prose">
  36. <CommonHeader hasSticky={true} />
  37. <div className="flex-1 flex flex-col pt-8 lg:pt-16 pb-32 max-w-[800px] w-full mx-auto px-2">
  38. <h1>Roadmap</h1>
  39. <p>Welcome to our OpenPanel Roadmap, where innovation meets transparency! We are excited to share our vision and plans for the future as we continually strive to enhance your hosting experience. This roadmap serves as a dynamic guide, outlining the upcoming features, improvements, and milestones that we are committed to delivering.</p>
  40. <h3>Planned releases</h3>
  41. <ul>
  42. {milestones.map((milestone) => (
  43. <li key={milestone.id}>
  44. <strong><a href={milestone.html_url} target="_blank" rel="noopener noreferrer">{milestone.title}</a></strong>
  45. <p>{milestone.description}</p>
  46. <p>Scheduled release: <strong>{formatDueDate(milestone.due_on)}</strong></p>
  47. <p>Progress: {calculateProgress(milestone)}%</p>
  48. {/* Progress bar */}
  49. <div style={{ width: '100%', height: '8px', backgroundColor: '#ddd', borderRadius: '4px', marginTop: '8px', overflow: 'hidden' }}>
  50. <div style={{ height: '100%', backgroundColor: '#4caf50', width: `${calculateProgress(milestone)}%`, transition: 'width 0.3s ease-in-out' }}></div>
  51. </div>
  52. </li>
  53. ))}
  54. </ul>
  55. <h3>About</h3>
  56. <p>At OPENPANEL we believe in the power of collaboration and value the feedback of our community. This roadmap is a testament to our dedication to open communication and customer-centric development. As we embark on this journey together, we invite you to explore the exciting initiatives that lie ahead and join us in shaping the future of hosting.</p>
  57. <p>Discover the roadmap that outlines our commitment to providing a robust, user-friendly hosting panel that not only meets but exceeds your expectations. Your insights and suggestions are invaluable to us, and we look forward to the shared successes that await on this path of innovation. Thank you for being an integral part of our growing community!</p>
  58. </div>
  59. <BlogFooter />
  60. </div>
  61. </CommonLayout>
  62. );
  63. };
  64. export default Roadmap;