Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

84 строки
3.0 KiB

  1. /*
  2. Copyright (C) 2025 QuantumNous
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Affero General Public License as
  5. published by the Free Software Foundation, either version 3 of the
  6. License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Affero General Public License for more details.
  11. You should have received a copy of the GNU Affero General Public License
  12. along with this program. If not, see <https://www.gnu.org/licenses/>.
  13. For commercial licensing, please contact support@quantumnous.com
  14. */
  15. import React, { useContext } from 'react';
  16. import { useTranslation } from 'react-i18next';
  17. import { StatusContext } from '../../../context/Status';
  18. const HomePageFooter = () => {
  19. const { t } = useTranslation();
  20. const [statusState] = useContext(StatusContext);
  21. const systemName = statusState?.status?.system_name || 'New API';
  22. const footerInfo = statusState?.status?.footer_info || '';
  23. const currentYear = new Date().getFullYear();
  24. const footerLinks = [
  25. { label: t('服务条款'), href: '/terms', external: false },
  26. { label: t('使用政策'), href: '/usage-policy', external: false },
  27. ];
  28. return (
  29. <footer className="home-snap-section home-footer">
  30. <div className="mx-auto w-full max-w-[1110px]">
  31. {/* 链接区域 */}
  32. <div className="mb-6 flex flex-col items-center justify-center gap-3 md:flex-row md:gap-4">
  33. {footerLinks.filter(link => link.href).map((link, index) => (
  34. <React.Fragment key={link.label}>
  35. <a
  36. href={link.href}
  37. target={link.external ? '_blank' : undefined}
  38. rel={link.external ? 'noopener noreferrer' : undefined}
  39. className="home-footer-link"
  40. >
  41. {link.label}
  42. </a>
  43. {index < footerLinks.filter(l => l.href).length - 1 && (
  44. <div className="hidden h-4 w-px bg-semi-color-border md:block" />
  45. )}
  46. </React.Fragment>
  47. ))}
  48. </div>
  49. {/* 分割线 */}
  50. <div className="border-t border-semi-color-border pt-6">
  51. <div className="flex flex-col items-center justify-between gap-4 md:flex-row">
  52. {/* 版权信息 */}
  53. {/*<div className="flex flex-col items-center gap-3 md:flex-row">*/}
  54. {/* <span className="text-sm text-semi-color-text-1">*/}
  55. {/* © {currentYear} {systemName}. {t('版权所有')}*/}
  56. {/* </span>*/}
  57. {/*</div>*/}
  58. {/* 附加信息 */}
  59. {footerInfo && (
  60. <div
  61. className="text-center text-sm text-semi-color-text-2 md:text-right"
  62. dangerouslySetInnerHTML={{ __html: footerInfo }}
  63. />
  64. )}
  65. </div>
  66. </div>
  67. </div>
  68. </footer>
  69. );
  70. };
  71. export default HomePageFooter;