{{ 'common.loading' | translate }}
}`,
+ template: `@if (facade.draft(); as draft) {{{ 'common.loading' | translate }}
}`,
styles: [`.editor-page { max-width: 1120px; margin: 0 auto; padding: 24px; display: grid; gap: 16px; } .editor-page h1, .editor-page p { margin: 0; }`],
changeDetection: ChangeDetectionStrategy.OnPush
})
diff --git a/src/app/features/admin/categories/services/admin-categories-api.gateway.ts b/src/app/features/admin/categories/services/admin-categories-api.gateway.ts
index 77b9f61..c226ab6 100644
--- a/src/app/features/admin/categories/services/admin-categories-api.gateway.ts
+++ b/src/app/features/admin/categories/services/admin-categories-api.gateway.ts
@@ -59,8 +59,7 @@ export class AdminCategoriesApiGateway implements AdminCategoriesGateway {
params = params.set('excludingId', excludingId);
}
return this.http.get<{ taken: boolean }>(`${this.baseUrl}/slug-taken`, { params }).pipe(
- map(response => response.taken),
- catchError(() => of(false))
+ map(response => response.taken)
);
}
}
diff --git a/src/app/i18n/en.ts b/src/app/i18n/en.ts
index 179d298..c8d811d 100644
--- a/src/app/i18n/en.ts
+++ b/src/app/i18n/en.ts
@@ -1533,6 +1533,7 @@ export const en: Translations = {
title: 'Title',
slug: 'URL slug',
slugTaken: 'This slug is already used by another category.',
+ slugCheckError: 'Could not verify this slug is unique. Try again before saving.',
parent: 'Parent category',
noParent: 'No parent (top level)',
icon: 'Icon',
diff --git a/src/app/i18n/hy.ts b/src/app/i18n/hy.ts
index 5ceef52..2d8c342 100644
--- a/src/app/i18n/hy.ts
+++ b/src/app/i18n/hy.ts
@@ -1528,6 +1528,7 @@ export const hy: Translations = {
title: 'Անուն',
slug: 'URL հասցե',
slugTaken: 'Այս հասցեն արդեն օգտագործվում է այլ կատեգորիայի կողմից։',
+ slugCheckError: 'Չհաջողվեց ստուգել հասցեի եզակիությունը։ Փորձեք կրկին՝ նախքան պահպանելը։',
parent: 'Ծնող կատեգորիա',
noParent: 'Առանց ծնողի (վերին մակարդակ)',
icon: 'Պատկերակ',
diff --git a/src/app/i18n/ru.ts b/src/app/i18n/ru.ts
index 912a823..5cdfdef 100644
--- a/src/app/i18n/ru.ts
+++ b/src/app/i18n/ru.ts
@@ -1528,6 +1528,7 @@ export const ru: Translations = {
title: 'Название',
slug: 'URL-адрес',
slugTaken: 'Этот адрес уже используется другой категорией.',
+ slugCheckError: 'Не удалось проверить уникальность адреса. Повторите попытку перед сохранением.',
parent: 'Родительская категория',
noParent: 'Без родителя (верхний уровень)',
icon: 'Иконка',
diff --git a/src/app/i18n/translations.ts b/src/app/i18n/translations.ts
index 1b855e8..8f8592d 100644
--- a/src/app/i18n/translations.ts
+++ b/src/app/i18n/translations.ts
@@ -1541,6 +1541,7 @@ export interface Translations {
title: string;
slug: string;
slugTaken: string;
+ slugCheckError: string;
parent: string;
noParent: string;
icon: string;