@linagora/twake-react-new-version 1.2.0 → 1.2.1

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## @linagora/twake-react-new-version [1.2.1](https://github.com/linagora/twake-libs/compare/@linagora/twake-react-new-version@1.2.0...@linagora/twake-react-new-version@1.2.1) (2026-11-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **twake-react-new-version:** Centre the text between the title and the buttons ([#74](https://github.com/linagora/twake-libs/issues/74)) ([d0dfacd](https://github.com/linagora/twake-libs/commit/d0dfacd19ffaa55b04d21529f6f4a326c9bde476))
7
+
1
8
  # @linagora/twake-react-new-version [1.2.0](https://github.com/linagora/twake-libs/compare/@linagora/twake-react-new-version@1.1.2...@linagora/twake-react-new-version@1.2.0) (2026-11-18)
2
9
 
3
10
 
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useId, useRef, useState } from 'react';
2
- import { Box, Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@linagora/twake-mui';
2
+ import { Box, Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, dialogTitleClasses } from '@linagora/twake-mui';
3
3
  import { useExtendI18n, useI18n } from 'twake-i18n';
4
4
  import { PatchNotes } from './PatchNotes';
5
5
  import de from './locales/de.json';
@@ -122,7 +122,11 @@ export const NewVersionDialog = ({ running, appName, fetchServed = fetchServedVe
122
122
  return (React.createElement(Dialog, { open: offered !== null, onClose: notNow, size: "small", "aria-labelledby": titleId, "data-testid": "new-version-dialog" },
123
123
  image !== undefined && (React.createElement(Banner, { image: image, background: imageBackground })),
124
124
  React.createElement(DialogTitle, { id: titleId, sx: { textAlign: 'center' } }, t('twakeNewVersion.title').replace('%{appName}', appName)),
125
- React.createElement(DialogContent, { sx: notes !== null ? { overflowY: 'visible' } : undefined }, notes !== null ? (React.createElement(PatchNotes, { notes: notes, titleId: titleId })) : (React.createElement(DialogContentText, { sx: { textAlign: 'center' } }, t('twakeNewVersion.body').replace('%{appName}', appName)))),
125
+ React.createElement(DialogContent, { sx: {
126
+ [`.${dialogTitleClasses.root} + &`]: { pt: 1 },
127
+ pb: { xs: 1, md: 1.5 },
128
+ ...(notes !== null && { overflowY: 'visible' })
129
+ } }, notes !== null ? (React.createElement(PatchNotes, { notes: notes, titleId: titleId })) : (React.createElement(DialogContentText, { sx: { textAlign: 'center' } }, t('twakeNewVersion.body').replace('%{appName}', appName)))),
126
130
  React.createElement(DialogActions, { sx: { justifyContent: 'center' } },
127
131
  React.createElement(Button, { variant: "text", "data-testid": "new-version-not-now", onClick: notNow }, t('twakeNewVersion.notNow')),
128
132
  React.createElement(Button, { variant: "contained", color: "primary", "data-testid": "new-version-reload", onClick: reload }, t('twakeNewVersion.reload')))));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@linagora/twake-react-new-version",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.2.1",
5
5
  "description": "Tells the user of a Twake application that a new version is served, and offers a reload in a dialog with an optional illustration",
6
6
  "author": "Twake",
7
7
  "license": "MIT",