|
@@ -1,10 +1,12 @@
|
|
|
import React from 'react';
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import PropTypes from 'prop-types';
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
+import ReactDOMServer from 'react-dom/server';
|
|
|
import { useTranslation } from 'react-i18next';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
|
|
|
|
import AppContainer from '~/client/services/AppContainer';
|
|
import AppContainer from '~/client/services/AppContainer';
|
|
|
import PageContainer from '~/client/services/PageContainer';
|
|
import PageContainer from '~/client/services/PageContainer';
|
|
|
|
|
+import Username from '~/components/User/Username';
|
|
|
|
|
|
|
|
import { withUnstatedContainers } from './UnstatedUtils';
|
|
import { withUnstatedContainers } from './UnstatedUtils';
|
|
|
|
|
|
|
@@ -82,9 +84,12 @@ class PageStatusAlert extends React.Component {
|
|
|
isConflictOnEdit = markdownOnEdit !== pageContainer.state.markdown;
|
|
isConflictOnEdit = markdownOnEdit !== pageContainer.state.markdown;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ const usernameComponentToString = ReactDOMServer.renderToString(<Username user={pageContainer.state.lastUpdateUser} />);
|
|
|
|
|
+
|
|
|
const label1 = isConflictOnEdit
|
|
const label1 = isConflictOnEdit
|
|
|
? t('modal_resolve_conflict.file_conflicting_with_newer_remote')
|
|
? t('modal_resolve_conflict.file_conflicting_with_newer_remote')
|
|
|
- : `${pageContainer.state.lastUpdateUsername} ${t('edited this page')}`;
|
|
|
|
|
|
|
+ // eslint-disable-next-line react/no-danger
|
|
|
|
|
+ : <span dangerouslySetInnerHTML={{ __html: `${usernameComponentToString} ${t('edited this page')}` }} />;
|
|
|
|
|
|
|
|
return [
|
|
return [
|
|
|
['bg-warning'],
|
|
['bg-warning'],
|