Radarr/frontend/src/MovieFile/Extras/ExtraFileDetailsPopover.tsx
admin 7961b36547 fix(ci): P2 improvements - editorconfig, integration tests, Prettier 3
- Remove duplicate dotnet_style_qualification rules in .editorconfig
- Update Radarr branding to Aletheia in .editorconfig
- Add integration tests step to build.yml (with continue-on-error)
- Upgrade Prettier to 3.7.4, eslint-plugin-prettier to 5.5.4
- Upgrade eslint-config-prettier to 10.1.8
- Fix pre-existing lint errors (unused vars, radix parameter)
- Reformat frontend code with Prettier 3 formatting changes

Closes #57 (SonarCloud deferred - needs org setup)
Closes #58, #62 (partial - ESLint 9 deferred), #63

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 11:46:44 -06:00

58 lines
1.3 KiB
TypeScript

import React from 'react';
import IconButton from 'Components/Link/IconButton';
import Popover from 'Components/Tooltip/Popover';
import { icons, tooltipPositions } from 'Helpers/Props';
import { ExtraFileType } from 'MovieFile/ExtraFile';
import translate from 'Utilities/String/translate';
interface ExtraFileDetailsPopoverProps {
type: ExtraFileType;
title?: string;
languageTags?: string[];
}
function ExtraFileDetailsPopover(
props: Readonly<ExtraFileDetailsPopoverProps>
) {
const { type, title, languageTags = [] } = props;
const details = [];
if (type === 'subtitle') {
if (title) {
details.push({ name: translate('Title'), value: title });
}
if (languageTags.length) {
details.push({
name: translate('Disposition'),
value: languageTags.join(', '),
});
}
}
if (details.length) {
return (
<Popover
anchor={<IconButton name={icons.INFO} />}
title={translate('Tags')}
body={
<ul>
{details.map(({ name, value }, index) => {
return (
<li key={index}>
{name}: {value}
</li>
);
})}
</ul>
}
position={tooltipPositions.LEFT}
/>
);
}
return '';
}
export default ExtraFileDetailsPopover;