Этот коммит содержится в:
Asaad Mahmood
2015-11-02 11:40:53 +05:00
коммит произвёл JoramWilander
родитель 97449a102e
Коммит 393d253021
7 изменённых файлов: 215 добавлений и 98 удалений

Просмотреть файл

@@ -383,10 +383,9 @@ export default class CreatePost extends React.Component {
screens.push( screens.push(
<div> <div>
<h4><strong>{'Sending Messages'}</strong></h4> <h4>{'Sending Messages'}</h4>
{'Type here to write a message.'} <p>{'Type here to write a message.'}</p>
<br/><br/> <p>{'Click the attachment button to upload an image or a file.'}</p>
{'Click the attachment button to upload an image or a file.'}
</div> </div>
); );

Просмотреть файл

@@ -323,28 +323,34 @@ export default class Sidebar extends React.Component {
screens.push( screens.push(
<div> <div>
<h4><strong>{'Channels'}</strong></h4> <h4>{'Channels'}</h4>
<strong>{'Channels'}</strong>{' organize conversations across different topics. Theyre open to everyone on your team. To send private communications use '}<strong>{'Direct Messages'}</strong>{' for a single person or '}<strong>{'Private Groups'}</strong>{' for multiple people.'} <p><strong>{'Channels'}</strong>{' organize conversations across different topics. Theyre open to everyone on your team. To send private communications use '}<strong>{'Direct Messages'}</strong>{' for a single person or '}<strong>{'Private Groups'}</strong>{' for multiple people.'}
</p>
</div> </div>
); );
screens.push( screens.push(
<div> <div>
<h4><strong>{'"Town Square" and "Off-Topic" channels'}</strong></h4> <h4>{'"Town Square" and "Off-Topic" channels'}</h4>
{'Here are two public channels to start:'} <p>{'Here are two public channels to start:'}</p>
<br/><br/> <p>
<strong>{'Town Square'}</strong>{' is a place for team-wide communication. Everyone in your team is a member of this channel.'} <strong>{'Town Square'}</strong>{' is a place for team-wide communication. Everyone in your team is a member of this channel.'}
<br/><br/> </p>
<strong>{'Off-Topic'}</strong>{' is a place for fun and humor outside of work-related channels. You and your team can decide what other channels to create.'} <p>
<strong>{'Off-Topic'}</strong>{' is a place for fun and humor outside of work-related channels. You and your team can decide what other channels to create.'}
</p>
</div> </div>
); );
screens.push( screens.push(
<div> <div>
<h4><strong>{'Creating and Joining Channels'}</strong></h4> <h4>{'Creating and Joining Channels'}</h4>
{'Click '}<strong>{'"More..."'}</strong>{' to create a new channel or join an existing one.'} <p>
<br/><br/> {'Click '}<strong>{'"More..."'}</strong>{' to create a new channel or join an existing one.'}
{'You can also create a new channel or private group by clicking the '}<strong>{'"+" symbol'}</strong>{' next to the channel or private group header.'} </p>
<p>
{'You can also create a new channel or private group by clicking the '}<strong>{'"+" symbol'}</strong>{' next to the channel or private group header.'}
</p>
</div> </div>
); );

Просмотреть файл

@@ -20,6 +20,10 @@ export default class TutorialIntroScreens extends React.Component {
this.state = {currentScreen: 0}; this.state = {currentScreen: 0};
} }
componentDidMount() {
const height = $(window).outerHeight() - 120;
$('.tutorial-steps__container').css('height', `${height}px`);
}
handleNext() { handleNext() {
if (this.state.currentScreen < 2) { if (this.state.currentScreen < 2) {
this.setState({currentScreen: this.state.currentScreen + 1}); this.setState({currentScreen: this.state.currentScreen + 1});
@@ -48,35 +52,29 @@ export default class TutorialIntroScreens extends React.Component {
createScreenOne() { createScreenOne() {
return ( return (
<div> <div>
<h4><strong>{'Welcome to:'}</strong></h4> <h3>{'Welcome to:'}</h3>
<h2><strong>{'Mattermost'}</strong></h2> <h1>{'Mattermost'}</h1>
<br/> <p>{'Your team communications all in one place, instantly searchable and available anywhere.'}</p>
{'Your team communications all in one place,'} <p>{'Keep your team connected to help them achieve what matters most.'}</p>
<br/> <div className='tutorial__circles'>
{'instantly searchable and available anywhere.'} <div className='circle active'/>
<br/><br/> <div className='circle'/>
{'Keep your team connected to help them'} <div className='circle'/>
<br/> </div>
{'achieve what matters most.'}
<br/><br/>
<span>{'[ x ][ ][ ]'}</span>
</div> </div>
); );
} }
createScreenTwo() { createScreenTwo() {
return ( return (
<div> <div>
<h4><strong>{'How Mattermost works:'}</strong></h4> <h3>{'How Mattermost works:'}</h3>
<br/> <p>{'Communication happens in public discussion channels, private groups and direct messages.'}</p>
{'Communication happens in public discussion channels,'} <p>{'Everything is archived and searchable from any web-enabled laptop, tablet or phone.'}</p>
<br/> <div className='tutorial__circles'>
{'private groups and direct messages.'} <div className='circle'/>
<br/><br/> <div className='circle active'/>
{'Everything is archived and searchable from'} <div className='circle'/>
<br/> </div>
{'any web-enabled laptop, tablet or phone.'}
<br/><br/>
<span>{'[ ][ x ][ ]'}</span>
</div> </div>
); );
} }
@@ -111,26 +109,26 @@ export default class TutorialIntroScreens extends React.Component {
return ( return (
<div> <div>
<h4><strong>{'Youre all set'}</strong></h4> <h3>{'Youre all set'}</h3>
<br/> <p>
{inviteModalLink} {inviteModalLink}
{' when youre ready.'} {' when youre ready.'}
<br/><br/> </p>
{'Need anything, just email us at '} <p>
<a {'Need anything, just email us at '}
href='mailto:feedback@mattermost.com' <a
target='_blank' href='mailto:feedback@mattermost.com'
> target='_blank'
{'feedback@mattermost.com.'} >
</a> {'feedback@mattermost.com.'}
<br/><br/> </a>
{'Click “Next” to enter Town Square. This is the first channel'} </p>
<br/> {'Click “Next” to enter Town Square. This is the first channel teammates see when they sign up - use it for posting updates everyone needs to know.'}
{'teammates see when they sign up - use it for posting updates'} <div className='tutorial__circles'>
<br/> <div className='circle'/>
{'everyone needs to know.'} <div className='circle'/>
<br/><br/> <div className='circle active'/>
<span>{'[ ][ ][ x ]'}</span> </div>
</div> </div>
); );
} }
@@ -138,16 +136,19 @@ export default class TutorialIntroScreens extends React.Component {
const screen = this.createScreen(); const screen = this.createScreen();
return ( return (
<div> <div className='tutorial-steps__container'>
{screen} <div className='tutorial__content'>
<br/><br/> <div className='tutorial__steps'>
<button {screen}
className='btn btn-primary' <button
tabIndex='1' className='btn btn-primary'
onClick={this.handleNext} tabIndex='1'
> onClick={this.handleNext}
{'Next'} >
</button> {'Next'}
</button>
</div>
</div>
</div> </div>
); );
} }

Просмотреть файл

@@ -52,9 +52,19 @@ export default class TutorialTip extends React.Component {
if (this.props.screens.length > 1) { if (this.props.screens.length > 1) {
for (let i = 0; i < this.props.screens.length; i++) { for (let i = 0; i < this.props.screens.length; i++) {
if (i === this.state.currentScreen) { if (i === this.state.currentScreen) {
dots.push(<span key={'dotactive' + i}>{'[ x ]'}</span>); dots.push(
<div
className='circle active'
key={'dotactive' + i}
/>
);
} else { } else {
dots.push(<span key={'dotinactive' + i}>{'[ ]'}</span>); dots.push(
<div
className='circle'
key={'dotinactive' + i}
/>
);
} }
} }
} }
@@ -63,7 +73,8 @@ export default class TutorialTip extends React.Component {
<div className='tip-div'> <div className='tip-div'>
<img <img
className='tip-button' className='tip-button'
src='/static/images/next.png' src='/static/images/tutorialTip.gif'
width='35'
onClick={this.toggle} onClick={this.toggle}
ref='target' ref='target'
/> />
@@ -77,24 +88,24 @@ export default class TutorialTip extends React.Component {
> >
<div className='tip-overlay'> <div className='tip-overlay'>
{this.props.screens[this.state.currentScreen]} {this.props.screens[this.state.currentScreen]}
<br/> <div className='tutorial__circles'>{dots}</div>
{dots} <div className='text-right'>
<button <button
className='btn btn-default' className='btn btn-default'
onClick={this.handleNext} onClick={this.handleNext}
>
{buttonText}
</button>
<br/>
<span>
{'Seen this before? '}
<a
href='#'
onClick={this.skipTutorial}
> >
{'Opt out of these tips.'} {buttonText}
</a> </button>
</span> <div className='tip-opt'>
{'Seen this before? '}
<a
href='#'
onClick={this.skipTutorial}
>
{'Opt out of these tips.'}
</a>
</div>
</div>
</div> </div>
</Overlay> </Overlay>
</div> </div>

Просмотреть файл

@@ -1,17 +1,71 @@
.tip-backdrop {
background: rgba(black, 0.5);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999;
}
.tip-overlay { .tip-overlay {
width: 350px;
max-width: 90%;
position:absolute; position:absolute;
background-color:#EEE; background-color: #fff;
box-shadow:0 5px 10px rgba(0, 0, 0, 0.2); @include border-radius(3px);
border:1px solid #CCC; padding: 20px;
border-radius:3px; z-index: 1000;
padding:10px; h4 {
z-index:999; font-size: em(16px);
font-weight: 600;
margin: 5px 0 15px;
}
p {
font-size: 13px;
line-height: 1.6;
strong {
font-weight: 600;
}
}
.btn {
background: #cccccc;
color: #fff;
@include border-radius(3px);
border: none;
margin-bottom: 10px;
&:hover, &:active, &:focus {
color: #fff;
border: none;
background: #bbb;
}
}
.tip-opt {
font-size: 12px;
span {
@include opacity(0.5);
}
}
.tutorial__circles {
margin: 1.5em 0px -1.7em -4px;
.circle {
width: 7px;
height: 7px;
margin: 0 4px;
&.active {
background: #000;
@include opacity(0.4);
}
}
}
} }
.tip-button { .tip-button {
height:20px; z-index: 998;
width:20px; right: -10px;
z-index:998; top: -10px;
position: relative;
cursor: pointer;
} }
.tip-div { .tip-div {
@@ -19,3 +73,48 @@
top:0px; top:0px;
right:0px; right:0px;
} }
.tutorial-steps__container {
text-align: center;
width: 100%;
display: table;
.tutorial__content {
display: table-cell;
vertical-align: middle;
padding-bottom: 100px;
padding: 0 40px;
.tutorial__steps {
max-width: 310px;
min-height: 420px;
text-align: left;
display: inline-block;
}
}
h1 {
font-size: em(40px);
margin: -20px 0 30px;
font-weight: 600;
}
h3 {
font-size: em(24px);
margin-bottom: 30px;
font-weight: 600;
}
}
.tutorial__circles {
margin: 2em 0;
.circle {
width: 9px;
height: 9px;
@include border-radius(9px);
@include opacity(0.1);
background: #000;
display: inline-block;
margin: 0 5px;
&.active {
background: $primary-color;
@include opacity(1);
}
}
}

Просмотреть файл

@@ -39,6 +39,7 @@
@import "partials/get-link"; @import "partials/get-link";
@import "partials/markdown"; @import "partials/markdown";
@import "partials/tutorial"; @import "partials/tutorial";
@import "partials/statistics";
// Responsive Css // Responsive Css
@import "partials/responsive"; @import "partials/responsive";

Двоичные данные
web/static/images/tutorialTip.gif Обычный файл

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 12 KiB