Added custom donation url (#1902)

* Added custom donation urls

* custom donation message
pull/1909/head^2^2
m4tta 7 years ago committed by Jamie
parent 925ef718f7
commit e3b8aaf4a4

@ -10,6 +10,9 @@ namespace Ombi.Settings.Settings.Models
public string ApplicationName { get; set; }
public string ApplicationUrl { get; set; }
public string CustomCssLink { get; set; }
public bool EnableCustomDonations { get; set; }
public string CustomDonationUrl { get; set; }
public string CustomDonationMessage { get; set; }
public string Logo { get; set; }
public string PresetThemeName { get; set; }

@ -52,6 +52,14 @@
<i class="fa fa-heart" style="color:red"></i> {{ 'NavigationBar.Donate' | translate }}</a>
</li>
</ul>
<div *ngIf="customizationSettings">
<ul *ngIf="customizationSettings.enableCustomDonations" class="nav navbar-nav">
<li>
<a href="{{customizationSettings.customDonationUrl}}" target="_blank">
<i class="fa fa-heart" style="color:yellow"></i> {{ customizationSettings.customDonationMessage ? customizationSettings.customDonationMessage : ('NavigationBar.DonateLibraryMaintainer' | translate) }}</a>
</li>
</ul>
</div>
<ul class="nav navbar-nav navbar-right">

@ -97,6 +97,9 @@ export interface ICustomizationSettings extends ISettings {
applicationUrl: string;
logo: string;
customCssLink: string;
enableCustomDonations: boolean;
customDonationUrl: string;
customDonationMessage: string;
hasPresetTheme: boolean;
presetThemeName: string;
presetThemeContent: string;

@ -43,6 +43,29 @@
</div>
</div>
<div class="form-group">
<div class="checkbox">
<input type="checkbox" id="enableCustomDonations" name="enableCustomDonations" [(ngModel)]="settings.enableCustomDonations">
<label for="enableCustomDonations" tooltipPosition="top" pTooltip="Enable to show a custom donation link in the navigation bar">Enable custom donation link</label>
</div>
</div>
<div class="form-group">
<label for="customDonation" class="control-label">Custom Donation URL</label>
<div>
<input [disabled]="!settings.enableCustomDonations" type="text" [(ngModel)]="settings.customDonationUrl" class="form-control form-control-custom " name="customDonation" value="{{settings.customDonationUrl}}"
tooltipPosition="top" pTooltip="A link to a Paypal address, or your custom donation url.">
</div>
</div>
<div class="form-group">
<label for="customDonationMessage" class="control-label">Donation Button Message</label>
<div>
<input [disabled]="!settings.enableCustomDonations" type="text" [(ngModel)]="settings.customDonationMessage" class="form-control form-control-custom " name="customDonationMessage" value="{{settings.customDonationMessage}}"
tooltipPosition="top" pTooltip="Set a custom message to be displayed in the navigation bar.">
</div>
</div>
<div class="form-group">

@ -47,6 +47,7 @@
"UserManagement": "User Management",
"Issues":"Issues",
"Donate": "Donate!",
"DonateLibraryMaintainer": "Donate to Library Maintainer",
"DonateTooltip":
"This is how I convince my wife to let me spend my spare time developing Ombi ;)",
"UpdateAvailableTooltip": "Update Available!",

Loading…
Cancel
Save