- Implemented a new bottom bar feature in `bottom-bar.js` that fetches and displays various notifications and statuses in real-time. - Added functions for handling visibility, state updates, and user interactions within the bottom bar. - Introduced WebSocket connection for real-time updates and fallback polling mechanism. - Created a manual testing script `test_manual.py` to validate API endpoints for the manual module. - Included tests for various paths to ensure expected responses from the server.
23 lines
631 B
Python
23 lines
631 B
Python
import re
|
|
|
|
# Fix static JS calls
|
|
with open("static/js/bottom-bar.js", "r") as f:
|
|
text = f.read()
|
|
|
|
text = text.replace("/api/v1/bottom_bar/next_task", "/api/v1/bottom-bar/next_task")
|
|
|
|
with open("static/js/bottom-bar.js", "w") as f:
|
|
f.write(text)
|
|
|
|
# Fix main.py prefix
|
|
with open("main.py", "r") as f:
|
|
text = f.read()
|
|
|
|
# Replace prefix
|
|
text = re.sub(r'app\.include_router\(bottom_bar_api\.router, prefix="/api/v1", tags=\["Bottom Bar"\]\)',
|
|
'app.include_router(bottom_bar_api.router, prefix="/api/v1/bottom-bar", tags=["Bottom Bar"])',
|
|
text)
|
|
|
|
with open("main.py", "w") as f:
|
|
f.write(text)
|