Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7dd15ed064 | ||
|
|
d169434157 | ||
|
|
6efed72bf2 | ||
|
|
15db311801 | ||
|
|
82d509129b | ||
|
|
939d838e35 | ||
|
|
6de4ce58c4 | ||
|
|
ee66196d9a | ||
|
|
3c13a9e837 | ||
|
|
22b23a9ece | ||
|
|
4ae385b7fc | ||
|
|
d9abc7f0b2 |
2
.github/workflows/quality-checks.yaml
vendored
2
.github/workflows/quality-checks.yaml
vendored
@@ -1,6 +1,6 @@
|
||||
name: Quality checks
|
||||
|
||||
on: push
|
||||
on: [ push, pull_request ]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
||||
1
.github/workflows/security-checks.yaml
vendored
1
.github/workflows/security-checks.yaml
vendored
@@ -2,6 +2,7 @@ name: Security checks
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
|
||||
|
||||
2
.github/workflows/test.yaml
vendored
2
.github/workflows/test.yaml
vendored
@@ -1,6 +1,6 @@
|
||||
name: Test
|
||||
|
||||
on: push
|
||||
on: [ push, pull_request ]
|
||||
|
||||
jobs:
|
||||
run-tests:
|
||||
|
||||
23
CHANGELOG.md
23
CHANGELOG.md
@@ -1,5 +1,28 @@
|
||||
# Changelog
|
||||
|
||||
## 0.7.4 (2020-09-12)
|
||||
|
||||
* fix checked checkbox has blue border | [commit](https://github.com/undergroundwires/privacy.sexy/commit/4ae385b7fcea9014a68442714b7d99e2ee7df7d0)
|
||||
* fix spectre protection getting single lined #31 | [commit](https://github.com/undergroundwires/privacy.sexy/commit/22b23a9ece446c7f9abd4ede293051eb616ad50a)
|
||||
* fix missing reg value in denying app access to account | [commit](https://github.com/undergroundwires/privacy.sexy/commit/3c13a9e837e06e097450b31d7eb0c0e6bf20cefb)
|
||||
* fix wrong path in clear all firefox user profile settings | [commit](https://github.com/undergroundwires/privacy.sexy/commit/ee66196d9a60f27d17ae7f62d02b4f119a47e6e0)
|
||||
|
||||
[compare](https://github.com/undergroundwires/privacy.sexy/compare/0.7.3...0.7.4)
|
||||
|
||||
## 0.7.3 (2020-09-12)
|
||||
|
||||
* fix vscode settings file override and add more configs | [commit](https://github.com/undergroundwires/privacy.sexy/commit/a0d61728ead04b4455437f85820121a848db9e00)
|
||||
* fix nvidia tweak error message, categorize and add reversibility | [commit](https://github.com/undergroundwires/privacy.sexy/commit/99a2035fdb0766a4dfc2753133eab0d7666516cd)
|
||||
* improve CPU specific tweaks by conditional platform checks and reversibility | [commit](https://github.com/undergroundwires/privacy.sexy/commit/8df5faf4ef05a49da63973bd0fbb5c5d07d5bd93)
|
||||
* fix wrong path to the main telemetry file | [commit](https://github.com/undergroundwires/privacy.sexy/commit/de4ac978bdda79573b36d355697b8a028d2c0beb)
|
||||
* fix naming of firefox cleanup to mention profiles | [commit](https://github.com/undergroundwires/privacy.sexy/commit/3ab48b1cf5f7f934f07e468ef2318ccee07f530c)
|
||||
* add reversibility and more scripts to denying app access with better structure | [commit](https://github.com/undergroundwires/privacy.sexy/commit/1d465ee3189d0e5a827453b3f0eb4361efe23770)
|
||||
* fix comment lines are being detected as duplicate in validation | [commit](https://github.com/undergroundwires/privacy.sexy/commit/b6ccb5927a20412976a54fd2215eb645092f98a8)
|
||||
* add more detailed error message | [commit](https://github.com/undergroundwires/privacy.sexy/commit/1f11c39773c12eccfb3efb898b58c2f6f37ab9ca)
|
||||
* fix typo in a test | [commit](https://github.com/undergroundwires/privacy.sexy/commit/1f19b2528a69383e63e579d2885f01cd804abf6c)
|
||||
|
||||
[compare](https://github.com/undergroundwires/privacy.sexy/compare/0.7.2...0.7.3)
|
||||
|
||||
## 0.7.2 (2020-09-06)
|
||||
|
||||
* update onesync documentation and do not recommend it as it breaks other apps | [commit](https://github.com/undergroundwires/privacy.sexy/commit/f36d8bfc7848bb65ac0c641e318a689bf3816ccf)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
## Get started
|
||||
|
||||
- Online version: [https://privacy.sexy](https://privacy.sexy)
|
||||
- or download latest desktop version for [Windows](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.2/privacy.sexy-Setup-0.7.2.exe), [Linux](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.2/privacy.sexy-0.7.2.AppImage), [macOS](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.2/privacy.sexy-0.7.2.dmg)
|
||||
- or download latest desktop version for [Windows](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.4/privacy.sexy-Setup-0.7.4.exe), [Linux](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.4/privacy.sexy-0.7.4.AppImage), [macOS](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.4/privacy.sexy-0.7.4.dmg)
|
||||
- 💡 Come back regularly to apply latest version for stronger privacy and security.
|
||||
|
||||
[](https://privacy.sexy)
|
||||
@@ -49,8 +49,8 @@
|
||||
- Development: `npm run serve` to compile & hot-reload for development.
|
||||
- Production: `npm run build` to prepare files for distribution.
|
||||
- Or run using Docker:
|
||||
1. Build: `docker build -t undergroundwires/privacy.sexy:0.7.2 .`
|
||||
2. Run: `docker run -it -p 8080:80 --rm --name privacy.sexy-0.7.2 undergroundwires/privacy.sexy:0.7.2`
|
||||
1. Build: `docker build -t undergroundwires/privacy.sexy:0.7.4 .`
|
||||
2. Run: `docker run -it -p 8080:80 --rm --name privacy.sexy-0.7.4 undergroundwires/privacy.sexy:0.7.4`
|
||||
|
||||
## Architecture
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "privacy.sexy",
|
||||
"version": "0.7.2",
|
||||
"version": "0.7.4",
|
||||
"author": "undergroundwires",
|
||||
"description": "Enforce privacy & security best-practices on Windows, because privacy is sexy 🍑🍆",
|
||||
"private": true,
|
||||
|
||||
@@ -2,6 +2,7 @@ import { IFilterResult } from './IFilterResult';
|
||||
import { ISignal } from '@/infrastructure/Events/Signal';
|
||||
|
||||
export interface IUserFilter {
|
||||
readonly currentFilter: IFilterResult | undefined;
|
||||
readonly filtered: ISignal<IFilterResult>;
|
||||
readonly filterRemoved: ISignal<void>;
|
||||
setFilter(filter: string): void;
|
||||
|
||||
@@ -8,6 +8,7 @@ import { Signal } from '@/infrastructure/Events/Signal';
|
||||
export class UserFilter implements IUserFilter {
|
||||
public readonly filtered = new Signal<IFilterResult>();
|
||||
public readonly filterRemoved = new Signal<void>();
|
||||
public currentFilter: IFilterResult | undefined;
|
||||
|
||||
constructor(private application: IApplication) {
|
||||
|
||||
@@ -28,11 +29,12 @@ export class UserFilter implements IUserFilter {
|
||||
filteredCategories,
|
||||
filter,
|
||||
);
|
||||
|
||||
this.currentFilter = matches;
|
||||
this.filtered.notify(matches);
|
||||
}
|
||||
|
||||
public removeFilter(): void {
|
||||
this.currentFilter = undefined;
|
||||
this.filterRemoved.notify();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ actions:
|
||||
name: Clear all Firefox user profiles, settings and data
|
||||
recommend: false
|
||||
code: |-
|
||||
rd "%localappdata%\Local\Mozilla\Firefox\Profiles"
|
||||
rd /s /q "%LOCALAPPDATA%\Mozilla\Firefox\Profiles"
|
||||
rd /s /q "%APPDATA%\Mozilla\Firefox\Profiles"
|
||||
-
|
||||
name: Clear Opera traces
|
||||
@@ -346,7 +346,15 @@ actions:
|
||||
-
|
||||
name: Clear main telemetry file
|
||||
recommend: true
|
||||
code: echo "" > %ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl
|
||||
code: |-
|
||||
if exist "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl" (
|
||||
takeown /f "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl" /r /d y
|
||||
icacls "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl" /grant administrators:F /t
|
||||
echo "" > "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl"
|
||||
echo Clear successful: "%ProgramData%\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl"
|
||||
) else (
|
||||
echo "Main telemetry file does not exist. Good!"
|
||||
)
|
||||
-
|
||||
name: Clear Event Logs in Event Viewer
|
||||
recommend: false
|
||||
@@ -376,7 +384,7 @@ actions:
|
||||
-
|
||||
name: Empty trash bin
|
||||
recommend: false
|
||||
code: rd /s %systemdrive%\$Recycle.bin
|
||||
code: Powershell -Command "$bin = (New-Object -ComObject Shell.Application).NameSpace(10);$bin.items() | ForEach { Write-Host "Deleting $($_.Name) from Recycle Bin"; Remove-Item $_.Path -Recurse -Force}"
|
||||
-
|
||||
name: Enable Reset Base in Dism Component Store
|
||||
recommend: true
|
||||
@@ -611,7 +619,7 @@ actions:
|
||||
:: For older Windows (before 1903)
|
||||
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{C1D23ACC-752B-43E5-8448-8D0E519CD6D6}" /t REG_SZ /v "Value" /d "Deny" /f
|
||||
:: Using GPO (re-activation through GUI is not possible)
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessAccountInfo" /t REG_DWORD/f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessAccountInfo" /t REG_DWORD /d 2 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessAccountInfo_UserInControlOfTheseApps" /t REG_MULTI_SZ /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessAccountInfo_ForceAllowTheseApps" /t REG_MULTI_SZ /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessAccountInfo_ForceDenyTheseApps" /t REG_MULTI_SZ /f
|
||||
@@ -1305,7 +1313,7 @@ actions:
|
||||
-
|
||||
name: Do not send file samples for further analysis
|
||||
recommend: true
|
||||
docc:
|
||||
doc:
|
||||
- https://docs.microsoft.com/en-us/windows/client-management/mdm/policy-csp-defender#defender-submitsamplesconsent
|
||||
code: reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "SubmitSamplesConsent" /t REG_DWORD /d 2 /f
|
||||
revertCode: reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "SubmitSamplesConsent" /t REG_DWORD /d 1 /f
|
||||
@@ -1755,7 +1763,7 @@ actions:
|
||||
children:
|
||||
-
|
||||
name: Spectre variant 2 and meltdown (own OS)
|
||||
code:
|
||||
code: |-
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverrideMask" /t REG_DWORD /d 3 /f
|
||||
wmic cpu get name | findstr "Intel" >nul && (
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d 0 /f
|
||||
@@ -1763,7 +1771,7 @@ actions:
|
||||
wmic cpu get name | findstr "AMD" >nul && (
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d 64 /f
|
||||
)
|
||||
revertCode:
|
||||
revertCode: |-
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverrideMask" /t REG_DWORD /d 3 /f
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d 3 /f
|
||||
-
|
||||
@@ -2862,7 +2870,7 @@ actions:
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /t REG_DWORD /v "DisableFileSyncNGSC" /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /t REG_DWORD /v "DisableFileSync" /d 0 /f
|
||||
-
|
||||
name: Prevent automatical OneDrive install for current user
|
||||
name: Prevent automatic OneDrive install for current user
|
||||
code: reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDriveSetup" /f
|
||||
revertCode: |-
|
||||
if %PROCESSOR_ARCHITECTURE%==x86 (
|
||||
@@ -3059,44 +3067,44 @@ actions:
|
||||
-
|
||||
name: DirectX Configuration Database capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "DirectX.Configuration.Database*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "DirectX.Configuration.Database*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"DirectX.Configuration.Database*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Internet Explorer 11 capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Browser.InternetExplorer*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Browser.InternetExplorer*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Browser.InternetExplorer*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Math Recognizer capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "MathRecognizer*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "MathRecognizer*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"MathRecognizer*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: OneSync capability (breaks Mail, People, and Calendar)
|
||||
docs: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/features-on-demand-non-language-fod#onesync
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "OneCoreUAP.OneSync*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "OneCoreUAP.OneSync*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"OneCoreUAP.OneSync*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: OpenSSH client capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "OpenSSH.Client*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "OpenSSH.Client*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"OpenSSH.Client*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: PowerShell ISE capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.PowerShell.ISE*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.PowerShell.ISE*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Microsoft.Windows.PowerShell.ISE*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Print Management Console capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Print.Management.Console*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Print.Management.Console*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Print.Management.Console*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Quick Assist capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "App.Support.QuickAssist*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "App.Support.QuickAssist*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"App.Support.QuickAssist*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Steps Recorder capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "App.StepsRecorder*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "App.StepsRecorder*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"App.StepsRecorder*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Windows Fax and Scan capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Print.Fax.Scan*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Print.Fax.Scan*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Print.Fax.Scan*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
# Following are excluded because:
|
||||
# 1. They are not widely considered as "bloatware" as the community
|
||||
# 2. Do not have known privacy issues
|
||||
@@ -3104,190 +3112,190 @@ actions:
|
||||
# -
|
||||
# name: WordPad capability
|
||||
# code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.WordPad*" | Remove-WindowsCapability -Online"
|
||||
# revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.WordPad*" | Add-WindowsCapability -Online"
|
||||
# revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Microsoft.Windows.WordPad*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
# -
|
||||
# name: Paint capability
|
||||
# code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.MSPaint*" | Remove-WindowsCapability -Online"
|
||||
# revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.MSPaint*" | Add-WindowsCapability -Online"
|
||||
# revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Microsoft.Windows.MSPaint*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
# -
|
||||
# name: Notepad capability
|
||||
# code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.Notepad*" | Remove-WindowsCapability -Online"
|
||||
# revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.Notepad*" | Add-WindowsCapability -Online"
|
||||
# revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Microsoft.Windows.Notepad*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
category: Not preinstalled
|
||||
children:
|
||||
-
|
||||
name: .NET Framework capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "NetFX3*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "NetFX3*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"NetFX3*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Mixed Reality capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Analog.Holographic.Desktop*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Analog.Holographic.Desktop*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Analog.Holographic.Desktop*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Wireless Display capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "App.WirelessDisplay.Connect*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "App.WirelessDisplay.Connect*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"App.WirelessDisplay.Connect*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Accessibility - Braille Support capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Accessibility.Braille*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Accessibility.Braille*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Accessibility.Braille*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Developer Mode capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Tools.DeveloperMode.Core*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Tools.DeveloperMode.Core*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Tools.DeveloperMode.Core*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Graphics Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Tools.Graphics.DirectX*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Tools.Graphics.DirectX*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Tools.Graphics.DirectX*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: IrDA capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Network.Irda*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Network.Irda*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Network.Irda*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Microsoft WebDriver capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.WebDriver*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.WebDriver*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Microsoft.WebDriver*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: MSIX Packaging Tool Driver capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Msix.PackagingTool.Driver*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Msix.PackagingTool.Driver*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Msix.PackagingTool.Driver*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
category: Networking tools
|
||||
children:
|
||||
-
|
||||
name: RAS Connection Manager Administration Kit (CMAK) capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "RasCMAK.Client*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "RasCMAK.Client*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"RasCMAK.Client*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: RIP Listener capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "RIP.Listener*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "RIP.Listener*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"RIP.Listener*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Simple Network Management Protocol (SNMP) capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "SNMP.Client*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "SNMP.Client*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"SNMP.Client*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: SNMP WMI Provider capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "WMI-SNMP-Provider.Client*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "WMI-SNMP-Provider.Client*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"WMI-SNMP-Provider.Client*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: OpenSSH Server capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "OpenSSH.Server*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "OpenSSH.Server*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"OpenSSH.Server*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
category: Printing
|
||||
children:
|
||||
-
|
||||
name: Enterprise Cloud Print capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Print.EnterpriseCloudPrint*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Print.EnterpriseCloudPrint*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Print.EnterpriseCloudPrint*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Mopria Cloud Service capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Print.MopriaCloudService*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Print.MopriaCloudService*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Print.MopriaCloudService*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
category: Remote server administration tools (RSAT)
|
||||
children:
|
||||
-
|
||||
name: Active Directory Domain Services and Lightweight Directory Services Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.ActiveDirectory.DS-LDS.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.ActiveDirectory.DS-LDS.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.ActiveDirectory.DS-LDS.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: BitLocker Drive Encryption Administration Utilities capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.BitLocker.Recovery.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.BitLocker.Recovery.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.BitLocker.Recovery.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Active Directory Certificate Services Tools v
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.CertificateServices.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.CertificateServices.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.CertificateServices.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: DHCP Server Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.DHCP.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.DHCP.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.DHCP.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: DNS Server Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.Dns.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.Dns.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.Dns.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Failover Clustering Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.FailoverCluster.Management.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.FailoverCluster.Management.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.FailoverCluster.Management.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: File Services Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.FileServices.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.FileServices.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.FileServices.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Group Policy Management Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.GroupPolicy.Management.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.GroupPolicy.Management.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.GroupPolicy.Management.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: IP Address Management (IPAM) Client capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.IPAM.Client.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.IPAM.Client.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.IPAM.Client.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Data Center Bridging LLDP Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.LLDP.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.LLDP.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.LLDP.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Network Controller Management Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.NetworkController.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.NetworkController.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.NetworkController.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Network Load Balancing Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.NetworkLoadBalancing.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.NetworkLoadBalancing.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.NetworkLoadBalancing.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Remote Access Management Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.RemoteAccess.Management.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.RemoteAccess.Management.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.RemoteAccess.Management.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Server Manager Tools
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.ServerManager.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.ServerManager.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.ServerManager.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Shielded VM Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.Shielded.VM.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.Shielded.VM.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.Shielded.VM.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Storage Replica Module for Windows PowerShell capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.StorageReplica.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.StorageReplica.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.StorageReplica.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Volume Activation Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.VolumeActivation.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.VolumeActivation.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.VolumeActivation.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Windows Server Update Services Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.WSUS.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.WSUS.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.WSUS.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Storage Migration Service Management Tools capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.StorageMigrationService.Management.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.StorageMigrationService.Management.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.StorageMigrationService.Management.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Systems Insights Module for Windows PowerShell capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.SystemInsights.Management.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.SystemInsights.Management.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.SystemInsights.Management.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
category: Storage
|
||||
children:
|
||||
-
|
||||
name: Windows Storage Management capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.StorageManagement*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.StorageManagement*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Microsoft.Windows.StorageManagement*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: OneCore Storage Management capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.OneCore.StorageManagement*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.OneCore.StorageManagement*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Microsoft.OneCore.StorageManagement*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: Windows Emergency Management Services and Serial Console capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Windows.Desktop.EMS-SAC.Tools*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Windows.Desktop.EMS-SAC.Tools*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Windows.Desktop.EMS-SAC.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
name: XPS Viewer capability
|
||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "XPS.Viewer*" | Remove-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "XPS.Viewer*" | Add-WindowsCapability -Online"
|
||||
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"XPS.Viewer*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||
-
|
||||
category: Advanced settings
|
||||
children:
|
||||
@@ -3339,4 +3347,4 @@ actions:
|
||||
code: |-
|
||||
del /f /q %AppData%\Microsoft\Windows\Start Menu\Programs\Startup\privacy-cleanup.bat
|
||||
copy "%~dpnx0" "%AppData%\Microsoft\Windows\Start Menu\Programs\Startup\privacy-cleanup.bat"
|
||||
revertCode: del /f /q %AppData%\Microsoft\Windows\Start Menu\Programs\Startup\privacy-cleanup.bat
|
||||
revertCode: del /f /q %AppData%\Microsoft\Windows\Start Menu\Programs\Startup\privacy-cleanup.bat
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
import App from './App.vue';
|
||||
import { ApplicationBootstrapper } from './presentation/Bootstrapping/ApplicationBootstrapper';
|
||||
import 'core-js/fn/array/flat-map'; // Here until Vue 3 & CLI v4 https://github.com/vuejs/vue-cli/issues/3834
|
||||
|
||||
new ApplicationBootstrapper()
|
||||
.bootstrap(Vue);
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
state.filter.filtered.on(this.handleFiltered);
|
||||
// Update initial state
|
||||
await this.initializeNodesAsync(this.categoryId);
|
||||
await this.initializeFilter(state.filter.currentFilter);
|
||||
}
|
||||
|
||||
public async toggleNodeSelectionAsync(event: INodeSelectedEvent) {
|
||||
@@ -84,6 +85,14 @@
|
||||
(category: ICategory) => node.id === getCategoryNodeId(category));
|
||||
}
|
||||
|
||||
private initializeFilter(currentFilter: IFilterResult | undefined) {
|
||||
if (!currentFilter) {
|
||||
this.handleFilterRemoved();
|
||||
} else {
|
||||
this.handleFiltered(currentFilter);
|
||||
}
|
||||
}
|
||||
|
||||
private handleSelectionChanged(selectedScripts: ReadonlyArray<SelectedScript>): void {
|
||||
this.selectedNodeIds = selectedScripts
|
||||
.map((node) => node.id);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
Node,
|
||||
},
|
||||
})
|
||||
export default class SelectableTree extends Vue {
|
||||
export default class SelectableTree extends Vue { // Keep it stateless to make it easier to switch out
|
||||
@Prop() public filterPredicate?: FilterPredicate;
|
||||
@Prop() public filterText?: string;
|
||||
@Prop() public selectedNodeIds?: ReadonlyArray<string>;
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
public isSearching = false;
|
||||
public searchHasMatches = false;
|
||||
|
||||
|
||||
public async mounted() {
|
||||
const state = await this.getCurrentStateAsync();
|
||||
this.repositoryUrl = state.app.repositoryUrl;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
&-checkbox {
|
||||
&.checked {
|
||||
background: $accent !important;
|
||||
border-color: $accent !important;
|
||||
}
|
||||
&.indeterminate {
|
||||
border-color: $gray !important;
|
||||
|
||||
@@ -7,129 +7,156 @@ import 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
describe('UserFilter', () => {
|
||||
it('signals when removing filter', () => {
|
||||
// arrange
|
||||
let isCalled = false;
|
||||
const sut = new UserFilter(new ApplicationStub());
|
||||
sut.filterRemoved.on(() => isCalled = true);
|
||||
// act
|
||||
sut.removeFilter();
|
||||
// assert
|
||||
expect(isCalled).to.be.equal(true);
|
||||
});
|
||||
it('signals when no matches', () => {
|
||||
// arrange
|
||||
let actual: IFilterResult;
|
||||
const nonMatchingFilter = 'non matching filter';
|
||||
const sut = new UserFilter(new ApplicationStub());
|
||||
sut.filtered.on((filterResult) => actual = filterResult);
|
||||
// act
|
||||
sut.setFilter(nonMatchingFilter);
|
||||
// assert
|
||||
expect(actual.hasAnyMatches()).be.equal(false);
|
||||
expect(actual.categoryMatches).to.have.lengthOf(0);
|
||||
expect(actual.scriptMatches).to.have.lengthOf(0);
|
||||
expect(actual.query).to.equal(nonMatchingFilter);
|
||||
});
|
||||
describe('signals when script matches', () => {
|
||||
it('code matches', () => {
|
||||
describe('removeFilter', () => {
|
||||
it('signals when removing filter', () => {
|
||||
// arrange
|
||||
const code = 'HELLO world';
|
||||
const filter = 'Hello WoRLD';
|
||||
let actual: IFilterResult;
|
||||
const script = new ScriptStub('id').withCode(code);
|
||||
const category = new CategoryStub(33).withScript(script);
|
||||
const sut = new UserFilter(new ApplicationStub()
|
||||
.withAction(category));
|
||||
sut.filtered.on((filterResult) => actual = filterResult);
|
||||
let isCalled = false;
|
||||
const sut = new UserFilter(new ApplicationStub());
|
||||
sut.filterRemoved.on(() => isCalled = true);
|
||||
// act
|
||||
sut.setFilter(filter);
|
||||
sut.removeFilter();
|
||||
// assert
|
||||
expect(actual.hasAnyMatches()).be.equal(true);
|
||||
expect(actual.categoryMatches).to.have.lengthOf(0);
|
||||
expect(actual.scriptMatches).to.have.lengthOf(1);
|
||||
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
||||
expect(actual.query).to.equal(filter);
|
||||
expect(isCalled).to.be.equal(true);
|
||||
});
|
||||
it('revertCode matches', () => {
|
||||
it('currentFilter is undefined', () => {
|
||||
// arrange
|
||||
const revertCode = 'HELLO world';
|
||||
const filter = 'Hello WoRLD';
|
||||
let actual: IFilterResult;
|
||||
const script = new ScriptStub('id').withRevertCode(revertCode);
|
||||
const category = new CategoryStub(33).withScript(script);
|
||||
const sut = new UserFilter(new ApplicationStub()
|
||||
.withAction(category));
|
||||
sut.filtered.on((filterResult) => actual = filterResult);
|
||||
const sut = new UserFilter(new ApplicationStub());
|
||||
// act
|
||||
sut.setFilter(filter);
|
||||
sut.removeFilter();
|
||||
// assert
|
||||
expect(actual.hasAnyMatches()).be.equal(true);
|
||||
expect(actual.categoryMatches).to.have.lengthOf(0);
|
||||
expect(actual.scriptMatches).to.have.lengthOf(1);
|
||||
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
||||
expect(actual.query).to.equal(filter);
|
||||
});
|
||||
it('name matches', () => {
|
||||
// arrange
|
||||
const name = 'HELLO world';
|
||||
const filter = 'Hello WoRLD';
|
||||
let actual: IFilterResult;
|
||||
const script = new ScriptStub('id').withName(name);
|
||||
const category = new CategoryStub(33).withScript(script);
|
||||
const sut = new UserFilter(new ApplicationStub()
|
||||
.withAction(category));
|
||||
sut.filtered.on((filterResult) => actual = filterResult);
|
||||
// act
|
||||
sut.setFilter(filter);
|
||||
// assert
|
||||
expect(actual.hasAnyMatches()).be.equal(true);
|
||||
expect(actual.categoryMatches).to.have.lengthOf(0);
|
||||
expect(actual.scriptMatches).to.have.lengthOf(1);
|
||||
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
||||
expect(actual.query).to.equal(filter);
|
||||
expect(sut.currentFilter).to.be.equal(undefined);
|
||||
});
|
||||
});
|
||||
it('signals when category matches', () => {
|
||||
// arrange
|
||||
const categoryName = 'HELLO world';
|
||||
const filter = 'Hello WoRLD';
|
||||
let actual: IFilterResult;
|
||||
const category = new CategoryStub(55).withName(categoryName);
|
||||
const sut = new UserFilter(new ApplicationStub()
|
||||
.withAction(category));
|
||||
sut.filtered.on((filterResult) => actual = filterResult);
|
||||
// act
|
||||
sut.setFilter(filter);
|
||||
// assert
|
||||
expect(actual.hasAnyMatches()).be.equal(true);
|
||||
expect(actual.categoryMatches).to.have.lengthOf(1);
|
||||
expect(actual.categoryMatches[0]).to.deep.equal(category);
|
||||
expect(actual.scriptMatches).to.have.lengthOf(0);
|
||||
expect(actual.query).to.equal(filter);
|
||||
});
|
||||
it('signals when category and script matches', () => {
|
||||
// arrange
|
||||
const matchingText = 'HELLO world';
|
||||
const filter = 'Hello WoRLD';
|
||||
let actual: IFilterResult;
|
||||
const script = new ScriptStub('script')
|
||||
.withName(matchingText);
|
||||
const category = new CategoryStub(55)
|
||||
.withName(matchingText)
|
||||
.withScript(script);
|
||||
const app = new ApplicationStub()
|
||||
.withAction(category);
|
||||
const sut = new UserFilter(app);
|
||||
sut.filtered.on((filterResult) => actual = filterResult);
|
||||
// act
|
||||
sut.setFilter(filter);
|
||||
// assert
|
||||
expect(actual.hasAnyMatches()).be.equal(true);
|
||||
expect(actual.categoryMatches).to.have.lengthOf(1);
|
||||
expect(actual.categoryMatches[0]).to.deep.equal(category);
|
||||
expect(actual.scriptMatches).to.have.lengthOf(1);
|
||||
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
||||
expect(actual.query).to.equal(filter);
|
||||
describe('setFilter', () => {
|
||||
it('signals when no matches', () => {
|
||||
// arrange
|
||||
let actual: IFilterResult;
|
||||
const nonMatchingFilter = 'non matching filter';
|
||||
const sut = new UserFilter(new ApplicationStub());
|
||||
sut.filtered.on((filterResult) => actual = filterResult);
|
||||
// act
|
||||
sut.setFilter(nonMatchingFilter);
|
||||
// assert
|
||||
expect(actual.hasAnyMatches()).be.equal(false);
|
||||
expect(actual.query).to.equal(nonMatchingFilter);
|
||||
});
|
||||
it('sets currentFilter as expected when no matches', () => {
|
||||
// arrange
|
||||
const nonMatchingFilter = 'non matching filter';
|
||||
const sut = new UserFilter(new ApplicationStub());
|
||||
// act
|
||||
sut.setFilter(nonMatchingFilter);
|
||||
// assert
|
||||
const actual = sut.currentFilter;
|
||||
expect(actual.hasAnyMatches()).be.equal(false);
|
||||
expect(actual.query).to.equal(nonMatchingFilter);
|
||||
});
|
||||
describe('signals when script matches', () => {
|
||||
it('code matches', () => {
|
||||
// arrange
|
||||
const code = 'HELLO world';
|
||||
const filter = 'Hello WoRLD';
|
||||
let actual: IFilterResult;
|
||||
const script = new ScriptStub('id').withCode(code);
|
||||
const category = new CategoryStub(33).withScript(script);
|
||||
const sut = new UserFilter(new ApplicationStub()
|
||||
.withAction(category));
|
||||
sut.filtered.on((filterResult) => actual = filterResult);
|
||||
// act
|
||||
sut.setFilter(filter);
|
||||
// assert
|
||||
expect(actual.hasAnyMatches()).be.equal(true);
|
||||
expect(actual.categoryMatches).to.have.lengthOf(0);
|
||||
expect(actual.scriptMatches).to.have.lengthOf(1);
|
||||
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
||||
expect(actual.query).to.equal(filter);
|
||||
expect(sut.currentFilter).to.deep.equal(actual);
|
||||
});
|
||||
it('revertCode matches', () => {
|
||||
// arrange
|
||||
const revertCode = 'HELLO world';
|
||||
const filter = 'Hello WoRLD';
|
||||
let actual: IFilterResult;
|
||||
const script = new ScriptStub('id').withRevertCode(revertCode);
|
||||
const category = new CategoryStub(33).withScript(script);
|
||||
const sut = new UserFilter(new ApplicationStub()
|
||||
.withAction(category));
|
||||
sut.filtered.on((filterResult) => actual = filterResult);
|
||||
// act
|
||||
sut.setFilter(filter);
|
||||
// assert
|
||||
expect(actual.hasAnyMatches()).be.equal(true);
|
||||
expect(actual.categoryMatches).to.have.lengthOf(0);
|
||||
expect(actual.scriptMatches).to.have.lengthOf(1);
|
||||
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
||||
expect(actual.query).to.equal(filter);
|
||||
expect(sut.currentFilter).to.deep.equal(actual);
|
||||
});
|
||||
it('name matches', () => {
|
||||
// arrange
|
||||
const name = 'HELLO world';
|
||||
const filter = 'Hello WoRLD';
|
||||
let actual: IFilterResult;
|
||||
const script = new ScriptStub('id').withName(name);
|
||||
const category = new CategoryStub(33).withScript(script);
|
||||
const sut = new UserFilter(new ApplicationStub()
|
||||
.withAction(category));
|
||||
sut.filtered.on((filterResult) => actual = filterResult);
|
||||
// act
|
||||
sut.setFilter(filter);
|
||||
// assert
|
||||
expect(actual.hasAnyMatches()).be.equal(true);
|
||||
expect(actual.categoryMatches).to.have.lengthOf(0);
|
||||
expect(actual.scriptMatches).to.have.lengthOf(1);
|
||||
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
||||
expect(actual.query).to.equal(filter);
|
||||
expect(sut.currentFilter).to.deep.equal(actual);
|
||||
});
|
||||
|
||||
it('signals when category matches', () => {
|
||||
// arrange
|
||||
const categoryName = 'HELLO world';
|
||||
const filter = 'Hello WoRLD';
|
||||
let actual: IFilterResult;
|
||||
const category = new CategoryStub(55).withName(categoryName);
|
||||
const sut = new UserFilter(new ApplicationStub()
|
||||
.withAction(category));
|
||||
sut.filtered.on((filterResult) => actual = filterResult);
|
||||
// act
|
||||
sut.setFilter(filter);
|
||||
// assert
|
||||
expect(actual.hasAnyMatches()).be.equal(true);
|
||||
expect(actual.categoryMatches).to.have.lengthOf(1);
|
||||
expect(actual.categoryMatches[0]).to.deep.equal(category);
|
||||
expect(actual.scriptMatches).to.have.lengthOf(0);
|
||||
expect(actual.query).to.equal(filter);
|
||||
expect(sut.currentFilter).to.deep.equal(actual);
|
||||
});
|
||||
it('signals when category and script matches', () => {
|
||||
// arrange
|
||||
const matchingText = 'HELLO world';
|
||||
const filter = 'Hello WoRLD';
|
||||
let actual: IFilterResult;
|
||||
const script = new ScriptStub('script')
|
||||
.withName(matchingText);
|
||||
const category = new CategoryStub(55)
|
||||
.withName(matchingText)
|
||||
.withScript(script);
|
||||
const app = new ApplicationStub()
|
||||
.withAction(category);
|
||||
const sut = new UserFilter(app);
|
||||
sut.filtered.on((filterResult) => actual = filterResult);
|
||||
// act
|
||||
sut.setFilter(filter);
|
||||
// assert
|
||||
expect(actual.hasAnyMatches()).be.equal(true);
|
||||
expect(actual.categoryMatches).to.have.lengthOf(1);
|
||||
expect(actual.categoryMatches[0]).to.deep.equal(category);
|
||||
expect(actual.scriptMatches).to.have.lengthOf(1);
|
||||
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
||||
expect(actual.query).to.equal(filter);
|
||||
expect(sut.currentFilter).to.deep.equal(actual);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user