From a8dc28f727e9f8fdf873039c58edc45b56535946 Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Thu, 23 Mar 2023 03:38:40 +0000 Subject: [PATCH] fix: #2 use shift+enter to wrap lines when submit key is enter --- README.md | 8 ++++++-- app/components/home.tsx | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 23dce25b9a5..8282439eacd 100644 --- a/README.md +++ b/README.md @@ -49,12 +49,16 @@ One-Click to deploy your own ChatGPT web UI. [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FYidadaa%2FChatGPT-Next-Web&env=OPENAI_API_KEY&project-name=chatgpt-next-web&repository-name=ChatGPT-Next-Web); 3. Enjoy :) -## 保持更新 Update +## 保持更新 Keep Updated -本项目会持续更新,如果你想让代码库总是保持更新,可以查看 [Github 的文档](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) 了解如何让 fork 的项目与上游代码同步,建议定期进行同步操作。 +本项目会持续更新,如果你想让代码库总是保持更新,可以查看 [Github 的文档](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) 了解如何让 fork 的项目与上游代码同步,建议定期进行同步操作以获得新功能。 + +你可以 star/watch 本项目或者 follow 作者来及时获得新功能更新通知。 This project will be continuously maintained. If you want to keep the code repository up to date, you can check out the [Github documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) to learn how to synchronize a forked project with upstream code. It is recommended to perform synchronization operations regularly. +You can star or watch this project or follow author to get release notifictions in time. + ## 开发 Development 点击下方按钮,开始二次开发: diff --git a/app/components/home.tsx b/app/components/home.tsx index 188374f2448..ad832d5b8e9 100644 --- a/app/components/home.tsx +++ b/app/components/home.tsx @@ -129,7 +129,10 @@ function useSubmitHandler() { (config.submitKey === SubmitKey.AltEnter && e.altKey) || (config.submitKey === SubmitKey.CtrlEnter && e.ctrlKey) || (config.submitKey === SubmitKey.ShiftEnter && e.shiftKey) || - config.submitKey === SubmitKey.Enter + (config.submitKey === SubmitKey.Enter && + !e.altKey && + !e.ctrlKey && + !e.shiftKey) ); };