notifications settings added
This commit is contained in:
@@ -120,6 +120,15 @@
|
||||
<data name="Header.Text" xml:space="preserve">
|
||||
<value>Settings</value>
|
||||
</data>
|
||||
<data name="NotificationsHeader.Text" xml:space="preserve">
|
||||
<value>Notifications</value>
|
||||
</data>
|
||||
<data name="NotificationsOnSuccessful.Header" xml:space="preserve">
|
||||
<value>Show notifications when task ended successfully</value>
|
||||
</data>
|
||||
<data name="NotificationsOnUnsuccessful.Header" xml:space="preserve">
|
||||
<value>Show notifications when task ended unsuccessfully</value>
|
||||
</data>
|
||||
<data name="SearchingHeader.Text" xml:space="preserve">
|
||||
<value>Searching</value>
|
||||
</data>
|
||||
|
||||
@@ -76,6 +76,18 @@ namespace VDownload.Core.ViewModels.Settings
|
||||
set => SetProperty(_settingsService.Data.Common.Tasks.DefaultOutputDirectory, value, _settingsService.Data.Common.Tasks, (u, n) => u.DefaultOutputDirectory = n);
|
||||
}
|
||||
|
||||
public bool NotificationsOnSuccessful
|
||||
{
|
||||
get => _settingsService.Data.Common.Notifications.OnSuccessful;
|
||||
set => SetProperty(_settingsService.Data.Common.Notifications.OnSuccessful, value, _settingsService.Data.Common.Notifications, (u, n) => u.OnSuccessful = n);
|
||||
}
|
||||
|
||||
public bool NotificationsOnUnsuccessful
|
||||
{
|
||||
get => _settingsService.Data.Common.Notifications.OnUnsuccessful;
|
||||
set => SetProperty(_settingsService.Data.Common.Notifications.OnUnsuccessful, value, _settingsService.Data.Common.Notifications, (u, n) => u.OnUnsuccessful = n);
|
||||
}
|
||||
|
||||
public string TempDirectory
|
||||
{
|
||||
get => _settingsService.Data.Common.Temp.Directory;
|
||||
|
||||
@@ -122,6 +122,27 @@
|
||||
</ctc:SettingsExpander>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Notifications -->
|
||||
<StackPanel Spacing="5">
|
||||
<TextBlock x:Uid="/VDownload.Core.Strings/SettingsViewResources/NotificationsHeader"
|
||||
FontWeight="Bold"
|
||||
FontSize="15"/>
|
||||
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/SettingsViewResources/NotificationsOnSuccessful">
|
||||
<ctc:SettingsCard.HeaderIcon>
|
||||
<BitmapIcon ShowAsMonochrome="False"
|
||||
UriSource="{ThemeResource ImageSettingsViewNotificationOnSuccessful}"/>
|
||||
</ctc:SettingsCard.HeaderIcon>
|
||||
<ToggleSwitch IsOn="{Binding NotificationOnSuccessful, Mode=TwoWay}"/>
|
||||
</ctc:SettingsCard>
|
||||
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/SettingsViewResources/NotificationsOnUnsuccessful">
|
||||
<ctc:SettingsCard.HeaderIcon>
|
||||
<BitmapIcon ShowAsMonochrome="False"
|
||||
UriSource="{ThemeResource ImageSettingsViewNotificationOnUnsuccessful}"/>
|
||||
</ctc:SettingsCard.HeaderIcon>
|
||||
<ToggleSwitch IsOn="{Binding NotificationOnUnsuccessful, Mode=TwoWay}"/>
|
||||
</ctc:SettingsCard>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Temporary files -->
|
||||
<StackPanel Spacing="5">
|
||||
<TextBlock x:Uid="/VDownload.Core.Strings/SettingsViewResources/TempHeader"
|
||||
|
||||
Reference in New Issue
Block a user