Commit Graph

54 Commits

Author SHA1 Message Date
Glenn de Haan
c3b36b55a3 Implemented the print.json translation file. Added a new print dialog. Moved /print function to a post request. Updated translation.js debug output. Implemented translator within print.js. Fixed typos. Removed unused utils from email and print components render function 2024-10-13 10:37:26 +02:00
Glenn de Haan
d5c19d021d Removed _locales.json implementation. Added language parameter to mail.js. Implemented regex check to translation.js. Added language dropdown to email component. Added languages.js 2024-10-10 19:36:07 +02:00
Glenn de Haan
1bc459de66 Swapped mail function parameters. Replaced throw errors for log warnings. Implemented fallback language in translation.js. Added express-locale for future web i18n use 2024-10-09 13:48:26 +02:00
Glenn de Haan
1fc446c72d Implemented sort and updated sync button layout 2024-10-09 09:58:13 +02:00
Glenn de Haan
7843a1e35d Implemented filters 2024-10-08 16:55:12 +02:00
Glenn de Haan
ded6547777 Implemented filter and sort selected functions 2024-10-08 15:29:05 +02:00
Glenn de Haan
a0b8520a6f Moved static routes before OIDC to prevent errors due to silent login 2024-10-07 15:51:23 +02:00
Glenn de Haan
f13ed225b3 Moved build info to variables.js. Simplified info.js build readout. Added versions to user dropdown 2024-10-07 11:34:06 +02:00
Glenn de Haan
7fb9956c10 Implemented Git version tag into docker build and GitHub actions. Implemented Release Notes button. Updated Documentation button to directly navigate to the README.md 2024-10-07 10:44:02 +02:00
Glenn de Haan
4418f9c347 Added Login with OIDC button to login page. Made login.ejs dynamic based on enabled authentication services. Made GitHub icon on login.ejs smaller. Refactored authorization.js middleware to support running both internal and OIDC authentication within the same instance. Added extra error to info.js when both authentication services are disabled but authentication itself is enabled. Updated status.js to correctly display both authentication services running at the same time. Updated README.md. Enabled /login when OIDC is enabled. Added missing middleware on /logout. Fixed JWT not initializing when authInternalEnabled is true 2024-10-03 13:56:28 +02:00
Glenn de Haan
3990144f07 Implemented new logout flow utilizing new /oidc/logout endpoints 2024-10-03 10:45:28 +02:00
Glenn de Haan
0dc4562ad8 Implemented the 'AUTH_INTERNAL_ENABLED' and 'AUTH_OIDC_ENABLED' environment variables. Removed complex if structures with 'AUTH_OIDC_ENABLED' checks. Updated README.md 2024-10-03 10:34:54 +02:00
Glenn de Haan
11873f4879 Replaced AUTH_PASSWORD with AUTH_INTERNAL_PASSWORD 2024-09-30 18:53:07 +02:00
Glenn de Haan
d653c124e2 Fixed error on force re-sync when UniFi is unavailable. Implemented check for deprecated environment variables. Implemented check for valid UniFi usernames. Implemented UniFi username check in unifi.js. Added array.js utils 2024-09-30 18:35:52 +02:00
Glenn de Haan
48f8bd3e36 Disabled userIcon for internal authentication 2024-09-24 20:56:46 +02:00
Glenn de Haan
be5f950568 Dependency updates. Fixed dark mode colors in details.ejs & email.ejs. Moved navigation to dedicated navigation.ejs file. Implemented user icon. Implemented user menu. Implemented /logout. Implemented Gravatar icon. Moved documentation and feature icons from menu to user menu 2024-09-24 19:09:28 +02:00
Glenn de Haan
b06a4ede65 Moved request logger to catch OIDC callback request for debugging 2024-09-22 21:48:20 +02:00
Glenn de Haan
73d17cdb3d Fixed missing email error response. Refactored email layout. Implemented voucher details in email layout 2024-09-21 08:09:07 +02:00
Glenn de Haan
8492616737 Created variables.js to replace duplicate code. Moved more cache.js logs to debug level. Fixed incorrect internal authentication state on status page. Updated dependencies. Fixed incorrect type check on /api/voucher/:type for HA users 2024-09-05 20:44:38 +02:00
Glenn de Haan
86ad4457de Moved application startup logs to dedicated info.js module. Lowered log output from unifi.js. Created tag.ejs partial. Implemented dedicated application status page. Updated voucher.ejs to implement status link. Lowered log output from cache.js. General cleanup of server.js. Implemented 501 Not Implemented responses when features are not enabled or configured properly 2024-09-04 18:01:41 +02:00
Glenn de Haan
1cd53e4227 Updated README.md. Reformat some docs. Implemented OIDC configuration verification on application start. Updated auth type check 2024-08-31 20:22:27 +02:00
Glenn de Haan
3c2155346a Migrated README.md images to .docs folder. Moved print logic to own module. Implemented ESC/POS printer support. Added logo_grayscale_dark.png. Replaced PDF logo. Implemented size.js util for dynamic PDF page length. Updated README.md. Updated auth output log with type. Updated print output log with printer ip 2024-08-30 20:56:11 +02:00
Glenn de Haan
3725698c46 Implemented custom express error page 2024-08-26 22:20:47 +02:00
Glenn de Haan
af3322cb7b Updated 'Voucher' log information. Implemented missing custom voucher log output. Implemented PRINTER_TYPE variable to prepare for future printers. Disabled printer function by default. Updated README.md 2024-08-25 10:18:37 +02:00
Glenn de Haan
bfe2d3998d Switched docker build to path based to allow .dockerignore to work. Implemented OIDC support. Updated README.md 2024-08-23 16:42:07 +02:00
Glenn de Haan
89bc27aef0 Fixed missing x-ingress-path within authorization.js redirects. Implemented local/development .options.json config 2024-08-21 21:05:31 +02:00
Glenn de Haan
3ba8d33456 Updated .dockerignore to remove unneeded files from container build. Updated docker-compose.yml with new environment variables. Updated README.md. Updated project description. Replaced DISABLE_AUTH with AUTH_DISABLE. Replaced SECURITY_CODE with AUTH_PASSWORD. Implemented AUTH_TOKEN for api authentication. Added migration guide. 2024-08-21 20:30:36 +02:00
Glenn de Haan
de07e51746 Hide email button when mail function is disabled 2024-08-17 14:11:27 +02:00
Glenn de Haan
c5cc7569f4 Implemented HA config parameters for mail functionality 2024-08-17 13:54:33 +02:00
Glenn de Haan
46dd565379 Updated Dependencies. Add axios override to patch CVE-2024-39338. Implemented email functionality. Updated README.md 2024-08-17 13:42:12 +02:00
Glenn de Haan
d785edd028 Removed unused css. Added a robots.txt. Attempt to block iOS from adding invalid telephone link. Added last sync to guest details. Changed DateTimeFormat from en-US to en-GB 2024-04-26 18:33:13 +02:00
Glenn de Haan
f68ee13ec0 Implemented guests cache. Implemented guests function within unifi.js. Updated app screenshots. Updated manifest.json. Added details.ejs component. Implemented voucher detail slide-over. Updated cache.js logic to fetch guests. Updated README.md. Implemented voucher detail component route. 2024-04-25 21:10:46 +02:00
Glenn de Haan
2ce15fe7dc Implemented LOG_LEVEL environment variable. Implemented log_level HA variable. Implemented log level based on user preference. Changed UniFi stack trace output from error to debug. Removed duplicate cache error log. Implemented internal build number. Updated README.md. Added account warning to README.md. Output build version on application start 2024-04-17 17:19:00 +02:00
Glenn de Haan
5867bc423b Updated ejs dependency. Fixed docker healthcheck IPv4 binding. Reworked unifi.js settings/config sections. Removed 1-hour session timeout from unifi.js. Implemented retry params for all unifi.js functions. Implemented re-authentication functions within catch blocks in unifi.js 2024-04-15 18:01:59 +02:00
Glenn de Haan
30d66b9dfc Added the jsonwebtoken package. Implemented a web jwt verify flow. Added missing JSON responses for api auth flows. Added jwt module. Moved bytes.js, logo.js, time.js and types.js to utils folder. Updated README.md. Implemented HA config check to allow API service configuration. Implemented JWT initialization. Replaced authorization cookie contents with JWT token. Implemented /api/vouchers endpoint. Updated /api endpoints list. 2024-04-12 18:01:42 +02:00
Glenn de Haan
78c891cdbd Fixed SERVICE_WEB variable not working correctly. Implemented missing HA voucher_custom config setting. Fixed VOUCHER_CUSTOM variable not working correctly. Fixed an issue where HA voucher_types config was not used during validation causing an incorrect error. Added bytes conversion 2024-04-08 20:49:54 +02:00
Glenn de Haan
a80f533abf Fixed missing logo link. Implemented custom voucher type. Implemented custom voucher fields. Fixed divider visibility on dark mode. Changed default VOUCHER_TYPES to single-use voucher type. Implemented VOUCHER_CUSTOM environment variable. 2024-04-07 11:28:48 +02:00
Glenn de Haan
db0bd72cc2 Updated screenshots. Implemented color-scheme script to force browser color-scheme. Implemented print functionality. Updated README.md. Implemented print route. 2024-04-06 21:25:30 +02:00
Glenn de Haan
ddc512b77a Implemented reusable UniFi sessions. Fixed UniFi login rate-limit trigger. Implemented bulk voucher generation. Implemented revoke/delete voucher function. Added grayscale logo. Fixed issue where headers are send 2 times. 2024-04-04 21:07:14 +02:00
Glenn de Haan
4404fabafa Refactored unifi.js to separate logic. Updated application header. Fixed incorrect screen-reader text. Updated sync button text. Implemented last sync date/time. Implemented cache util. Fixed missing vouchers check to prevent 'headers are already send' error. Fixed missing cache sync on api voucher creation. Implemented auto sync every 15 minutes 2024-04-03 23:15:10 +02:00
Glenn de Haan
65c79b1f3d Removed SID middleware. Implemented cache module. Updated screenshots. Removed old background images. Updated manifest.json. Updated 404 and login background color. Updated error alert styling. Updated voucher branding/layout. Updated README.md. Cleanup server.js. Removed GET /voucher route. Updated redirects to GET /vouchers. Implemented caching mechanism for UniFi vouchers overview. Implemented force refresh option. 2024-03-26 20:21:36 +01:00
Glenn de Haan
88fbf7c182 Implemented a logger. Fix UniFi error messages. Implemented additional UniFi logging 2024-03-24 12:21:08 +01:00
Glenn de Haan
a693632ef0 Added additional log for verifying external config 2024-03-23 17:44:10 +01:00
Glenn de Haan
d147b8e5ad Implemented external config provider for HA. Removed debug line 2024-03-23 17:33:29 +01:00
Glenn de Haan
186485d947 Fixed missing baseUrl for 404 2024-03-23 17:01:41 +01:00
Glenn de Haan
1ec0ebedf0 Implemented HA ingress path header prefix 2024-03-23 16:58:35 +01:00
Glenn de Haan
0a4c0e358e Added a debug header for HA testing 2024-03-23 16:43:00 +01:00
Glenn de Haan
95989c212c Implemented API endpoints. Update README.md. Implemented health endpoint. Updated dependencies 2024-03-22 17:13:37 +01:00
Glenn de Haan
611e8cc45c #30 Implemented environment variable to disable built-in authentication system 2024-03-04 20:49:42 +01:00
Glenn de Haan
03fb5356ef Updated dependencies. Introduced a styled 404 page. Implemented a new authorization system including separate login flow. Implemented flash message system to removal all query url parameters. Made SID more persistent between sessions. Implemented new vouchers overview. Improved color scheme for info and error flash messages. Updated README.md 2024-01-22 19:27:42 +01:00