Merge pull request #4161 from atmire/only-import-altcha-on-the-browser

Fix ssr error by only importing altcha on the client side
This commit is contained in:
kshepherd
2025-04-10 13:23:12 +02:00
committed by GitHub
4 changed files with 4 additions and 8 deletions

View File

@@ -86,8 +86,8 @@
<!-- Captcha - to be rendered only if enabled in backend requestitem.cfg -->
@if (!!(captchaEnabled$ | async)) {
<div *ngVar="challengeHref$ | async as href">
<ds-altcha-captcha autoload="onload" challengeUrl="{{ href }}" (payload)="handlePayload($event)">
<div>
<ds-altcha-captcha autoload="onload" challengeUrl="{{ challengeHref$ | async }}" (payload)="handlePayload($event)">
</ds-altcha-captcha>
</div>
}

View File

@@ -1,5 +1,3 @@
import 'altcha';
import {
AsyncPipe,
Location,
@@ -65,7 +63,6 @@ import {
isNotEmpty,
} from '../../../shared/empty.util';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { VarDirective } from '../../../shared/utils/var.directive';
import { getItemPageRoute } from '../../item-page-routing-paths';
import { AltchaCaptchaComponent } from './altcha-captcha.component';
@@ -78,7 +75,6 @@ import { AltchaCaptchaComponent } from './altcha-captcha.component';
AsyncPipe,
ReactiveFormsModule,
BtnDisabledDirective,
VarDirective,
AltchaCaptchaComponent,
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],

View File

@@ -1,5 +1,3 @@
import 'altcha';
import {
AsyncPipe,
Location,

View File

@@ -1,3 +1,5 @@
import 'altcha';
import {
HttpClient,
provideHttpClient,