up static routes
This commit is contained in:
parent
9cca0e4998
commit
1048f4af45
14 changed files with 2959 additions and 1076 deletions
|
@ -93,17 +93,36 @@ The traffic jam reporting page (`/demo/traffic`) provides a specialized form for
|
|||
|
||||
#### OpenStreetMap Authentication
|
||||
|
||||
The traffic jam reporting page includes OAuth2 authentication with OpenStreetMap:
|
||||
All demo pages include OAuth2 authentication with OpenStreetMap:
|
||||
|
||||
- Users can authenticate with their OpenStreetMap account
|
||||
- Users can authenticate with their OpenStreetMap account on any demo page
|
||||
- Authentication state is shared across all demo pages using localStorage
|
||||
- After authentication, the user's OSM username and a link to their profile are displayed
|
||||
- When submitting a traffic jam report, the OSM username is included in the event properties as `reporter:osm`
|
||||
- When submitting reports or creating events, the OSM username is included in the event properties as `reporter:osm`
|
||||
- OAuth2 configuration parameters are stored in the `.env` file:
|
||||
- `CLIENT_ID`: The OAuth2 client ID for the application
|
||||
- `CLIENT_SECRET`: The OAuth2 client secret for the application
|
||||
- `CLIENT_AUTORIZATIONS`: The permissions requested (default: "read_prefs")
|
||||
- `CLIENT_REDIRECT`: The redirect URL after authentication
|
||||
|
||||
#### Common Styling
|
||||
|
||||
All demo pages share a common CSS style for consistent look and feel:
|
||||
|
||||
- Common CSS file located at `/static/demo/demo_styles.css`
|
||||
- Improved styling for the OpenStreetMap login button
|
||||
- Consistent styling for forms, buttons, and other UI elements
|
||||
- Responsive design for better mobile experience
|
||||
|
||||
#### JavaScript Modules
|
||||
|
||||
The demo pages use JavaScript modules for shared functionality:
|
||||
|
||||
- Authentication module located at `/static/demo/demo_auth.js`
|
||||
- Handles OAuth2 authentication flow with OpenStreetMap
|
||||
- Stores and retrieves authentication information in localStorage
|
||||
- Provides methods for checking authentication status and getting user information
|
||||
|
||||
## Future Improvements
|
||||
|
||||
Potential future improvements for the demo pages:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue