-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from acelaya/feature/0.2.0
Feature/0.2.0
- Loading branch information
Showing
49 changed files
with
825 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,45 @@ | ||
{ | ||
"short_name": "Shlink", | ||
"name": "Shlink web client", | ||
"name": "Shlink", | ||
"start_url": "/", | ||
"display": "standalone", | ||
"theme_color": "#4696e5", | ||
"background_color": "#4696e5", | ||
"icons": [ | ||
{ | ||
"src": "./icons/shlink-128.png", | ||
"src": "./icons/icon-72x72.png", | ||
"type": "image/png", | ||
"sizes": "72x72" | ||
}, | ||
{ | ||
"src": "./icons/icon-96x96.png", | ||
"type": "image/png", | ||
"sizes": "96x96" | ||
}, | ||
{ | ||
"src": "./icons/icon-128x128.png", | ||
"type": "image/png", | ||
"sizes": "128x128" | ||
}, | ||
{ | ||
"src": "./icons/shlink-64.png", | ||
"src": "./icons/icon-144x144.png", | ||
"type": "image/png", | ||
"sizes": "64x64" | ||
"sizes": "144x144" | ||
}, | ||
{ | ||
"src": "./icons/shlink-32.png", | ||
"src": "./icons/icon-152x152.png", | ||
"type": "image/png", | ||
"sizes": "32x32" | ||
"sizes": "152x152" | ||
}, | ||
{ | ||
"src": "./icons/shlink-24.png", | ||
"src": "./icons/icon-192x192.png", | ||
"type": "image/png", | ||
"sizes": "24x24" | ||
"sizes": "192x192" | ||
}, | ||
{ | ||
"src": "./icons/shlink-16.png", | ||
"src": "./icons/icon-384x384.png", | ||
"type": "image/png", | ||
"sizes": "16x16" | ||
"sizes": "384x384" | ||
} | ||
], | ||
"start_url": "/", | ||
"display": "standalone", | ||
"theme_color": "#4696e5", | ||
"background_color": "#4696e5" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,48 @@ | ||
import React from 'react'; | ||
import { connect } from 'react-redux'; | ||
import './Home.scss'; | ||
import { resetSelectedServer } from '../servers/reducers/selectedServer'; | ||
import chevronIcon from '@fortawesome/fontawesome-free-solid/faChevronRight' | ||
import FontAwesomeIcon from '@fortawesome/react-fontawesome' | ||
import { isEmpty, pick, values } from 'ramda' | ||
import React from 'react' | ||
import { connect } from 'react-redux' | ||
import { Link } from 'react-router-dom' | ||
import { ListGroup, ListGroupItem } from 'reactstrap' | ||
import { resetSelectedServer } from '../servers/reducers/selectedServer' | ||
import './Home.scss' | ||
|
||
export class Home extends React.Component { | ||
componentDidMount() { | ||
this.props.resetSelectedServer(); | ||
} | ||
|
||
render() { | ||
const servers = values(this.props.servers); | ||
const hasServers = !isEmpty(servers); | ||
|
||
return ( | ||
<div className="home-container"> | ||
<h1 className="home-container__title">Welcome to Shlink</h1> | ||
<h5 className="home-container__intro">Please, select a server.</h5> | ||
<div className="home"> | ||
<h1 className="home__title">Welcome to Shlink</h1> | ||
<h5 className="home__intro"> | ||
{hasServers && <span>Please, select a server.</span>} | ||
{!hasServers && <span>Please, <Link to="/server/create">add a server</Link>.</span>} | ||
</h5> | ||
|
||
{hasServers && ( | ||
<ListGroup className="home__servers-list"> | ||
{servers.map(({ name, id }) => ( | ||
<ListGroupItem | ||
key={id} | ||
tag={Link} | ||
to={`/server/${id}/list-short-urls/1`} | ||
className="home__servers-item" | ||
> | ||
{name} | ||
<FontAwesomeIcon icon={chevronIcon} className="home__servers-item-icon" /> | ||
</ListGroupItem> | ||
))} | ||
</ListGroup> | ||
)} | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default connect(null, { resetSelectedServer })(Home); | ||
export default connect(pick(['servers']), { resetSelectedServer })(Home); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.react-tagsinput { | ||
background-color: #fff; | ||
border: 1px solid #ccc; | ||
border-radius: .25rem; | ||
overflow: hidden; | ||
min-height: calc(2.6rem + 2px); | ||
padding: 6px 0 0 6px; | ||
} | ||
|
||
.react-tagsinput--focused { | ||
border-color: #80bdff; | ||
-webkit-box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25); | ||
box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25); | ||
-webkit-transition: border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out; | ||
transition: border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out; | ||
-o-transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; | ||
transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; | ||
transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out; | ||
} | ||
|
||
.react-tagsinput-tag { | ||
font-size: 1rem; | ||
background-color: #f1f1f1; | ||
border-radius: 2px; | ||
border: 1px solid #d1d1d1; | ||
display: inline-block; | ||
font-weight: 400; | ||
margin: 0 5px 6px 0; | ||
padding: 6px 8px; | ||
line-height: 1; | ||
} | ||
.react-tagsinput-tag:hover { | ||
border-color: #b1b1b1; | ||
} | ||
|
||
.react-tagsinput-remove { | ||
cursor: pointer; | ||
font-weight: bold; | ||
margin-left: 8px; | ||
} | ||
|
||
.react-tagsinput-tag a::before { | ||
content: "\2715"; | ||
color: #aaa; | ||
} | ||
|
||
.react-tagsinput-input { | ||
background: transparent; | ||
border: 0; | ||
outline: none; | ||
padding: 3px 5px; | ||
width: 155px; | ||
margin-bottom: 6px; | ||
} |
Oops, something went wrong.