mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 00:15:38 +08:00
fix: 兼容不同浏览器的input range兼容
This commit is contained in:
@@ -32,6 +32,7 @@ import { UPDATE_URL } from "../constant";
|
||||
import { SearchService, usePromptStore } from "../store/prompt";
|
||||
import { requestUsage } from "../requests";
|
||||
import { ErrorBoundary } from "./error";
|
||||
import { InputRange } from "./input-range";
|
||||
|
||||
function SettingItem(props: {
|
||||
title: string;
|
||||
@@ -274,8 +275,7 @@ export function Settings(props: { closeSettings: () => void }) {
|
||||
title={Locale.Settings.FontSize.Title}
|
||||
subTitle={Locale.Settings.FontSize.SubTitle}
|
||||
>
|
||||
<input
|
||||
type="range"
|
||||
<InputRange
|
||||
title={`${config.fontSize ?? 14}px`}
|
||||
value={config.fontSize}
|
||||
min="12"
|
||||
@@ -287,7 +287,7 @@ export function Settings(props: { closeSettings: () => void }) {
|
||||
(config.fontSize = Number.parseInt(e.currentTarget.value)),
|
||||
)
|
||||
}
|
||||
></input>
|
||||
></InputRange>
|
||||
</SettingItem>
|
||||
|
||||
<SettingItem title={Locale.Settings.TightBorder}>
|
||||
@@ -407,8 +407,7 @@ export function Settings(props: { closeSettings: () => void }) {
|
||||
title={Locale.Settings.HistoryCount.Title}
|
||||
subTitle={Locale.Settings.HistoryCount.SubTitle}
|
||||
>
|
||||
<input
|
||||
type="range"
|
||||
<InputRange
|
||||
title={config.historyMessageCount.toString()}
|
||||
value={config.historyMessageCount}
|
||||
min="0"
|
||||
@@ -420,7 +419,7 @@ export function Settings(props: { closeSettings: () => void }) {
|
||||
(config.historyMessageCount = e.target.valueAsNumber),
|
||||
)
|
||||
}
|
||||
></input>
|
||||
></InputRange>
|
||||
</SettingItem>
|
||||
|
||||
<SettingItem
|
||||
@@ -467,8 +466,7 @@ export function Settings(props: { closeSettings: () => void }) {
|
||||
title={Locale.Settings.Temperature.Title}
|
||||
subTitle={Locale.Settings.Temperature.SubTitle}
|
||||
>
|
||||
<input
|
||||
type="range"
|
||||
<InputRange
|
||||
value={config.modelConfig.temperature?.toFixed(1)}
|
||||
min="0"
|
||||
max="2"
|
||||
@@ -482,7 +480,7 @@ export function Settings(props: { closeSettings: () => void }) {
|
||||
)),
|
||||
);
|
||||
}}
|
||||
></input>
|
||||
></InputRange>
|
||||
</SettingItem>
|
||||
<SettingItem
|
||||
title={Locale.Settings.MaxTokens.Title}
|
||||
@@ -508,8 +506,7 @@ export function Settings(props: { closeSettings: () => void }) {
|
||||
title={Locale.Settings.PresencePenlty.Title}
|
||||
subTitle={Locale.Settings.PresencePenlty.SubTitle}
|
||||
>
|
||||
<input
|
||||
type="range"
|
||||
<InputRange
|
||||
value={config.modelConfig.presence_penalty?.toFixed(1)}
|
||||
min="-2"
|
||||
max="2"
|
||||
@@ -523,7 +520,7 @@ export function Settings(props: { closeSettings: () => void }) {
|
||||
)),
|
||||
);
|
||||
}}
|
||||
></input>
|
||||
></InputRange>
|
||||
</SettingItem>
|
||||
</List>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user