mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 05:47:22 -04:00
New: Placeholders in notification fields
This commit is contained in:
parent
69f5963f6f
commit
0e6ec58a83
4 changed files with 11 additions and 12 deletions
|
@ -32,15 +32,13 @@ namespace NzbDrone.Core.Notifications.Email
|
|||
|
||||
public EmailSettings()
|
||||
{
|
||||
Server = "smtp.gmail.com";
|
||||
Port = 587;
|
||||
|
||||
To = Array.Empty<string>();
|
||||
CC = Array.Empty<string>();
|
||||
Bcc = Array.Empty<string>();
|
||||
}
|
||||
|
||||
[FieldDefinition(0, Label = "Server", HelpText = "Hostname or IP of Email server")]
|
||||
[FieldDefinition(0, Label = "Server", HelpText = "Hostname or IP of Email server", Placeholder = "smtp.gmail.com")]
|
||||
public string Server { get; set; }
|
||||
|
||||
[FieldDefinition(1, Label = "Port")]
|
||||
|
@ -55,16 +53,16 @@ namespace NzbDrone.Core.Notifications.Email
|
|||
[FieldDefinition(4, Label = "Password", HelpText = "Password", Type = FieldType.Password, Privacy = PrivacyLevel.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "From Address")]
|
||||
[FieldDefinition(5, Label = "From Address", Placeholder = "example@email.com")]
|
||||
public string From { get; set; }
|
||||
|
||||
[FieldDefinition(6, Label = "Recipient Address(es)", HelpText = "Comma separated list of email recipients")]
|
||||
[FieldDefinition(6, Label = "Recipient Address(es)", HelpText = "Comma separated list of email recipients", Placeholder = "example@email.com,example1@email.com")]
|
||||
public IEnumerable<string> To { get; set; }
|
||||
|
||||
[FieldDefinition(7, Label = "CC Address(es)", HelpText = "Comma separated list of email cc recipients", Advanced = true)]
|
||||
[FieldDefinition(7, Label = "CC Address(es)", HelpText = "Comma separated list of email cc recipients", Placeholder = "example@email.com,example1@email.com", Advanced = true)]
|
||||
public IEnumerable<string> CC { get; set; }
|
||||
|
||||
[FieldDefinition(8, Label = "BCC Address(es)", HelpText = "Comma separated list of email bcc recipients", Advanced = true)]
|
||||
[FieldDefinition(8, Label = "BCC Address(es)", HelpText = "Comma separated list of email bcc recipients", Placeholder = "example@email.com,example1@email.com", Advanced = true)]
|
||||
public IEnumerable<string> Bcc { get; set; }
|
||||
|
||||
public NzbDroneValidationResult Validate()
|
||||
|
|
|
@ -28,10 +28,10 @@ namespace NzbDrone.Core.Notifications.PushBullet
|
|||
[FieldDefinition(0, Label = "Access Token", Privacy = PrivacyLevel.ApiKey, HelpLink = "https://www.pushbullet.com/#settings/account")]
|
||||
public string ApiKey { get; set; }
|
||||
|
||||
[FieldDefinition(1, Label = "Device IDs", HelpText = "List of device IDs (leave blank to send to all devices)", Type = FieldType.Device)]
|
||||
[FieldDefinition(1, Label = "Device IDs", HelpText = "List of device IDs (leave blank to send to all devices)", Type = FieldType.Device, Placeholder = "123456789,987654321")]
|
||||
public IEnumerable<string> DeviceIds { get; set; }
|
||||
|
||||
[FieldDefinition(2, Label = "Channel Tags", HelpText = "List of Channel Tags to send notifications to", Type = FieldType.Tag)]
|
||||
[FieldDefinition(2, Label = "Channel Tags", HelpText = "List of Channel Tags to send notifications to", Type = FieldType.Tag, Placeholder = "Channel1234,Channel4321")]
|
||||
public IEnumerable<string> ChannelTags { get; set; }
|
||||
|
||||
[FieldDefinition(3, Label = "Sender ID", HelpText = "The device ID to send notifications from, use device_iden in the device's URL on pushbullet.com (leave blank to send from yourself)")]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FluentValidation;
|
||||
using NzbDrone.Core.Annotations;
|
||||
|
@ -23,7 +24,7 @@ namespace NzbDrone.Core.Notifications.Pushover
|
|||
public PushoverSettings()
|
||||
{
|
||||
Priority = 0;
|
||||
Devices = System.Array.Empty<string>();
|
||||
Devices = Array.Empty<string>();
|
||||
}
|
||||
|
||||
//TODO: Get Pushover to change our app name (or create a new app) when we have a new logo
|
||||
|
@ -33,7 +34,7 @@ namespace NzbDrone.Core.Notifications.Pushover
|
|||
[FieldDefinition(1, Label = "User Key", Privacy = PrivacyLevel.UserName, HelpLink = "https://pushover.net/")]
|
||||
public string UserKey { get; set; }
|
||||
|
||||
[FieldDefinition(2, Label = "Devices", HelpText = "List of device names (leave blank to send to all devices)", Type = FieldType.Tag)]
|
||||
[FieldDefinition(2, Label = "Devices", HelpText = "List of device names (leave blank to send to all devices)", Type = FieldType.Tag, Placeholder = "device1")]
|
||||
public IEnumerable<string> Devices { get; set; }
|
||||
|
||||
[FieldDefinition(3, Label = "Priority", Type = FieldType.Select, SelectOptions = typeof(PushoverPriority))]
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace NzbDrone.Core.Notifications.SendGrid
|
|||
[FieldDefinition(2, Label = "From Address")]
|
||||
public string From { get; set; }
|
||||
|
||||
[FieldDefinition(3, Label = "Recipient Address(es)", Type = FieldType.Tag)]
|
||||
[FieldDefinition(3, Label = "Recipient Address(es)", Type = FieldType.Tag, Placeholder = "example@email.com,example1@email.com")]
|
||||
public IEnumerable<string> Recipients { get; set; }
|
||||
|
||||
public NzbDroneValidationResult Validate()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue