This pull request introduces an update notification feature for the application. The main changes include adding a new widget to the client-side, creating a server-side update checker, and integrating it with the existing system.
Client-side changes:
client/src/app.tsx: Imported and added the UpdateAvailableWidget to the header components. [1][2]
This pull request introduces an update notification feature for the application. The main changes include adding a new widget to the client-side, creating a server-side update checker, and integrating it with the existing system.
Client-side changes:
client/src/app.tsx
: Imported and added theUpdateAvailableWidget
to the header components. [1] [2]client/src/components/HeaderComponents/UpdateAvailableWidget.tsx
: Created a new widget to display update notifications usingPopover
,Badge
, andAvatar
components.client/src/components/Icons/CustomIcons.tsx
: Added a newUpdateLine
icon for the update widget.Server-side changes:
server/src/controllers/rest/user/user.ts
: Updated thegetCurrentUser
function to include theupdateAvailable
field. [1] [2] [3]server/src/core/startup/index.ts
: Integrated theUpdateChecker
to run during the server startup. [1] [2]server/src/data/cache/defaults/index.ts
: Added a default value for theUPDATE_AVAILABLE
key in the Redis cache.server/src/modules/crons/index.ts
: Added a cron job to periodically check for updates. [1] [2]server/src/modules/update/UpdateChecker.ts
: Implemented theUpdateChecker
class to fetch the latest version and update the cache.Shared library changes:
shared-lib/src/enums/settings.ts
: AddedUPDATE_AVAILABLE
toGeneralSettingsKeys
andDefaultValue
enums. [1] [2]shared-lib/src/types/api.ts
: Updated theSettings
type to include theupdateAvailable
field.Testing:
server/src/tests/unit-tests/modules/update/UpdateChecker.test.ts
: Added unit tests for theUpdateChecker
module.