1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-08-18 00:09:37 +02:00

New: Enforce Indent after Logical for UI

This commit is contained in:
Qstick 2019-12-06 21:38:58 -05:00
parent 6235225f7d
commit 7f0581018b
17 changed files with 290 additions and 290 deletions

View File

@ -268,7 +268,7 @@
"react/jsx-curly-spacing": [2, "never"],
"react/jsx-equals-spacing": [2, "never"],
"react/jsx-indent-props": [2, 2],
"react/jsx-indent": [2, 2],
"react/jsx-indent": [2, 2, { "indentLogicalExpressions": true }],
"react/jsx-key": 2,
"react/jsx-no-bind": [2, { "allowArrowFunctions": true }],
"react/jsx-no-duplicate-props": [2, { "ignoreCase": true }],

View File

@ -88,27 +88,27 @@ class AddNewMovieSearchResult extends Component {
{
!title.contains(year) && !!year &&
<span className={styles.year}>({year})</span>
<span className={styles.year}>({year})</span>
}
{
isExistingMovie &&
<Icon
className={styles.alreadyExistsIcon}
name={icons.CHECK_CIRCLE}
size={36}
title="Already in your library"
/>
<Icon
className={styles.alreadyExistsIcon}
name={icons.CHECK_CIRCLE}
size={36}
title="Already in your library"
/>
}
{
isExclusionMovie &&
<Icon
className={styles.exclusionIcon}
name={icons.DANGER}
size={36}
title="Movie is on Net Import Exclusion List"
/>
<Icon
className={styles.exclusionIcon}
name={icons.DANGER}
size={36}
title="Movie is on Net Import Exclusion List"
/>
}
</div>
@ -122,19 +122,19 @@ class AddNewMovieSearchResult extends Component {
{
!!studio &&
<Label size={sizes.LARGE}>
{studio}
</Label>
<Label size={sizes.LARGE}>
{studio}
</Label>
}
{
status === 'ended' &&
<Label
kind={kinds.DANGER}
size={sizes.LARGE}
>
Ended
</Label>
<Label
kind={kinds.DANGER}
size={sizes.LARGE}
>
Ended
</Label>
}
</div>

View File

@ -53,19 +53,19 @@ function AppRoutes(props) {
{
window.Radarr.urlBase &&
<Route
exact={true}
path="/"
addUrlBase={false}
render={() => {
return (
<Redirect
to={getPathWithUrlBase('/')}
component={app}
/>
);
}}
/>
<Route
exact={true}
path="/"
addUrlBase={false}
render={() => {
return (
<Redirect
to={getPathWithUrlBase('/')}
component={app}
/>
);
}}
/>
}
<Route

View File

@ -134,9 +134,9 @@ class CalendarPage extends Component {
>
{
movieError &&
<div className={styles.errorMessage}>
{getErrorMessage(movieError, 'Failed to load movie from API')}
</div>
<div className={styles.errorMessage}>
{getErrorMessage(movieError, 'Failed to load movie from API')}
</div>
}
{

View File

@ -78,21 +78,21 @@ class MovieHistoryTableContent extends Component {
{
isPopulated && hasItems && !error &&
<Table columns={columns}>
<TableBody>
{
items.reverse().map((item) => {
return (
<MovieHistoryRowConnector
key={item.id}
{...item}
onMarkAsFailedPress={onMarkAsFailedPress}
/>
);
})
}
</TableBody>
</Table>
<Table columns={columns}>
<TableBody>
{
items.reverse().map((item) => {
return (
<MovieHistoryRowConnector
key={item.id}
{...item}
onMarkAsFailedPress={onMarkAsFailedPress}
/>
);
})
}
</TableBody>
</Table>
}
</div>
);

View File

@ -51,20 +51,20 @@ class MovieTitlesTableContent extends Component {
{
isPopulated && hasItems && !error &&
<Table columns={columns}>
<TableBody>
{
items.reverse().map((item) => {
return (
<MovieTitlesRow
key={item.id}
{...item}
/>
);
})
}
</TableBody>
</Table>
<Table columns={columns}>
<TableBody>
{
items.reverse().map((item) => {
return (
<MovieTitlesRow
key={item.id}
{...item}
/>
);
})
}
</TableBody>
</Table>
}
</div>
);

View File

@ -44,91 +44,91 @@ function ProxySettings(props) {
{
proxyEnabled.value &&
<div>
<FormGroup>
<FormLabel>Proxy Type</FormLabel>
<div>
<FormGroup>
<FormLabel>Proxy Type</FormLabel>
<FormInputGroup
type={inputTypes.SELECT}
name="proxyType"
values={proxyTypeOptions}
onChange={onInputChange}
{...proxyType}
/>
</FormGroup>
<FormInputGroup
type={inputTypes.SELECT}
name="proxyType"
values={proxyTypeOptions}
onChange={onInputChange}
{...proxyType}
/>
</FormGroup>
<FormGroup>
<FormLabel>Hostname</FormLabel>
<FormGroup>
<FormLabel>Hostname</FormLabel>
<FormInputGroup
type={inputTypes.TEXT}
name="proxyHostname"
<FormInputGroup
type={inputTypes.TEXT}
name="proxyHostname"
onChange={onInputChange}
{...proxyHostname}
/>
</FormGroup>
onChange={onInputChange}
{...proxyHostname}
/>
</FormGroup>
<FormGroup>
<FormLabel>Port</FormLabel>
<FormGroup>
<FormLabel>Port</FormLabel>
<FormInputGroup
type={inputTypes.NUMBER}
name="proxyPort"
min={1}
max={65535}
onChange={onInputChange}
{...proxyPort}
/>
</FormGroup>
<FormInputGroup
type={inputTypes.NUMBER}
name="proxyPort"
min={1}
max={65535}
onChange={onInputChange}
{...proxyPort}
/>
</FormGroup>
<FormGroup>
<FormLabel>Username</FormLabel>
<FormGroup>
<FormLabel>Username</FormLabel>
<FormInputGroup
type={inputTypes.TEXT}
name="proxyUsername"
helpText="You only need to enter a username and password if one is required. Leave them blank otherwise."
onChange={onInputChange}
{...proxyUsername}
/>
</FormGroup>
<FormInputGroup
type={inputTypes.TEXT}
name="proxyUsername"
helpText="You only need to enter a username and password if one is required. Leave them blank otherwise."
onChange={onInputChange}
{...proxyUsername}
/>
</FormGroup>
<FormGroup>
<FormLabel>Password</FormLabel>
<FormGroup>
<FormLabel>Password</FormLabel>
<FormInputGroup
type={inputTypes.PASSWORD}
name="proxyPassword"
helpText="You only need to enter a username and password if one is required. Leave them blank otherwise."
onChange={onInputChange}
{...proxyPassword}
/>
</FormGroup>
<FormInputGroup
type={inputTypes.PASSWORD}
name="proxyPassword"
helpText="You only need to enter a username and password if one is required. Leave them blank otherwise."
onChange={onInputChange}
{...proxyPassword}
/>
</FormGroup>
<FormGroup>
<FormLabel>Ignored Addresses</FormLabel>
<FormGroup>
<FormLabel>Ignored Addresses</FormLabel>
<FormInputGroup
type={inputTypes.TEXT}
name="proxyBypassFilter"
helpText="Use ',' as a separator, and '*.' as a wildcard for subdomains"
onChange={onInputChange}
{...proxyBypassFilter}
/>
</FormGroup>
<FormInputGroup
type={inputTypes.TEXT}
name="proxyBypassFilter"
helpText="Use ',' as a separator, and '*.' as a wildcard for subdomains"
onChange={onInputChange}
{...proxyBypassFilter}
/>
</FormGroup>
<FormGroup size={sizes.MEDIUM}>
<FormLabel>Bypass Proxy for Local Addresses</FormLabel>
<FormGroup size={sizes.MEDIUM}>
<FormLabel>Bypass Proxy for Local Addresses</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="proxyBypassLocalAddresses"
onChange={onInputChange}
{...proxyBypassLocalAddresses}
/>
</FormGroup>
</div>
<FormInputGroup
type={inputTypes.CHECK}
name="proxyBypassLocalAddresses"
onChange={onInputChange}
{...proxyBypassLocalAddresses}
/>
</FormGroup>
</div>
}
</FieldSet>
);

View File

@ -93,32 +93,32 @@ class SecuritySettings extends Component {
{
authenticationEnabled &&
<FormGroup>
<FormLabel>Username</FormLabel>
<FormGroup>
<FormLabel>Username</FormLabel>
<FormInputGroup
type={inputTypes.TEXT}
name="username"
helpTextWarning="Requires restart to take effect"
onChange={onInputChange}
{...username}
/>
</FormGroup>
<FormInputGroup
type={inputTypes.TEXT}
name="username"
helpTextWarning="Requires restart to take effect"
onChange={onInputChange}
{...username}
/>
</FormGroup>
}
{
authenticationEnabled &&
<FormGroup>
<FormLabel>Password</FormLabel>
<FormGroup>
<FormLabel>Password</FormLabel>
<FormInputGroup
type={inputTypes.PASSWORD}
name="password"
helpTextWarning="Requires restart to take effect"
onChange={onInputChange}
{...password}
/>
</FormGroup>
<FormInputGroup
type={inputTypes.PASSWORD}
name="password"
helpTextWarning="Requires restart to take effect"
onChange={onInputChange}
{...password}
/>
</FormGroup>
}
<FormGroup>

View File

@ -50,58 +50,58 @@ function UpdateSettings(props) {
{
!isWindows &&
<div>
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
size={sizes.MEDIUM}
>
<FormLabel>Automatic</FormLabel>
<div>
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
size={sizes.MEDIUM}
>
<FormLabel>Automatic</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="updateAutomatically"
helpText="Automatically download and install updates. You will still be able to install from System: Updates"
onChange={onInputChange}
{...updateAutomatically}
/>
</FormGroup>
<FormInputGroup
type={inputTypes.CHECK}
name="updateAutomatically"
helpText="Automatically download and install updates. You will still be able to install from System: Updates"
onChange={onInputChange}
{...updateAutomatically}
/>
</FormGroup>
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
>
<FormLabel>Mechanism</FormLabel>
<FormInputGroup
type={inputTypes.SELECT}
name="updateMechanism"
values={updateOptions}
helpText="Use Radarr's built-in updater or a script"
helpLink="https://github.com/Radarr/Radarr/wiki/Updating"
onChange={onInputChange}
{...updateMechanism}
/>
</FormGroup>
{
updateMechanism.value === 'script' &&
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
>
<FormLabel>Script Path</FormLabel>
<FormLabel>Mechanism</FormLabel>
<FormInputGroup
type={inputTypes.TEXT}
name="updateScriptPath"
helpText="Path to a custom script that takes an extracted update package and handle the remainder of the update process"
type={inputTypes.SELECT}
name="updateMechanism"
values={updateOptions}
helpText="Use Radarr's built-in updater or a script"
helpLink="https://github.com/Radarr/Radarr/wiki/Updating"
onChange={onInputChange}
{...updateScriptPath}
{...updateMechanism}
/>
</FormGroup>
}
</div>
{
updateMechanism.value === 'script' &&
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
>
<FormLabel>Script Path</FormLabel>
<FormInputGroup
type={inputTypes.TEXT}
name="updateScriptPath"
helpText="Path to a custom script that takes an extracted update package and handle the remainder of the update process"
onChange={onInputChange}
{...updateScriptPath}
/>
</FormGroup>
}
</div>
}
</FieldSet>
);

View File

@ -96,12 +96,12 @@ class Indexer extends Component {
{
!enableRss && !enableAutomaticSearch && !enableInteractiveSearch &&
<Label
kind={kinds.DISABLED}
outline={true}
>
Disabled
</Label>
<Label
kind={kinds.DISABLED}
outline={true}
>
Disabled
</Label>
}
</div>

View File

@ -64,9 +64,9 @@ class MediaManagement extends Component {
{
!isFetching && error &&
<FieldSet legend="Naming Settings">
<div>Unable to load Media Management settings</div>
</FieldSet>
<FieldSet legend="Naming Settings">
<div>Unable to load Media Management settings</div>
</FieldSet>
}
{

View File

@ -86,12 +86,12 @@ class NetImport extends Component {
{
!enabled && !enableAuto &&
<Label
kind={kinds.DISABLED}
outline={true}
>
Disabled
</Label>
<Label
kind={kinds.DISABLED}
outline={true}
>
Disabled
</Label>
}
</div>

View File

@ -106,9 +106,9 @@ class Notification extends Component {
{
supportsOnHealthIssue && onHealthIssue &&
<Label kind={kinds.SUCCESS}>
On Health Issue
</Label>
<Label kind={kinds.SUCCESS}>
On Health Issue
</Label>
}
{

View File

@ -76,45 +76,45 @@ function LogsTable(props) {
<PageContentBodyConnector>
{
isFetching && !isPopulated &&
<LoadingIndicator />
<LoadingIndicator />
}
{
isPopulated && !error && !items.length &&
<div>
No logs found
</div>
<div>
No logs found
</div>
}
{
isPopulated && !error && !!items.length &&
<div>
<Table
columns={columns}
canModifyColumns={false}
{...otherProps}
>
<TableBody>
{
items.map((item) => {
return (
<LogsTableRow
key={item.id}
columns={columns}
{...item}
/>
);
})
}
</TableBody>
</Table>
<div>
<Table
columns={columns}
canModifyColumns={false}
{...otherProps}
>
<TableBody>
{
items.map((item) => {
return (
<LogsTableRow
key={item.id}
columns={columns}
{...item}
/>
);
})
}
</TableBody>
</Table>
<TablePager
totalRecords={totalRecords}
isFetching={isFetching}
{...otherProps}
/>
</div>
<TablePager
totalRecords={totalRecords}
isFetching={isFetching}
{...otherProps}
/>
</div>
}
</PageContentBodyConnector>
</PageContent>

View File

@ -54,27 +54,27 @@ function QueuedTasks(props) {
<FieldSet legend="Queue">
{
isFetching && !isPopulated &&
<LoadingIndicator />
<LoadingIndicator />
}
{
isPopulated &&
<Table
columns={columns}
>
<TableBody>
{
items.map((item) => {
return (
<QueuedTaskRowConnector
key={item.id}
{...item}
/>
);
})
}
</TableBody>
</Table>
<Table
columns={columns}
>
<TableBody>
{
items.map((item) => {
return (
<QueuedTaskRowConnector
key={item.id}
{...item}
/>
);
})
}
</TableBody>
</Table>
}
</FieldSet>
);

View File

@ -44,27 +44,27 @@ function ScheduledTasks(props) {
<FieldSet legend="Scheduled">
{
isFetching && !isPopulated &&
<LoadingIndicator />
<LoadingIndicator />
}
{
isPopulated &&
<Table
columns={columns}
>
<TableBody>
{
items.map((item) => {
return (
<ScheduledTaskRowConnector
key={item.id}
{...item}
/>
);
})
}
</TableBody>
</Table>
<Table
columns={columns}
>
<TableBody>
{
items.map((item) => {
return (
<ScheduledTaskRowConnector
key={item.id}
{...item}
/>
);
})
}
</TableBody>
</Table>
}
</FieldSet>
);

View File

@ -55,14 +55,14 @@ class Updates extends Component {
<div className={styles.updateAvailable}>
{
!isDocker &&
<SpinnerButton
className={styles.updateAvailable}
kind={kinds.PRIMARY}
isSpinning={isInstallingUpdate}
onPress={onInstallLatestPress}
>
Install Latest
</SpinnerButton>
<SpinnerButton
className={styles.updateAvailable}
kind={kinds.PRIMARY}
isSpinning={isInstallingUpdate}
onPress={onInstallLatestPress}
>
Install Latest
</SpinnerButton>
}
{