|
@@ -1,7 +1,7 @@
|
|
|
import React, { useEffect, useState } from 'react';
|
|
import React, { useEffect, useState } from 'react';
|
|
|
|
|
|
|
|
import { getFooterHTML, getSystemName } from '../helpers';
|
|
import { getFooterHTML, getSystemName } from '../helpers';
|
|
|
-import { Layout } from '@douyinfe/semi-ui';
|
|
|
|
|
|
|
+import { Layout, Tooltip } from '@douyinfe/semi-ui';
|
|
|
|
|
|
|
|
const Footer = () => {
|
|
const Footer = () => {
|
|
|
const systemName = getSystemName();
|
|
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(() => {
|
|
useEffect(() => {
|
|
|
const timer = setInterval(() => {
|
|
const timer = setInterval(() => {
|
|
|
if (remainCheckTimes <= 0) {
|
|
if (remainCheckTimes <= 0) {
|
|
@@ -31,41 +59,14 @@ const Footer = () => {
|
|
|
<Layout>
|
|
<Layout>
|
|
|
<Layout.Content style={{ textAlign: 'center' }}>
|
|
<Layout.Content style={{ textAlign: 'center' }}>
|
|
|
{footer ? (
|
|
{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.Content>
|
|
|
</Layout>
|
|
</Layout>
|