1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-17 21:26:22 -04:00

Compare commits

...

88 Commits

Author SHA1 Message Date
ta264
b92e2c6601 FFMpeg 5.0.1 2022-04-10 12:28:11 -05:00
ta264
df863a08a1 Fixed: Loading old commands from database
(cherry picked from commit 0f87cb72e559a19bddc6c9d4387ec7d9428291f8)
2022-04-02 14:11:47 -05:00
Mark McDowall
8a0c318540 Fixed: Scrolling in Firefox in small window (requires refresh)
Closes #7142

(cherry picked from commit e3aa92d09a247f696a003b87f6e9511c33340a1d)
2022-03-31 21:52:04 -05:00
Mark McDowall
4f9d067361 Don't return early after re-running checks after startup grace period
Fixes #7147

(cherry picked from commit 06464d720c0d31c22865629062d6da0911d2a01f)
2022-03-31 21:26:07 -05:00
Mark McDowall
6739310ba8 Fixed: Delay health check notifications on startup
Closes #7145

(cherry picked from commit 07f0db477a91b39c1f4b884775c08a55ada487cf)
2022-03-31 21:25:46 -05:00
Qstick
a45b91abe8 New: Schedule refresh and process monitored download tasks at high priority
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
2022-03-31 21:21:02 -05:00
Qstick
1ad2dc54b3 Fixed: Use Digital Release in ChangeFileDate if no Physical
Fixes #5647
2022-03-29 22:52:43 -05:00
Qstick
7f0b708cb9 Fixed: Cleanup Temp files after backup creation
[common]

Fixes #6815
2022-03-29 22:26:25 -05:00
ta264
c8cdf03077 Centralise image choice, update to latest images
Fixes #6957

(cherry picked from commit fa1985509d77dedd108286a159749fd5cf9d8599)
2022-03-29 22:21:42 -05:00
Weblate
c8afe578f3 Translated using Weblate (Chinese (Simplified) (zh_CN)) [skip ci]
Currently translated at 100.0% (1116 of 1116 strings)

Translated using Weblate (Chinese (Simplified) (zh_CN)) [skip ci]

Currently translated at 97.7% (1091 of 1116 strings)

Translated using Weblate (Portuguese (Brazil)) [skip ci]

Currently translated at 100.0% (1116 of 1116 strings)

Translated using Weblate (Spanish) [skip ci]

Currently translated at 100.0% (1116 of 1116 strings)

Translated using Weblate (Chinese (Simplified) (zh_CN)) [skip ci]

Currently translated at 97.7% (1091 of 1116 strings)

Translated using Weblate (Chinese (Simplified) (zh_CN)) [skip ci]

Currently translated at 97.5% (1089 of 1116 strings)

Translated using Weblate (German) [skip ci]

Currently translated at 100.0% (1116 of 1116 strings)

Translated using Weblate (Chinese (Simplified) (zh_CN)) [skip ci]

Currently translated at 96.7% (1080 of 1116 strings)

Translated using Weblate (Chinese (Simplified) (zh_CN)) [skip ci]

Currently translated at 96.7% (1080 of 1116 strings)

Translated using Weblate (French) [skip ci]

Currently translated at 97.8% (1092 of 1116 strings)

Co-authored-by: EthanChoy <ethanchoy@163.com>
Co-authored-by: Havok Dan <havokdan@yahoo.com.br>
Co-authored-by: Kakise <sam.taa@icloud.com>
Co-authored-by: Kevin Ho <309446119@qq.com>
Co-authored-by: RicardoVelaC <ricardovelac@gmail.com>
Co-authored-by: Vincent <intelligentvincent@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: libsu <libsu@qq.com>
Co-authored-by: reloxx <reloxx@interia.pl>
Co-authored-by: westay1984 <westjay@qq.com>
Co-authored-by: 無情天 <kofzhanganguo@126.com>
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/de/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/es/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/fr/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/pt_BR/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/zh_CN/
Translation: Servarr/Radarr
2022-03-29 22:09:15 -05:00
Qstick
9bb394f420 Fixed: Validation when testing indexers, import lists, connections and download clients
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
2022-03-28 20:04:10 -05:00
Robin Dadswell
4f512c5cdf New: Added UDP syslog support
(cherry picked from commit 8d856b2edb8bf46a2b516d5f7644ae3fa1151323)
2022-03-27 00:43:38 +00:00
nitsua
8ae84222d1 Add error handling to Notifiarr connect to reduce Sentry hits
Add Environment switch to Notifiarr connect
Add Instance Name to Notifiarr connect
2022-03-26 18:59:51 -05:00
Qstick
7ec0fd1cea Update multi parser test 2022-03-26 18:45:23 -05:00
Qstick
ad8629fac9 Remove old Multi language workaround 2022-03-26 18:09:47 -05:00
Taloth Saldono
32393eabb7 Add response size to http responses
(cherry picked from commit d899225509f04a9b6c72da19c7d63ff53498de22)
2022-03-21 18:56:14 -05:00
Robin Dadswell
6f42dd671f Linting fixes for frontend following eslint package upgrade 2022-03-21 08:44:19 +00:00
Qstick
966963b53d FontAwesome 6 2022-03-20 12:03:09 -05:00
Qstick
43a74ab32a Bump react-text-truncate to 0.18.0 2022-03-20 11:57:24 -05:00
Qstick
897e4b4d0a Bump qs to 6.10.3 2022-03-20 11:56:27 -05:00
Qstick
0dd639ff76 Bump clipboard.js to 2.0.10 2022-03-20 11:55:41 -05:00
Qstick
64da17a9ab Change react-custom-scrollbars to react-custom-scrollbars-2 2022-03-20 11:51:26 -05:00
Qstick
dbaabf90a5 Update frontend babel packages 2022-03-20 11:30:43 -05:00
Qstick
1aabc4bc5c Update frontend stylelint packages 2022-03-20 11:24:03 -05:00
Qstick
cce4334310 Update frontend eslint packages 2022-03-20 11:22:25 -05:00
Qstick
8d54b4268b Bump Sentry to 3.15.0 2022-03-20 11:07:00 -05:00
Qstick
2be9b306a3 Bump NLog to 4.7.14 2022-03-20 11:06:14 -05:00
Qstick
7f5cd9a765 Bump FluentMigrator to 3.3.2 2022-03-20 11:02:50 -05:00
Qstick
d26ca9a7a5 Bump dotnet to 6.0.3 2022-03-20 11:01:31 -05:00
Qstick
933796e214 Bump DryIoc to 4.8.8
Potentially Fixes #7141
2022-03-20 10:58:47 -05:00
Weblate
121a347fc9 Translated using Weblate (Chinese (Simplified)) [skip ci]
Currently translated at 0.7% (8 of 1116 strings)

Translated using Weblate (Chinese (Simplified) (zh_CN)) [skip ci]

Currently translated at 97.0% (1083 of 1116 strings)

Translated using Weblate (Portuguese (Brazil)) [skip ci]

Currently translated at 100.0% (1116 of 1116 strings)

Translated using Weblate (Chinese (Simplified) (zh_CN)) [skip ci]

Currently translated at 96.9% (1082 of 1116 strings)

Translated using Weblate (Portuguese (Brazil)) [skip ci]

Currently translated at 100.0% (1116 of 1116 strings)

Translated using Weblate (German) [skip ci]

Currently translated at 99.9% (1115 of 1116 strings)

Co-authored-by: 3limin4tor <cedric.annen@gmail.com>
Co-authored-by: Ayi <4ayixd@gmail.com>
Co-authored-by: Havok Dan <havokdan@yahoo.com.br>
Co-authored-by: Kevin Ho <309446119@qq.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: 杰森 <john@johnrosen1.com>
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/de/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/pt_BR/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/zh_CN/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/zh_Hans/
Translation: Servarr/Radarr
2022-03-17 12:45:49 -05:00
Servarr
ed060d552f Automated API Docs update 2022-03-14 22:43:15 -05:00
Qstick
51485259ae Allow more startup time for openapi generation
Radarr has many migrations
2022-03-14 22:30:18 -05:00
Qstick
76a3ca37ed Bump Swashbuckle to 6.3.0 2022-03-14 22:25:17 -05:00
Qstick
e5e7292f11 Removed non-functional altyear API controller 2022-03-14 19:42:40 -05:00
Qstick
397ee20160 Update API docs
Co-Authored-By: Servarr <32001786+ServarrAdmin@users.noreply.github.com>
2022-03-13 22:13:29 -05:00
Qstick
2914c3c88f API is v3 2022-03-13 22:03:03 -05:00
Qstick
750cb94692 Fix Prowlarr references 2022-03-13 21:55:55 -05:00
Qstick
1ffbae9d16 Autogenerated API docs 2022-03-13 21:46:25 -05:00
Weblate
a515c5c7a5 Translated using Weblate (Portuguese (Brazil)) [skip ci]
Currently translated at 100.0% (1116 of 1116 strings)

Translated using Weblate (Portuguese) [skip ci]

Currently translated at 100.0% (1116 of 1116 strings)

Translated using Weblate (Hungarian) [skip ci]

Currently translated at 100.0% (1116 of 1116 strings)

Translated using Weblate (Finnish) [skip ci]

Currently translated at 100.0% (1116 of 1116 strings)

Co-authored-by: Csaba <csab0825@gmail.com>
Co-authored-by: Havok Dan <havokdan@yahoo.com.br>
Co-authored-by: José Eduardo Veiga <vitruxpt@vitruxbot.com>
Co-authored-by: Oskari Lavinto <olavinto@protonmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/fi/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/hu/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/pt/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/pt_BR/
Translation: Servarr/Radarr
2022-03-11 01:45:19 -06:00
Weblate
c58f31d690 Translated using Weblate (French) [skip ci]
Currently translated at 96.3% (1073 of 1114 strings)

Co-authored-by: KevoM <lilmarsu@gmail.com>
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/fr/
Translation: Servarr/Radarr
2022-03-06 21:25:30 -06:00
Qstick
2041797587 New: Language filter on manual search
Fixes #6921
2022-03-06 19:26:25 -06:00
Qstick
b1d8763593 Fix HistorySpecification tests 2022-03-06 18:50:40 -06:00
Qstick
ff7f95a0ab New: Original Language and Title sort and filter options
Fixes #7019
Fixes #5438
2022-03-06 18:47:45 -06:00
Mark McDowall
ccd561eb24 Fixed: Clearing logs not updating UI once complete
Fixes #7090
2022-03-06 18:14:47 -06:00
Qstick
3e353a6710 Fixed: On Import notifications for webhooks
Fixes #7084

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
2022-03-06 18:01:52 -06:00
Mark McDowall
544e942fe4 Fixed: Send download client name instead of type for grab events
Closes #7078
2022-03-06 18:01:52 -06:00
Mathis
8bb3764708 New: Add qBittorrent sequential order and first and last piece priority options
Fixes #7057
2022-03-06 17:50:42 -06:00
Qstick
356013a84e Fixed: Profiles with upgrades disabled incorrectly allowing upgrades in some cases
Fixes #7040

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
2022-03-06 17:47:59 -06:00
Qstick
75b2414e29 New: Add Release group to history for all events
Fixes #6986

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
2022-03-06 17:27:25 -06:00
Qstick
4084ce5c2f Bump FFProbe to 5.0 2022-03-06 17:19:39 -06:00
Mark McDowall
ca2f12338e Fixed: Parsing of quality in DP.WEB releases
Closes #7079

(cherry picked from commit 9e820144549c12cfc05700642c3a6affcb2be4d2)
2022-03-06 17:13:49 -06:00
bakerboy448
347fdc1572 Fixed: Correctly Detect Remux prefixed by Brackets 2022-03-06 17:13:49 -06:00
bakerboy448
6c04d0701c Fixed: Treat 720p BR Remux as BluRay
Fixes #7009
2022-03-06 17:13:49 -06:00
bakerboy448
3f4e5e55a3 Fixed: Better Cleansing of Tracker Announce Keys
Fixed: Cleanse Notifiarr secret from URL in logs (API)

sonarr ec866082d44d299096112a6c7c232384b1f74505
2022-03-06 17:13:49 -06:00
bakerboy448
7310481e6a New: Dont parse hash as release group
Fixed tests
2022-03-06 17:13:49 -06:00
bakerboy448
e59a1a64f9 New: Support for parsing various Anime Groups
DusIctv
DHD
SEV
CtrlHD
-ZR-
XZVN
ADC
Koten_Gars
RH
Kametsu
BluDragon
2022-03-06 17:13:49 -06:00
bakerboy448
5c1ebc72b3 Fixed: Dont Parse HDRip as group 2022-03-06 17:13:49 -06:00
bakerboy448
a96971beff New: Support for parsing [HDO] as HDO Group
Fixed: Don't parse -EN, -ES, -CAT as Group

Refactored exception group regex and related parser code
2022-03-06 17:13:49 -06:00
Robin Dadswell
b34f4fde1b Fixed: Updater version number logging
[common]
2022-03-06 14:25:53 -06:00
Alan Collins
a9b2635cb0 Adjusted the Windows LongPath support check for valid segment lengths
(cherry picked from commit 52c6bc5549ab998ccc018d138c55f8f924eed6d3)
2022-03-05 14:26:12 -06:00
Dane Powell
1ed8bd7350 PWA missing name 2022-03-05 14:25:22 -06:00
Weblate
f0891e9df7 Translated using Weblate (Chinese (Traditional) (zh_TW)) [skip ci]
Currently translated at 0.1% (2 of 1114 strings)

Translated using Weblate (Portuguese (Brazil)) [skip ci]

Currently translated at 100.0% (1114 of 1114 strings)

Translated using Weblate (Russian) [skip ci]

Currently translated at 99.0% (1103 of 1114 strings)

Translated using Weblate (Portuguese) [skip ci]

Currently translated at 95.4% (1063 of 1114 strings)

Translated using Weblate (Dutch) [skip ci]

Currently translated at 95.5% (1064 of 1114 strings)

