implement jira ticker RN-50 - Accept Team URL for Server URL (#499)

* implement jira ticker RN-50 - Accept Team URL for Server URL

* update per review

* add url-parse license to NOTICE.txt
This commit is contained in:
Carlos Tadeu Panato Junior 2017-04-26 23:42:57 +02:00 committed by enahum
parent d6bb00edf7
commit c6d6bcc03f
3 changed files with 39 additions and 2 deletions

View file

@ -1002,3 +1002,36 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---
## url-parse
This product contains 'url-parse.js', Small footprint URL parser that works seamlessly across Node.js and browser environments.
* HOMEPAGE:
* https://github.com/unshiftio/url-parse
* LICENSE:
The MIT License (MIT)
Copyright (c) 2015 Unshift.io, Arnout Kazemier, the Contributors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -25,6 +25,8 @@ import TextInputWithLocalizedPlaceholder from 'app/components/text_input_with_lo
import {GlobalStyles} from 'app/styles';
import {isValidUrl, stripTrailingSlashes} from 'app/utils/url';
import urlParse from 'url-parse';
import logo from 'assets/images/logo.png';
export default class SelectServer extends PureComponent {
@ -77,7 +79,8 @@ export default class SelectServer extends PureComponent {
};
onClick = async () => {
const url = this.props.serverUrl;
const preUrl = urlParse(this.props.serverUrl, true);
const url = preUrl.protocol + '//' + preUrl.host;
let error = null;
Keyboard.dismiss();

View file

@ -35,7 +35,8 @@
"redux-persist-transform-filter": "0.0.9",
"redux-thunk": "2.2.0",
"reselect": "3.0.0",
"semver": "5.3.0"
"semver": "5.3.0",
"url-parse" : "1.1.8"
},
"devDependencies": {
"babel-cli": "6.24.0",