Skip to content

v1.2.0 - Added session codes

Choose a tag to compare

@BytePhilHD BytePhilHD released this 23 Dec 11:05
· 18 commits to master since this release

This version includes several changes to the SpotifyLink project, focusing on adding session management, improving the user interface, and refactoring the code for better organization and readability. The most important changes are grouped by theme below.

Session Management Improvements:

  • Added sessionCode generation and validation methods in the Main class to manage user sessions. (src/main/de.bytephil/main/Main.java, [1] [2] [3] [4]
  • Updated WebSocket message handling to include session code validation and actions based on user type (ADMIN, USER, FORBIDDEN). (src/main/de.bytephil/main/Main.java, [1] [2] [3] [4] [5]

User Interface Enhancements:

  • Modified admin.html to display and manage session codes, including buttons for sharing and regenerating the session code. (src/main/resources/WebPages/admin.html, [1] [2]
  • Updated adminscript.js to handle session code display and sharing functionality. (src/main/resources/WebPages/assets/script/adminscript.js, [1] [2] [3] [4]

Code Refactoring:

  • Refactored WebSocket message handling in adminscript.js to use a unified data structure for sending actions and content. (src/main/resources/WebPages/assets/script/adminscript.js, src/main/resources/WebPages/assets/script/adminscript.jsL140-R155)
  • Removed redundant code and improved readability in the Main class by consolidating message handling logic. (src/main/de.bytephil/main/Main.java, [1] [2]

New Features:

  • Added a new UserType enum to manage different user roles within the application. (src/main/de.bytephil/enums/UserType.java, src/main/de.bytephil/enums/UserType.javaR1-R5)
  • Introduced a secure random session code generator to enhance session management security. (src/main/de.bytephil/main/Main.java, src/main/de.bytephil/main/Main.javaR300-R326)

Minor Changes:

  • Updated the project version in pom.xml to 1.2.0. (pom.xml, pom.xmlL10-R10)
  • Removed unnecessary imports and print statements to clean up the codebase. (src/main/de.bytephil/main/Main.java, [1] [2]