Translated using Weblate (Finnish) [skip ci]

Currently translated at 100.0% (1114 of 1114 strings)

Translated using Weblate (Spanish) [skip ci]

Currently translated at 94.2% (1050 of 1114 strings)

Translated using Weblate (German) [skip ci]

Currently translated at 100.0% (1114 of 1114 strings)

Translated using Weblate (Hungarian) [skip ci]

Currently translated at 100.0% (1114 of 1114 strings)

Translated using Weblate (Finnish) [skip ci]

Currently translated at 100.0% (1114 of 1114 strings)

Translated using Weblate (Hungarian) [skip ci]

Currently translated at 100.0% (1114 of 1114 strings)

Co-authored-by: AlexR-sf <omg.portal.supp@gmail.com>
Co-authored-by: Csaba <csab0825@gmail.com>
Co-authored-by: Havok Dan <havokdan@yahoo.com.br>
Co-authored-by: Nuno Filipe de Vilhena Santos <nunovilhenasantos@msn.com>
Co-authored-by: Oskari Lavinto <olavinto@protonmail.com>
Co-authored-by: Rico_Walker <ricardo.walker1203@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Zalhera <tobias.bechen@gmail.com>
Co-authored-by: allanantunez <allanantunez@gmail.com>
Co-authored-by: nopetw <lubduphaur@gmail.com>
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/de/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/es/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/fi/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/hu/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/nl/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/pt/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/pt_BR/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/ru/
Translate-URL: https://translate.servarr.com/projects/servarr/radarr/zh_TW/
Translation: Servarr/Radarr
2022-03-05 14:24:35 -06:00
Qstick
5834afe30b SimpleTitleRegex catchup
Fixes #7104
Fixes #5926
Fixes #6784
Closes #7105

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
Co-Authored-By: Taloth <Taloth@users.noreply.github.com>
2022-03-05 11:36:28 -06:00
bakerboy448
c015a3ebf0 Fixed: Assume SABnzbd develop version is 3.0.0 if not specified
Fixes #7093

(cherry picked from commit 77412f23766e8bb553e83d87f1e599e795a67f8b)
2022-03-05 11:08:38 -06:00
Qstick
8fd1f121f4 Bump node build version to 16.X LTS
Regenerate yarn.lock
2022-03-05 11:05:02 -06:00
Qstick
b18cc49a83 Bump dotnet to 6.0.2 2022-03-05 10:56:25 -06:00
Qstick
69b969cfc8 Bump version to 4.1.0 2022-03-04 19:11:10 -06:00
Robin Dadswell
bc3e3714b9 Fixed: Update from version in logs
[common]
2022-03-04 07:08:14 -06:00
Marcelo Castagna
85dd5f5754 Update Synology error codes
(cherry picked from commit a8cb7784f2a6f833bda9e24ca2146701df8da75c)
2022-02-27 11:57:59 -06:00
Robin Dadswell
7de270b212 Fixed: Remove pre-DB from frontend storage 2022-02-25 18:16:08 -06:00
Robin Dadswell
b1afd7aaaa Fixed: Removing multiple items from the queue wording 2022-02-23 13:31:15 +00:00
bakerboy448
894fafcad7 Fixed: Improve help text for download client Category
(cherry picked from commit d18751eff2c684a72e4c698a1e0f6c282c8da0da)
Closes #7056
2022-02-22 21:41:45 +00:00
bakerboy448
2cf62915b0 New: Update Cert Validation Help Text [common]
(cherry picked from commit 66be23a7c4ae717cf060f5e89b4df7a08bdff5ac)
Closes #7065
2022-02-22 21:41:45 +00:00
PearsonFlyer
d3743446da Fixed: Updated ruTorrent stopped state helptext
(cherry picked from commit 69ccb96a365b12ec57cfb642f52f7c6ab8c67262)
2022-02-21 19:51:41 -06:00
4toomany
b332fa55de fixed text box not being uniform to others 2022-02-21 19:47:28 -06:00
Zack Eckersley Pallett
36da57f87b New: Add backup size information
Closes #4830

(cherry picked from commit 78aeda1a2cc217c367c5c3c6fd281c101b28413c)
2022-02-21 22:53:47 +00:00
Robin Dadswell
07bb5e416b Fix swagger inCinema references 2022-02-21 22:53:39 +00:00
Mark McDowall
69207ba77b Fixed: Recycle bin log message
(cherry picked from commit 9e1b799fb74c341510d6da98f9f658d642b25c02)
2022-02-21 22:53:33 +00:00
bakerboy448
ff409d3661 Fix nzbdrone reference 2022-02-21 21:29:34 +00:00
bakerboy448
dfb8d2ea0f additional testcase obfuscation
closes #6850
2022-02-21 21:24:58 +00:00
Ajax
603db7c76b Fixed: IPv4 instead of IP4
(cherry picked from commit c7427f8df828733a81d83ea28393a18d10875769)
2022-02-21 15:08:06 -06:00
ta264
6fa0cdc9a8 Report runtime identifier to sentry
(cherry picked from commit 6d9413627388c2004c3a5dffdbe2269dadeef326)
2022-02-20 20:49:30 +00:00
ta264
c0cbbc7ed4 Update API URL 2022-02-18 12:39:46 -06:00
ta264
daa9ee30a2 Fixed: No longer require first run as admin on windows
(cherry picked from commit 8d9302da7761752189b2d2820915d7d13197ce47)
2022-02-18 11:42:31 +00:00
ta264
86102349c5 Build installer from build.sh
(cherry picked from commit 6db135877a8394244a95142347b99ea651e0cceb)

Closes #6958
2022-02-18 11:42:31 +00:00
ta264
c4d035f0ad Fixed: Enable response compression over https
(cherry picked from commit cb0ae3603309daae4d6b026de15f26cb4b59096d)
2022-02-16 19:06:37 +00:00
Qstick
95d44f968f Bump to 4.0.5 2022-01-30 21:25:25 -06:00
445 changed files with 16422 additions and 9159 deletions

4
.gitignore vendored
View File

@@ -187,6 +187,10 @@ packages.config.md5sum
**/.idea/**/*.iml **/.idea/**/*.iml
**/.idea/**/contentModel.xml **/.idea/**/contentModel.xml
**/.idea/**/modules.xml **/.idea/**/modules.xml
# ignore node_modules symlink # ignore node_modules symlink
node_modules node_modules
node_modules.nosync node_modules.nosync
# API doc generation
.config/

View File

