Skip to main content

v3.4.0

  1. Replaced vars.users with Context API users, and reworked UserCard component, thus:
    • Supported user data update sync across components (real-time update)
    • Supported user data cache for faster data display (user profile popover)
    • Improved performance with reduced API calls
    • Removed unnecessary logic to further improve performance
  2. Replaced vars.members with Context API memberUIDs, thus:
    • Reduced memory consumption
    • Supported member info changes across pages (Role updates will be reflected in "Members" tab without needing to refresh the page)
    • Supported background loading of members list, reducing the time at initial loading screen
      (It will load at background and automatically fill relevant data where necessary)
  3. Replaced vars.userInfo with Context API curUser, also added optimization to prevent unnecessary re-renders when users change while ensuring curUser is updated when it is changed using setUsers
  4. Replaced vars.userPerm with Context API curUserPerm, also added automatic curUserPerm re-calculation with the roles of users[curUID] when users[curUID] changes
  5. Added permissions display next to roles in profile popover
  6. Removed vars.userDivisionIDs and made it calculate when needed (only needed in delivery tab)
  7. Removed vars.isLoggedIn to use curUID ?= NULL to determine whether user is logged in
  8. Removed vars.userStats to get real-time userDrivenDistance in challenge tab on tab load
  9. Replaced vars.economy* with Context API economyCache
  10. Replaced vars.userSettings with Context API AppContext.userSettings and ThemeContext.themeSettings, thus:
    • Supported real-time reflection of settings updates
    • Improved handling of theme update
  11. Replaced vars.dlogDetails with Context API dlogDetailsCache, also supported background loading
  12. Replaced vars.userBanner with Context API curUserBanner
  13. Replaced vars.apiconfig with Context API apiConfig
  14. Replaced vars.dhconfig with Context API webConfig, also supported real-time reflection of web config update
  15. Replaced vars.allUsers with Context API allUsersCache which is currently only used to purge inactive users
  16. Replaced vars.divisions with Context API divisions
  17. Replaced vars.applicationTypes with Context API applicationTypes
  18. Replaced vars.announcementTypes with Context API announcementTypes
  19. Updated detection mechanism of "page changed" to prevent wrong triggers due to Context API
  20. Moved loading of applicationTypes and divisions to "before needed" rather than "on page load"
  21. Replaced vars.languages with Context API languages, also supported background loading for supported languages
  22. Replaced vars.roles with Context API allRoles, also removed vars.orderedRoles which is to be calculated in UserCard
  23. Replaced vars.perms with Context API allPerms
  24. Replaced vars.ranks with Context API allRanks
  25. Replaced vars.dhpath with Context API apiPath
  26. Replaced vars.host with window.dhhost (Context API was not used because this variable is mostly static and is defined locally on initial load)
  27. Replaced vars.apiversion with Context API apiVersion
  28. Replaced vars.dhlogo with Context API vtcLogo
  29. Replaced vars.dhbanner with Context API vtcBanner
  30. Replaced vars.dhvtcbg with Context API vtcBackground
  31. Replaced vars.dhcustombg with Context API customBackground
  32. Replaced vars.specialRoles and vars.specialRolesMap with Context API specialRoles and specialUsers
  33. Replaced vars.patrons and vars.userPatreonID with Context API patrons and curUserPatreonID
  34. Replaced vars.userConfig with Context API userConfig
  35. Replaced vars.vtc|userLevel with Context API vtc|userLevel