feat(ui): allow any value 1-100 for quota limit/days (#1337)

pull/1330/head
TheCatLady 4 years ago committed by GitHub
parent 1c8968fd26
commit f4bed9a63b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -61,13 +61,11 @@ const QuotaSelector: React.FC<QuotaSelectorProps> = ({
<option value="0"> <option value="0">
{intl.formatMessage(messages.unlimited)} {intl.formatMessage(messages.unlimited)}
</option> </option>
<option value="1">1</option> {[...Array(100)].map((_item, i) => (
<option value="2">2</option> <option value={i + 1} key={`${mediaType}-limit-${i + 1}`}>
<option value="5">5</option> {i + 1}
<option value="10">10</option> </option>
<option value="25">25</option> ))}
<option value="50">50</option>
<option value="100">100</option>
</select> </select>
), ),
quotaDays: ( quotaDays: (
@ -77,12 +75,11 @@ const QuotaSelector: React.FC<QuotaSelectorProps> = ({
onChange={(e) => setQuotaDays(Number(e.target.value))} onChange={(e) => setQuotaDays(Number(e.target.value))}
disabled={isDisabled} disabled={isDisabled}
> >
<option value="1">1</option> {[...Array(100)].map((_item, i) => (
<option value="7">7</option> <option value={i + 1} key={`${mediaType}-days-${i + 1}`}>
<option value="14">14</option> {i + 1}
<option value="30">30</option> </option>
<option value="60">60</option> ))}
<option value="90">90</option>
</select> </select>
), ),
} }

Loading…
Cancel
Save