mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Use extension's app preference tab name when available (#5798)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
d44599af00
commit
07c5de6e8e
@ -173,7 +173,7 @@ exports[`preferences - navigation to extension specific preferences given in pre
|
|||||||
id="extensions"
|
id="extensions"
|
||||||
>
|
>
|
||||||
<h2>
|
<h2>
|
||||||
registered-tab-page-id
|
Metrics tab
|
||||||
|
|
||||||
preferences
|
preferences
|
||||||
</h2>
|
</h2>
|
||||||
@ -473,7 +473,7 @@ exports[`preferences - navigation to extension specific preferences given in pre
|
|||||||
id="extensions"
|
id="extensions"
|
||||||
>
|
>
|
||||||
<h2>
|
<h2>
|
||||||
registered-tab-page-id
|
Metrics tab
|
||||||
|
|
||||||
preferences
|
preferences
|
||||||
</h2>
|
</h2>
|
||||||
@ -773,7 +773,7 @@ exports[`preferences - navigation to extension specific preferences given in pre
|
|||||||
id="extensions"
|
id="extensions"
|
||||||
>
|
>
|
||||||
<h2>
|
<h2>
|
||||||
duplicated-tab-page-id
|
Metrics tab
|
||||||
|
|
||||||
preferences
|
preferences
|
||||||
</h2>
|
</h2>
|
||||||
@ -3264,7 +3264,7 @@ exports[`preferences - navigation to extension specific preferences when navigat
|
|||||||
id="extensions"
|
id="extensions"
|
||||||
>
|
>
|
||||||
<h2>
|
<h2>
|
||||||
duplicated-tab-page-id
|
Metrics tab
|
||||||
|
|
||||||
preferences
|
preferences
|
||||||
</h2>
|
</h2>
|
||||||
|
|||||||
@ -20,9 +20,10 @@ const extensionPreferencesModelInjectable = getInjectable({
|
|||||||
return computed(() => {
|
return computed(() => {
|
||||||
const { extensionId, tabId } = pathParameters.get();
|
const { extensionId, tabId } = pathParameters.get();
|
||||||
const targetExtension = extensions.get().find((extension) => extension.sanitizedExtensionId === extensionId);
|
const targetExtension = extensions.get().find((extension) => extension.sanitizedExtensionId === extensionId);
|
||||||
|
const targetAppTab = targetExtension?.appPreferenceTabs.find(tab => tab.id === tabId);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
extensionName: targetExtension?.manifest.name,
|
extensionName: targetAppTab?.title ?? targetExtension?.manifest.name,
|
||||||
preferenceItems: getExtensionPreferenceItems(targetExtension, tabId),
|
preferenceItems: getExtensionPreferenceItems(targetExtension, tabId),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user