From 1fa736c6d8f6e10ae886b3a33aa47cba0e01f660 Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Sun, 22 Jan 2017 19:52:25 +0100 Subject: [PATCH] Fixed styling. Fixed definitions not being returned. --- .../NetImport/CouchPotato/CouchPotatoAPI.cs | 3 +- .../CouchPotato/CouchPotatoSettings.cs | 4 +- .../NetImport/RSSImport/RSSImport.cs | 11 +- .../ThingiProvider/ProviderFactory.cs | 2 +- .../Edit/NetImportEditViewTemplate.hbs | 4 +- .../NetImport/NetImportItemViewTemplate.hbs | 5 + src/UI/Settings/NetImport/indexers.less | 33 --- src/UI/Settings/NetImport/list.less | 33 +++ src/UI/Settings/settings.less | 207 +++++++++--------- 9 files changed, 155 insertions(+), 147 deletions(-) delete mode 100644 src/UI/Settings/NetImport/indexers.less create mode 100644 src/UI/Settings/NetImport/list.less diff --git a/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoAPI.cs b/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoAPI.cs index 1fc3a3362..1da2039ed 100644 --- a/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoAPI.cs +++ b/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoAPI.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Windows.Forms; using System.Xml.Serialization; namespace NzbDrone.Core.NetImport.CouchPotato @@ -48,7 +49,7 @@ namespace NzbDrone.Core.NetImport.CouchPotato public class ReleaseInfo { - public int size { get; set; } + public double size { get; set; } public int seeders { get; set; } public string protocol { get; set; } public string description { get; set; } diff --git a/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoSettings.cs b/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoSettings.cs index 3cd3cb57e..15a6cf9cb 100644 --- a/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoSettings.cs +++ b/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoSettings.cs @@ -18,10 +18,10 @@ namespace NzbDrone.Core.NetImport.CouchPotato [FieldDefinition(0, Label = "CouchPotato URL", HelpText = "Link to your CoouchPootato.")] public new string Link { get; set; } - [FieldDefinition(2, Label = "CouchPotato Port", HelpText = "Port your CoouchPootato uses.")] + [FieldDefinition(1, Label = "CouchPotato Port", HelpText = "Port your CoouchPootato uses.")] public string Port { get; set; } - [FieldDefinition(3, Label = "CouchPotato API Key", HelpText = "CoouchPootato API Key.")] + [FieldDefinition(2, Label = "CouchPotato API Key", HelpText = "CoouchPootato API Key.")] public string ApiKey { get; set; } } } diff --git a/src/NzbDrone.Core/NetImport/RSSImport/RSSImport.cs b/src/NzbDrone.Core/NetImport/RSSImport/RSSImport.cs index c5f9da7de..3a1967fd9 100644 --- a/src/NzbDrone.Core/NetImport/RSSImport/RSSImport.cs +++ b/src/NzbDrone.Core/NetImport/RSSImport/RSSImport.cs @@ -26,17 +26,18 @@ namespace NzbDrone.Core.NetImport.RSSImport { get { - var config = (RSSImportSettings)new RSSImportSettings(); - config.Link = "http://rss.imdb.com/list/YOURLISTID"; - + foreach (var def in base.DefaultDefinitions) + { + yield return def; + } yield return new NetImportDefinition { Name = "IMDb Watchlist", - Enabled = config.Validate().IsValid && Enabled, + Enabled = Enabled, EnableAuto = true, ProfileId = 1, Implementation = GetType().Name, - Settings = config + Settings = new RSSImportSettings { Link = "http://rss.imdb.com/list/YOURLISTID" }, }; } } diff --git a/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs b/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs index 44b58e34d..74b77410d 100644 --- a/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs +++ b/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs @@ -45,7 +45,7 @@ namespace NzbDrone.Core.ThingiProvider { var definition = provider.DefaultDefinitions .OfType() - .FirstOrDefault(v => v.Name == null || v.Name == provider.GetType().Name); + .FirstOrDefault(v => v.Name == null || v.Name == provider.Name); if (definition == null) { diff --git a/src/UI/Settings/NetImport/Edit/NetImportEditViewTemplate.hbs b/src/UI/Settings/NetImport/Edit/NetImportEditViewTemplate.hbs index ae480bf51..c89c11bae 100644 --- a/src/UI/Settings/NetImport/Edit/NetImportEditViewTemplate.hbs +++ b/src/UI/Settings/NetImport/Edit/NetImportEditViewTemplate.hbs @@ -23,13 +23,13 @@
diff --git a/src/UI/Settings/NetImport/indexers.less b/src/UI/Settings/NetImport/indexers.less deleted file mode 100644 index 3fed3ef5f..000000000 --- a/src/UI/Settings/NetImport/indexers.less +++ /dev/null @@ -1,33 +0,0 @@ -@import "../../Shared/Styles/clickable.less"; - -.indexer-list { - li { - display: inline-block; - vertical-align: top; - } -} - -.indexer-item { - - .clickable; - - width: 290px; - height: 90px; - padding: 10px 15px; - - &.add-card { - .center { - margin-top: -3px; - } - } -} - -.modal-overflow { - overflow-y: visible; -} - -.add-indexer { - li.add-thingy-item { - width: 33%; - } -} \ No newline at end of file diff --git a/src/UI/Settings/NetImport/list.less b/src/UI/Settings/NetImport/list.less new file mode 100644 index 000000000..4579f083a --- /dev/null +++ b/src/UI/Settings/NetImport/list.less @@ -0,0 +1,33 @@ +@import "../../Shared/Styles/clickable.less"; + +.lists-list { + li { + display: inline-block; + vertical-align: top; + } +} + +.list-item { + + .clickable; + + width: 290px; + height: 90px; + padding: 10px 15px; + + &.add-card { + .center { + margin-top: -3px; + } + } +} + +.modal-overflow { + overflow-y: visible; +} + +.add-list { + li.add-thingy-item { + width: 33%; + } +} diff --git a/src/UI/Settings/settings.less b/src/UI/Settings/settings.less index ec6bd2a1c..cd2ee76b5 100644 --- a/src/UI/Settings/settings.less +++ b/src/UI/Settings/settings.less @@ -7,155 +7,156 @@ @import "Metadata/metadata"; @import "DownloadClient/downloadclient"; @import "thingy"; +@import "NetImport/list.less"; li.save-and-add { - .clickable; - - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 20px; - color: rgb(51, 51, 51); - white-space: nowrap; + .clickable; + + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 20px; + color: rgb(51, 51, 51); + white-space: nowrap; } li.save-and-add:hover { - text-decoration: none; - color: rgb(255, 255, 255); - background-color: rgb(0, 129, 194); + text-decoration: none; + color: rgb(255, 255, 255); + background-color: rgb(0, 129, 194); } .add-card { - .clickable; - color: #adadad; - font-size: 50px; - text-align: center; - background-color: #f5f5f5; - - .center { - display: inline-block; - padding: 5px 20px 0px; - background-color: white; - } - - i { - .clickable; - } + .clickable; + color: #adadad; + font-size: 50px; + text-align: center; + background-color: #f5f5f5; + + .center { + display: inline-block; + padding: 5px 20px 0px; + background-color: white; + } + + i { + .clickable; + } } .naming-example { - display: inline-block; - margin-top: 5px; + display: inline-block; + margin-top: 5px; } .naming-format { - width: 500px; + width: 500px; } .settings-controls { - margin-top: 10px; + margin-top: 10px; } .advanced-settings-toggle { - display: inline-block; - margin-bottom: 10px; - - .checkbox { - width : 100px; - margin-left : 0px; - display : inline-block; - padding-top : 0px; - margin-bottom : -10px; - margin-top : -1px; - } - - .help-inline-checkbox { - display : inline-block; - margin-top : -3px; - margin-bottom : 0; - vertical-align : middle; - } + display: inline-block; + margin-bottom: 10px; + + .checkbox { + width : 100px; + margin-left : 0px; + display : inline-block; + padding-top : 0px; + margin-bottom : -10px; + margin-top : -1px; + } + + .help-inline-checkbox { + display : inline-block; + margin-top : -3px; + margin-bottom : 0; + vertical-align : middle; + } } .advanced-setting { - display: none; + display: none; - .control-label { - color: @brand-warning; - } + .control-label { + color: @brand-warning; + } } .basic-setting { - display: block; + display: block; } .show-advanced-settings { - .advanced-setting { - display: block; - } + .advanced-setting { + display: block; + } - .basic-setting { - display: none; - } + .basic-setting { + display: none; + } } .api-key { - input { - width : 280px; - cursor : text; - } + input { + width : 280px; + cursor : text; + } } .settings-tabs { - li>a { - padding : 10px; - } - - @media (min-width: @screen-sm-min) and (max-width: @screen-md-max) { - li { - a { - white-space : nowrap; - padding : 10px; - } - } - } + li>a { + padding : 10px; + } + + @media (min-width: @screen-sm-min) and (max-width: @screen-md-max) { + li { + a { + white-space : nowrap; + padding : 10px; + } + } + } } .indicator { - display : none; - padding-right : 5px; + display : none; + padding-right : 5px; } .add-rule-setting-mapping { - cursor : pointer; - font-size : 14px; - text-align : center; - display : inline-block; - padding : 2px 6px; - - i { - cursor : pointer; - } + cursor : pointer; + font-size : 14px; + text-align : center; + display : inline-block; + padding : 2px 6px; + + i { + cursor : pointer; + } } .rule-setting-list { - .rule-setting-header .row { - font-weight : bold; - line-height : 40px; - } - - .rows .row { - line-height : 30px; - border-top : 1px solid #ddd; - vertical-align : middle; - padding : 5px; - - i { - cursor : pointer; - margin-left : 5px; - } - } + .rule-setting-header .row { + font-weight : bold; + line-height : 40px; + } + + .rows .row { + line-height : 30px; + border-top : 1px solid #ddd; + vertical-align : middle; + padding : 5px; + + i { + cursor : pointer; + margin-left : 5px; + } + } }