Release 2.6.15
This commit is contained in:
@@ -167,6 +167,31 @@ function buildTaskPlayerLabel(metadata) {
|
||||
return '';
|
||||
}
|
||||
|
||||
function buildTaskDescription(task, metadata) {
|
||||
const playerLabel = buildTaskPlayerLabel(metadata);
|
||||
const taskKey = String(task && task.key || '').trim();
|
||||
let displayKey = taskKey;
|
||||
|
||||
if (playerLabel && displayKey) {
|
||||
const playerPrefix = `${playerLabel}:`;
|
||||
const playerSuffix = `:${playerLabel}`;
|
||||
|
||||
if (displayKey.startsWith(playerPrefix)) {
|
||||
displayKey = displayKey.slice(playerPrefix.length);
|
||||
}
|
||||
|
||||
if (displayKey.endsWith(playerSuffix)) {
|
||||
displayKey = displayKey.slice(0, -playerSuffix.length);
|
||||
}
|
||||
|
||||
if (displayKey === playerLabel) {
|
||||
displayKey = '';
|
||||
}
|
||||
}
|
||||
|
||||
return [playerLabel, displayKey].filter(Boolean).join(':');
|
||||
}
|
||||
|
||||
function buildQueuePageViewModel(data, message, currentUser) {
|
||||
const tasks = (data && data.tasks) || [];
|
||||
const summary = (data && data.summary) || { counts: {}, total: 0, activeCount: 0 };
|
||||
@@ -262,7 +287,7 @@ function buildQueuePageViewModel(data, message, currentUser) {
|
||||
|
||||
const visibleTasksWithSources = visibleTasks.map(function (task) {
|
||||
const playerLabel = buildTaskPlayerLabel(task.metadata);
|
||||
const taskDescription = [playerLabel, String(task && task.key || '').trim()].filter(Boolean).join(':');
|
||||
const taskDescription = buildTaskDescription(task, task.metadata);
|
||||
|
||||
return Object.assign({}, task, {
|
||||
sourceUrl: buildTaskSourceFilterUrl(queryState, task, sourceFilter),
|
||||
|
||||
Reference in New Issue
Block a user