[go: up one dir, main page]

Skip to content

Commit

Permalink
完善令牌界面
Browse files Browse the repository at this point in the history
  • Loading branch information
Calcium-Ion committed Oct 31, 2023
1 parent f98dd8d commit 0a945c1
Show file tree
Hide file tree
Showing 7 changed files with 477 additions and 476 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@

# Neko API

> **Note**
> 本项目为开源项目,在[One API](https://github.com/songquanpeng/one-api)的基础上进行二次开发,感谢原作者的无私奉献。
> 使用者必须在遵循 OpenAI 的[使用条款](https://openai.com/policies/terms-of-use)以及**法律法规**的情况下使用,不得用于非法用途。

> **Warning**
> 本项目为个人学习使用,不保证稳定性,且不提供任何技术支持,使用者必须在遵循 OpenAI 的使用条款以及法律法规的情况下使用,不得用于非法用途。
> 根据[《生成式人工智能服务管理暂行办法》](http://www.cac.gov.cn/2023-07/13/c_1690898327029107.htm)的要求,请勿对中国地区公众提供一切未经备案的生成式人工智能服务。
> **Note**
> 最新版Docker镜像 calciumion/neko-api:main
5 changes: 2 additions & 3 deletions web/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#ffffff" />
<meta name="description"
content="Neko API,企业级AI接口调用平台,专为企业级需求打造,提供高性能、高并发、高可用的服务,一站式处理大规模数据和复杂任务。我们的稳定高并发处理能力和高可用性保证您的业务流畅运行,结合OpenAI、Claude、Midjourney等AI接口和专业的技术支持,为您的企业快速部署和实现AI接口应用,释放商业价值"/>
<title>Neko API</title>
content="NekoAPI,企业级AI接口调用平台,专为企业级需求打造,提供高性能、高并发、高可用的服务,一站式处理大规模数据和复杂任务。我们的稳定高并发处理能力和高可用性保证您的业务流畅运行,结合OpenAI、Claude、Midjourney等AI接口和专业的技术支持,为您的企业快速部署和实现AI接口应用,释放商业价值"/>
<meta name="keywords" content="Neko API,OpenAI,Claude,Midjourney,高并发,高可用,高性能,企业级AI接口调用平台"/>
<title>Neko API</title>
<title>NekoAPI</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
20 changes: 5 additions & 15 deletions web/src/components/LogsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from '@douyinfe/semi-icons';

const {Sider, Content, Header} = Layout;
const { Column } = Table;
const {Column} = Table;


function renderTimestamp(timestamp) {
Expand Down Expand Up @@ -65,13 +65,13 @@ const LogsTable = () => {
{
title: '渠道',
dataIndex: 'channel',
className: isAdmin()?'tableShow':'tableHiddle',
className: isAdmin() ? 'tableShow' : 'tableHiddle',
render: (text, record, index) => {
return (
isAdminUser ?
record.type === 0 || record.type === 2 ?
<div>
{<Tag color={colors[parseInt(text) % 10]} size='large'> {text} </Tag>}
{<Tag color={stringToColor(text)} size='large'> {text} </Tag>}
</div>
:
<></>
Expand All @@ -83,7 +83,7 @@ const LogsTable = () => {
{
title: '用户',
dataIndex: 'username',
className: isAdmin()?'tableShow':'tableHiddle',
className: isAdmin() ? 'tableShow' : 'tableHiddle',
render: (text, record, index) => {
return (
isAdminUser ?
Expand Down Expand Up @@ -291,23 +291,13 @@ const LogsTable = () => {

const pageData = logs.slice((activePage - 1) * ITEMS_PER_PAGE, activePage * ITEMS_PER_PAGE);

// const { activePage }) => {
// (async () => {
// if (activePage === Math.ceil(logs.length / ITEMS_PER_PAGE) + 1) {
// // In this case we have to load more data and then append them.
// await loadLogs(activePage - 1);
// }
// setActivePage(activePage);
// })();
// };
const handlePageChange = page => {
setActivePage(page);
if (page === Math.ceil(logs.length / ITEMS_PER_PAGE) + 1) {
// In this case we have to load more data and then append them.
loadLogs(page - 1).then(r => {
});
}
// setLoading(false);
};

const refresh = async () => {
Expand Down Expand Up @@ -405,7 +395,7 @@ const LogsTable = () => {
</>
}
<Form.Section>
<Button label='操作' type="primary" htmlType="submit" className="btn-margin-right"
<Button label='查询' type="primary" htmlType="submit" className="btn-margin-right"
onClick={refresh}>查询</Button>
</Form.Section>
</>
Expand Down
6 changes: 3 additions & 3 deletions web/src/components/SiderBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ let headerButtons = [
itemKey: 'channel',
to: '/channel',
icon: <IconLayers/>,
admin: true
className: isAdmin()?'semi-navigation-item-normal':'tableHiddle',
},

{
Expand All @@ -48,7 +48,7 @@ let headerButtons = [
itemKey: 'redemption',
to: '/redemption',
icon: <IconGift/>,
admin: true
className: isAdmin()?'semi-navigation-item-normal':'tableHiddle',
},
{
text: '钱包',
Expand All @@ -61,7 +61,7 @@ let headerButtons = [
itemKey: 'user',
to: '/user',
icon: <IconUser/>,
admin: true
className: isAdmin()?'semi-navigation-item-normal':'tableHiddle',
},
{
text: '日志',
Expand Down
Loading

0 comments on commit 0a945c1

Please sign in to comment.