import {Link} from 'react-router';
import styled from '@emotion/styled';
import ClippedBox from 'sentry/components/clippedBox';
import {CopyToClipboardButton} from 'sentry/components/copyToClipboardButton';
import {Hovercard} from 'sentry/components/hovercard';
import List from 'sentry/components/list';
import ListItem from 'sentry/components/list/listItem';
import Placeholder from 'sentry/components/placeholder';
import TextOverflow from 'sentry/components/textOverflow';
import {t, tn} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import useOrganization from 'sentry/utils/useOrganization';
import {ProguardMappingAssociation} from 'sentry/views/settings/projectProguard';
function ProguardAssociationsBody({
associations,
}: {
associations: ProguardMappingAssociation;
}) {
const organization = useOrganization();
return (
{associations.releases.map(release => (
{release}
))}
);
}
type Props = {
associations: ProguardMappingAssociation;
loading?: boolean;
};
export function ProguardAssociations({associations, loading}: Props) {
if (loading) {
return ;
}
if (!associations.releases.length) {
return (
{t('No releases associated with this proguard mapping file')}
);
}
return (
}
header={t('Releases')}
displayTimeout={0}
showUnderline
>
{tn('%s Release', '%s Releases', associations.releases.length)}
{' '}
{t('associated')}
);
}
const NoAssociations = styled('div')`
color: ${p => p.theme.disabled};
`;
const ReleaseContent = styled('div')`
display: grid;
grid-template-columns: 1fr max-content;
gap: ${space(1)};
align-items: center;
`;
const ReleaseLink = styled(Link)`
overflow: hidden;
`;
const WiderHovercard = styled(Hovercard)`
width: 320px;
/* "Body" element */
> div:last-child {
transition: all 5s ease-in-out;
overflow-x: hidden;
overflow-y: scroll;
max-height: 300px;
}
`;
const ClippedBoxWithoutPadding = styled(ClippedBox)`
padding: 0;
/* "ClipFade" element */
> div:last-child {
background: ${p => p.theme.background};
border-bottom: 0;
padding: 0;
}
`;