diff --git a/app/components/button.tsx b/app/components/button.tsx index c6039acc292..87b4abd30f9 100644 --- a/app/components/button.tsx +++ b/app/components/button.tsx @@ -18,6 +18,7 @@ export function IconButton(props: { tabIndex?: number; autoFocus?: boolean; style?: CSSProperties; + aria?: string; }) { return ( ); diff --git a/app/components/chat.tsx b/app/components/chat.tsx index e4ba869c3bf..b18c86708a7 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -1337,6 +1337,8 @@ function _Chat() { } bordered + title={Locale.Chat.EditMessage.Title} + aria={Locale.Chat.EditMessage.Title} onClick={() => setIsEditingMessage(true)} /> @@ -1356,6 +1358,8 @@ function _Chat() { : } bordered + title={Locale.Chat.Actions.FullScreen} + aria={Locale.Chat.Actions.FullScreen} onClick={() => { config.update( (config) => (config.tightBorder = !config.tightBorder), @@ -1407,6 +1411,7 @@ function _Chat() {
} + aria={Locale.Chat.Actions.Edit} onClick={async () => { const newMessage = await showPrompt( Locale.Chat.Actions.Edit, diff --git a/app/components/input-range.tsx b/app/components/input-range.tsx index a8ee9532b38..08756e2c8d8 100644 --- a/app/components/input-range.tsx +++ b/app/components/input-range.tsx @@ -9,6 +9,7 @@ interface InputRangeProps { min: string; max: string; step: string; + aria: string; } export function InputRange({ @@ -19,11 +20,13 @@ export function InputRange({ min, max, step, + aria, }: InputRangeProps) { return (
{title || value} setShowPicker(false)} >
setShowPicker(true)} style={{ cursor: "pointer" }} > @@ -139,6 +141,7 @@ export function MaskConfig(props: { @@ -153,6 +156,7 @@ export function MaskConfig(props: { subTitle={Locale.Mask.Config.HideContext.SubTitle} > { @@ -169,6 +173,7 @@ export function MaskConfig(props: { subTitle={Locale.Mask.Config.Share.SubTitle} > } text={Locale.Mask.Config.Share.Action} onClick={copyMaskLink} @@ -182,6 +187,7 @@ export function MaskConfig(props: { subTitle={Locale.Mask.Config.Sync.SubTitle} > { diff --git a/app/components/model-config.tsx b/app/components/model-config.tsx index 346fd3a7129..6ce25f6642c 100644 --- a/app/components/model-config.tsx +++ b/app/components/model-config.tsx @@ -17,6 +17,7 @@ export function ModelConfigList(props: { <> @@ -159,6 +166,7 @@ export function ModelConfigList(props: { subTitle={Locale.Settings.InputTemplate.SubTitle} > @@ -175,6 +183,7 @@ export function ModelConfigList(props: { subTitle={Locale.Settings.HistoryCount.SubTitle} > diff --git a/app/components/sd/sd-panel.tsx b/app/components/sd/sd-panel.tsx index c27fbd54e2c..a71e560ddef 100644 --- a/app/components/sd/sd-panel.tsx +++ b/app/components/sd/sd-panel.tsx @@ -192,6 +192,7 @@ export function ControlParam(props: { required={item.required} > : } bordered onClick={() => { diff --git a/app/components/settings.tsx b/app/components/settings.tsx index 71fd2d8398e..ca0a5a18796 100644 --- a/app/components/settings.tsx +++ b/app/components/settings.tsx @@ -246,6 +246,7 @@ function DangerItems() { subTitle={Locale.Settings.Danger.Reset.SubTitle} > { if (await showConfirm(Locale.Settings.Danger.Reset.Confirm)) { @@ -260,6 +261,7 @@ function DangerItems() { subTitle={Locale.Settings.Danger.Clear.SubTitle} > { if (await showConfirm(Locale.Settings.Danger.Clear.Confirm)) { @@ -513,6 +515,7 @@ function SyncItems() { >
} text={Locale.UI.Config} onClick={() => { @@ -543,6 +546,7 @@ function SyncItems() { >
} text={Locale.UI.Export} onClick={() => { @@ -550,6 +554,7 @@ function SyncItems() { }} /> } text={Locale.UI.Import} onClick={() => { @@ -687,6 +692,7 @@ export function Settings() { subTitle={Locale.Settings.Access.CustomEndpoint.SubTitle} > @@ -706,6 +712,7 @@ export function Settings() { subTitle={Locale.Settings.Access.OpenAI.Endpoint.SubTitle} >
} onClick={() => navigate(Path.Home)} bordered @@ -1267,6 +1304,8 @@ export function Settings() { open={showEmojiPicker} >
{ setShowEmojiPicker(!showEmojiPicker); @@ -1304,6 +1343,7 @@ export function Settings() { { updateConfig( @@ -1339,6 +1380,7 @@ export function Settings() { @@ -1408,6 +1453,7 @@ export function Settings() { subTitle={Locale.Settings.SendPreviewBubble.SubTitle} > @@ -1428,6 +1474,7 @@ export function Settings() { subTitle={Locale.Settings.Mask.Splash.SubTitle} > @@ -1445,6 +1492,7 @@ export function Settings() { subTitle={Locale.Settings.Mask.Builtin.SubTitle} > @@ -1463,6 +1511,7 @@ export function Settings() { subTitle={Locale.Settings.Prompt.Disable.SubTitle} > @@ -1482,6 +1531,7 @@ export function Settings() { )} > } text={Locale.Settings.Prompt.Edit} onClick={() => setShowPromptModal(true)} @@ -1503,6 +1553,7 @@ export function Settings() { subTitle={Locale.Settings.Access.Provider.SubTitle} >
- } shadow /> + } + shadow + />
diff --git a/app/components/ui-lib.tsx b/app/components/ui-lib.tsx index fc374bb3db4..fd78f9c4765 100644 --- a/app/components/ui-lib.tsx +++ b/app/components/ui-lib.tsx @@ -265,9 +265,10 @@ export function Input(props: InputProps) { ); } -export function PasswordInput(props: HTMLProps) { +export function PasswordInput( + props: HTMLProps & { aria?: string }, +) { const [visible, setVisible] = useState(false); - function changeVisibility() { setVisible(!visible); } @@ -275,6 +276,7 @@ export function PasswordInput(props: HTMLProps) { return (
: } onClick={changeVisibility} className={"password-eye"} diff --git a/app/constant.ts b/app/constant.ts index aa207718c18..d21f18f5a37 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -243,6 +243,7 @@ export const KnowledgeCutOffDate: Record = { "gpt-4-turbo-preview": "2023-12", "gpt-4o": "2023-10", "gpt-4o-2024-05-13": "2023-10", + "gpt-4o-2024-08-06": "2023-10", "gpt-4o-mini": "2023-10", "gpt-4o-mini-2024-07-18": "2023-10", "gpt-4-vision-preview": "2023-04", @@ -264,6 +265,7 @@ const openaiModels = [ "gpt-4-turbo-preview", "gpt-4o", "gpt-4o-2024-05-13", + "gpt-4o-2024-08-06", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4-vision-preview", diff --git a/app/locales/cn.ts b/app/locales/cn.ts index 4f47403abe2..02b3a9d403a 100644 --- a/app/locales/cn.ts +++ b/app/locales/cn.ts @@ -42,6 +42,7 @@ const cn = { PinToastAction: "查看", Delete: "删除", Edit: "编辑", + FullScreen: "全屏", }, Commands: { new: "新建聊天", @@ -132,6 +133,7 @@ const cn = { Settings: { Title: "设置", SubTitle: "所有设置选项", + ShowPassword: "显示密码", Danger: { Reset: { diff --git a/app/locales/en.ts b/app/locales/en.ts index ac788032979..6cca963a959 100644 --- a/app/locales/en.ts +++ b/app/locales/en.ts @@ -44,6 +44,7 @@ const en: LocaleType = { PinToastAction: "View", Delete: "Delete", Edit: "Edit", + FullScreen: "FullScreen", }, Commands: { new: "Start a new chat", @@ -135,6 +136,7 @@ const en: LocaleType = { Settings: { Title: "Settings", SubTitle: "All Settings", + ShowPassword: "ShowPassword", Danger: { Reset: { Title: "Reset All Settings",