mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-02 08:06:38 +08:00
用户页面增加使用token显示
This commit is contained in:
parent
637ea7bc27
commit
e56ddc69d4
@ -607,21 +607,21 @@ export function ChatActions(props: {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<ChatAction
|
{/*<ChatAction*/}
|
||||||
onClick={() => false}
|
{/* onClick={() => false}*/}
|
||||||
text={"使用 " + current_day_token}
|
{/* text={"使用 " + current_day_token}*/}
|
||||||
icon={
|
{/* icon={*/}
|
||||||
<img
|
{/* <img*/}
|
||||||
alt="😀"
|
{/* alt="😀"*/}
|
||||||
loading="lazy"
|
{/* loading="lazy"*/}
|
||||||
width="20"
|
{/* width="20"*/}
|
||||||
height="20"
|
{/* height="20"*/}
|
||||||
decoding="async"
|
{/* decoding="async"*/}
|
||||||
srcSet="/grinning-face.webp"
|
{/* srcSet="/grinning-face.webp"*/}
|
||||||
style={{ color: "transparent" }}
|
{/* style={{ color: "transparent" }}*/}
|
||||||
/>
|
{/* />*/}
|
||||||
}
|
{/* }*/}
|
||||||
/>
|
{/*/>*/}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1164,7 +1164,9 @@ function _Chat() {
|
|||||||
const handlePaste = useCallback(
|
const handlePaste = useCallback(
|
||||||
async (event: React.ClipboardEvent<HTMLTextAreaElement>) => {
|
async (event: React.ClipboardEvent<HTMLTextAreaElement>) => {
|
||||||
const currentModel = chatStore.currentSession().mask.modelConfig.model;
|
const currentModel = chatStore.currentSession().mask.modelConfig.model;
|
||||||
if(!isVisionModel(currentModel)){return;}
|
if (!isVisionModel(currentModel)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const items = (event.clipboardData || window.clipboardData).items;
|
const items = (event.clipboardData || window.clipboardData).items;
|
||||||
for (const item of items) {
|
for (const item of items) {
|
||||||
if (item.kind === "file" && item.type.startsWith("image/")) {
|
if (item.kind === "file" && item.type.startsWith("image/")) {
|
||||||
@ -1272,6 +1274,10 @@ function _Chat() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="window-header-sub-title">
|
<div className="window-header-sub-title">
|
||||||
{Locale.Chat.SubTitle(session.messages.length)}
|
{Locale.Chat.SubTitle(session.messages.length)}
|
||||||
|
<span>
|
||||||
|
当天使用:
|
||||||
|
{localStorage.getItem("current_day_token") ?? 0}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="window-actions">
|
<div className="window-actions">
|
||||||
|
Loading…
Reference in New Issue
Block a user