mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-01 04:08:45 -05:00
fix(ui): Dynamically generate path to config in warning message (#851)
This commit is contained in:
@@ -6,12 +6,12 @@ import Alert from '../Common/Alert';
|
||||
const messages = defineMessages({
|
||||
dockerVolumeMissing: 'Docker Volume Mount Missing',
|
||||
dockerVolumeMissingDescription:
|
||||
'The <code>/app/config</code> volume mount was not configured properly. All data will be cleared when the container is stopped or restarted.',
|
||||
'The <code>{appDataPath}</code> volume mount was not configured properly. All data will be cleared when the container is stopped or restarted.',
|
||||
});
|
||||
|
||||
const AppDataWarning: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
const { data, error } = useSWR<{ appData: boolean }>(
|
||||
const { data, error } = useSWR<{ appData: boolean; appDataPath: string }>(
|
||||
'/api/v1/status/appdata'
|
||||
);
|
||||
|
||||
@@ -31,6 +31,7 @@ const AppDataWarning: React.FC = () => {
|
||||
code: function code(msg) {
|
||||
return <code className="bg-opacity-50">{msg}</code>;
|
||||
},
|
||||
appDataPath: data.appDataPath,
|
||||
})}
|
||||
</Alert>
|
||||
)}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"components.AppDataWarning.dockerVolumeMissing": "Docker Volume Mount Missing",
|
||||
"components.AppDataWarning.dockerVolumeMissingDescription": "The <code>/app/config</code> volume mount was not configured properly. All data will be cleared when the container is stopped or restarted.",
|
||||
"components.AppDataWarning.dockerVolumeMissingDescription": "The <code>{appDataPath}</code> volume mount was not configured properly. All data will be cleared when the container is stopped or restarted.",
|
||||
"components.CollectionDetails.movies": "Movies",
|
||||
"components.CollectionDetails.numberofmovies": "Number of Movies: {count}",
|
||||
"components.CollectionDetails.overview": "Overview",
|
||||
|
||||
Reference in New Issue
Block a user