mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-10-08 14:36:48 +00:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
386ae0c581 | ||
|
|
1b84f2d6fb | ||
|
|
741f80d0b8 |
@@ -202,6 +202,13 @@
|
|||||||
"UndoLabel": "Enable AI features in Microsoft Edge",
|
"UndoLabel": "Enable AI features in Microsoft Edge",
|
||||||
"ApplyUndoText": "Enabling AI features in Microsoft Edge"
|
"ApplyUndoText": "Enabling AI features in Microsoft Edge"
|
||||||
},
|
},
|
||||||
|
"DisableChromeAI": {
|
||||||
|
"Label": "Disable AI features in Google Chrome",
|
||||||
|
"ToolTip": "Disables Google Chrome's built-in AI tools and integrations, including Gemini, AI search & suggestions, writing assistance, autofill and more. It also removes local AI models. This feature uses policies, which will lock down certain settings.",
|
||||||
|
"ApplyText": "Disabling AI features in Google Chrome",
|
||||||
|
"UndoLabel": "Enable AI features in Google Chrome",
|
||||||
|
"ApplyUndoText": "Enabling AI features in Google Chrome"
|
||||||
|
},
|
||||||
"DisablePaintAI": {
|
"DisablePaintAI": {
|
||||||
"Label": "Disable AI features in Paint",
|
"Label": "Disable AI features in Paint",
|
||||||
"ToolTip": "This will turn off AI features in Paint, such as the AI-powered image generation and editing tools. This feature uses policies, which will lock down certain settings.",
|
"ToolTip": "This will turn off AI features in Paint, such as the AI-powered image generation and editing tools. This feature uses policies, which will lock down certain settings.",
|
||||||
|
|||||||
+11
-6
@@ -157,18 +157,23 @@
|
|||||||
<Setter Property="Margin" Value="8,0,8,0"/>
|
<Setter Property="Margin" Value="8,0,8,0"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Column widths for the app table rows and header (dot | name | description | id) -->
|
<!-- Column widths for the app table rows and header (indicator | name | description | id) -->
|
||||||
<GridLength x:Key="AppTableDotColWidth">16</GridLength>
|
<GridLength x:Key="AppTableDotColWidth">16</GridLength>
|
||||||
<GridLength x:Key="AppTableNameColWidth">180</GridLength>
|
<GridLength x:Key="AppTableNameColWidth">180</GridLength>
|
||||||
<GridLength x:Key="AppTableDescColWidth">1*</GridLength>
|
<GridLength x:Key="AppTableDescColWidth">1*</GridLength>
|
||||||
<GridLength x:Key="AppTableIdColWidth">261</GridLength>
|
<GridLength x:Key="AppTableIdColWidth">261</GridLength>
|
||||||
|
|
||||||
<!-- Recommendation dot shape style for app table rows -->
|
<!-- Recommendation indicator style shared by circles, diamonds, and triangles -->
|
||||||
<Style x:Key="AppRecommendationDotStyle" TargetType="Ellipse">
|
<Style x:Key="AppRecommendationIndicatorStyle" TargetType="Shape">
|
||||||
<Setter Property="Width" Value="9"/>
|
<Setter Property="Width" Value="9"/>
|
||||||
<Setter Property="Height" Value="9"/>
|
<Setter Property="Height" Value="9"/>
|
||||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="RenderTransform">
|
||||||
|
<Setter.Value>
|
||||||
|
<TranslateTransform Y="1"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Container style for each dynamically-created app table row -->
|
<!-- Container style for each dynamically-created app table row -->
|
||||||
@@ -184,7 +189,7 @@
|
|||||||
<SolidColorBrush x:Key="ValidationErrorColor" Color="#c42b1c"/>
|
<SolidColorBrush x:Key="ValidationErrorColor" Color="#c42b1c"/>
|
||||||
<SolidColorBrush x:Key="ValidationSuccessColor" Color="#28a745"/>
|
<SolidColorBrush x:Key="ValidationSuccessColor" Color="#28a745"/>
|
||||||
|
|
||||||
<!-- App recommendation dot / legend colors -->
|
<!-- App recommendation indicator / legend colors -->
|
||||||
<SolidColorBrush x:Key="AppRecommendationSafeColor" Color="#4CAF50"/>
|
<SolidColorBrush x:Key="AppRecommendationSafeColor" Color="#4CAF50"/>
|
||||||
<SolidColorBrush x:Key="AppRecommendationOptionalColor" Color="#FFC107"/>
|
<SolidColorBrush x:Key="AppRecommendationOptionalColor" Color="#FFC107"/>
|
||||||
<SolidColorBrush x:Key="AppRecommendationUnsafeColor" Color="#F44336"/>
|
<SolidColorBrush x:Key="AppRecommendationUnsafeColor" Color="#F44336"/>
|
||||||
@@ -710,12 +715,12 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
<!-- Optional (default) -->
|
<!-- Optional (default) -->
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,0,16,0" ToolTip="%LANG:AppLegendOptionalTooltip%">
|
<StackPanel Orientation="Horizontal" Margin="0,0,16,0" ToolTip="%LANG:AppLegendOptionalTooltip%">
|
||||||
<Ellipse Width="9" Height="9" Fill="{DynamicResource AppRecommendationOptionalColor}" VerticalAlignment="Center" Margin="0,0,6,0"/>
|
<Polygon Points="4.5,0 9,4.5 4.5,9 0,4.5" Stretch="Fill" Width="9" Height="9" Fill="{DynamicResource AppRecommendationOptionalColor}" VerticalAlignment="Center" Margin="0,0,6,0"/>
|
||||||
<TextBlock Text="%LANG:AppLegendOptional%" Foreground="{DynamicResource AppFgColor}" FontSize="12" VerticalAlignment="Center" Opacity="0.8"/>
|
<TextBlock Text="%LANG:AppLegendOptional%" Foreground="{DynamicResource AppFgColor}" FontSize="12" VerticalAlignment="Center" Opacity="0.8"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<!-- Not Recommended (unsafe) -->
|
<!-- Not Recommended (unsafe) -->
|
||||||
<StackPanel Orientation="Horizontal" ToolTip="%LANG:AppLegendNotRecommendedTooltip%">
|
<StackPanel Orientation="Horizontal" ToolTip="%LANG:AppLegendNotRecommendedTooltip%">
|
||||||
<Ellipse Width="9" Height="9" Fill="{DynamicResource AppRecommendationUnsafeColor}" VerticalAlignment="Center" Margin="0,0,6,0"/>
|
<Polygon Points="0,9 4.5,0 9,9" Stretch="Fill" Width="9" Height="9" Fill="{DynamicResource AppRecommendationUnsafeColor}" VerticalAlignment="Center" Margin="0,0,6,0"/>
|
||||||
<TextBlock Text="%LANG:AppLegendNotRecommended%" Foreground="{DynamicResource AppFgColor}" FontSize="12" VerticalAlignment="Center" Opacity="0.8"/>
|
<TextBlock Text="%LANG:AppLegendNotRecommended%" Foreground="{DynamicResource AppFgColor}" FontSize="12" VerticalAlignment="Center" Opacity="0.8"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ function Add-AppsToMainWindow {
|
|||||||
$checkbox.IsChecked = $app.IsChecked
|
$checkbox.IsChecked = $app.IsChecked
|
||||||
$checkbox.Style = $Window.Resources['AppsPanelCheckBoxStyle']
|
$checkbox.Style = $Window.Resources['AppsPanelCheckBoxStyle']
|
||||||
|
|
||||||
# Build table row: Recommendation dot | Name | Description | App ID
|
# Build table row: Recommendation indicator | Name | Description | App ID
|
||||||
$row = New-Object System.Windows.Controls.Grid
|
$row = New-Object System.Windows.Controls.Grid
|
||||||
$row.Style = $Window.Resources['AppTableRowStyle']
|
$row.Style = $Window.Resources['AppTableRowStyle']
|
||||||
$c0 = New-Object System.Windows.Controls.ColumnDefinition; $c0.Width = $Window.Resources['AppTableDotColWidth']
|
$c0 = New-Object System.Windows.Controls.ColumnDefinition; $c0.Width = $Window.Resources['AppTableDotColWidth']
|
||||||
@@ -441,16 +441,30 @@ function Add-AppsToMainWindow {
|
|||||||
$row.ColumnDefinitions.Add($c0); $row.ColumnDefinitions.Add($c1)
|
$row.ColumnDefinitions.Add($c0); $row.ColumnDefinitions.Add($c1)
|
||||||
$row.ColumnDefinitions.Add($c2); $row.ColumnDefinitions.Add($c3)
|
$row.ColumnDefinitions.Add($c2); $row.ColumnDefinitions.Add($c3)
|
||||||
|
|
||||||
$dot = New-Object System.Windows.Shapes.Ellipse
|
$indicator = switch ($app.Recommendation) {
|
||||||
$dot.Style = $Window.Resources['AppRecommendationDotStyle']
|
'safe' { New-Object System.Windows.Shapes.Ellipse }
|
||||||
$dot.Fill = switch ($app.Recommendation) { 'safe' { $brushSafe } 'unsafe' { $brushUnsafe } default { $brushDefault } }
|
'unsafe' {
|
||||||
|
$triangle = New-Object System.Windows.Shapes.Polygon
|
||||||
|
$triangle.Points = [System.Windows.Media.PointCollection]::Parse('0,9 4.5,0 9,9')
|
||||||
|
$triangle.Stretch = 'Fill'
|
||||||
|
$triangle
|
||||||
|
}
|
||||||
|
default {
|
||||||
|
$diamond = New-Object System.Windows.Shapes.Polygon
|
||||||
|
$diamond.Points = [System.Windows.Media.PointCollection]::Parse('4.5,0 9,4.5 4.5,9 0,4.5')
|
||||||
|
$diamond.Stretch = 'Fill'
|
||||||
|
$diamond
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$indicator.Style = $Window.Resources['AppRecommendationIndicatorStyle']
|
||||||
|
$indicator.Fill = switch ($app.Recommendation) { 'safe' { $brushSafe } 'unsafe' { $brushUnsafe } default { $brushDefault } }
|
||||||
$recommendationKey = switch ($app.Recommendation) {
|
$recommendationKey = switch ($app.Recommendation) {
|
||||||
'safe' { 'AppLegendRecommendedTooltip' }
|
'safe' { 'AppLegendRecommendedTooltip' }
|
||||||
'unsafe' { 'AppLegendNotRecommendedTooltip' }
|
'unsafe' { 'AppLegendNotRecommendedTooltip' }
|
||||||
default { 'AppLegendOptionalTooltip' }
|
default { 'AppLegendOptionalTooltip' }
|
||||||
}
|
}
|
||||||
$dot.SetResourceReference([System.Windows.FrameworkElement]::ToolTipProperty, "Language_$recommendationKey")
|
$indicator.SetResourceReference([System.Windows.FrameworkElement]::ToolTipProperty, "Language_$recommendationKey")
|
||||||
[System.Windows.Controls.Grid]::SetColumn($dot, 0)
|
[System.Windows.Controls.Grid]::SetColumn($indicator, 0)
|
||||||
|
|
||||||
$tbName = New-Object System.Windows.Controls.TextBlock
|
$tbName = New-Object System.Windows.Controls.TextBlock
|
||||||
$tbName.Text = $app.FriendlyName
|
$tbName.Text = $app.FriendlyName
|
||||||
@@ -469,7 +483,7 @@ function Add-AppsToMainWindow {
|
|||||||
$tbId.ToolTip = $app.AppIdDisplay
|
$tbId.ToolTip = $app.AppIdDisplay
|
||||||
[System.Windows.Controls.Grid]::SetColumn($tbId, 3)
|
[System.Windows.Controls.Grid]::SetColumn($tbId, 3)
|
||||||
|
|
||||||
$row.Children.Add($dot) | Out-Null
|
$row.Children.Add($indicator) | Out-Null
|
||||||
$row.Children.Add($tbName) | Out-Null
|
$row.Children.Add($tbName) | Out-Null
|
||||||
$row.Children.Add($tbDesc) | Out-Null
|
$row.Children.Add($tbDesc) | Out-Null
|
||||||
$row.Children.Add($tbId) | Out-Null
|
$row.Children.Add($tbId) | Out-Null
|
||||||
|
|||||||
@@ -89,4 +89,19 @@ Describe 'FeatureId parameter contracts' {
|
|||||||
|
|
||||||
$missing | Should -HaveCount 0 -Because ($missing -join '; ')
|
$missing | Should -HaveCount 0 -Because ($missing -join '; ')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
It 'has an en-US Features translation with a Label for every FeatureId' {
|
||||||
|
$enUsPath = Join-Path $script:RepoRoot 'Config\Languages\en-US\Features.json'
|
||||||
|
$translations = (Get-Content -LiteralPath $enUsPath -Raw | ConvertFrom-Json).Features
|
||||||
|
$missing = @(
|
||||||
|
foreach ($feature in $script:Features) {
|
||||||
|
$entry = $translations.PSObject.Properties[$feature.FeatureId]
|
||||||
|
if ($null -eq $entry -or [string]::IsNullOrWhiteSpace($entry.Value.Label)) {
|
||||||
|
$feature.FeatureId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
$missing | Should -HaveCount 0 -Because ($missing -join ', ')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ BeforeAll {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Describe 'Get-StartMenuUserNameFromPath' {
|
Describe 'Get-StartMenuUserNameFromPath' {
|
||||||
|
BeforeEach {
|
||||||
|
# Restore copies are named to the second; clear them so tests sharing $TestDrive cannot see each other's copy
|
||||||
|
Get-ChildItem -LiteralPath $TestDrive -Filter 'Win11Debloat-StartRestore-*.bak' | Remove-Item -Force
|
||||||
|
}
|
||||||
|
|
||||||
It 'extracts a user name from a start-menu path and falls back for unknown paths' {
|
It 'extracts a user name from a start-menu path and falls back for unknown paths' {
|
||||||
Get-StartMenuUserNameFromPath -StartMenuBinFile 'C:\Users\Alice\AppData\Local\Packages\Start\start2.bin' | Should -Be 'Alice'
|
Get-StartMenuUserNameFromPath -StartMenuBinFile 'C:\Users\Alice\AppData\Local\Packages\Start\start2.bin' | Should -Be 'Alice'
|
||||||
Get-StartMenuUserNameFromPath -StartMenuBinFile 'C:\Temp\start2.bin' | Should -Be 'unknown'
|
Get-StartMenuUserNameFromPath -StartMenuBinFile 'C:\Temp\start2.bin' | Should -Be 'unknown'
|
||||||
|
|||||||
Reference in New Issue
Block a user