mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 02:06:36 +02:00
[Settings][Plugin manager] Activation commands: Fix conflict with calc plugin and add warning (#19593)
* update activation commands * add warning and badges * fix spelling * fix badge style * fixes * small fixes missed * spell fix * revert changes for Program plugin * small tweaks * Add Grid control * merge warnings * fix spelling * fix resource * updating conflicitng keywords * remove keywordWarning and warningBagde * fix broken reference * add new information bar
This commit is contained in:
@@ -56,10 +56,10 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
settings.Disabled = value;
|
||||
NotifyPropertyChanged();
|
||||
NotifyPropertyChanged(nameof(ShowNotAccessibleWarning));
|
||||
NotifyPropertyChanged(nameof(ShowNotAllowedKeywordWarning));
|
||||
NotifyPropertyChanged(nameof(Enabled));
|
||||
NotifyPropertyChanged(nameof(DisabledOpacity));
|
||||
NotifyPropertyChanged(nameof(IsGlobalAndEnabled));
|
||||
NotifyPropertyChanged(nameof(ShowBadgeOnPluginSettingError));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,6 +91,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
NotifyPropertyChanged();
|
||||
NotifyPropertyChanged(nameof(ShowNotAccessibleWarning));
|
||||
NotifyPropertyChanged(nameof(IsGlobalAndEnabled));
|
||||
NotifyPropertyChanged(nameof(ShowBadgeOnPluginSettingError));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,8 +109,6 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
{
|
||||
settings.WeightBoost = value;
|
||||
NotifyPropertyChanged();
|
||||
NotifyPropertyChanged(nameof(ShowNotAccessibleWarning));
|
||||
NotifyPropertyChanged(nameof(ShowNotAllowedKeywordWarning));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,7 +127,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
settings.ActionKeyword = value;
|
||||
NotifyPropertyChanged();
|
||||
NotifyPropertyChanged(nameof(ShowNotAccessibleWarning));
|
||||
NotifyPropertyChanged(nameof(ShowNotAllowedKeywordWarning));
|
||||
NotifyPropertyChanged(nameof(ShowBadgeOnPluginSettingError));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -180,14 +179,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
get => !Disabled && !IsGlobal && string.IsNullOrWhiteSpace(ActionKeyword);
|
||||
}
|
||||
|
||||
private static readonly List<string> NotAllowedKeywords = new List<string>()
|
||||
public bool ShowBadgeOnPluginSettingError
|
||||
{
|
||||
"~", @"\", @"\\",
|
||||
};
|
||||
|
||||
public bool ShowNotAllowedKeywordWarning
|
||||
{
|
||||
get => !Disabled && NotAllowedKeywords.Contains(ActionKeyword);
|
||||
get => !Disabled && ShowNotAccessibleWarning;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
{
|
||||
if (
|
||||
e.PropertyName == nameof(PowerLauncherPluginViewModel.ShowNotAccessibleWarning)
|
||||
|| e.PropertyName == nameof(PowerLauncherPluginViewModel.ShowNotAllowedKeywordWarning)
|
||||
|| e.PropertyName == nameof(PowerLauncherPluginViewModel.ShowBadgeOnPluginSettingError)
|
||||
)
|
||||
{
|
||||
// Don't trigger a settings update if the changed property is for visual notification.
|
||||
|
||||
Reference in New Issue
Block a user