Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ef32958f
authored
May 26, 2025
by
Apple\Apple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🔖
chore: Preparation modifications before the merger
parent
9c67bf12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
web/src/components/ChannelsTable.js
+8
-1
web/src/pages/Playground/Playground.js
+7
-1
No files found.
web/src/components/ChannelsTable.js
View file @
ef32958f
...
@@ -921,9 +921,13 @@ const ChannelsTable = () => {
...
@@ -921,9 +921,13 @@ const ChannelsTable = () => {
const
localIdSort
=
localStorage
.
getItem
(
'id-sort'
)
===
'true'
;
const
localIdSort
=
localStorage
.
getItem
(
'id-sort'
)
===
'true'
;
const
localPageSize
=
const
localPageSize
=
parseInt
(
localStorage
.
getItem
(
'page-size'
))
||
ITEMS_PER_PAGE
;
parseInt
(
localStorage
.
getItem
(
'page-size'
))
||
ITEMS_PER_PAGE
;
const
localEnableTagMode
=
localStorage
.
getItem
(
'enable-tag-mode'
)
===
'true'
;
const
localEnableBatchDelete
=
localStorage
.
getItem
(
'enable-batch-delete'
)
===
'true'
;
setIdSort
(
localIdSort
);
setIdSort
(
localIdSort
);
setPageSize
(
localPageSize
);
setPageSize
(
localPageSize
);
loadChannels
(
0
,
localPageSize
,
localIdSort
,
enableTagMode
)
setEnableTagMode
(
localEnableTagMode
);
setEnableBatchDelete
(
localEnableBatchDelete
);
loadChannels
(
0
,
localPageSize
,
localIdSort
,
localEnableTagMode
)
.
then
()
.
then
()
.
catch
((
reason
)
=>
{
.
catch
((
reason
)
=>
{
showError
(
reason
);
showError
(
reason
);
...
@@ -1492,7 +1496,9 @@ const ChannelsTable = () => {
...
@@ -1492,7 +1496,9 @@ const ChannelsTable = () => {
{
t
(
'开启批量操作'
)}
{
t
(
'开启批量操作'
)}
<
/Typography.Text
>
<
/Typography.Text
>
<
Switch
<
Switch
checked
=
{
enableBatchDelete
}
onChange
=
{(
v
)
=>
{
onChange
=
{(
v
)
=>
{
localStorage
.
setItem
(
'enable-batch-delete'
,
v
+
''
);
setEnableBatchDelete
(
v
);
setEnableBatchDelete
(
v
);
}}
}}
/
>
/
>
...
@@ -1505,6 +1511,7 @@ const ChannelsTable = () => {
...
@@ -1505,6 +1511,7 @@ const ChannelsTable = () => {
<
Switch
<
Switch
checked
=
{
enableTagMode
}
checked
=
{
enableTagMode
}
onChange
=
{(
v
)
=>
{
onChange
=
{(
v
)
=>
{
localStorage
.
setItem
(
'enable-tag-mode'
,
v
+
''
);
setEnableTagMode
(
v
);
setEnableTagMode
(
v
);
loadChannels
(
0
,
pageSize
,
idSort
,
v
);
loadChannels
(
0
,
pageSize
,
idSort
,
v
);
}}
}}
...
...
web/src/pages/Playground/Playground.js
View file @
ef32958f
...
@@ -83,8 +83,9 @@ const Playground = () => {
...
@@ -83,8 +83,9 @@ const Playground = () => {
},
},
];
];
const
defaultModel
=
'deepseek-r1'
;
const
[
inputs
,
setInputs
]
=
useState
({
const
[
inputs
,
setInputs
]
=
useState
({
model
:
'deepseek-r1'
,
model
:
defaultModel
,
group
:
''
,
group
:
''
,
max_tokens
:
0
,
max_tokens
:
0
,
temperature
:
0
,
temperature
:
0
,
...
@@ -126,6 +127,11 @@ const Playground = () => {
...
@@ -126,6 +127,11 @@ const Playground = () => {
value
:
model
,
value
:
model
,
}));
}));
setModels
(
localModelOptions
);
setModels
(
localModelOptions
);
// if default model is not in the list, set the first one as default
const
hasDefault
=
localModelOptions
.
some
(
option
=>
option
.
value
===
defaultModel
);
if
(
!
hasDefault
&&
localModelOptions
.
length
>
0
)
{
setInputs
((
inputs
)
=>
({
...
inputs
,
model
:
localModelOptions
[
0
].
value
}));
}
}
else
{
}
else
{
showError
(
t
(
message
));
showError
(
t
(
message
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment