mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-17 21:26:22 -04:00
Compare commits
88 Commits
ipv6
...
v4.1.0.617
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b92e2c6601 | ||
|
|
df863a08a1 | ||
|
|
8a0c318540 | ||
|
|
4f9d067361 | ||
|
|
6739310ba8 | ||
|
|
a45b91abe8 | ||
|
|
1ad2dc54b3 | ||
|
|
7f0b708cb9 | ||
|
|
c8cdf03077 | ||
|
|
c8afe578f3 | ||
|
|
9bb394f420 | ||
|
|
4f512c5cdf | ||
|
|
8ae84222d1 | ||
|
|
7ec0fd1cea | ||
|
|
ad8629fac9 | ||
|
|
32393eabb7 | ||
|
|
6f42dd671f | ||
|
|
966963b53d | ||
|
|
43a74ab32a | ||
|
|
897e4b4d0a | ||
|
|
0dd639ff76 | ||
|
|
64da17a9ab | ||
|
|
dbaabf90a5 | ||
|
|
1aabc4bc5c | ||
|
|
cce4334310 | ||
|
|
8d54b4268b | ||
|
|
2be9b306a3 | ||
|
|
7f5cd9a765 | ||
|
|
d26ca9a7a5 | ||
|
|
933796e214 | ||
|
|
121a347fc9 | ||
|
|
ed060d552f | ||
|
|
51485259ae | ||
|
|
76a3ca37ed | ||
|
|
e5e7292f11 | ||
|
|
397ee20160 | ||
|
|
2914c3c88f | ||
|
|
750cb94692 | ||
|
|
1ffbae9d16 | ||
|
|
a515c5c7a5 | ||
|
|
c58f31d690 | ||
|
|
2041797587 | ||
|
|
b1d8763593 | ||
|
|
ff7f95a0ab | ||
|
|
ccd561eb24 | ||
|
|
3e353a6710 | ||
|
|
544e942fe4 | ||
|
|
8bb3764708 | ||
|
|
356013a84e | ||
|
|
75b2414e29 | ||
|
|
4084ce5c2f | ||
|
|
ca2f12338e | ||
|
|
347fdc1572 | ||
|
|
6c04d0701c | ||
|
|
3f4e5e55a3 | ||
|
|
7310481e6a | ||
|
|
e59a1a64f9 | ||
|
|
5c1ebc72b3 | ||
|
|
a96971beff | ||
|
|
b34f4fde1b | ||
|
|
a9b2635cb0 | ||
|
|
1ed8bd7350 | ||
|
|
f0891e9df7 | ||
|
|
5834afe30b | ||
|
|
c015a3ebf0 | ||
|
|
8fd1f121f4 | ||
|
|
b18cc49a83 | ||
|
|
69b969cfc8 | ||
|
|
bc3e3714b9 | ||
|
|
85dd5f5754 | ||
|
|
7de270b212 | ||
|
|
b1afd7aaaa | ||
|
|
894fafcad7 | ||
|
|
2cf62915b0 | ||
|
|
d3743446da | ||
|
|
b332fa55de | ||
|
|
36da57f87b | ||
|
|
07bb5e416b | ||
|
|
69207ba77b | ||
|
|
ff409d3661 | ||
|
|
dfb8d2ea0f | ||
|
|
603db7c76b | ||
|
|
6fa0cdc9a8 | ||
|
|
c0cbbc7ed4 | ||
|
|
daa9ee30a2 | ||
|
|
86102349c5 | ||
|
|
c4d035f0ad | ||
|
|
95d44f968f |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -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/
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
39
build.sh
39
build.sh
@@ -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
38
docs.sh
Normal 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
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class QueueOptions extends Component {
|
|||||||
[name]: value
|
[name]: value
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class ImportMovieRowConnector extends Component {
|
|||||||
id: this.props.id,
|
id: this.props.id,
|
||||||
[name]: value
|
[name]: value
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ class ImportMovieTable extends Component {
|
|||||||
/>
|
/>
|
||||||
</VirtualTableRow>
|
</VirtualTableRow>
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class ImportMovieSearchResult extends Component {
|
|||||||
|
|
||||||
onPress = () => {
|
onPress = () => {
|
||||||
this.props.onPress(this.props.tmdbId);
|
this.props.onPress(this.props.tmdbId);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class CalendarHeader extends Component {
|
|||||||
this.setState({ view }, () => {
|
this.setState({ view }, () => {
|
||||||
this.props.onViewChange(view);
|
this.props.onViewChange(view);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class CalendarHeaderViewButton extends Component {
|
|||||||
|
|
||||||
onPress = () => {
|
onPress = () => {
|
||||||
this.props.onPress(this.props.view);
|
this.props.onPress(this.props.view);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class FileBrowserRow extends Component {
|
|||||||
|
|
||||||
onPress = () => {
|
onPress = () => {
|
||||||
this.props.onPress(this.props.path);
|
this.props.onPress(this.props.path);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class IndexerFilterBuilderRowValueConnector extends Component {
|
|||||||
if (!this.props.isPopulated) {
|
if (!this.props.isPopulated) {
|
||||||
this.props.dispatchFetchIndexers();
|
this.props.dispatchFetchIndexers();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class QualityFilterBuilderRowValueConnector extends Component {
|
|||||||
if (!this.props.isPopulated) {
|
if (!this.props.isPopulated) {
|
||||||
this.props.dispatchFetchQualityProfileSchema();
|
this.props.dispatchFetchQualityProfileSchema();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class IndexerFlagsSelectInputConnector extends Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.props.onChange({ name, value: indexerFlags });
|
this.props.onChange({ name, value: indexerFlags });
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -47,11 +47,11 @@ class PathInputConnector extends Component {
|
|||||||
path,
|
path,
|
||||||
includeFiles
|
includeFiles
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
onClearPaths = () => {
|
onClearPaths = () => {
|
||||||
this.props.dispatchClearPaths();
|
this.props.dispatchClearPaths();
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ class RootFolderSelectInputConnector extends Component {
|
|||||||
|
|
||||||
onNewRootFolderSelect = (path) => {
|
onNewRootFolderSelect = (path) => {
|
||||||
this.props.dispatchAddRootFolder(path);
|
this.props.dispatchAddRootFolder(path);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class TagInputInput extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onInputContainerPress();
|
onInputContainerPress();
|
||||||
}
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class TagInputTag extends Component {
|
|||||||
index,
|
index,
|
||||||
id: tag.id
|
id: tag.id
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class Link extends Component {
|
|||||||
if (!isDisabled && onPress) {
|
if (!isDisabled && onPress) {
|
||||||
onPress(event);
|
onPress(event);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class SpinnerErrorButton extends Component {
|
|||||||
hasWarning: false,
|
hasWarning: false,
|
||||||
hasError: false
|
hasError: false
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -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 = {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class FilterMenuItem extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
onPress(filterKey);
|
onPress(filterKey);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class SearchMenuItem extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
onPress(name);
|
onPress(name);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class SelectedMenuItem extends Component {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
onPress(name);
|
onPress(name);
|
||||||
}
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ function ModalError(props) {
|
|||||||
{translate('Close')}
|
{translate('Close')}
|
||||||
</Button>
|
</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>);
|
</ModalContent>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ModalError.propTypes = {
|
ModalError.propTypes = {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
Reference in New Issue
Block a user