From eaf0513605c3f8e982c36617ca43555f2ac7a5e4 Mon Sep 17 00:00:00 2001 From: XYZJR <50780760+XYZJR@users.noreply.github.com> Date: Wed, 17 Mar 2021 00:29:26 +0100 Subject: [PATCH] Core: rewrite of configuration items. Resolves #2114 (#11104) --- src/Jackett.Common/Content/custom.css | 4 + src/Jackett.Common/Content/custom.js | 3 + src/Jackett.Common/Content/custom_mobile.css | 4 + src/Jackett.Common/Content/index.html | 5 + src/Jackett.Common/Indexers/Anidex.cs | 20 +- src/Jackett.Common/Indexers/BaseIndexer.cs | 14 +- .../Indexers/CardigannIndexer.cs | 44 +- src/Jackett.Common/Indexers/Cinecalidad.cs | 5 +- src/Jackett.Common/Indexers/DivxTotal.cs | 6 +- src/Jackett.Common/Indexers/GazelleGames.cs | 4 +- src/Jackett.Common/Indexers/HDSpace.cs | 2 +- src/Jackett.Common/Indexers/IPTorrents.cs | 4 +- .../Indexers/InternetArchive.cs | 16 +- src/Jackett.Common/Indexers/Magnetico.cs | 12 +- src/Jackett.Common/Indexers/MejorTorrent.cs | 6 +- src/Jackett.Common/Indexers/MoreThanTV.cs | 12 +- src/Jackett.Common/Indexers/NewPCT.cs | 16 +- src/Jackett.Common/Indexers/PolishTracker.cs | 4 +- src/Jackett.Common/Indexers/RarBG.cs | 6 +- src/Jackett.Common/Indexers/TorrentLeech.cs | 4 +- src/Jackett.Common/Indexers/TorrentNetwork.cs | 12 +- src/Jackett.Common/Indexers/XSpeeds.cs | 6 +- src/Jackett.Common/Models/DTO/Indexer.cs | 2 +- .../Bespoke/ConfigurationDataAbnormal.cs | 96 ++-- .../Bespoke/ConfigurationDataAniDub.cs | 5 +- .../Bespoke/ConfigurationDataAniLibria.cs | 10 +- .../Bespoke/ConfigurationDataAnimeBytes.cs | 26 +- .../Bespoke/ConfigurationDataBakaBT.cs | 8 +- .../Bespoke/ConfigurationDataEliteTracker.cs | 16 +- .../Bespoke/ConfigurationDataFileList.cs | 8 +- .../ConfigurationDataGazelleTracker.cs | 34 +- .../Bespoke/ConfigurationDataHDBitsApi.cs | 18 +- .../Bespoke/ConfigurationDataMyAnonamouse.cs | 20 +- .../Bespoke/ConfigurationDataNCore.cs | 30 +- .../Bespoke/ConfigurationDataNorbits.cs | 88 ++-- .../Bespoke/ConfigurationDataPornolab.cs | 4 +- .../Bespoke/ConfigurationDataRutracker.cs | 23 +- .../Bespoke/ConfigurationDataSceneTime.cs | 4 +- .../Bespoke/ConfigurationDataTVstore.cs | 12 +- .../Bespoke/ConfigurationDataToloka.cs | 4 +- .../Bespoke/ConfigurationDataXthor.cs | 49 +- .../Models/IndexerConfig/ConfigurationData.cs | 421 +++++++++++------- .../IndexerConfig/ConfigurationDataAPIKey.cs | 4 +- ...DataAPILoginWithUserAndPasskeyAndFilter.cs | 26 +- .../ConfigurationDataBasicLogin.cs | 14 +- .../ConfigurationDataBasicLoginWith2FA.cs | 16 +- .../ConfigurationDataBasicLoginWithEmail.cs | 14 +- .../ConfigurationDataBasicLoginWithFilter.cs | 25 +- .../ConfigurationDataBasicLoginWithPID.cs | 16 +- .../ConfigurationDataBasicLoginWithRSS.cs | 12 +- ...gurationDataBasicLoginWithRSSAndDisplay.cs | 16 +- .../ConfigurationDataCaptchaLogin.cs | 24 +- .../IndexerConfig/ConfigurationDataCookie.cs | 19 +- .../IndexerConfig/ConfigurationDataPasskey.cs | 8 +- .../ConfigurationDataPinNumber.cs | 4 +- .../ConfigurationDataUserPasskey.cs | 12 +- 56 files changed, 693 insertions(+), 604 deletions(-) diff --git a/src/Jackett.Common/Content/custom.css b/src/Jackett.Common/Content/custom.css index 5692e2a99..246be5a50 100644 --- a/src/Jackett.Common/Content/custom.css +++ b/src/Jackett.Common/Content/custom.css @@ -55,6 +55,10 @@ body { max-width: 255px; } +.setup-item-password { + max-width: 255px; +} + .setup-item-inputcheckbox label { padding: 0 1.5em; } diff --git a/src/Jackett.Common/Content/custom.js b/src/Jackett.Common/Content/custom.js index 2234d802b..6c13fa383 100644 --- a/src/Jackett.Common/Content/custom.js +++ b/src/Jackett.Common/Content/custom.js @@ -573,6 +573,9 @@ function getConfigModalJson(configForm) { case "inputstring": itemEntry.value = $el.find(".setup-item-inputstring input").val(); break; + case "password": + itemEntry.value = $el.find(".setup-item-password input").val(); + break; case "inputbool": itemEntry.value = $el.find(".setup-item-inputbool input").is(":checked"); break; diff --git a/src/Jackett.Common/Content/custom_mobile.css b/src/Jackett.Common/Content/custom_mobile.css index 3c9fe822a..578880907 100644 --- a/src/Jackett.Common/Content/custom_mobile.css +++ b/src/Jackett.Common/Content/custom_mobile.css @@ -55,6 +55,10 @@ body { max-width: 255px; } +.setup-item-password { + max-width: 255px; +} + .setup-item-inputbool input { max-width: 100px; height: 20px; diff --git a/src/Jackett.Common/Content/index.html b/src/Jackett.Common/Content/index.html index eaefcfb71..24213707b 100644 --- a/src/Jackett.Common/Content/index.html +++ b/src/Jackett.Common/Content/index.html @@ -235,6 +235,11 @@ {{/if}} +