Browse Source

fix: AI action details name a white labeling reset, and JSON blocks labelled settings show a translated label

pull/16833/head
Igor Kulikov 3 weeks ago
parent
commit
f4b79ec563
  1. 5
      ui-ngx/src/app/modules/home/components/ai/ai-action-detail.models.ts
  2. 3
      ui-ngx/src/assets/locale/locale.constant-en_US.json

5
ui-ngx/src/app/modules/home/components/ai/ai-action-detail.models.ts

@ -1172,7 +1172,10 @@ function describe(tool: string, values: Values, result: unknown, names: AiDetail
case 'read_white_labeling':
return {hood: text('read-white-labeling'), blocks: json('settings', result)};
case 'save_white_labeling': {
const {target, ...changes} = values;
const {target, reset, ...changes} = values;
if (reset) {
return {hood: text(target === 'LOGIN' ? 'reset-white-labeling-login' : 'reset-white-labeling'), blocks: []};
}
return {hood: text(target === 'LOGIN' ? 'save-white-labeling-login' : 'save-white-labeling'), blocks: [{type: 'facts', rows: facts(changes)}]};
}
case 'read_ota': {

3
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -890,6 +890,8 @@
"read-white-labeling": "Read the white labeling",
"save-white-labeling": "Changed the platform's white labeling",
"save-white-labeling-login": "Changed the login page's white labeling",
"reset-white-labeling": "Reset the platform's white labeling to the defaults",
"reset-white-labeling-login": "Reset the login page's white labeling to the defaults",
"save-ota-package": "Created the OTA package {{name}}",
"assign-ota-package": "Assigned the OTA package",
"clear-ota-package": "Cleared the OTA package",
@ -1592,6 +1594,7 @@
"details": "Details",
"request": "Request",
"result": "Result",
"settings": "Settings",
"try-again": "Try again",
"try-again-prompt": "Try that again"
},

Loading…
Cancel
Save