Introduce "sources" util class

This commit is contained in:
schroda
2025-04-21 17:00:13 +02:00
parent 633f58b563
commit 4a9f90b746
11 changed files with 67 additions and 56 deletions

View File

@@ -153,8 +153,7 @@ function getSourceName(source?: Pick<SourceType, 'id' | 'displayName'> | null):
return translate('global.label.unknown');
}
const isLocalSource = Number(source.id) === 0;
if (isLocalSource) {
if (Sources.isLocalSource(source)) {
return translate('source.local_source.title');
}