@acorex/platform 20.9.8 → 20.9.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1626,38 +1626,43 @@ const AXPLayoutDetailsViewViewModel = signalStore(withState(() => {
1626
1626
  }
1627
1627
  return true;
1628
1628
  }
1629
- const rawText = result?.message?.text;
1630
- const errorText = rawText
1631
- ? typeof rawText === 'string'
1632
- ? rawText.startsWith('@')
1633
- ? await translateService.translateAsync(rawText)
1634
- : rawText
1635
- : translateService.resolve(rawText)
1636
- : await translateService.translateAsync('@general:messages.generic.error.description');
1637
- toastService.show({
1638
- color: 'danger',
1639
- title: await translateService.translateAsync('@general:messages.generic.error.title'),
1640
- content: errorText,
1641
- location: 'bottom-center',
1642
- closeButton: true,
1643
- timeOut: 5000,
1644
- timeOutProgress: true,
1645
- });
1629
+ if (enableOperationToasts) {
1630
+ const rawText = result?.message?.text;
1631
+ const errorText = rawText
1632
+ ? typeof rawText === 'string'
1633
+ ? rawText.startsWith('@')
1634
+ ? await translateService.translateAsync(rawText)
1635
+ : rawText
1636
+ : translateService.resolve(rawText)
1637
+ : await translateService.translateAsync('@general:messages.generic.error.description');
1638
+ toastService.show({
1639
+ color: 'danger',
1640
+ title: await translateService.translateAsync('@general:messages.generic.error.title'),
1641
+ content: errorText,
1642
+ location: 'bottom-center',
1643
+ closeButton: true,
1644
+ timeOut: 5000,
1645
+ timeOutProgress: true,
1646
+ });
1647
+ }
1646
1648
  return false;
1647
1649
  }
1648
1650
  catch (error) {
1649
- const errorText = error instanceof Error
1650
- ? error.message
1651
- : await translateService.translateAsync('@general:messages.generic.error.description');
1652
- toastService.show({
1653
- color: 'danger',
1654
- title: await translateService.translateAsync('@general:messages.generic.error.title'),
1655
- content: errorText,
1656
- location: 'bottom-center',
1657
- closeButton: true,
1658
- timeOut: 5000,
1659
- timeOutProgress: true,
1660
- });
1651
+ const enableOperationToasts = await settingsService.get(AXPCommonSettings.EnableOperationToasts);
1652
+ if (enableOperationToasts) {
1653
+ const errorText = error instanceof Error
1654
+ ? error.message
1655
+ : await translateService.translateAsync('@general:messages.generic.error.description');
1656
+ toastService.show({
1657
+ color: 'danger',
1658
+ title: await translateService.translateAsync('@general:messages.generic.error.title'),
1659
+ content: errorText,
1660
+ location: 'bottom-center',
1661
+ closeButton: true,
1662
+ timeOut: 5000,
1663
+ timeOutProgress: true,
1664
+ });
1665
+ }
1661
1666
  return false;
1662
1667
  }
1663
1668
  finally {