mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 09:30:31 +03:00
Merge pull request #194 from acelaya-forks/feature/fix-set-empty-max-visits
Fixed maxVisits being set to 0 when trying to reset it
This commit is contained in:
commit
3adcaef455
6 changed files with 29 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
||||||
build:
|
build:
|
||||||
environment:
|
environment:
|
||||||
node: v12.11.0
|
node: v12.14.1
|
||||||
tools:
|
tools:
|
||||||
external_code_coverage:
|
external_code_coverage:
|
||||||
timeout: 1200
|
timeout: 1200
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
language: node_js
|
language: node_js
|
||||||
|
|
||||||
node_js:
|
node_js:
|
||||||
- "12.11.0"
|
- "12.14.1"
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
|
|
23
CHANGELOG.md
23
CHANGELOG.md
|
@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org).
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
#### Added
|
||||||
|
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
#### Changed
|
||||||
|
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
#### Deprecated
|
||||||
|
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
#### Removed
|
||||||
|
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
#### Fixed
|
||||||
|
|
||||||
|
* [#193](https://github.com/shlinkio/shlink-web-client/issues/193) Fixed `maxVisits` being set to 0 when trying to reset it from having a value to `null`.
|
||||||
|
|
||||||
|
|
||||||
## 2.3.0 - 2020-01-19
|
## 2.3.0 - 2020-01-19
|
||||||
|
|
||||||
#### Added
|
#### Added
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM node:12.11.1-alpine as node
|
FROM node:12.14.1-alpine as node
|
||||||
COPY . /shlink-web-client
|
COPY . /shlink-web-client
|
||||||
RUN cd /shlink-web-client && npm install && npm run build
|
RUN cd /shlink-web-client && npm install && npm run build
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ version: '3'
|
||||||
services:
|
services:
|
||||||
shlink_web_client_node:
|
shlink_web_client_node:
|
||||||
container_name: shlink_web_client_node
|
container_name: shlink_web_client_node
|
||||||
image: node:12.11.0-alpine
|
image: node:12.14.1-alpine
|
||||||
command: /bin/sh -c "cd /home/shlink/www && npm install && npm run start"
|
command: /bin/sh -c "cd /home/shlink/www && npm install && npm run start"
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/home/shlink/www
|
- ./:/home/shlink/www
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
import { faInfoCircle as infoIcon } from '@fortawesome/free-solid-svg-icons';
|
import { faInfoCircle as infoIcon } from '@fortawesome/free-solid-svg-icons';
|
||||||
import { ExternalLink } from 'react-external-link';
|
import { ExternalLink } from 'react-external-link';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { pipe } from 'ramda';
|
import { isEmpty, pipe } from 'ramda';
|
||||||
import { shortUrlType } from '../reducers/shortUrlsList';
|
import { shortUrlType } from '../reducers/shortUrlsList';
|
||||||
import { shortUrlEditMetaType } from '../reducers/shortUrlMeta';
|
import { shortUrlEditMetaType } from '../reducers/shortUrlMeta';
|
||||||
import DateInput from '../../utils/DateInput';
|
import DateInput from '../../utils/DateInput';
|
||||||
|
@ -37,7 +37,7 @@ const EditMetaModal = (
|
||||||
|
|
||||||
const close = pipe(resetShortUrlMeta, toggle);
|
const close = pipe(resetShortUrlMeta, toggle);
|
||||||
const doEdit = () => editShortUrlMeta(shortUrl.shortCode, {
|
const doEdit = () => editShortUrlMeta(shortUrl.shortCode, {
|
||||||
maxVisits: maxVisits && parseInt(maxVisits),
|
maxVisits: maxVisits && !isEmpty(maxVisits) ? parseInt(maxVisits) : null,
|
||||||
validSince: validSince && formatIsoDate(validSince),
|
validSince: validSince && formatIsoDate(validSince),
|
||||||
validUntil: validUntil && formatIsoDate(validUntil),
|
validUntil: validUntil && formatIsoDate(validUntil),
|
||||||
}).then(close);
|
}).then(close);
|
||||||
|
|
Loading…
Reference in a new issue