@lvce-editor/extension-detail-view 7.23.2 → 7.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1545,11 +1545,13 @@ const register$1 = feature => {
|
|
|
1545
1545
|
const getFeatures = (selectedFeature, extension) => {
|
|
1546
1546
|
const allFeatures = Object.values(features);
|
|
1547
1547
|
const enabledFeatures = allFeatures.filter(item => item.isEnabled(extension));
|
|
1548
|
+
const hasSelectedFeature = enabledFeatures.some(item => item.id === selectedFeature);
|
|
1549
|
+
const actualSelectedFeature = hasSelectedFeature ? selectedFeature : enabledFeatures[0]?.id;
|
|
1548
1550
|
const converted = enabledFeatures.map(item => {
|
|
1549
1551
|
return {
|
|
1550
1552
|
id: item.id,
|
|
1551
1553
|
label: item.getLabel(),
|
|
1552
|
-
selected: item.id ===
|
|
1554
|
+
selected: item.id === actualSelectedFeature
|
|
1553
1555
|
};
|
|
1554
1556
|
});
|
|
1555
1557
|
return converted;
|
|
@@ -5582,6 +5584,7 @@ const loadContentInternal = async (state, platform, savedState, isTest = false)
|
|
|
5582
5584
|
selectedTab
|
|
5583
5585
|
} = restoreState(savedState);
|
|
5584
5586
|
const features = getFeatures(selectedFeature || Theme, extension);
|
|
5587
|
+
const actualSelectedFeature = features.find(feature => feature.selected)?.id || '';
|
|
5585
5588
|
const hasFeatures = features.length > 0;
|
|
5586
5589
|
const hasGithubReleases = Boolean(getGithubRepository(extension));
|
|
5587
5590
|
const tabs = getTabs(selectedTab, hasReadme, hasFeatures, hasChangelog || hasGithubReleases);
|
|
@@ -5647,6 +5650,7 @@ const loadContentInternal = async (state, platform, savedState, isTest = false)
|
|
|
5647
5650
|
resources,
|
|
5648
5651
|
scrollSource: Script,
|
|
5649
5652
|
scrollToTopButtonEnabled: true,
|
|
5653
|
+
selectedFeature: actualSelectedFeature,
|
|
5650
5654
|
selectedTab,
|
|
5651
5655
|
settingsButtonEnabled: true,
|
|
5652
5656
|
showSideBar,
|