diff --git a/src/settings/RealTimeUpdates.tsx b/src/settings/RealTimeUpdates.tsx
index b5281bb3..914c5a6f 100644
--- a/src/settings/RealTimeUpdates.tsx
+++ b/src/settings/RealTimeUpdates.tsx
@@ -1,6 +1,7 @@
-import { Card, CardBody, CardHeader, FormGroup, Input } from 'reactstrap';
+import { FormGroup, Input } from 'reactstrap';
import classNames from 'classnames';
import ToggleSwitch from '../utils/ToggleSwitch';
+import { SimpleCard } from '../utils/SimpleCard';
import { Settings } from './reducers/settings';
interface RealTimeUpdatesProps {
@@ -14,39 +15,36 @@ const intervalValue = (interval?: number) => !interval ? '' : `${interval}`;
const RealTimeUpdates = (
{ settings: { realTimeUpdates }, toggleRealTimeUpdates, setRealTimeUpdatesInterval }: RealTimeUpdatesProps,
) => (
-
- Real-time updates
-
-
-
- Enable or disable real-time updates, when using Shlink v2.2.0 or newer.
-
-
-
-
- setRealTimeUpdatesInterval(Number(e.target.value))}
- />
- {realTimeUpdates.enabled && (
-
- {realTimeUpdates.interval !== undefined && realTimeUpdates.interval > 0 && (
-
- Updates will be reflected in the UI every {realTimeUpdates.interval} minute{realTimeUpdates.interval > 1 && 's'}.
-
- )}
- {!realTimeUpdates.interval && 'Updates will be reflected in the UI as soon as they happen.'}
-
- )}
-
-
-
+
+
+
+ Enable or disable real-time updates, when using Shlink v2.2.0 or newer.
+
+
+
+
+ setRealTimeUpdatesInterval(Number(e.target.value))}
+ />
+ {realTimeUpdates.enabled && (
+
+ {realTimeUpdates.interval !== undefined && realTimeUpdates.interval > 0 && (
+
+ Updates will be reflected in the UI every {realTimeUpdates.interval} minute{realTimeUpdates.interval > 1 && 's'}.
+
+ )}
+ {!realTimeUpdates.interval && 'Updates will be reflected in the UI as soon as they happen.'}
+
+ )}
+
+
);
export default RealTimeUpdates;
diff --git a/src/short-urls/CreateShortUrl.tsx b/src/short-urls/CreateShortUrl.tsx
index 2df2978b..d3abc7c9 100644
--- a/src/short-urls/CreateShortUrl.tsx
+++ b/src/short-urls/CreateShortUrl.tsx
@@ -1,6 +1,6 @@
import { isEmpty, pipe, replace, trim } from 'ramda';
import { FC, useState } from 'react';
-import { Button, Card, CardBody, CardHeader, FormGroup, Input } from 'reactstrap';
+import { Button, FormGroup, Input } from 'reactstrap';
import { InputType } from 'reactstrap/lib/Input';
import * as m from 'moment';
import DateInput, { DateInputProps } from '../utils/DateInput';
@@ -11,6 +11,7 @@ import { isReachableServer, SelectedServer } from '../servers/data';
import { formatIsoDate } from '../utils/helpers/date';
import { TagsSelectorProps } from '../tags/helpers/TagsSelector';
import { DomainSelectorProps } from '../domains/DomainSelector';
+import { SimpleCard } from '../utils/SimpleCard';
import { ShortUrlData } from './data';
import { ShortUrlCreation } from './reducers/shortUrlCreation';
import UseExistingIfFoundInfoIcon from './UseExistingIfFoundInfoIcon';
@@ -121,55 +122,48 @@ const CreateShortUrl = (
<>
-
- Customize the short URL
-
-
- Use a custom slug for your marketing campaigns, change the domain or set a specific length for
- the auto-generated short code.
-
- {renderOptionalInput('customSlug', 'Custom slug', 'text', {
- disabled: hasValue(shortUrlCreation.shortCodeLength),
- })}
- {renderOptionalInput('shortCodeLength', 'Short code length', 'number', {
- min: 4,
- disabled: disableShortCodeLength || hasValue(shortUrlCreation.customSlug),
- ...disableShortCodeLength && {
- title: 'Shlink 2.1.0 or higher is required to be able to provide the short code length',
- },
- })}
- {!showDomainSelector && renderOptionalInput('domain', 'Domain', 'text', {
- disabled: disableDomain,
- ...disableDomain && { title: 'Shlink 1.19.0 or higher is required to be able to provide the domain' },
- })}
- {showDomainSelector && (
-
- setShortUrlCreation({ ...shortUrlCreation, domain })}
- />
-
- )}
-
-
+
+
+ Use a custom slug for your marketing campaigns, change the domain or set a specific length for
+ the auto-generated short code.
+
+ {renderOptionalInput('customSlug', 'Custom slug', 'text', {
+ disabled: hasValue(shortUrlCreation.shortCodeLength),
+ })}
+ {renderOptionalInput('shortCodeLength', 'Short code length', 'number', {
+ min: 4,
+ disabled: disableShortCodeLength || hasValue(shortUrlCreation.customSlug),
+ ...disableShortCodeLength && {
+ title: 'Shlink 2.1.0 or higher is required to be able to provide the short code length',
+ },
+ })}
+ {!showDomainSelector && renderOptionalInput('domain', 'Domain', 'text', {
+ disabled: disableDomain,
+ ...disableDomain && { title: 'Shlink 1.19.0 or higher is required to be able to provide the domain' },
+ })}
+ {showDomainSelector && (
+
+ setShortUrlCreation({ ...shortUrlCreation, domain })}
+ />
+
+ )}
+
-
- Limit access to the short URL
-
-
Determine when and how many times your short URL can be accessed.
- {renderOptionalInput('maxVisits', 'Maximum number of visits allowed', 'number', { min: 1 })}
- {renderDateInput('validSince', 'Enabled since...', { maxDate: shortUrlCreation.validUntil as m.Moment | undefined })}
- {renderDateInput('validUntil', 'Enabled until...', { minDate: shortUrlCreation.validSince as m.Moment | undefined })}
-
-
+
+
Determine when and how many times your short URL can be accessed.
+ {renderOptionalInput('maxVisits', 'Maximum number of visits allowed', 'number', { min: 1 })}
+ {renderDateInput('validSince', 'Enabled since...', { maxDate: shortUrlCreation.validUntil as m.Moment | undefined })}
+ {renderDateInput('validUntil', 'Enabled until...', { minDate: shortUrlCreation.validSince as m.Moment | undefined })}
+
-
- Extra validations
-
+
+
Make sure the long URL is valid, or ensure an existing short URL is returned if it matches all
provided data.
@@ -185,21 +179,19 @@ const CreateShortUrl = (
-
-
- setShortUrlCreation({ ...shortUrlCreation, findIfExists })}
- >
- Use existing URL if found
-
-
-
-
-
-
+
+ setShortUrlCreation({ ...shortUrlCreation, findIfExists })}
+ >
+ Use existing URL if found
+
+
+