anse-app / chatgpt-demo

Minimal web UI for ChatGPT.
https://chatgpt.ddiu.me
MIT License
8.01k stars 3.81k forks source link

feat: add stick-to-bottom button and instant scroll function #350

Closed CNSeniorious000 closed 1 year ago

CNSeniorious000 commented 1 year ago

Description

This PR adds a "stick-to-bottom" feature to the Generator component, as well as an instant scroll function to quickly scroll to the bottom of the page. The feature can be turned on/off using a button, and its status is saved in local storage. An event listener is also added to automatically turn off the feature when the user scrolls up. Additionally, the handleBeforeUnload function is updated to save the feature's status. Here is its commit message:

Linked Issues

This PR addresses the following issue: #344

Additional context

In addition to the above changes, I have also added a style for the stick-to-bottom button in unocss.config.ts, based on my understanding of the project's style. Please review this change as well.

Please focus on the implementation of the "stick-to-bottom" feature and the instant scroll function. Thank you for your review!

netlify[bot] commented 1 year ago

Deploy Preview for chatgpt-api-demo ready!

Name Link
Latest commit 7dc3df22ec16d1bbaf652ee1de22af6f720fc01d
Latest deploy log https://app.netlify.com/sites/chatgpt-api-demo/deploys/642ef0dde180c60008b94ee7
Deploy Preview https://deploy-preview-350--chatgpt-api-demo.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

vercel[bot] commented 1 year ago

@CNSeniorious000 is attempting to deploy a commit to the ddiu8081's Team Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
chatgpt-demo βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Apr 6, 2023 4:24pm