修改版权信息

This commit is contained in:
1808837298@qq.com
2024-05-24 21:27:13 +08:00
parent 54f17d6002
commit 1291504fdc
3 changed files with 53 additions and 39 deletions

View File

@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import { getFooterHTML, getSystemName } from '../helpers';
import { Layout } from '@douyinfe/semi-ui';
import { Layout, Tooltip } from '@douyinfe/semi-ui';
const Footer = () => {
const systemName = getSystemName();
@@ -15,6 +15,34 @@ const Footer = () => {
}
};
const defaultFooter = (
<div className='custom-footer'>
<a
href='https://github.com/Calcium-Ion/new-api'
target='_blank'
rel='noreferrer'
>
New API {import.meta.env.VITE_REACT_APP_VERSION}{' '}
</a>
{' '}
<a
href='https://github.com/Calcium-Ion'
target='_blank'
rel='noreferrer'
>
Calcium-Ion
</a>{' '}
开发基于{' '}
<a
href='https://github.com/songquanpeng/one-api'
target='_blank'
rel='noreferrer'
>
One API
</a>
</div>
);
useEffect(() => {
const timer = setInterval(() => {
if (remainCheckTimes <= 0) {
@@ -31,41 +59,14 @@ const Footer = () => {
<Layout>
<Layout.Content style={{ textAlign: 'center' }}>
{footer ? (
<div
className='custom-footer'
dangerouslySetInnerHTML={{ __html: footer }}
></div>
<Tooltip content={defaultFooter}>
<div
className='custom-footer'
dangerouslySetInnerHTML={{ __html: footer }}
></div>
</Tooltip>
) : (
<div className='custom-footer'>
<a
href='https://github.com/Calcium-Ion/new-api'
target='_blank'
rel='noreferrer'
>
New API {import.meta.env.VITE_REACT_APP_VERSION}{' '}
</a>
{' '}
<a
href='https://github.com/Calcium-Ion'
target='_blank'
rel='noreferrer'
>
Calcium-Ion
</a>{' '}
开发基于{' '}
<a
href='https://github.com/songquanpeng/one-api'
target='_blank'
rel='noreferrer'
>
One API v0.5.4
</a>{' '}
本项目根据{' '}
<a href='https://opensource.org/licenses/mit-license.php'>
MIT 许可证
</a>{' '}
授权
</div>
defaultFooter
)}
</Layout.Content>
</Layout>