refactor: reuse shared frontend filename helper

This commit is contained in:
Dariusz L
2026-08-05 14:37:31 +02:00
parent 6b0f806e30
commit dc0524b72c
2 changed files with 17 additions and 1 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
import { getFilenameFromPath } from './utils/html_utils.js';
function normalizeIdentity(value) {
return String(value ?? '').trim().replaceAll('\\', '/').toLowerCase();
}
@@ -15,7 +17,7 @@ function getResolvedModelFilename(model = {}) {
|| getResolvedModelPath(model)
|| 'Resolved model'
);
return source.split(/[\\/]/).pop() || source;
return getFilenameFromPath(source) || source;
}
function getResolvedModelCategoryLabel(model = {}, formatCategory = null) {