1// SPDX-License-Identifier: GPL-2.0-only
2// Copyright (c) 2026-present FERS Contributors (see AUTHORS.md).
4import GitHubIcon from '@mui/icons-material/GitHub';
15} from '@mui/material';
16import { getVersion } from '@tauri-apps/api/app';
17import { openUrl } from '@tauri-apps/plugin-opener';
18import { useEffect, useState } from 'react';
20interface AboutDialogProps {
23 onLicensesClick: () => void;
26const GITHUB_URL = 'https://github.com/stpaine/FERS';
28export default function AboutDialog({
33 const [version, setVersion] = useState('...');
39 .catch(() => setVersion('unknown'));
42 const handleGitHub = () => {
43 openUrl(GITHUB_URL).catch(console.error);
47 <Dialog open={open} onClose={onClose} maxWidth="xs" fullWidth>
48 <DialogTitle>About FERS</DialogTitle>
53 flexDirection: 'column',
61 <Typography variant="h5" fontWeight="bold">
64 <Typography variant="subtitle2" color="text.secondary">
65 Flexible Extensible Radar Simulator
67 <Typography variant="body2">Version {version}</Typography>
74 <Divider flexItem sx={{ my: 1 }} />
75 <Typography variant="body2" color="text.secondary">
76 Copyright © 2006–2008 Marc Brooker and Michael Inggs.
78 <Typography variant="body2" color="text.secondary">
79 Copyright © 2008–present FERS Contributors.
82 startIcon={<GitHubIcon />}
83 onClick={handleGitHub}
91 <DialogActions sx={{ justifyContent: 'space-between' }}>
92 <Button onClick={onLicensesClick} size="small">
95 <Button onClick={onClose}>Close</Button>