@@ -7,14 +7,20 @@ variables:
outputFolder: './_output' outputFolder: './_output'
artifactsFolder: './_artifacts' artifactsFolder: './_artifacts'
testsFolder: './_tests' testsFolder: './_tests'
majorVersion: '4.0.4' yarnCacheFolder: $(Pipeline.Workspace)/.yarn
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
majorVersion: '4.1.0'
minorVersion: $[counter('minorVersion', 2000)] minorVersion: $[counter('minorVersion', 2000)]
radarrVersion: '$(majorVersion).$(minorVersion)' radarrVersion: '$(majorVersion).$(minorVersion)'
buildName: '$(Build.SourceBranchName).$(radarrVersion)' buildName: '$(Build.SourceBranchName).$(radarrVersion)'
sentryOrg: 'servarr' sentryOrg: 'servarr'
sentryUrl: 'https://sentry.servarr.com' sentryUrl: 'https://sentry.servarr.com'
dotnetVersion: '6.0.101' dotnetVersion: '6.0.201'
yarnCacheFolder: $(Pipeline.Workspace)/.yarn nodeVersion: '16.X'
innoVersion: '6.2.0'
windowsImage: 'windows-2022'
linuxImage: 'ubuntu-20.04'
macImage: 'macOS-11'
trigger: trigger:
branches: branches:
@@ -29,6 +35,7 @@ pr:
paths: paths:
exclude: exclude:
- src/NzbDrone.Core/Localization/Core - src/NzbDrone.Core/Localization/Core
- src/Radarr.Api.*/openapi.json
stages: stages:
- stage: Setup - stage: Setup
@@ -37,7 +44,7 @@ stages:
- job: - job:
displayName: Build Variables displayName: Build Variables
pool: pool:
vmImage: 'ubuntu-18.04' vmImage: ${{ variables.linuxImage }}
steps: steps:
# Set the build name properly. The 'name' property won't recursively expand so hack here: # Set the build name properly. The 'name' property won't recursively expand so hack here:
- bash: echo "##vso[build.updatebuildnumber]$RADARRVERSION" - bash: echo "##vso[build.updatebuildnumber]$RADARRVERSION"
@@ -63,15 +70,15 @@ stages:
matrix: matrix:
Linux: Linux:
osName: 'Linux' osName: 'Linux'
imageName: 'ubuntu-18.04' imageName: ${{ variables.linuxImage }}
enableAnalysis: 'true' enableAnalysis: 'true'
Mac: Mac:
osName: 'Mac' osName: 'Mac'
imageName: 'macos-10.15' imageName: ${{ variables.macImage }}
enableAnalysis: 'false' enableAnalysis: 'false'
Windows: Windows:
osName: 'Windows' osName: 'Windows'
imageName: 'windows-2019' imageName: ${{ variables.windowsImage }}
enableAnalysis: 'false' enableAnalysis: 'false'
pool: pool:
@@ -141,20 +148,20 @@ stages:
matrix: matrix:
Linux: Linux:
osName: 'Linux' osName: 'Linux'
imageName: 'ubuntu-18.04' imageName: ${{ variables.linuxImage }}
Mac: Mac:
osName: 'Mac' osName: 'Mac'
imageName: 'macos-10.15' imageName: ${{ variables.macImage }}
Windows: Windows:
osName: 'Windows' osName: 'Windows'
imageName: 'windows-2019' imageName: ${{ variables.windowsImage }}
pool: pool:
vmImage: $(imageName) vmImage: $(imageName)
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
displayName: Set Node.js version displayName: Set Node.js version
inputs: inputs:
versionSpec: '12.x' versionSpec: $(nodeVersion)
- checkout: self - checkout: self
submodules: true submodules: true
fetchDepth: 1 fetchDepth: 1
@@ -184,7 +191,7 @@ stages:
- job: Windows_Installer - job: Windows_Installer
displayName: Create Installer displayName: Create Installer
pool: pool:
vmImage: 'windows-2019' vmImage: ${{ variables.windowsImage }}
steps: steps:
- checkout: self - checkout: self
fetchDepth: 1 fetchDepth: 1
@@ -200,16 +207,11 @@ stages:
artifactName: WindowsFrontend artifactName: WindowsFrontend
targetPath: _output targetPath: _output
displayName: Fetch Frontend displayName: Fetch Frontend
- bash: ./build.sh --packages
displayName: Create Packages
- bash: | - bash: |
setup/inno/ISCC.exe setup/radarr.iss //DFramework=net6.0 //DRuntime=win-x86 ./build.sh --packages --installer
cp setup/output/Radarr.*windows.net6.0.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x86-installer.exe cp setup/output/Radarr.*win-x64.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x64-installer.exe
displayName: Create .NET Core Windows installer cp setup/output/Radarr.*win-x86.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x86-installer.exe
- bash: | displayName: Create Installers
setup/inno/ISCC.exe setup/radarr.iss //DFramework=net6.0 //DRuntime=win-x64
cp setup/output/Radarr.*windows.net6.0.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x64-installer.exe
displayName: Create .NET Core Windows installer
- publish: $(Build.ArtifactStagingDirectory) - publish: $(Build.ArtifactStagingDirectory)
artifact: 'WindowsInstaller' artifact: 'WindowsInstaller'
displayName: Publish Installer displayName: Publish Installer
@@ -222,7 +224,7 @@ stages:
- job: Other_Packages - job: Other_Packages
displayName: Create Standard Packages displayName: Create Standard Packages
pool: pool:
vmImage: 'ubuntu-18.04' vmImage: ${{ variables.linuxImage }}
steps: steps:
- checkout: self - checkout: self
fetchDepth: 1 fetchDepth: 1
@@ -383,7 +385,7 @@ stages:
jobs: jobs:
- job: Prepare - job: Prepare
pool: pool:
vmImage: 'ubuntu-18.04' vmImage: ${{ variables.linuxImage }}
steps: steps:
- checkout: none - checkout: none
- task: DownloadPipelineArtifact@2 - task: DownloadPipelineArtifact@2
@@ -407,17 +409,17 @@ stages:
osName: 'Mac' osName: 'Mac'
testName: 'MacCore' testName: 'MacCore'
poolName: 'Azure Pipelines' poolName: 'Azure Pipelines'
imageName: 'macos-10.15' imageName: ${{ variables.macImage }}
WindowsCore: WindowsCore:
osName: 'Windows' osName: 'Windows'
testName: 'WindowsCore' testName: 'WindowsCore'
poolName: 'Azure Pipelines' poolName: 'Azure Pipelines'
imageName: 'windows-2019' imageName: ${{ variables.windowsImage }}
LinuxCore: LinuxCore:
osName: 'Linux' osName: 'Linux'
testName: 'LinuxCore' testName: 'LinuxCore'
poolName: 'Azure Pipelines' poolName: 'Azure Pipelines'
imageName: 'ubuntu-18.04' imageName: ${{ variables.linuxImage }}
FreebsdCore: FreebsdCore:
osName: 'Linux' osName: 'Linux'
testName: 'FreebsdCore' testName: 'FreebsdCore'
@@ -477,7 +479,7 @@ stages:
containerImage: ghcr.io/servarr/testimages:alpine containerImage: ghcr.io/servarr/testimages:alpine
pool: pool:
vmImage: 'ubuntu-18.04' vmImage: ${{ variables.linuxImage }}
container: $[ variables['containerImage'] ] container: $[ variables['containerImage'] ]
@@ -521,7 +523,7 @@ stages:
jobs: jobs:
- job: Prepare - job: Prepare
pool: pool:
vmImage: 'ubuntu-18.04' vmImage: ${{ variables.linuxImage }}
steps: steps:
- checkout: none - checkout: none
- task: DownloadPipelineArtifact@2 - task: DownloadPipelineArtifact@2
@@ -541,17 +543,17 @@ stages:
MacCore: MacCore:
osName: 'Mac' osName: 'Mac'
testName: 'MacCore' testName: 'MacCore'
imageName: 'macos-10.15' imageName: ${{ variables.macImage }}
pattern: 'Radarr.*.osx-core-x64.tar.gz' pattern: 'Radarr.*.osx-core-x64.tar.gz'
WindowsCore: WindowsCore:
osName: 'Windows' osName: 'Windows'
testName: 'WindowsCore' testName: 'WindowsCore'
imageName: 'windows-2019' imageName: ${{ variables.windowsImage }}
pattern: 'Radarr.*.windows-core-x64.zip' pattern: 'Radarr.*.windows-core-x64.zip'
LinuxCore: LinuxCore:
osName: 'Linux' osName: 'Linux'
testName: 'LinuxCore' testName: 'LinuxCore'
imageName: 'ubuntu-18.04' imageName: ${{ variables.linuxImage }}
pattern: 'Radarr.*.linux-core-x64.tar.gz' pattern: 'Radarr.*.linux-core-x64.tar.gz'
pool: pool:
@@ -655,7 +657,7 @@ stages:
containerImage: ghcr.io/servarr/testimages:alpine containerImage: ghcr.io/servarr/testimages:alpine
pattern: 'Radarr.*.linux-musl-core-x64.tar.gz' pattern: 'Radarr.*.linux-musl-core-x64.tar.gz'
pool: pool:
vmImage: 'ubuntu-18.04' vmImage: ${{ variables.linuxImage }}
container: $[ variables['containerImage'] ] container: $[ variables['containerImage'] ]
@@ -711,17 +713,17 @@ stages:
matrix: matrix:
Linux: Linux:
osName: 'Linux' osName: 'Linux'
imageName: 'ubuntu-18.04' imageName: ${{ variables.linuxImage }}
pattern: 'Radarr.*.linux-core-x64.tar.gz' pattern: 'Radarr.*.linux-core-x64.tar.gz'
failBuild: true failBuild: true
Mac: Mac:
osName: 'Mac' osName: 'Mac'
imageName: 'macos-10.15' imageName: ${{ variables.macImage }}
pattern: 'Radarr.*.osx-core-x64.tar.gz' pattern: 'Radarr.*.osx-core-x64.tar.gz'
failBuild: true failBuild: true
Windows: Windows:
osName: 'Windows' osName: 'Windows'
imageName: 'windows-2019' imageName: ${{ variables.windowsImage }}
pattern: 'Radarr.*.windows-core-x64.zip' pattern: 'Radarr.*.windows-core-x64.zip'
failBuild: true failBuild: true
@@ -787,7 +789,7 @@ stages:
jobs: jobs:
- job: Prepare - job: Prepare
pool: pool:
vmImage: 'ubuntu-18.04' vmImage: ${{ variables.linuxImage }}
steps: steps:
- checkout: none - checkout: none
- task: DownloadPipelineArtifact@2 - task: DownloadPipelineArtifact@2
@@ -804,17 +806,17 @@ stages:
matrix: matrix:
Linux: Linux:
osName: 'Linux' osName: 'Linux'
imageName: 'ubuntu-18.04' imageName: ${{ variables.linuxImage }}
Windows: Windows:
osName: 'Windows' osName: 'Windows'
imageName: 'windows-2019' imageName: ${{ variables.windowsImage }}
pool: pool:
vmImage: $(imageName) vmImage: $(imageName)
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
displayName: Set Node.js version displayName: Set Node.js version
inputs: inputs:
versionSpec: '12.x' versionSpec: $(nodeVersion)
- checkout: self - checkout: self
submodules: true submodules: true
fetchDepth: 1 fetchDepth: 1
@@ -836,7 +838,7 @@ stages:
displayName: Frontend displayName: Frontend
condition: eq(variables['System.PullRequest.IsFork'], 'False') condition: eq(variables['System.PullRequest.IsFork'], 'False')
pool: pool:
vmImage: windows-2019 vmImage: ${{ variables.windowsImage }}
steps: steps:
- checkout: self # Need history for Sonar analysis - checkout: self # Need history for Sonar analysis
- task: SonarCloudPrepare@1 - task: SonarCloudPrepare@1
@@ -852,6 +854,60 @@ stages:
cliProjectVersion: '$(radarrVersion)' cliProjectVersion: '$(radarrVersion)'
cliSources: './frontend' cliSources: './frontend'
- task: SonarCloudAnalyze@1 - task: SonarCloudAnalyze@1
- job: Api_Docs
displayName: API Docs
dependsOn: Prepare
condition: |
and
(
and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop')),
and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
)
pool:
vmImage: ${{ variables.windowsImage }}
steps:
- task: UseDotNet@2
displayName: 'Install .net core'
inputs:
version: $(dotnetVersion)
- checkout: self
submodules: true
persistCredentials: true
fetchDepth: 1
- bash: ./docs.sh Windows
displayName: Create openapi.json
- bash: |
git config --global user.email "development@lidarr.audio"
git config --global user.name "Servarr"
git checkout -b api-docs
git add .
git status
if git status | grep modified
then
git commit -am 'Automated API Docs update'
git push -f --set-upstream origin api-docs
curl -X POST -H "Authorization: token ${GITHUBTOKEN}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/radarr/radarr/pulls -d '{"head":"api-docs","base":"develop","title":"Update API docs"}'
else
echo "No changes since last run"
fi
displayName: Commit API Doc Change
continueOnError: true
env:
GITHUBTOKEN: $(githubToken)
- task: CopyFiles@2
displayName: 'Copy openapi.json to: $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: |
**/*openapi.json
TargetFolder: '$(Build.ArtifactStagingDirectory)/api_docs'
- publish: $(Build.ArtifactStagingDirectory)/api_docs
artifact: 'APIDocs'
displayName: Publish API Docs Bundle
condition: and(succeeded(), eq(variables['System.JobAttempt'], '1'))
- job: Analyze_Backend - job: Analyze_Backend
displayName: Backend displayName: Backend
@@ -863,7 +919,7 @@ stages:
EnableAnalyzers: 'false' EnableAnalyzers: 'false'
pool: pool:
vmImage: windows-2019 vmImage: ${{ variables.windowsImage }}
steps: steps:
- task: UseDotNet@2 - task: UseDotNet@2
@@ -920,7 +976,7 @@ stages:
- job: - job:
displayName: Discord Notification displayName: Discord Notification
pool: pool:
vmImage: 'ubuntu-18.04' vmImage: ${{ variables.linuxImage }}
steps: steps:
- task: DownloadPipelineArtifact@2 - task: DownloadPipelineArtifact@2
continueOnError: true continueOnError: true

View File

@@ -233,6 +233,32 @@ Package()
esac esac
} }
BuildInstaller()
{
local framework="$1"
local runtime="$2"
./_inno/ISCC.exe setup/radarr.iss "//DFramework=$framework" "//DRuntime=$runtime"
}
InstallInno()
{
ProgressStart "Installing portable Inno Setup"
rm -rf _inno
curl -s --output innosetup.exe "https://files.jrsoftware.org/is/6/innosetup-${INNOVERSION:-6.2.0}.exe"
mkdir _inno
./innosetup.exe //portable=1 //silent //currentuser //dir=.\\_inno
rm innosetup.exe
ProgressEnd "Installed portable Inno Setup"
}
RemoveInno()
{
rm -rf _inno
}
PackageTests() PackageTests()
{ {
local framework="$1" local framework="$1"
@@ -264,6 +290,7 @@ if [ $# -eq 0 ]; then
BACKEND=YES BACKEND=YES
FRONTEND=YES FRONTEND=YES
PACKAGES=YES PACKAGES=YES
INSTALLER=NO
LINT=YES LINT=YES
ENABLE_BSD=NO ENABLE_BSD=NO
fi fi
@@ -299,6 +326,10 @@ case $key in
PACKAGES=YES PACKAGES=YES
shift # past argument shift # past argument
;; ;;
--installer)
INSTALLER=YES
shift # past argument
;;
--lint) --lint)
LINT=YES LINT=YES
shift # past argument shift # past argument
@@ -382,3 +413,11 @@ then
Package "$FRAMEWORK" "$RID" Package "$FRAMEWORK" "$RID"
fi fi
fi fi
if [ "$INSTALLER" = "YES" ];
then
InstallInno
BuildInstaller "net6.0" "win-x64"
BuildInstaller "net6.0" "win-x86"
RemoveInno
fi

38
docs.sh Normal file
View File

@@ -0,0 +1,38 @@
PLATFORM=$1
if [ "$PLATFORM" = "Windows" ]; then
RUNTIME="win-x64"
elif [ "$PLATFORM" = "Linux" ]; then
WHERE="linux-x64"
elif [ "$PLATFORM" = "Mac" ]; then
WHERE="osx-x64"
else
echo "Platform must be provided as first arguement: Windows, Linux or Mac"
exit 1
fi
outputFolder='_output'
testPackageFolder='_tests'
rm -rf $outputFolder
rm -rf $testPackageFolder
slnFile=src/Radarr.sln
platform=Posix
dotnet clean $slnFile -c Debug
dotnet clean $slnFile -c Release
dotnet msbuild -restore $slnFile -p:Configuration=Debug -p:Platform=$platform -p:RuntimeIdentifiers=$RUNTIME -t:PublishAllRids
dotnet new tool-manifest
dotnet tool install --version 6.3.0 Swashbuckle.AspNetCore.Cli
dotnet tool run swagger tofile --output ./src/Radarr.Api.V3/openapi.json "$outputFolder/net6.0/$RUNTIME/radarr.console.dll" v3 &
sleep 45
kill %1
exit 0

View File

@@ -61,33 +61,33 @@ class Blocklist extends Component {
getSelectedIds = () => { getSelectedIds = () => {
return getSelectedIds(this.state.selectedState); return getSelectedIds(this.state.selectedState);
} };
// //
// Listeners // Listeners
onSelectAllChange = ({ value }) => { onSelectAllChange = ({ value }) => {
this.setState(selectAll(this.state.selectedState, value)); this.setState(selectAll(this.state.selectedState, value));
} };
onSelectedChange = ({ id, value, shiftKey = false }) => { onSelectedChange = ({ id, value, shiftKey = false }) => {
this.setState((state) => { this.setState((state) => {
return toggleSelected(state, this.props.items, id, value, shiftKey); return toggleSelected(state, this.props.items, id, value, shiftKey);
}); });
} };
onRemoveSelectedPress = () => { onRemoveSelectedPress = () => {
this.setState({ isConfirmRemoveModalOpen: true }); this.setState({ isConfirmRemoveModalOpen: true });
} };
onRemoveSelectedConfirmed = () => { onRemoveSelectedConfirmed = () => {
this.props.onRemoveSelected(this.getSelectedIds()); this.props.onRemoveSelected(this.getSelectedIds());
this.setState({ isConfirmRemoveModalOpen: false }); this.setState({ isConfirmRemoveModalOpen: false });
} };
onConfirmRemoveModalClose = () => { onConfirmRemoveModalClose = () => {
this.setState({ isConfirmRemoveModalOpen: false }); this.setState({ isConfirmRemoveModalOpen: false });
} };
// //
// Render // Render

View File

@@ -65,37 +65,37 @@ class BlocklistConnector extends Component {
repopulate = () => { repopulate = () => {
this.props.fetchBlocklist(); this.props.fetchBlocklist();
} };
// //
// Listeners // Listeners
onFirstPagePress = () => { onFirstPagePress = () => {
this.props.gotoBlocklistFirstPage(); this.props.gotoBlocklistFirstPage();
} };
onPreviousPagePress = () => { onPreviousPagePress = () => {
this.props.gotoBlocklistPreviousPage(); this.props.gotoBlocklistPreviousPage();
} };
onNextPagePress = () => { onNextPagePress = () => {
this.props.gotoBlocklistNextPage(); this.props.gotoBlocklistNextPage();
} };
onLastPagePress = () => { onLastPagePress = () => {
this.props.gotoBlocklistLastPage(); this.props.gotoBlocklistLastPage();
} };
onPageSelect = (page) => { onPageSelect = (page) => {
this.props.gotoBlocklistPage({ page }); this.props.gotoBlocklistPage({ page });
} };
onRemoveSelected = (ids) => { onRemoveSelected = (ids) => {
this.props.removeBlocklistItems({ ids }); this.props.removeBlocklistItems({ ids });
} };
onSortPress = (sortKey) => { onSortPress = (sortKey) => {
this.props.setBlocklistSort({ sortKey }); this.props.setBlocklistSort({ sortKey });
} };
onTableOptionChange = (payload) => { onTableOptionChange = (payload) => {
this.props.setBlocklistTableOption(payload); this.props.setBlocklistTableOption(payload);
@@ -103,11 +103,11 @@ class BlocklistConnector extends Component {
if (payload.pageSize) { if (payload.pageSize) {
this.props.gotoBlocklistFirstPage(); this.props.gotoBlocklistFirstPage();
} }
} };
onClearBlocklistPress = () => { onClearBlocklistPress = () => {
this.props.executeCommand({ name: commandNames.CLEAR_BLOCKLIST }); this.props.executeCommand({ name: commandNames.CLEAR_BLOCKLIST });
} };
// //
// Render // Render

View File

@@ -32,11 +32,11 @@ class BlocklistRow extends Component {
onDetailsPress = () => { onDetailsPress = () => {
this.setState({ isDetailsModalOpen: true }); this.setState({ isDetailsModalOpen: true });
} };
onDetailsModalClose = () => { onDetailsModalClose = () => {
this.setState({ isDetailsModalOpen: false }); this.setState({ isDetailsModalOpen: false });
} };
// //
// Render // Render

View File

@@ -57,38 +57,38 @@ class HistoryConnector extends Component {
repopulate = () => { repopulate = () => {
this.props.fetchHistory(); this.props.fetchHistory();
} };
// //
// Listeners // Listeners
onFirstPagePress = () => { onFirstPagePress = () => {
this.props.gotoHistoryFirstPage(); this.props.gotoHistoryFirstPage();
} };
onPreviousPagePress = () => { onPreviousPagePress = () => {
this.props.gotoHistoryPreviousPage(); this.props.gotoHistoryPreviousPage();
} };
onNextPagePress = () => { onNextPagePress = () => {
this.props.gotoHistoryNextPage(); this.props.gotoHistoryNextPage();
} };
onLastPagePress = () => { onLastPagePress = () => {
this.props.gotoHistoryLastPage(); this.props.gotoHistoryLastPage();
} };
onPageSelect = (page) => { onPageSelect = (page) => {
this.props.gotoHistoryPage({ page }); this.props.gotoHistoryPage({ page });
} };
onSortPress = (sortKey) => { onSortPress = (sortKey) => {
this.props.setHistorySort({ sortKey }); this.props.setHistorySort({ sortKey });
} };
onFilterSelect = (selectedFilterKey) => { onFilterSelect = (selectedFilterKey) => {
this.props.setHistoryFilter({ selectedFilterKey }); this.props.setHistoryFilter({ selectedFilterKey });
} };
onTableOptionChange = (payload) => { onTableOptionChange = (payload) => {
this.props.setHistoryTableOption(payload); this.props.setHistoryTableOption(payload);
@@ -96,7 +96,7 @@ class HistoryConnector extends Component {
if (payload.pageSize) { if (payload.pageSize) {
this.props.gotoHistoryFirstPage(); this.props.gotoHistoryFirstPage();
} }
} };
// //
// Render // Render

View File

@@ -41,11 +41,11 @@ class HistoryRow extends Component {
onDetailsPress = () => { onDetailsPress = () => {
this.setState({ isDetailsModalOpen: true }); this.setState({ isDetailsModalOpen: true });
} };
onDetailsModalClose = () => { onDetailsModalClose = () => {
this.setState({ isDetailsModalOpen: false }); this.setState({ isDetailsModalOpen: false });
} };
// //
// Render // Render

View File

@@ -46,7 +46,7 @@ class HistoryRowConnector extends Component {
onMarkAsFailedPress = () => { onMarkAsFailedPress = () => {
this.props.markAsFailed({ id: this.props.id }); this.props.markAsFailed({ id: this.props.id });
} };
// //
// Render // Render

View File

@@ -90,45 +90,45 @@ class Queue extends Component {
getSelectedIds = () => { getSelectedIds = () => {
return getSelectedIds(this.state.selectedState); return getSelectedIds(this.state.selectedState);
} };
// //
// Listeners // Listeners
onQueueRowModalOpenOrClose = (isOpen) => { onQueueRowModalOpenOrClose = (isOpen) => {
this._shouldBlockRefresh = isOpen; this._shouldBlockRefresh = isOpen;
} };
onSelectAllChange = ({ value }) => { onSelectAllChange = ({ value }) => {
this.setState(selectAll(this.state.selectedState, value)); this.setState(selectAll(this.state.selectedState, value));
} };
onSelectedChange = ({ id, value, shiftKey = false }) => { onSelectedChange = ({ id, value, shiftKey = false }) => {
this.setState((state) => { this.setState((state) => {
return toggleSelected(state, this.props.items, id, value, shiftKey); return toggleSelected(state, this.props.items, id, value, shiftKey);
}); });
} };
onGrabSelectedPress = () => { onGrabSelectedPress = () => {
this.props.onGrabSelectedPress(this.getSelectedIds()); this.props.onGrabSelectedPress(this.getSelectedIds());
} };
onRemoveSelectedPress = () => { onRemoveSelectedPress = () => {
this.setState({ isConfirmRemoveModalOpen: true }, () => { this.setState({ isConfirmRemoveModalOpen: true }, () => {
this._shouldBlockRefresh = true; this._shouldBlockRefresh = true;
}); });
} };
onRemoveSelectedConfirmed = (payload) => { onRemoveSelectedConfirmed = (payload) => {
this._shouldBlockRefresh = false; this._shouldBlockRefresh = false;
this.props.onRemoveSelectedPress({ ids: this.getSelectedIds(), ...payload }); this.props.onRemoveSelectedPress({ ids: this.getSelectedIds(), ...payload });
this.setState({ isConfirmRemoveModalOpen: false }); this.setState({ isConfirmRemoveModalOpen: false });
} };
onConfirmRemoveModalClose = () => { onConfirmRemoveModalClose = () => {
this._shouldBlockRefresh = false; this._shouldBlockRefresh = false;
this.setState({ isConfirmRemoveModalOpen: false }); this.setState({ isConfirmRemoveModalOpen: false });
} };
// //
// Render // Render

View File

@@ -77,34 +77,34 @@ class QueueConnector extends Component {
repopulate = () => { repopulate = () => {
this.props.fetchQueue(); this.props.fetchQueue();
} };
// //
// Listeners // Listeners
onFirstPagePress = () => { onFirstPagePress = () => {
this.props.gotoQueueFirstPage(); this.props.gotoQueueFirstPage();
} };
onPreviousPagePress = () => { onPreviousPagePress = () => {
this.props.gotoQueuePreviousPage(); this.props.gotoQueuePreviousPage();
} };
onNextPagePress = () => { onNextPagePress = () => {
this.props.gotoQueueNextPage(); this.props.gotoQueueNextPage();
} };
onLastPagePress = () => { onLastPagePress = () => {
this.props.gotoQueueLastPage(); this.props.gotoQueueLastPage();
} };
onPageSelect = (page) => { onPageSelect = (page) => {
this.props.gotoQueuePage({ page }); this.props.gotoQueuePage({ page });
} };
onSortPress = (sortKey) => { onSortPress = (sortKey) => {
this.props.setQueueSort({ sortKey }); this.props.setQueueSort({ sortKey });
} };
onTableOptionChange = (payload) => { onTableOptionChange = (payload) => {
this.props.setQueueTableOption(payload); this.props.setQueueTableOption(payload);
@@ -112,21 +112,21 @@ class QueueConnector extends Component {
if (payload.pageSize) { if (payload.pageSize) {
this.props.gotoQueueFirstPage(); this.props.gotoQueueFirstPage();
} }
} };
onRefreshPress = () => { onRefreshPress = () => {
this.props.executeCommand({ this.props.executeCommand({
name: commandNames.REFRESH_MONITORED_DOWNLOADS name: commandNames.REFRESH_MONITORED_DOWNLOADS
}); });
} };
onGrabSelectedPress = (ids) => { onGrabSelectedPress = (ids) => {
this.props.grabQueueItems({ ids }); this.props.grabQueueItems({ ids });
} };
onRemoveSelectedPress = (payload) => { onRemoveSelectedPress = (payload) => {
this.props.removeQueueItems(payload); this.props.removeQueueItems(payload);
} };
// //
// Render // Render

View File

@@ -42,7 +42,7 @@ class QueueOptions extends Component {
[name]: value [name]: value
}); });
}); });
} };
// //
// Render // Render

View File

@@ -40,7 +40,7 @@ class QueueRow extends Component {
onRemoveQueueItemPress = () => { onRemoveQueueItemPress = () => {
this.setState({ isRemoveQueueItemModalOpen: true }); this.setState({ isRemoveQueueItemModalOpen: true });
} };
onRemoveQueueItemModalConfirmed = (blocklist) => { onRemoveQueueItemModalConfirmed = (blocklist) => {
const { const {
@@ -52,25 +52,25 @@ class QueueRow extends Component {
onRemoveQueueItemPress(blocklist); onRemoveQueueItemPress(blocklist);
this.setState({ isRemoveQueueItemModalOpen: false }); this.setState({ isRemoveQueueItemModalOpen: false });
} };
onRemoveQueueItemModalClose = () => { onRemoveQueueItemModalClose = () => {
this.props.onQueueRowModalOpenOrClose(false); this.props.onQueueRowModalOpenOrClose(false);
this.setState({ isRemoveQueueItemModalOpen: false }); this.setState({ isRemoveQueueItemModalOpen: false });
} };
onInteractiveImportPress = () => { onInteractiveImportPress = () => {
this.props.onQueueRowModalOpenOrClose(true); this.props.onQueueRowModalOpenOrClose(true);
this.setState({ isInteractiveImportModalOpen: true }); this.setState({ isInteractiveImportModalOpen: true });
} };
onInteractiveImportModalClose = () => { onInteractiveImportModalClose = () => {
this.props.onQueueRowModalOpenOrClose(false); this.props.onQueueRowModalOpenOrClose(false);
this.setState({ isInteractiveImportModalOpen: false }); this.setState({ isInteractiveImportModalOpen: false });
} };
// //
// Render // Render

View File

@@ -37,11 +37,11 @@ class QueueRowConnector extends Component {
onGrabPress = () => { onGrabPress = () => {
this.props.grabQueueItem({ id: this.props.id }); this.props.grabQueueItem({ id: this.props.id });
} };
onRemoveQueueItemPress = (payload) => { onRemoveQueueItemPress = (payload) => {
this.props.removeQueueItem({ id: this.props.id, ...payload }); this.props.removeQueueItem({ id: this.props.id, ...payload });
} };
// //
// Render // Render

View File

@@ -34,30 +34,30 @@ class RemoveQueueItemModal extends Component {
remove: true, remove: true,
blocklist: false blocklist: false
}); });
} };
// //
// Listeners // Listeners
onRemoveChange = ({ value }) => { onRemoveChange = ({ value }) => {
this.setState({ remove: value }); this.setState({ remove: value });
} };
onBlocklistChange = ({ value }) => { onBlocklistChange = ({ value }) => {
this.setState({ blocklist: value }); this.setState({ blocklist: value });
} };
onRemoveConfirmed = () => { onRemoveConfirmed = () => {
const state = this.state; const state = this.state;
this.resetState(); this.resetState();
this.props.onRemovePress(state); this.props.onRemovePress(state);
} };
onModalClose = () => { onModalClose = () => {
this.resetState(); this.resetState();
this.props.onModalClose(); this.props.onModalClose();
} };
// //
// Render // Render

View File

@@ -30,35 +30,35 @@ class RemoveQueueItemsModal extends Component {
// //
// Control // Control
resetState = function() { resetState = function() {
this.setState({ this.setState({
remove: true, remove: true,
blocklist: false blocklist: false
}); });
} };
// //
// Listeners // Listeners
onRemoveChange = ({ value }) => { onRemoveChange = ({ value }) => {
this.setState({ remove: value }); this.setState({ remove: value });
} };
onBlocklistChange = ({ value }) => { onBlocklistChange = ({ value }) => {
this.setState({ blocklist: value }); this.setState({ blocklist: value });
} };
onRemoveConfirmed = () => { onRemoveConfirmed = () => {
const state = this.state; const state = this.state;
this.resetState(); this.resetState();
this.props.onRemovePress(state); this.props.onRemovePress(state);
} };
onModalClose = () => { onModalClose = () => {
this.resetState(); this.resetState();
this.props.onModalClose(); this.props.onModalClose();
} };
// //
// Render // Render

View File

@@ -67,12 +67,12 @@ class AddNewMovie extends Component {
this.props.onClearMovieLookup(); this.props.onClearMovieLookup();
} }
}); });
} };
onClearMovieLookupPress = () => { onClearMovieLookupPress = () => {
this.setState({ term: '' }); this.setState({ term: '' });
this.props.onClearMovieLookup(); this.props.onClearMovieLookup();
} };
// //
// Render // Render

View File

@@ -79,11 +79,11 @@ class AddNewMovieConnector extends Component {
this.props.lookupMovie({ term }); this.props.lookupMovie({ term });
}, 300); }, 300);
} }
} };
onClearMovieLookup = () => { onClearMovieLookup = () => {
this.props.clearAddMovie(); this.props.clearAddMovie();
} };
// //
// Render // Render

View File

@@ -22,11 +22,11 @@ class AddNewMovieModalContent extends Component {
onQualityProfileIdChange = ({ value }) => { onQualityProfileIdChange = ({ value }) => {
this.props.onInputChange({ name: 'qualityProfileId', value: parseInt(value) }); this.props.onInputChange({ name: 'qualityProfileId', value: parseInt(value) });
} };
onAddMoviePress = () => { onAddMoviePress = () => {
this.props.onAddMoviePress(); this.props.onAddMoviePress();
} };
// //
// Render // Render

View File

@@ -51,7 +51,7 @@ class AddNewMovieModalContentConnector extends Component {
onInputChange = ({ name, value }) => { onInputChange = ({ name, value }) => {
this.props.setAddMovieDefault({ [name]: value }); this.props.setAddMovieDefault({ [name]: value });
} };
onAddMoviePress = () => { onAddMoviePress = () => {
const { const {
@@ -73,7 +73,7 @@ class AddNewMovieModalContentConnector extends Component {
searchForMovie: searchForMovie.value, searchForMovie: searchForMovie.value,
tags: tags.value tags: tags.value
}); });
} };
// //
// Render // Render

View File

@@ -39,15 +39,15 @@ class AddNewMovieSearchResult extends Component {
onPress = () => { onPress = () => {
this.setState({ isNewAddMovieModalOpen: true }); this.setState({ isNewAddMovieModalOpen: true });
} };
onAddMovieModalClose = () => { onAddMovieModalClose = () => {
this.setState({ isNewAddMovieModalOpen: false }); this.setState({ isNewAddMovieModalOpen: false });
} };
onExternalLinkPress = (event) => { onExternalLinkPress = (event) => {
event.stopPropagation(); event.stopPropagation();
} };
// //
// Render // Render

View File

@@ -32,25 +32,25 @@ class ImportMovie extends Component {
setScrollerRef = (ref) => { setScrollerRef = (ref) => {
this.setState({ scroller: ref }); this.setState({ scroller: ref });
} };
// //
// Listeners // Listeners
getSelectedIds = () => { getSelectedIds = () => {
return getSelectedIds(this.state.selectedState, { parseIds: false }); return getSelectedIds(this.state.selectedState, { parseIds: false });
} };
onSelectAllChange = ({ value }) => { onSelectAllChange = ({ value }) => {
// Only select non-dupes // Only select non-dupes
this.setState(selectAll(this.state.selectedState, value)); this.setState(selectAll(this.state.selectedState, value));
} };
onSelectedChange = ({ id, value, shiftKey = false }) => { onSelectedChange = ({ id, value, shiftKey = false }) => {
this.setState((state) => { this.setState((state) => {
return toggleSelected(state, this.props.items, id, value, shiftKey); return toggleSelected(state, this.props.items, id, value, shiftKey);
}); });
} };
onRemoveSelectedStateItem = (id) => { onRemoveSelectedStateItem = (id) => {
this.setState((state) => { this.setState((state) => {
@@ -62,15 +62,15 @@ class ImportMovie extends Component {
selectedState selectedState
}; };
}); });
} };
onInputChange = ({ name, value }) => { onInputChange = ({ name, value }) => {
this.props.onInputChange(this.getSelectedIds(), name, value); this.props.onInputChange(this.getSelectedIds(), name, value);
} };
onImportPress = () => { onImportPress = () => {
this.props.onImportPress(this.getSelectedIds()); this.props.onImportPress(this.getSelectedIds());
} };
// //
// Render // Render

View File

@@ -112,11 +112,11 @@ class ImportMovieConnector extends Component {
[name]: value [name]: value
}); });
}); });
} };
onImportPress = (ids) => { onImportPress = (ids) => {
this.props.dispatchImportMovie({ ids }); this.props.dispatchImportMovie({ ids });
} };
// //
// Render // Render

View File

@@ -83,7 +83,7 @@ class ImportMovieFooter extends Component {
onInputChange = ({ name, value }) => { onInputChange = ({ name, value }) => {
this.setState({ [name]: value }); this.setState({ [name]: value });
this.props.onInputChange({ name, value }); this.props.onInputChange({ name, value });
} };
// //
// Render // Render

View File

@@ -48,7 +48,7 @@ class ImportMovieRowConnector extends Component {
id: this.props.id, id: this.props.id,
[name]: value [name]: value
}); });
} };
// //
// Render // Render

View File

@@ -121,7 +121,7 @@ class ImportMovieTable extends Component {
/> />
</VirtualTableRow> </VirtualTableRow>
); );
} };
// //
// Render // Render

View File

@@ -11,7 +11,7 @@ class ImportMovieSearchResult extends Component {
onPress = () => { onPress = () => {
this.props.onPress(this.props.tmdbId); this.props.onPress(this.props.tmdbId);
} };
// //
// Render // Render

View File

@@ -69,7 +69,7 @@ class ImportMovieSelectMovie extends Component {
this.setState({ isOpen: false }); this.setState({ isOpen: false });
this._removeListener(); this._removeListener();
} }
} };
onPress = () => { onPress = () => {
if (this.state.isOpen) { if (this.state.isOpen) {
@@ -79,7 +79,7 @@ class ImportMovieSelectMovie extends Component {
} }
this.setState({ isOpen: !this.state.isOpen }); this.setState({ isOpen: !this.state.isOpen });
} };
onSearchInputChange = ({ value }) => { onSearchInputChange = ({ value }) => {
if (this._movieLookupTimeout) { if (this._movieLookupTimeout) {
@@ -91,17 +91,17 @@ class ImportMovieSelectMovie extends Component {
this.props.onSearchInputChange(value); this.props.onSearchInputChange(value);
}, 200); }, 200);
}); });
} };
onRefreshPress = () => { onRefreshPress = () => {
this.props.onSearchInputChange(this.state.term); this.props.onSearchInputChange(this.state.term);
} };
onMovieSelect = (tmdbId) => { onMovieSelect = (tmdbId) => {
this.setState({ isOpen: false }); this.setState({ isOpen: false });
this.props.onMovieSelect(tmdbId); this.props.onMovieSelect(tmdbId);
} };
// //
// Render // Render

View File

@@ -36,7 +36,7 @@ class ImportMovieSelectMovieConnector extends Component {
term, term,
topOfQueue: true topOfQueue: true
}); });
} };
onMovieSelect = (tmdbId) => { onMovieSelect = (tmdbId) => {
const { const {
@@ -48,7 +48,7 @@ class ImportMovieSelectMovieConnector extends Component {
id, id,
selectedMovie: _.find(items, { tmdbId }) selectedMovie: _.find(items, { tmdbId })
}); });
} };
// //
// Render // Render

View File

@@ -25,7 +25,7 @@ class ImportMovieRootFolderRowConnector extends Component {
onDeletePress = () => { onDeletePress = () => {
this.props.deleteRootFolder({ id: this.props.id }); this.props.deleteRootFolder({ id: this.props.id });
} };
// //
// Render // Render

View File

@@ -55,15 +55,15 @@ class ImportMovieSelectFolder extends Component {
onAddNewRootFolderPress = () => { onAddNewRootFolderPress = () => {
this.setState({ isAddNewRootFolderModalOpen: true }); this.setState({ isAddNewRootFolderModalOpen: true });
} };
onNewRootFolderSelect = ({ value }) => { onNewRootFolderSelect = ({ value }) => {
this.props.onNewRootFolderSelect(value); this.props.onNewRootFolderSelect(value);
} };
onAddRootFolderModalClose = () => { onAddRootFolderModalClose = () => {
this.setState({ isAddNewRootFolderModalOpen: false }); this.setState({ isAddNewRootFolderModalOpen: false });
} };
// //
// Render // Render

View File

@@ -58,11 +58,11 @@ class ImportMovieSelectFolderConnector extends Component {
onNewRootFolderSelect = (path) => { onNewRootFolderSelect = (path) => {
this.props.addRootFolder({ path }); this.props.addRootFolder({ path });
} };
onDeleteRootFolderPress = (id) => { onDeleteRootFolderPress = (id) => {
this.props.deleteRootFolder({ id }); this.props.deleteRootFolder({ id });
} };
// //
// Render // Render

View File

@@ -27,11 +27,11 @@ class AgendaEvent extends Component {
onPress = () => { onPress = () => {
this.setState({ isDetailsModalOpen: true }); this.setState({ isDetailsModalOpen: true });
} };
onDetailsModalClose = () => { onDetailsModalClose = () => {
this.setState({ isDetailsModalOpen: false }); this.setState({ isDetailsModalOpen: false });
} };
// //
// Render // Render

View File

@@ -119,43 +119,43 @@ class CalendarConnector extends Component {
this.props.fetchQueueDetails({ time, view }); this.props.fetchQueueDetails({ time, view });
this.props.fetchCalendar({ time, view }); this.props.fetchCalendar({ time, view });
} };
scheduleUpdate = () => { scheduleUpdate = () => {
this.clearUpdateTimeout(); this.clearUpdateTimeout();
this.updateTimeoutId = setTimeout(this.updateCalendar, UPDATE_DELAY); this.updateTimeoutId = setTimeout(this.updateCalendar, UPDATE_DELAY);
} };
clearUpdateTimeout = () => { clearUpdateTimeout = () => {
if (this.updateTimeoutId) { if (this.updateTimeoutId) {
clearTimeout(this.updateTimeoutId); clearTimeout(this.updateTimeoutId);
} }
} };
updateCalendar = () => { updateCalendar = () => {
this.props.gotoCalendarToday(); this.props.gotoCalendarToday();
this.scheduleUpdate(); this.scheduleUpdate();
} };
// //
// Listeners // Listeners
onCalendarViewChange = (view) => { onCalendarViewChange = (view) => {
this.props.setCalendarView({ view }); this.props.setCalendarView({ view });
} };
onTodayPress = () => { onTodayPress = () => {
this.props.gotoCalendarToday(); this.props.gotoCalendarToday();
} };
onPreviousPress = () => { onPreviousPress = () => {
this.props.gotoCalendarPreviousRange(); this.props.gotoCalendarPreviousRange();
} };
onNextPress = () => { onNextPress = () => {
this.props.gotoCalendarNextRange(); this.props.gotoCalendarNextRange();
} };
// //
// Render // Render

View File

@@ -44,23 +44,23 @@ class CalendarPage extends Component {
const days = Math.max(3, Math.min(7, Math.floor(width / MINIMUM_DAY_WIDTH))); const days = Math.max(3, Math.min(7, Math.floor(width / MINIMUM_DAY_WIDTH)));
this.props.onDaysCountChange(days); this.props.onDaysCountChange(days);
} };
onGetCalendarLinkPress = () => { onGetCalendarLinkPress = () => {
this.setState({ isCalendarLinkModalOpen: true }); this.setState({ isCalendarLinkModalOpen: true });
} };
onGetCalendarLinkModalClose = () => { onGetCalendarLinkModalClose = () => {
this.setState({ isCalendarLinkModalOpen: false }); this.setState({ isCalendarLinkModalOpen: false });
} };
onOptionsPress = () => { onOptionsPress = () => {
this.setState({ isOptionsModalOpen: true }); this.setState({ isOptionsModalOpen: true });
} };
onOptionsModalClose = () => { onOptionsModalClose = () => {
this.setState({ isOptionsModalOpen: false }); this.setState({ isOptionsModalOpen: false });
} };
onSearchMissingPress = () => { onSearchMissingPress = () => {
const { const {
@@ -69,7 +69,7 @@ class CalendarPage extends Component {
} = this.props; } = this.props;
onSearchMissingPress(missingMovieIds); onSearchMissingPress(missingMovieIds);
} };
// //
// Render // Render

View File

@@ -60,20 +60,20 @@ class CalendarDays extends Component {
this.setState({ todaysDate: todaysDate.toISOString() }); this.setState({ todaysDate: todaysDate.toISOString() });
this.updateTimeoutId = setTimeout(this.scheduleUpdate, diff); this.updateTimeoutId = setTimeout(this.scheduleUpdate, diff);
} };
clearUpdateTimeout = () => { clearUpdateTimeout = () => {
if (this.updateTimeoutId) { if (this.updateTimeoutId) {
clearTimeout(this.updateTimeoutId); clearTimeout(this.updateTimeoutId);
} }
} };
// //
// Listeners // Listeners
onEventModalOpenToggle = (isEventModalOpen) => { onEventModalOpenToggle = (isEventModalOpen) => {
this.setState({ isEventModalOpen }); this.setState({ isEventModalOpen });
} };
onTouchStart = (event) => { onTouchStart = (event) => {
const touches = event.touches; const touches = event.touches;
@@ -92,7 +92,7 @@ class CalendarDays extends Component {
} }
this._touchStart = touchStart; this._touchStart = touchStart;
} };
onTouchEnd = (event) => { onTouchEnd = (event) => {
const touches = event.changedTouches; const touches = event.changedTouches;
@@ -109,17 +109,17 @@ class CalendarDays extends Component {
} }
this._touchStart = null; this._touchStart = null;
} };
onTouchCancel = (event) => { onTouchCancel = (event) => {
this._touchStart = null; this._touchStart = null;
} };
onTouchMove = (event) => { onTouchMove = (event) => {
if (!this._touchStart) { if (!this._touchStart) {
return; return;
} }
} };
// //
// Render // Render

View File

@@ -47,13 +47,13 @@ class DaysOfWeek extends Component {
}); });
this.updateTimeoutId = setTimeout(this.scheduleUpdate, diff); this.updateTimeoutId = setTimeout(this.scheduleUpdate, diff);
} };
clearUpdateTimeout = () => { clearUpdateTimeout = () => {
if (this.updateTimeoutId) { if (this.updateTimeoutId) {
clearTimeout(this.updateTimeoutId); clearTimeout(this.updateTimeoutId);
} }
} };
// //
// Render // Render

View File

@@ -71,7 +71,7 @@ class CalendarHeader extends Component {
this.setState({ view }, () => { this.setState({ view }, () => {
this.props.onViewChange(view); this.props.onViewChange(view);
}); });
} };
// //
// Render // Render

View File

@@ -41,19 +41,19 @@ class CalendarHeaderConnector extends Component {
onViewChange = (view) => { onViewChange = (view) => {
this.props.setCalendarView({ view }); this.props.setCalendarView({ view });
} };
onTodayPress = () => { onTodayPress = () => {
this.props.gotoCalendarToday(); this.props.gotoCalendarToday();
} };
onPreviousPress = () => { onPreviousPress = () => {
this.props.gotoCalendarPreviousRange(); this.props.gotoCalendarPreviousRange();
} };
onNextPress = () => { onNextPress = () => {
this.props.gotoCalendarNextRange(); this.props.gotoCalendarNextRange();
} };
// //
// Render // Render

View File

@@ -12,7 +12,7 @@ class CalendarHeaderViewButton extends Component {
onPress = () => { onPress = () => {
this.props.onPress(this.props.view); this.props.onPress(this.props.view);
} };
// //
// Render // Render

View File

@@ -69,7 +69,7 @@ class CalendarOptionsModalContent extends Component {
} = this.props; } = this.props;
dispatchSetCalendarOption({ [name]: value }); dispatchSetCalendarOption({ [name]: value });
} };
onGlobalInputChange = ({ name, value }) => { onGlobalInputChange = ({ name, value }) => {
const { const {
@@ -81,11 +81,11 @@ class CalendarOptionsModalContent extends Component {
this.setState(setting, () => { this.setState(setting, () => {
dispatchSaveUISettings(setting); dispatchSaveUISettings(setting);
}); });
} };
onLinkFocus = (event) => { onLinkFocus = (event) => {
event.target.select(); event.target.select();
} };
// //
// Render // Render

View File

@@ -84,11 +84,11 @@ class CalendarLinkModalContent extends Component {
[name]: value, [name]: value,
...urls ...urls
}); });
} };
onLinkFocus = (event) => { onLinkFocus = (event) => {
event.target.select(); event.target.select();
} };
// //
// Render // Render

View File

@@ -70,18 +70,18 @@ class FileBrowserModalContent extends Component {
} else { } else {
this._scrollerNode = null; this._scrollerNode = null;
} }
} };
// //
// Listeners // Listeners
onPathInputChange = ({ value }) => { onPathInputChange = ({ value }) => {
this.setState({ currentPath: value }); this.setState({ currentPath: value });
} };
onRowPress = (path) => { onRowPress = (path) => {
this.props.onFetchPaths(path); this.props.onFetchPaths(path);
} };
onOkPress = () => { onOkPress = () => {
this.props.onChange({ this.props.onChange({
@@ -91,7 +91,7 @@ class FileBrowserModalContent extends Component {
this.props.onClearPaths(); this.props.onClearPaths();
this.props.onModalClose(); this.props.onModalClose();
} };
// //
// Render // Render

View File

@@ -78,16 +78,16 @@ class FileBrowserModalContentConnector extends Component {
allowFoldersWithoutTrailingSlashes: true, allowFoldersWithoutTrailingSlashes: true,
includeFiles includeFiles
}); });
} };
onClearPaths = () => { onClearPaths = () => {
// this.props.dispatchClearPaths(); // this.props.dispatchClearPaths();
} };
onModalClose = () => { onModalClose = () => {
this.props.dispatchClearPaths(); this.props.dispatchClearPaths();
this.props.onModalClose(); this.props.onModalClose();
} };
// //
// Render // Render

View File

@@ -28,7 +28,7 @@ class FileBrowserRow extends Component {
onPress = () => { onPress = () => {
this.props.onPress(this.props.path); this.props.onPress(this.props.path);
} };
// //
// Render // Render

View File

@@ -103,7 +103,7 @@ class DateFilterBuilderRowValue extends Component {
name: NAME, name: NAME,
value: newValue value: newValue
}); });
} };
onTimeChange = ({ value }) => { onTimeChange = ({ value }) => {
const { const {
@@ -118,7 +118,7 @@ class DateFilterBuilderRowValue extends Component {
value: filterValue.value value: filterValue.value
} }
}); });
} };
// //
// Render // Render

View File

@@ -63,7 +63,7 @@ class FilterBuilderModalContent extends Component {
onLabelChange = ({ value }) => { onLabelChange = ({ value }) => {
this.setState({ label: value }); this.setState({ label: value });
} };
onFilterChange = (index, filter) => { onFilterChange = (index, filter) => {
const filters = [...this.state.filters]; const filters = [...this.state.filters];
@@ -72,7 +72,7 @@ class FilterBuilderModalContent extends Component {
this.setState({ this.setState({
filters filters
}); });
} };
onAddFilterPress = () => { onAddFilterPress = () => {
const filters = [...this.state.filters]; const filters = [...this.state.filters];
@@ -81,7 +81,7 @@ class FilterBuilderModalContent extends Component {
this.setState({ this.setState({
filters filters
}); });
} };
onRemoveFilterPress = (index) => { onRemoveFilterPress = (index) => {
const filters = [...this.state.filters]; const filters = [...this.state.filters];
@@ -90,7 +90,7 @@ class FilterBuilderModalContent extends Component {
this.setState({ this.setState({
filters filters
}); });
} };
onSaveFilterPress = () => { onSaveFilterPress = () => {
const { const {
@@ -122,7 +122,7 @@ class FilterBuilderModalContent extends Component {
label, label,
filters filters
}); });
} };
// //
// Render // Render

View File

@@ -154,7 +154,7 @@ class FilterBuilderRow extends Component {
this.selectedFilterBuilderProp = selectedFilterBuilderProp; this.selectedFilterBuilderProp = selectedFilterBuilderProp;
onFilterChange(index, filter); onFilterChange(index, filter);
} };
onFilterChange = ({ name, value }) => { onFilterChange = ({ name, value }) => {
const { const {
@@ -174,7 +174,7 @@ class FilterBuilderRow extends Component {
filter[name] = value; filter[name] = value;
onFilterChange(index, filter); onFilterChange(index, filter);
} };
onAddPress = () => { onAddPress = () => {
const { const {
@@ -183,7 +183,7 @@ class FilterBuilderRow extends Component {
} = this.props; } = this.props;
onAddPress(index); onAddPress(index);
} };
onRemovePress = () => { onRemovePress = () => {
const { const {
@@ -192,7 +192,7 @@ class FilterBuilderRow extends Component {
} = this.props; } = this.props;
onRemovePress(index); onRemovePress(index);
} };
// //
// Render // Render

View File

@@ -84,7 +84,7 @@ class FilterBuilderRowValue extends Component {
name: NAME, name: NAME,
value: [...filterValue, value] value: [...filterValue, value]
}); });
} };
onTagDelete = ({ index }) => { onTagDelete = ({ index }) => {
const { const {
@@ -98,7 +98,7 @@ class FilterBuilderRowValue extends Component {
name: NAME, name: NAME,
value value
}); });
} };
// //
// Render // Render

View File

@@ -47,7 +47,7 @@ class IndexerFilterBuilderRowValueConnector extends Component {
if (!this.props.isPopulated) { if (!this.props.isPopulated) {
this.props.dispatchFetchIndexers(); this.props.dispatchFetchIndexers();
} }
} };
// //
// Render // Render

View File

@@ -43,7 +43,7 @@ class QualityFilterBuilderRowValueConnector extends Component {
if (!this.props.isPopulated) { if (!this.props.isPopulated) {
this.props.dispatchFetchQualityProfileSchema(); this.props.dispatchFetchQualityProfileSchema();
} }
} };
// //
// Render // Render

View File

@@ -55,7 +55,7 @@ class CustomFilter extends Component {
} = this.props; } = this.props;
onEditPress(id); onEditPress(id);
} };
onRemovePress = () => { onRemovePress = () => {
const { const {
@@ -67,7 +67,7 @@ class CustomFilter extends Component {
dispatchDeleteCustomFilter({ id }); dispatchDeleteCustomFilter({ id });
}); });
} };
// //
// Render // Render

View File

@@ -25,14 +25,14 @@ class FilterModal extends Component {
this.setState({ this.setState({
filterBuilder: true filterBuilder: true
}); });
} };
onEditCustomFilter = (id) => { onEditCustomFilter = (id) => {
this.setState({ this.setState({
filterBuilder: true, filterBuilder: true,
id id
}); });
} };
onCancelPress = () => { onCancelPress = () => {
if (this.state.filterBuilder) { if (this.state.filterBuilder) {
@@ -43,7 +43,7 @@ class FilterModal extends Component {
} else { } else {
this.onModalClose(); this.onModalClose();
} }
} };
onModalClose = () => { onModalClose = () => {
this.setState({ this.setState({
@@ -52,7 +52,7 @@ class FilterModal extends Component {
}, () => { }, () => {
this.props.onModalClose(); this.props.onModalClose();
}); });
} };
// //
// Render // Render

View File

@@ -35,11 +35,11 @@ class AutoCompleteInput extends Component {
name: this.props.name, name: this.props.name,
value: newValue value: newValue
}); });
} };
onInputBlur = () => { onInputBlur = () => {
this.setState({ suggestions: [] }); this.setState({ suggestions: [] });
} };
onSuggestionsFetchRequested = ({ value }) => { onSuggestionsFetchRequested = ({ value }) => {
const { values } = this.props; const { values } = this.props;
@@ -50,11 +50,11 @@ class AutoCompleteInput extends Component {
}); });
this.setState({ suggestions: filteredValues }); this.setState({ suggestions: filteredValues });
} };
onSuggestionsClearRequested = () => { onSuggestionsClearRequested = () => {
this.setState({ suggestions: [] }); this.setState({ suggestions: [] });
} };
// //
// Render // Render

View File

@@ -49,7 +49,7 @@ class AutoSuggestInput extends Component {
}} }}
</Reference> </Reference>
); );
} };
renderSuggestionsContainer = ({ containerProps, children }) => { renderSuggestionsContainer = ({ containerProps, children }) => {
return ( return (
@@ -90,7 +90,7 @@ class AutoSuggestInput extends Component {
</Popper> </Popper>
</Portal> </Portal>
); );
} };
// //
// Listeners // Listeners
@@ -113,14 +113,14 @@ class AutoSuggestInput extends Component {
data.styles.width = width; data.styles.width = width;
return data; return data;
} };
onInputChange = (event, { newValue }) => { onInputChange = (event, { newValue }) => {
this.props.onChange({ this.props.onChange({
name: this.props.name, name: this.props.name,
value: newValue value: newValue
}); });
} };
onInputKeyDown = (event) => { onInputKeyDown = (event) => {
const { const {
@@ -144,7 +144,7 @@ class AutoSuggestInput extends Component {
}); });
} }
} }
} };
// //
// Render // Render

View File

@@ -39,7 +39,7 @@ class CaptchaInputConnector extends Component {
componentWillUnmount = () => { componentWillUnmount = () => {
this.props.resetCaptcha(); this.props.resetCaptcha();
} };
// //
// Listeners // Listeners
@@ -51,7 +51,7 @@ class CaptchaInputConnector extends Component {
} = this.props; } = this.props;
this.props.refreshCaptcha({ provider, providerData }); this.props.refreshCaptcha({ provider, providerData });
} };
onCaptchaChange = (captchaResponse) => { onCaptchaChange = (captchaResponse) => {
// If the captcha has expired `captchaResponse` will be null. // If the captcha has expired `captchaResponse` will be null.
@@ -68,7 +68,7 @@ class CaptchaInputConnector extends Component {
} = this.props; } = this.props;
this.props.getCaptchaCookie({ provider, providerData, captchaResponse }); this.props.getCaptchaCookie({ provider, providerData, captchaResponse });
} };
// //
// Render // Render

View File

@@ -59,14 +59,14 @@ class CheckInput extends Component {
shiftKey shiftKey
}); });
} }
} };
// //
// Listeners // Listeners
setRef = (ref) => { setRef = (ref) => {
this._checkbox = ref; this._checkbox = ref;
} };
onClick = (event) => { onClick = (event) => {
if (this.props.isDisabled) { if (this.props.isDisabled) {
@@ -78,14 +78,14 @@ class CheckInput extends Component {
event.preventDefault(); event.preventDefault();
this.toggleChecked(checked, shiftKey); this.toggleChecked(checked, shiftKey);
} };
onChange = (event) => { onChange = (event) => {
const checked = event.target.checked; const checked = event.target.checked;
const shiftKey = event.nativeEvent.shiftKey; const shiftKey = event.nativeEvent.shiftKey;
this.toggleChecked(checked, shiftKey); this.toggleChecked(checked, shiftKey);
} };
// //
// Render // Render

View File

@@ -23,7 +23,7 @@ class DeviceInput extends Component {
name, name,
value: [...value, deviceId] value: [...value, deviceId]
}); });
} };
onTagDelete = ({ index }) => { onTagDelete = ({ index }) => {
const { const {
@@ -39,7 +39,7 @@ class DeviceInput extends Component {
name, name,
value: newValue value: newValue
}); });
} };
// //
// Render // Render

View File

@@ -48,11 +48,11 @@ class DeviceInputConnector extends Component {
componentDidMount = () => { componentDidMount = () => {
this._populate(); this._populate();
} };
componentWillUnmount = () => { componentWillUnmount = () => {
this.props.dispatchClearOptions({ section: 'devices' }); this.props.dispatchClearOptions({ section: 'devices' });
} };
// //
// Control // Control
@@ -77,7 +77,7 @@ class DeviceInputConnector extends Component {
onRefreshPress = () => { onRefreshPress = () => {
this._populate(); this._populate();
} };
// //
// Render // Render

View File

@@ -66,7 +66,7 @@ class DownloadClientSelectInputConnector extends Component {
onChange = ({ name, value }) => { onChange = ({ name, value }) => {
this.props.onChange({ name, value: parseInt(value) }); this.props.onChange({ name, value: parseInt(value) });
} };
// //
// Render // Render

View File

@@ -12,9 +12,9 @@ import ModalBody from 'Components/Modal/ModalBody';
import Portal from 'Components/Portal'; import Portal from 'Components/Portal';
import Scroller from 'Components/Scroller/Scroller'; import Scroller from 'Components/Scroller/Scroller';
import { icons, scrollDirections, sizes } from 'Helpers/Props'; import { icons, scrollDirections, sizes } from 'Helpers/Props';
import { isMobile as isMobileUtil } from 'Utilities/browser';
import * as keyCodes from 'Utilities/Constants/keyCodes'; import * as keyCodes from 'Utilities/Constants/keyCodes';
import getUniqueElememtId from 'Utilities/getUniqueElementId'; import getUniqueElememtId from 'Utilities/getUniqueElementId';
import { isMobile as isMobileUtil } from 'Utilities/mobile';
import HintedSelectInputOption from './HintedSelectInputOption'; import HintedSelectInputOption from './HintedSelectInputOption';
import HintedSelectInputSelectedValue from './HintedSelectInputSelectedValue'; import HintedSelectInputSelectedValue from './HintedSelectInputSelectedValue';
import TextInput from './TextInput'; import TextInput from './TextInput';
@@ -149,7 +149,7 @@ class EnhancedSelectInput extends Component {
} }
return data; return data;
} };
onWindowClick = (event) => { onWindowClick = (event) => {
const button = document.getElementById(this._buttonId); const button = document.getElementById(this._buttonId);
@@ -168,14 +168,14 @@ class EnhancedSelectInput extends Component {
this.setState({ isOpen: false }); this.setState({ isOpen: false });
this._removeListener(); this._removeListener();
} }
} };
onFocus = () => { onFocus = () => {
if (this.state.isOpen) { if (this.state.isOpen) {
this._removeListener(); this._removeListener();
this.setState({ isOpen: false }); this.setState({ isOpen: false });
} }
} };
onBlur = () => { onBlur = () => {
if (!this.props.isEditable) { if (!this.props.isEditable) {
@@ -186,7 +186,7 @@ class EnhancedSelectInput extends Component {
this.setState({ selectedIndex: origIndex }); this.setState({ selectedIndex: origIndex });
} }
} }
} };
onKeyDown = (event) => { onKeyDown = (event) => {
const { const {
@@ -253,7 +253,7 @@ class EnhancedSelectInput extends Component {
if (!_.isEmpty(newState)) { if (!_.isEmpty(newState)) {
this.setState(newState); this.setState(newState);
} }
} };
onPress = () => { onPress = () => {
if (this.state.isOpen) { if (this.state.isOpen) {
@@ -267,7 +267,7 @@ class EnhancedSelectInput extends Component {
} }
this.setState({ isOpen: !this.state.isOpen }); this.setState({ isOpen: !this.state.isOpen });
} };
onSelect = (value) => { onSelect = (value) => {
if (Array.isArray(this.props.value)) { if (Array.isArray(this.props.value)) {
@@ -291,15 +291,15 @@ class EnhancedSelectInput extends Component {
value value
}); });
} }
} };
onMeasure = ({ width }) => { onMeasure = ({ width }) => {
this.setState({ width }); this.setState({ width });
} };
onOptionsModalClose = () => { onOptionsModalClose = () => {
this.setState({ isOpen: false }); this.setState({ isOpen: false });
} };
// //
// Render // Render

View File

@@ -73,7 +73,7 @@ class EnhancedSelectInputConnector extends Component {
componentDidMount = () => { componentDidMount = () => {
this._populate(); this._populate();
} };
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
const prevKey = getProviderDataKey(prevProps.providerData); const prevKey = getProviderDataKey(prevProps.providerData);
@@ -82,11 +82,11 @@ class EnhancedSelectInputConnector extends Component {
if (!_.isEqual(prevKey, nextKey)) { if (!_.isEqual(prevKey, nextKey)) {
this.setState({ refetchRequired: true }); this.setState({ refetchRequired: true });
} }
} };
componentWillUnmount = () => { componentWillUnmount = () => {
this._cleanup(); this._cleanup();
} };
// //
// Listeners // Listeners
@@ -95,7 +95,7 @@ class EnhancedSelectInputConnector extends Component {
if (this.state.refetchRequired) { if (this.state.refetchRequired) {
this._populate(); this._populate();
} }
} };
// //
// Control // Control

View File

@@ -21,11 +21,11 @@ class EnhancedSelectInputOption extends Component {
} = this.props; } = this.props;
onSelect(id); onSelect(id);
} };
onCheckPress = () => { onCheckPress = () => {
// CheckInput requires a handler. Swallow the change event because onPress will already handle it via event propagation. // CheckInput requires a handler. Swallow the change event because onPress will already handle it via event propagation.
} };
// //
// Render // Render

View File

@@ -43,7 +43,7 @@ class IndexerFlagsSelectInputConnector extends Component {
}); });
this.props.onChange({ name, value: indexerFlags }); this.props.onChange({ name, value: indexerFlags });
} };
// //
// Render // Render

View File

@@ -39,7 +39,7 @@ class KeyValueListInput extends Component {
name, name,
value: newValue value: newValue
}); });
} };
onRemoveItem = (index) => { onRemoveItem = (index) => {
const { const {
@@ -55,13 +55,13 @@ class KeyValueListInput extends Component {
name, name,
value: newValue value: newValue
}); });
} };
onFocus = () => { onFocus = () => {
this.setState({ this.setState({
isFocused: true isFocused: true
}); });
} };
onBlur = () => { onBlur = () => {
this.setState({ this.setState({
@@ -88,7 +88,7 @@ class KeyValueListInput extends Component {
value: newValue value: newValue
}); });
} }
} };
// //
// Render // Render

View File

@@ -18,7 +18,7 @@ class KeyValueListInputItem extends Component {
} = this.props; } = this.props;
onChange(index, { key: keyValue, value }); onChange(index, { key: keyValue, value });
} };
onValueChange = ({ value }) => { onValueChange = ({ value }) => {
// TODO: Validate here or validate at a lower level component // TODO: Validate here or validate at a lower level component
@@ -30,7 +30,7 @@ class KeyValueListInputItem extends Component {
} = this.props; } = this.props;
onChange(index, { key: keyValue, value }); onChange(index, { key: keyValue, value });
} };
onRemovePress = () => { onRemovePress = () => {
const { const {
@@ -39,15 +39,15 @@ class KeyValueListInputItem extends Component {
} = this.props; } = this.props;
onRemove(index); onRemove(index);
} };
onFocus = () => { onFocus = () => {
this.props.onFocus(); this.props.onFocus();
} };
onBlur = () => { onBlur = () => {
this.props.onBlur(); this.props.onBlur();
} };
// //
// Render // Render

View File

@@ -59,11 +59,11 @@ class NumberInput extends Component {
value: parseValue(this.props, value) value: parseValue(this.props, value)
}); });
} };
onFocus = () => { onFocus = () => {
this.setState({ isFocused: true }); this.setState({ isFocused: true });
} };
onBlur = () => { onBlur = () => {
const { const {
@@ -88,7 +88,7 @@ class NumberInput extends Component {
name, name,
value: parsedValue value: parsedValue
}); });
} };
// //
// Render // Render

View File

@@ -41,7 +41,7 @@ class OAuthInputConnector extends Component {
componentWillUnmount = () => { componentWillUnmount = () => {
this.props.resetOAuth(); this.props.resetOAuth();
} };
// //
// Listeners // Listeners
@@ -60,7 +60,7 @@ class OAuthInputConnector extends Component {
providerData, providerData,
section section
}); });
} };
// //
// Render // Render

View File

@@ -62,7 +62,7 @@ class PathInput extends Component {
onInputChange = ({ value }) => { onInputChange = ({ value }) => {
this.setState({ value }); this.setState({ value });
} };
onInputKeyDown = (event) => { onInputKeyDown = (event) => {
if (event.key === 'Tab') { if (event.key === 'Tab') {
@@ -80,7 +80,7 @@ class PathInput extends Component {
} }
} }
} }
} };
onInputBlur = () => { onInputBlur = () => {
this.props.onChange({ this.props.onChange({
@@ -89,28 +89,28 @@ class PathInput extends Component {
}); });
this.props.onClearPaths(); this.props.onClearPaths();
} };
onSuggestionsFetchRequested = ({ value }) => { onSuggestionsFetchRequested = ({ value }) => {
this.props.onFetchPaths(value); this.props.onFetchPaths(value);
} };
onSuggestionsClearRequested = () => { onSuggestionsClearRequested = () => {
// Required because props aren't always rendered, but no-op // Required because props aren't always rendered, but no-op
// because we don't want to reset the paths after a path is selected. // because we don't want to reset the paths after a path is selected.
} };
onSuggestionSelected = (event, { suggestionValue }) => { onSuggestionSelected = (event, { suggestionValue }) => {
this.props.onFetchPaths(suggestionValue); this.props.onFetchPaths(suggestionValue);
} };
onFileBrowserOpenPress = () => { onFileBrowserOpenPress = () => {
this.setState({ isFileBrowserModalOpen: true }); this.setState({ isFileBrowserModalOpen: true });
} };
onFileBrowserModalClose = () => { onFileBrowserModalClose = () => {
this.setState({ isFileBrowserModalOpen: false }); this.setState({ isFileBrowserModalOpen: false });
} };
// //
// Render // Render

View File

@@ -47,11 +47,11 @@ class PathInputConnector extends Component {
path, path,
includeFiles includeFiles
}); });
} };
onClearPaths = () => { onClearPaths = () => {
this.props.dispatchClearPaths(); this.props.dispatchClearPaths();
} };
// //
// Render // Render

View File

@@ -69,7 +69,7 @@ class QualityProfileSelectInputConnector extends Component {
onChange = ({ name, value }) => { onChange = ({ name, value }) => {
this.props.onChange({ name, value: parseInt(value) }); this.props.onChange({ name, value: parseInt(value) });
} };
// //
// Render // Render

View File

@@ -49,17 +49,17 @@ class RootFolderSelectInput extends Component {
} else { } else {
this.props.onChange({ name, value }); this.props.onChange({ name, value });
} }
} };
onNewRootFolderSelect = ({ value }) => { onNewRootFolderSelect = ({ value }) => {
this.setState({ newRootFolderPath: value }, () => { this.setState({ newRootFolderPath: value }, () => {
this.props.onNewRootFolderSelect(value); this.props.onNewRootFolderSelect(value);
}); });
} };
onAddRootFolderModalClose = () => { onAddRootFolderModalClose = () => {
this.setState({ isAddNewRootFolderModalOpen: false }); this.setState({ isAddNewRootFolderModalOpen: false });
} };
// //
// Render // Render

View File

@@ -134,7 +134,7 @@ class RootFolderSelectInputConnector extends Component {
onNewRootFolderSelect = (path) => { onNewRootFolderSelect = (path) => {
this.props.dispatchAddRootFolder(path); this.props.dispatchAddRootFolder(path);
} };
// //
// Render // Render

View File

@@ -13,7 +13,7 @@ class SelectInput extends Component {
name: this.props.name, name: this.props.name,
value: event.target.value value: event.target.value
}); });
} };
// //
// Render // Render

View File

@@ -49,7 +49,7 @@ class TagInput extends Component {
_setAutosuggestRef = (ref) => { _setAutosuggestRef = (ref) => {
this._autosuggestRef = ref; this._autosuggestRef = ref;
} };
getSuggestionValue({ name }) { getSuggestionValue({ name }) {
return name; return name;
@@ -57,7 +57,7 @@ class TagInput extends Component {
shouldRenderSuggestions = (value) => { shouldRenderSuggestions = (value) => {
return value.length >= this.props.minQueryLength; return value.length >= this.props.minQueryLength;
} };
renderSuggestion({ name }) { renderSuggestion({ name }) {
return name; return name;
@@ -70,14 +70,14 @@ class TagInput extends Component {
value: '', value: '',
suggestions: [] suggestions: []
}); });
}, 250, { leading: true, trailing: false }) }, 250, { leading: true, trailing: false });
// //
// Listeners // Listeners
onInputContainerPress = () => { onInputContainerPress = () => {
this._autosuggestRef.input.focus(); this._autosuggestRef.input.focus();
} };
onInputChange = (event, { newValue, method }) => { onInputChange = (event, { newValue, method }) => {
const value = _.isObject(newValue) ? newValue.name : newValue; const value = _.isObject(newValue) ? newValue.name : newValue;
@@ -85,7 +85,7 @@ class TagInput extends Component {
if (method === 'type') { if (method === 'type') {
this.setState({ value }); this.setState({ value });
} }
} };
onInputKeyDown = (event) => { onInputKeyDown = (event) => {
const { const {
@@ -125,11 +125,11 @@ class TagInput extends Component {
event.preventDefault(); event.preventDefault();
} }
} }
} };
onInputFocus = () => { onInputFocus = () => {
this.setState({ isFocused: true }); this.setState({ isFocused: true });
} };
onInputBlur = () => { onInputBlur = () => {
this.setState({ isFocused: false }); this.setState({ isFocused: false });
@@ -153,7 +153,7 @@ class TagInput extends Component {
if (tag) { if (tag) {
this.addTag(tag); this.addTag(tag);
} }
} };
onSuggestionsFetchRequested = ({ value }) => { onSuggestionsFetchRequested = ({ value }) => {
const lowerCaseValue = value.toLowerCase(); const lowerCaseValue = value.toLowerCase();
@@ -170,16 +170,16 @@ class TagInput extends Component {
}); });
this.setState({ suggestions }); this.setState({ suggestions });
} };
onSuggestionsClearRequested = () => { onSuggestionsClearRequested = () => {
// Required because props aren't always rendered, but no-op // Required because props aren't always rendered, but no-op
// because we don't want to reset the paths after a path is selected. // because we don't want to reset the paths after a path is selected.
} };
onSuggestionSelected = (event, { suggestion }) => { onSuggestionSelected = (event, { suggestion }) => {
this.addTag(suggestion); this.addTag(suggestion);
} };
// //
// Render // Render
@@ -204,7 +204,7 @@ class TagInput extends Component {
onInputContainerPress={this.onInputContainerPress} onInputContainerPress={this.onInputContainerPress}
/> />
); );
} };
render() { render() {
const { const {

View File

@@ -101,7 +101,7 @@ class TagInputConnector extends Component {
newValue.push(tag.id); newValue.push(tag.id);
this.props.onChange({ name, value: newValue }); this.props.onChange({ name, value: newValue });
} };
onTagDelete = ({ index }) => { onTagDelete = ({ index }) => {
const { const {
@@ -116,7 +116,7 @@ class TagInputConnector extends Component {
name, name,
value: newValue value: newValue
}); });
} };
onTagCreated = (tag) => { onTagCreated = (tag) => {
const { const {
@@ -128,7 +128,7 @@ class TagInputConnector extends Component {
newValue.push(tag.id); newValue.push(tag.id);
this.props.onChange({ name, value: newValue }); this.props.onChange({ name, value: newValue });
} };
// //
// Render // Render

View File

@@ -19,7 +19,7 @@ class TagInputInput extends Component {
} }
onInputContainerPress(); onInputContainerPress();
} };
render() { render() {
const { const {

View File

@@ -22,7 +22,7 @@ class TagInputTag extends Component {
index, index,
id: tag.id id: tag.id
}); });
} };
// //
// Render // Render

View File

@@ -60,7 +60,7 @@ class TagSelectInputConnector extends Component {
} }
this.props.onChange({ name, value: newValue }); this.props.onChange({ name, value: newValue });
} };
onTagDelete = ({ index }) => { onTagDelete = ({ index }) => {
const { const {
@@ -75,7 +75,7 @@ class TagSelectInputConnector extends Component {
name, name,
value: newValue value: newValue
}); });
} };
// //
// Render // Render

View File

@@ -35,7 +35,7 @@ class TextArea extends Component {
setInputRef = (ref) => { setInputRef = (ref) => {
this._input = ref; this._input = ref;
} };
selectionChange() { selectionChange() {
if (this._selectionTimeout) { if (this._selectionTimeout) {
@@ -75,7 +75,7 @@ class TextArea extends Component {
}; };
onChange(payload); onChange(payload);
} };
onFocus = (event) => { onFocus = (event) => {
if (this.props.onFocus) { if (this.props.onFocus) {
@@ -83,19 +83,19 @@ class TextArea extends Component {
} }
this.selectionChange(); this.selectionChange();
} };
onKeyUp = () => { onKeyUp = () => {
this.selectionChange(); this.selectionChange();
} };
onMouseDown = () => { onMouseDown = () => {
this._isMouseTarget = true; this._isMouseTarget = true;
} };
onMouseUp = () => { onMouseUp = () => {
this.selectionChange(); this.selectionChange();
} };
onDocumentMouseUp = () => { onDocumentMouseUp = () => {
if (this._isMouseTarget) { if (this._isMouseTarget) {
@@ -103,7 +103,7 @@ class TextArea extends Component {
} }
this._isMouseTarget = false; this._isMouseTarget = false;
} };
// //
// Render // Render

View File

@@ -35,7 +35,7 @@ class TextInput extends Component {
setInputRef = (ref) => { setInputRef = (ref) => {
this._input = ref; this._input = ref;
} };
selectionChange() { selectionChange() {
if (this._selectionTimeout) { if (this._selectionTimeout) {
@@ -82,7 +82,7 @@ class TextInput extends Component {
} }
onChange(payload); onChange(payload);
} };
onFocus = (event) => { onFocus = (event) => {
if (this.props.onFocus) { if (this.props.onFocus) {
@@ -90,19 +90,19 @@ class TextInput extends Component {
} }
this.selectionChange(); this.selectionChange();
} };
onKeyUp = () => { onKeyUp = () => {
this.selectionChange(); this.selectionChange();
} };
onMouseDown = () => { onMouseDown = () => {
this._isMouseTarget = true; this._isMouseTarget = true;
} };
onMouseUp = () => { onMouseUp = () => {
this.selectionChange(); this.selectionChange();
} };
onDocumentMouseUp = () => { onDocumentMouseUp = () => {
if (this._isMouseTarget) { if (this._isMouseTarget) {
@@ -110,7 +110,7 @@ class TextInput extends Component {
} }
this._isMouseTarget = false; this._isMouseTarget = false;
} };
// //
// Render // Render

View File

@@ -53,7 +53,7 @@ class TextTagInputConnector extends Component {
}); });
onChange({ name, value: newValue.join(',') }); onChange({ name, value: newValue.join(',') });
} };
onTagDelete = ({ index }) => { onTagDelete = ({ index }) => {
const { const {
@@ -69,7 +69,7 @@ class TextTagInputConnector extends Component {
name, name,
value: newValue.join(',') value: newValue.join(',')
}); });
} };
// //
// Render // Render

View File

@@ -63,7 +63,7 @@ class ClipboardButton extends Component {
showSuccess: false, showSuccess: false,
showError: false showError: false
}); });
} };
// //
// Listeners // Listeners
@@ -72,13 +72,13 @@ class ClipboardButton extends Component {
this.setState({ this.setState({
showSuccess: true showSuccess: true
}); });
} };
onError = () => { onError = () => {
this.setState({ this.setState({
showError: true showError: true
}); });
} };
// //
// Render // Render

View File

@@ -18,7 +18,7 @@ class Link extends Component {
if (!isDisabled && onPress) { if (!isDisabled && onPress) {
onPress(event); onPress(event);
} }
} };
// //
// Render // Render

View File

@@ -90,7 +90,7 @@ class SpinnerErrorButton extends Component {
hasWarning: false, hasWarning: false,
hasError: false hasError: false
}); });
} };
// //
// Render // Render

View File

@@ -61,7 +61,7 @@ class Marquee extends Component {
} else if (this.state.overflowWidth > 0) { } else if (this.state.overflowWidth > 0) {
this.startAnimation(); this.startAnimation();
} }
} };
onHandleMouseLeave = () => { onHandleMouseLeave = () => {
if (this.props.hoverToStop && this.state.overflowWidth > 0) { if (this.props.hoverToStop && this.state.overflowWidth > 0) {
@@ -70,7 +70,7 @@ class Marquee extends Component {
clearTimeout(this.marqueeTimer); clearTimeout(this.marqueeTimer);
this.setState({ animatedWidth: 0 }); this.setState({ animatedWidth: 0 });
} }
} };
startAnimation = () => { startAnimation = () => {
clearTimeout(this.marqueeTimer); clearTimeout(this.marqueeTimer);
@@ -108,7 +108,7 @@ class Marquee extends Component {
}; };
this.marqueeTimer = setTimeout(animate, timeout); this.marqueeTimer = setTimeout(animate, timeout);
} };
measureText = () => { measureText = () => {
const container = this.container; const container = this.container;
@@ -123,7 +123,7 @@ class Marquee extends Component {
this.setState({ overflowWidth }); this.setState({ overflowWidth });
} }
} }
} };
render() { render() {
const style = { const style = {

View File

@@ -17,7 +17,7 @@ class Measure extends Component {
onMeasure = _.debounce((payload) => { onMeasure = _.debounce((payload) => {
this.props.onMeasure(payload); this.props.onMeasure(payload);
}, 250, { leading: true, trailing: false }) }, 250, { leading: true, trailing: false });
// //
// Render // Render

View File

@@ -25,11 +25,11 @@ class FilterMenu extends Component {
onCustomFiltersPress = () => { onCustomFiltersPress = () => {
this.setState({ isFilterModalOpen: true }); this.setState({ isFilterModalOpen: true });
} };
onFiltersModalClose = () => { onFiltersModalClose = () => {
this.setState({ isFilterModalOpen: false }); this.setState({ isFilterModalOpen: false });
} };
// //
// Render // Render

View File

@@ -14,7 +14,7 @@ class FilterMenuItem extends Component {
} = this.props; } = this.props;
onPress(filterKey); onPress(filterKey);
} };
// //
// Render // Render

View File

@@ -124,7 +124,7 @@ class Menu extends Component {
this.setState({ isMenuOpen: false }); this.setState({ isMenuOpen: false });
this._removeListener(); this._removeListener();
} }
} };
onTouchStart = (event) => { onTouchStart = (event) => {
const menuButton = document.getElementById(this._menuButtonId); const menuButton = document.getElementById(this._menuButtonId);
@@ -148,17 +148,17 @@ class Menu extends Component {
this.setState({ isMenuOpen: false }); this.setState({ isMenuOpen: false });
this._removeListener(); this._removeListener();
} }
} };
onWindowResize = () => { onWindowResize = () => {
this.setMaxHeight(); this.setMaxHeight();
} };
onWindowScroll = (event) => { onWindowScroll = (event) => {
if (this.state.isMenuOpen) { if (this.state.isMenuOpen) {
this.setMaxHeight(); this.setMaxHeight();
} }
} };
onMenuButtonPress = () => { onMenuButtonPress = () => {
const state = { const state = {
@@ -173,7 +173,7 @@ class Menu extends Component {
} }
this.setState(state); this.setState(state);
} };
// //
// Render // Render

View File

@@ -14,7 +14,7 @@ class SearchMenuItem extends Component {
} = this.props; } = this.props;
onPress(name); onPress(name);
} };
// //
// Render // Render

View File

@@ -17,7 +17,7 @@ class SelectedMenuItem extends Component {
} = this.props; } = this.props;
onPress(name); onPress(name);
} };
// //
// Render // Render

View File

@@ -6,9 +6,9 @@ import ReactDOM from 'react-dom';
import FocusLock from 'react-focus-lock'; import FocusLock from 'react-focus-lock';
import ErrorBoundary from 'Components/Error/ErrorBoundary'; import ErrorBoundary from 'Components/Error/ErrorBoundary';
import { sizes } from 'Helpers/Props'; import { sizes } from 'Helpers/Props';
import { isIOS } from 'Utilities/browser';
import * as keyCodes from 'Utilities/Constants/keyCodes'; import * as keyCodes from 'Utilities/Constants/keyCodes';
import getUniqueElememtId from 'Utilities/getUniqueElementId'; import getUniqueElememtId from 'Utilities/getUniqueElementId';
import { isIOS } from 'Utilities/mobile';
import { setScrollLock } from 'Utilities/scrollLock'; import { setScrollLock } from 'Utilities/scrollLock';
import ModalError from './ModalError'; import ModalError from './ModalError';
import styles from './Modal.css'; import styles from './Modal.css';
@@ -66,7 +66,7 @@ class Modal extends Component {
_setBackgroundRef = (ref) => { _setBackgroundRef = (ref) => {
this._backgroundRef = ref; this._backgroundRef = ref;
} };
_openModal() { _openModal() {
openModals.push(this._modalId); openModals.push(this._modalId);
@@ -131,7 +131,7 @@ class Modal extends Component {
onBackdropBeginPress = (event) => { onBackdropBeginPress = (event) => {
this._isBackdropPressed = this._isBackdropTarget(event); this._isBackdropPressed = this._isBackdropTarget(event);
} };
onBackdropEndPress = (event) => { onBackdropEndPress = (event) => {
const { const {
@@ -148,7 +148,7 @@ class Modal extends Component {
} }
this._isBackdropPressed = false; this._isBackdropPressed = false;
} };
onKeyDown = (event) => { onKeyDown = (event) => {
const keyCode = event.keyCode; const keyCode = event.keyCode;
@@ -161,7 +161,7 @@ class Modal extends Component {
this.props.onModalClose(); this.props.onModalClose();
} }
} }
} };
// //
// Render // Render

View File

@@ -37,7 +37,8 @@ function ModalError(props) {
{translate('Close')} {translate('Close')}
</Button> </Button>
</ModalFooter> </ModalFooter>
</ModalContent>); </ModalContent>
);
} }
ModalError.propTypes = { ModalError.propTypes = {

View File

@@ -26,7 +26,7 @@ class MonitorToggleButton extends Component {
const shiftKey = event.nativeEvent.shiftKey; const shiftKey = event.nativeEvent.shiftKey;
this.props.onPress(!this.props.monitored, { shiftKey }); this.props.onPress(!this.props.monitored, { shiftKey });
} };
// //
// Render // Render

View File

@@ -56,12 +56,12 @@ class MovieSearchInput extends Component {
setAutosuggestRef = (ref) => { setAutosuggestRef = (ref) => {
this._autosuggest = ref; this._autosuggest = ref;
} };
focusInput = (event) => { focusInput = (event) => {
event.preventDefault(); event.preventDefault();
this._autosuggest.input.focus(); this._autosuggest.input.focus();
} };
getSectionSuggestions(section) { getSectionSuggestions(section) {
return section.suggestions; return section.suggestions;
@@ -127,7 +127,7 @@ class MovieSearchInput extends Component {
} }
this.setState({ value: newValue }); this.setState({ value: newValue });
} };
onKeyDown = (event) => { onKeyDown = (event) => {
if (event.shiftKey || event.altKey || event.ctrlKey) { if (event.shiftKey || event.altKey || event.ctrlKey) {
@@ -172,11 +172,11 @@ class MovieSearchInput extends Component {
this._autosuggest.input.blur(); this._autosuggest.input.blur();
this.reset(); this.reset();
} };
onBlur = () => { onBlur = () => {
this.reset(); this.reset();
} };
onSuggestionsFetchRequested = ({ value }) => { onSuggestionsFetchRequested = ({ value }) => {
if (!this.state.loading) { if (!this.state.loading) {
@@ -241,14 +241,14 @@ class MovieSearchInput extends Component {
this.getWorker().postMessage(payload); this.getWorker().postMessage(payload);
} }
} };
onSuggestionsClearRequested = () => { onSuggestionsClearRequested = () => {
this.setState({ this.setState({
suggestions: [], suggestions: [],
loading: false loading: false
}); });
} };
onSuggestionSelected = (event, { suggestion }) => { onSuggestionSelected = (event, { suggestion }) => {
if (suggestion.type === ADD_NEW_TYPE) { if (suggestion.type === ADD_NEW_TYPE) {
@@ -256,7 +256,7 @@ class MovieSearchInput extends Component {
} else { } else {
this.goToMovie(suggestion); this.goToMovie(suggestion);
} }
} };
// //
// Render // Render

View File

@@ -32,14 +32,14 @@ class PageHeader extends Component {
onOpenKeyboardShortcutsModal = () => { onOpenKeyboardShortcutsModal = () => {
this.setState({ isKeyboardShortcutsModalOpen: true }); this.setState({ isKeyboardShortcutsModalOpen: true });
} };
// //
// Listeners // Listeners
onKeyboardShortcutsModalClose = () => { onKeyboardShortcutsModalClose = () => {
this.setState({ isKeyboardShortcutsModalOpen: false }); this.setState({ isKeyboardShortcutsModalOpen: false });
} };
// //
// Render // Render

View File

@@ -28,11 +28,11 @@ class PageHeaderActionsMenuConnector extends Component {
onRestartPress = () => { onRestartPress = () => {
this.props.restart(); this.props.restart();
} };
onShutdownPress = () => { onShutdownPress = () => {
this.props.shutdown(); this.props.shutdown();
} };
// //
// Render // Render

View File

@@ -54,15 +54,15 @@ class Page extends Component {
width: window.innerWidth, width: window.innerWidth,
height: window.innerHeight height: window.innerHeight
}); });
} };
onUpdatedModalClose = () => { onUpdatedModalClose = () => {
this.setState({ isUpdatedModalOpen: false }); this.setState({ isUpdatedModalOpen: false });
} };
onConnectionLostModalClose = () => { onConnectionLostModalClose = () => {
this.setState({ isConnectionLostModalOpen: false }); this.setState({ isConnectionLostModalOpen: false });
} };
// //
// Render // Render

Some files were not shown because too many files have changed in this diff Show More