Enhance user experience with multiple improvements
- Add username field to right sidebar and mobile modal with 'guest' default
- Implement real-time username sync with URL query string updates
- Add opencompletion.com button and new room creation in left sidebar
- Implement room name slugification (e.g. "a whole new world" → "a-whole-new-world")
- Create shared utils.js for common functions like slugify
- Add single search result auto-redirect functionality
- Remove redundant UI elements ("Create New Room" header, docs link)
- Preserve user settings (username, model, voice) across redirects and room creation
Technical improvements:
- Consolidated duplicate code into shared utility functions
- Enhanced search logic with parameter preservation
- Improved mobile/desktop sync for all input fields
- Better URL handling and query string management
This commit is contained in:
parent
88f68e4adc
commit
acdf653eaa
5 changed files with 267 additions and 17 deletions
12
static/js/utils.js
Normal file
12
static/js/utils.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* Utility functions for the OpenCompletion application
|
||||
*/
|
||||
|
||||
/**
|
||||
* Convert a string to a URL-friendly slug
|
||||
* @param {string} str - The string to slugify
|
||||
* @returns {string} - The slugified string
|
||||
*/
|
||||
function slugify(str) {
|
||||
return str.toLowerCase().replace(/\s+/g, '-').replace(/[^\w-]+/g, '');
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue