forked from desktop/desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
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 desktop#1362 from desktop/tabula-rasa
Tabula rasa
- Loading branch information
Showing
8 changed files
with
131 additions
and
22 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
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,60 @@ | ||
import * as React from 'react' | ||
import { UiView } from '../ui-view' | ||
import { Button } from '../lib/button' | ||
import { Octicon, OcticonSymbol } from '../octicons' | ||
|
||
interface IBlankSlateProps { | ||
/** A function to call when the user chooses to create a repository. */ | ||
readonly onCreate: () => void | ||
|
||
/** A function to call when the user chooses to clone a repository. */ | ||
readonly onClone: () => void | ||
|
||
/** A function to call when the user chooses to add a local repository. */ | ||
readonly onAdd: () => void | ||
} | ||
|
||
/** | ||
* The blank slate view. This is shown when the user hasn't added any | ||
* repositories to the app. | ||
*/ | ||
export class BlankSlateView extends React.Component<IBlankSlateProps, void> { | ||
public render() { | ||
return ( | ||
<UiView id='blank-slate'> | ||
<div className='header'> | ||
<div className='title'>{__DARWIN__ ? 'No Repositories Found' : 'No repositories found'}</div> | ||
<div> | ||
Add or create a repository so that you can start committing code and publish it to GitHub. | ||
</div> | ||
</div> | ||
|
||
<div className='content'> | ||
<div className='callout'> | ||
<Octicon symbol={OcticonSymbol.plus}/> | ||
<div>Create a new project and publish it to GitHub</div> | ||
<Button onClick={this.props.onCreate}> | ||
{__DARWIN__ ? 'Create New Repository' : 'Create new repository'} | ||
</Button> | ||
</div> | ||
|
||
<div className='callout'> | ||
<Octicon symbol={OcticonSymbol.repoClone}/> | ||
<div>Clone an existing project from GitHub to your computer</div> | ||
<Button onClick={this.props.onClone}> | ||
{__DARWIN__ ? 'Clone a Repository' : 'Clone a repository'} | ||
</Button> | ||
</div> | ||
|
||
<div className='callout'> | ||
<Octicon symbol={OcticonSymbol.deviceDesktop}/> | ||
<div>Add an existing project on your computer and publish it to GitHub</div> | ||
<Button onClick={this.props.onAdd}> | ||
{__DARWIN__ ? 'Add a Local Repository' : 'Add a local repository'} | ||
</Button> | ||
</div> | ||
</div> | ||
</UiView> | ||
) | ||
} | ||
} |
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 @@ | ||
export { BlankSlateView } from './blank-slate' |
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 @@ | ||
#blank-slate { | ||
display: flex; | ||
justify-content: center; | ||
|
||
.header { | ||
max-width: 490px; | ||
align-self: center; | ||
|
||
text-align: center; | ||
padding-bottom: var(--spacing-double); | ||
|
||
.title { | ||
font-size: var(--font-size-lg); | ||
font-weight: var(--font-weight-semibold); | ||
} | ||
} | ||
|
||
.content { | ||
display: flex; | ||
flex-direction: row; | ||
|
||
align-self: center; | ||
} | ||
|
||
.callout { | ||
display: flex; | ||
flex-direction: column; | ||
|
||
max-width: 370px; | ||
align-items: center; | ||
|
||
text-align: center; | ||
|
||
padding: 0 60px; | ||
|
||
div { | ||
margin: var(--spacing); | ||
font-size: var(--font-size-md); | ||
} | ||
|
||
.octicon { | ||
width: 32px; | ||
height: 32px; | ||
} | ||
|
||
button { | ||
flex-grow: 0; | ||
} | ||
} | ||
|
||
.callout:not(:last-child) { | ||
border-right: var(--base-border); | ||
} | ||
} |