feat(admin): visual badge manager with storefront-accurate previews
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> P0 user feedback: badges were a comma-separated text input with no preview. - Replaced with a chip editor: current badges render as removable pills in the exact colors customers see on the storefront (colors sourced from getBadgeClass/item.utils.ts so admin preview and product card never drift) - The standard set (new/sale/exclusive/hot/limited/bestseller/featured) is offered as one-click add chips; custom badges added via text field, unlimited, shown in the storefront's custom-badge grey - Deliberately NOT per-badge arbitrary colors: badge colors are part of the storefront design contract (string[] + fixed palette); introducing per-badge color storage would change the product data shape consumed by the future backend - New adminProducts keys (badgesHint, addBadge, removeBadge, customBadgePlaceholder) in en/ru/hy; verified in browser
This commit is contained in:
@@ -1546,6 +1546,10 @@ export const en: Translations = {
|
||||
seoGenerate: 'Fill from product details',
|
||||
seoGenerateHint: 'Fills empty fields from the product name and short description. Your existing text is kept.',
|
||||
translationsHint: 'The main fields above are shown in your default store language. Add translations here for other languages - if a translation is empty, customers see the default text instead.',
|
||||
badgesHint: 'Badges are the small colored labels customers see on the product photo. Pick from the standard set or add your own.',
|
||||
addBadge: 'Add',
|
||||
removeBadge: 'Remove badge',
|
||||
customBadgePlaceholder: 'Your own badge text…',
|
||||
seoExplain: 'This is what shows up in search results — a clear title and description help customers find this product.',
|
||||
searchTitle: 'Search title',
|
||||
searchTitleHint: 'The headline shown in search results. Keep it short and descriptive.',
|
||||
|
||||
@@ -1541,6 +1541,10 @@ export const hy: Translations = {
|
||||
seoGenerate: 'Լրացնել ապրանքի տվյալներից',
|
||||
seoGenerateHint: 'Լրացնում է դատարկ դաշտերը անունից և կարճ նկարագրությունից։ Ձեր տեքստը չի փոխվում։',
|
||||
translationsHint: 'Վերևի հիմնական դաշտերը ցուցադրվում են խանութի հիմնական լեզվով։ Այստեղ ավելացրեք թարգմանություններ այլ լեզուների համար — եթե թարգմանությունը դատարկ է, գնորդները կտեսնեն հիմնական տեքստը։',
|
||||
badgesHint: 'Բեյջերը փոքր գունավոր պիտակներ են, որոնք գնորդները տեսնում են ապրանքի նկարի վրա։ Ընտրեք ստանդարտներից կամ ավելացրեք ձերը։',
|
||||
addBadge: 'Ավելացնել',
|
||||
removeBadge: 'Հեռացնել բեյջը',
|
||||
customBadgePlaceholder: 'Ձեր բեյջի տեքստը…',
|
||||
seoExplain: 'Սա այն է, ինչ երևում է որոնման արդյունքներում․ հստակ վերնագիրն ու նկարագրությունը օգնում են գտնել այս ապրանքը։',
|
||||
searchTitle: 'Որոնման վերնագիր',
|
||||
searchTitleHint: 'Վերնագիրը, որ երևում է որոնման արդյունքներում։ Պահեք կարճ։',
|
||||
|
||||
@@ -1541,6 +1541,10 @@ export const ru: Translations = {
|
||||
seoGenerate: 'Заполнить из данных товара',
|
||||
seoGenerateHint: 'Заполняет пустые поля из названия и краткого описания. Ваш текст не перезаписывается.',
|
||||
translationsHint: 'Основные поля выше отображаются на языке магазина по умолчанию. Здесь добавьте переводы для других языков — если перевод пуст, покупатели увидят текст по умолчанию.',
|
||||
badgesHint: 'Бейджи — небольшие цветные ярлыки, которые покупатели видят на фото товара. Выберите из стандартных или добавьте свой.',
|
||||
addBadge: 'Добавить',
|
||||
removeBadge: 'Убрать бейдж',
|
||||
customBadgePlaceholder: 'Текст своего бейджа…',
|
||||
seoExplain: 'Это то, что видно в результатах поиска — понятные заголовок и описание помогают найти товар.',
|
||||
searchTitle: 'Заголовок для поиска',
|
||||
searchTitleHint: 'Заголовок, показываемый в результатах поиска. Делайте его коротким.',
|
||||
|
||||
@@ -1553,6 +1553,10 @@ export interface Translations {
|
||||
seoGenerate: string;
|
||||
seoGenerateHint: string;
|
||||
translationsHint: string;
|
||||
badgesHint: string;
|
||||
addBadge: string;
|
||||
removeBadge: string;
|
||||
customBadgePlaceholder: string;
|
||||
seoExplain: string;
|
||||
searchTitle: string;
|
||||
searchTitleHint: string;
|
||||
|
||||
Reference in New Issue
Block a user