mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-3963 removed reshadow from VersionInfo
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import styled, { css } from 'reshadow';
|
||||
|
||||
import { Icon } from '../Icon';
|
||||
import { s } from '../s';
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
.group {
|
||||
list-style-position: inside;
|
||||
height: 100%;
|
||||
max-height: 300px;
|
||||
}
|
||||
|
||||
.reactMarkdown > * {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
@@ -7,44 +7,32 @@
|
||||
*/
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import styled, { css } from 'reshadow';
|
||||
|
||||
import { Container, Group, GroupItem, GroupTitle, useResource, useStyles, useTranslate } from '@cloudbeaver/core-blocks';
|
||||
import { Container, Group, GroupItem, GroupTitle, s, useResource, useS, useTranslate } from '@cloudbeaver/core-blocks';
|
||||
import { VersionResource } from '@cloudbeaver/core-version';
|
||||
import styles from './VersionInfo.m.css';
|
||||
|
||||
interface Props {
|
||||
item: string;
|
||||
}
|
||||
|
||||
const style = css`
|
||||
Group {
|
||||
list-style-position: inside;
|
||||
height: 100%;
|
||||
max-height: 300px;
|
||||
}
|
||||
ReactMarkdown > * {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
`;
|
||||
|
||||
export const VersionInfo = observer<Props>(function VersionInfo({ item }) {
|
||||
const translate = useTranslate();
|
||||
const styles = useStyles(style);
|
||||
const style = useS(styles);
|
||||
const versionResource = useResource(VersionInfo, VersionResource, item);
|
||||
|
||||
const version = versionResource.tryGetData;
|
||||
|
||||
return styled(styles)(
|
||||
return (
|
||||
<Container wrap gap overflow large>
|
||||
<Group gap overflow>
|
||||
<Group className={s(style, { group: true })} gap overflow>
|
||||
<GroupTitle>{version ? `Release notes ${version.number} - ${version.date}` : translate('version_update_version_no_info')}</GroupTitle>
|
||||
{version && (
|
||||
<GroupItem>
|
||||
<ReactMarkdown>{version.releaseNotes}</ReactMarkdown>
|
||||
<ReactMarkdown className={s(style, { reactMarkdown: true })}>{version.releaseNotes}</ReactMarkdown>
|
||||
</GroupItem>
|
||||
)}
|
||||
</Group>
|
||||
</Container>,
|
||||
</Container>
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user