Skip to main content
v3.4.0
- 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
- 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)
- 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
- Replaced
vars.userPerm
with Context API curUserPerm
, also added automatic curUserPerm
re-calculation with the roles of users[curUID]
when users[curUID]
changes
- Added permissions display next to roles in profile popover
- Removed
vars.userDivisionIDs
and made it calculate when needed (only needed in delivery tab)
- Removed
vars.isLoggedIn
to use curUID ?= NULL
to determine whether user is logged in
- Removed
vars.userStats
to get real-time userDrivenDistance
in challenge tab on tab load
- Replaced
vars.economy*
with Context API economyCache
- Replaced
vars.userSettings
with Context API AppContext.userSettings
and ThemeContext.themeSettings
, thus:
- Supported real-time reflection of settings updates
- Improved handling of theme update
- Replaced
vars.dlogDetails
with Context API dlogDetailsCache
, also supported background loading
- Replaced
vars.userBanner
with Context API curUserBanner
- Replaced
vars.apiconfig
with Context API apiConfig
- Replaced
vars.dhconfig
with Context API webConfig
, also supported real-time reflection of web config update
- Replaced
vars.allUsers
with Context API allUsersCache
which is currently only used to purge inactive users
- Replaced
vars.divisions
with Context API divisions
- Replaced
vars.applicationTypes
with Context API applicationTypes
- Replaced
vars.announcementTypes
with Context API announcementTypes
- Updated detection mechanism of "page changed" to prevent wrong triggers due to Context API
- Moved loading of
applicationTypes
and divisions
to "before needed" rather than "on page load"
- Replaced
vars.languages
with Context API languages
, also supported background loading for supported languages
- Replaced
vars.roles
with Context API allRoles
, also removed vars.orderedRoles
which is to be calculated in UserCard
- Replaced
vars.perms
with Context API allPerms
- Replaced
vars.ranks
with Context API allRanks
- Replaced
vars.dhpath
with Context API apiPath
- Replaced
vars.host
with window.dhhost
(Context API was not used because this variable is mostly static and is defined locally on initial load)
- Replaced
vars.apiversion
with Context API apiVersion
- Replaced
vars.dhlogo
with Context API vtcLogo
- Replaced
vars.dhbanner
with Context API vtcBanner
- Replaced
vars.dhvtcbg
with Context API vtcBackground
- Replaced
vars.dhcustombg
with Context API customBackground
- Replaced
vars.specialRoles
and vars.specialRolesMap
with Context API specialRoles
and specialUsers
- Replaced
vars.patrons
and vars.userPatreonID
with Context API patrons
and curUserPatreonID
- Replaced
vars.userConfig
with Context API userConfig
- Replaced
vars.vtc|userLevel
with Context API vtc|userLevel