|
|
@ -229,19 +229,21 @@ export class TabProxy extends Plugin { |
|
|
|
}) |
|
|
|
}) |
|
|
|
formatPath.shift() |
|
|
|
formatPath.shift() |
|
|
|
if (formatPath.length > 0) { |
|
|
|
if (formatPath.length > 0) { |
|
|
|
const duplicateTabName = this.loadedTabs.find(({ title }) => title === formatPath.join('/')).name |
|
|
|
const index = this.loadedTabs.findIndex(({ title }) => title === formatPath.join('/')) |
|
|
|
const duplicateTabPath = duplicateTabName.split('/') |
|
|
|
if (index > -1) { |
|
|
|
const duplicateTabFormatPath = [...duplicateTabPath].reverse() |
|
|
|
const duplicateTabName = this.loadedTabs[index].name |
|
|
|
const duplicateTabTitle = duplicateTabFormatPath.slice(0, titleLength).reverse().join('/') |
|
|
|
const duplicateTabPath = duplicateTabName.split('/') |
|
|
|
|
|
|
|
const duplicateTabFormatPath = [...duplicateTabPath].reverse() |
|
|
|
this.loadedTabs.push({ |
|
|
|
const duplicateTabTitle = duplicateTabFormatPath.slice(0, titleLength).reverse().join('/') |
|
|
|
id: duplicateTabName, |
|
|
|
this.loadedTabs[index] = { |
|
|
|
name: duplicateTabName, |
|
|
|
id: duplicateTabName, |
|
|
|
title: duplicateTabTitle, |
|
|
|
name: duplicateTabName, |
|
|
|
icon, |
|
|
|
title: duplicateTabTitle, |
|
|
|
tooltip: duplicateTabName, |
|
|
|
icon, |
|
|
|
iconClass: helper.getPathIcon(duplicateTabName) |
|
|
|
tooltip: duplicateTabName, |
|
|
|
}) |
|
|
|
iconClass: helper.getPathIcon(duplicateTabName) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
break |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|