1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-09 23:32:10 -04:00

plugins: represent featured plugins in built-in browsers

This commit is contained in:
bbedward
2026-01-30 13:31:12 -05:00
parent f2d9066f90
commit 02edce2999
8 changed files with 101 additions and 15 deletions

View File

@@ -48,6 +48,14 @@ FloatingWindow {
filtered.push(plugin);
}
filtered.sort((a, b) => {
if (a.featured !== b.featured)
return a.featured ? -1 : 1;
if (a.firstParty !== b.firstParty)
return a.firstParty ? -1 : 1;
return 0;
});
filteredPlugins = filtered;
selectedIndex = -1;
keyboardNavigationActive = false;
@@ -411,6 +419,7 @@ FloatingWindow {
property bool isSelected: root.keyboardNavigationActive && index === root.selectedIndex
property bool isInstalled: modelData.installed || false
property bool isFirstParty: modelData.firstParty || false
property bool isFeatured: modelData.featured || false
property bool isCompatible: PluginService.checkPluginCompatibility(modelData.requires_dms)
color: isSelected ? Theme.primarySelected : Theme.withAlpha(Theme.surfaceVariant, 0.3)
border.color: isSelected ? Theme.primary : Theme.withAlpha(Theme.outline, 0.2)
@@ -449,6 +458,38 @@ FloatingWindow {
anchors.verticalCenter: parent.verticalCenter
}
Rectangle {
height: 16
width: featuredRow.implicitWidth + Theme.spacingXS * 2
radius: 8
color: Theme.withAlpha(Theme.secondary, 0.15)
border.color: Theme.withAlpha(Theme.secondary, 0.4)
border.width: 1
visible: isFeatured
anchors.verticalCenter: parent.verticalCenter
Row {
id: featuredRow
anchors.centerIn: parent
spacing: 2
DankIcon {
name: "star"
size: 10
color: Theme.secondary
anchors.verticalCenter: parent.verticalCenter
}
StyledText {
text: I18n.tr("featured")
font.pixelSize: Theme.fontSizeSmall - 2
color: Theme.secondary
font.weight: Font.Medium
anchors.verticalCenter: parent.verticalCenter
}
}
}
Rectangle {
height: 16
width: firstPartyText.implicitWidth + Theme.spacingXS * 2