Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit298ca2e

Browse files
committed
update tutorial displayed, release 13.1
1 parent04174cd commit298ca2e

File tree

10 files changed

+18
-9
lines changed

10 files changed

+18
-9
lines changed

‎CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to[Semantic Versioning](http://semver.org/).
44

5+
##[0.13.1] - 2016-09-15
6+
- tutorial list shows latest tutorial version
7+
- fix empty directory issue
8+
59
##[0.13.0] - 2016-09-14
610
- improved page open. uses`onDidOpen` callback
711
- progress reset button

‎lib/actions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ var actions_11 = require('./modules/tutorials/actions');
3737
exports.tutorialsFind=actions_11.tutorialsFind;
3838
exports.tutorialUpdate=actions_11.tutorialUpdate;
3939
exports.tutorialsUpdate=actions_11.tutorialsUpdate;
40+
exports.tutorialVersion=actions_11.tutorialVersion;
4041
varactions_12=require('./modules/window/actions');
4142
exports.windowToggle=actions_12.windowToggle;
4243
exports.quit=actions_12.quit;

‎lib/components/Tutorials/UpdateTutorial/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ var styles = {
1616
},
1717
latest:{
1818
marginLeft:'10px',
19+
opacity:'0.5',
1920
},
2021
};
2122
varUpdateTutorial=(function(_super){
@@ -27,7 +28,7 @@ var UpdateTutorial = (function (_super) {
2728
var_a=this.props,tutorial=_a.tutorial,tutorialUpdate=_a.tutorialUpdate;
2829
return(React.createElement("span",null,
2930
React.createElement(update_1.default,{style:styles.icon,color:colors_1.pink500,onTouchTap:tutorialUpdate.bind(this,tutorial.name)}),
30-
React.createElement("span",null,tutorial.latest)));
31+
React.createElement("span",{style:styles.latest},"("+tutorial.latest+")" ?tutorial.latest :'')));
3132
};
3233
returnUpdateTutorial;
3334
}(React.Component));

‎lib/modules/tutorials/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function tutorialsReducer(t, action) {
1616
});
1717
casetypes_1.TUTORIAL_VERSION:
1818
var_a=action.payload,name_1=_a.name,latest_1=_a.latest;
19-
t.map(function(tutorial){
19+
returnt.map(function(tutorial){
2020
if(tutorial.name===name_1){
2121
tutorial.isLatest=false;
2222
tutorial.latest=latest_1;

‎lib/modules/tutorials/utils/latestVersion.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
varstore_1=require('../../../store');
33
varcompareVersions_1=require('../../../utils/compareVersions');
44
varfetch_1=require('../../../utils/fetch');
5-
varactions_1=require('./actions');
5+
varactions_1=require('../actions');
66
varnpmApiCall=function(name){return("https://registry.npmjs.org/"+name);};
77
functiongetLatest(version,data){
88
returndata['dist-tags'].latest;
@@ -14,6 +14,7 @@ function isLatestVersion(_a) {
1414
.then(fetch_1.json)
1515
.then(getLatest.bind(this,version))
1616
.then(function(latest){
17+
console.log('isAbove',compareVersions_1.isAboveVersion(version,latest));
1718
if(!compareVersions_1.isAboveVersion(version,latest)){
1819
store_1.default.dispatch(actions_1.tutorialVersion({name:name,latest:latest}));
1920
}

‎package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"dependencies": {
3232
"atom-plugin-command-line":"1.0.2",
33-
"coderoad-cli":"0.9.0",
33+
"coderoad-cli":"0.9.1",
3434
"marked":"0.3.6",
3535
"material-ui":"0.15.4",
3636
"node-file-exists":"1.1.0",
@@ -45,6 +45,7 @@
4545
"reselect":"2.5.3"
4646
},
4747
"devDependencies": {
48+
"coderoad-cli":"^0.9.1",
4849
"electron-chromedriver":"^1.3.2",
4950
"eslint":"^3.5.0",
5051
"eslint-plugin-react":"^6.2.2",

‎src/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ export {routeSet} from './modules/route/actions';
88
export{setupVerify,setupPackage}from'./modules/setup/actions';
99
export{testLoad,testRun,testResult,testComplete}from'./modules/tests/actions';
1010
export{tutorialSet}from'./modules/tutorial/actions';
11-
export{tutorialsFind,tutorialUpdate,tutorialsUpdate}from'./modules/tutorials/actions';
11+
export{tutorialsFind,tutorialUpdate,tutorialsUpdate,tutorialVersion}from'./modules/tutorials/actions';
1212
export{windowToggle,quit}from'./modules/window/actions';

‎src/components/Tutorials/UpdateTutorial/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const styles = {
1212
},
1313
latest:{
1414
marginLeft:'10px',
15+
opacity:'0.5',
1516
},
1617
};
1718

@@ -27,7 +28,7 @@ class UpdateTutorial extends React.Component<{
2728
color={pink500}
2829
onTouchTap={tutorialUpdate.bind(this,tutorial.name)}
2930
/>
30-
<span>{tutorial.latest}</span>
31+
<spanstyle={styles.latest}>{`(${tutorial.latest})` ?tutorial.latest :''}</span>
3132
</span>
3233
);
3334
}

‎src/modules/tutorials/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function tutorialsReducer(
3737

3838
caseTUTORIAL_VERSION:
3939
const{ name, latest}=action.payload;
40-
t.map((tutorial:Tutorial.Info)=>{
40+
returnt.map((tutorial:Tutorial.Info)=>{
4141
if(tutorial.name===name){
4242
tutorial.isLatest=false;
4343
tutorial.latest=latest;

‎src/modules/tutorials/utils/latestVersion.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
importstorefrom'../../../store';
22
import{isAboveVersion}from'../../../utils/compareVersions';
33
import{json,status}from'../../../utils/fetch';
4-
import{tutorialVersion}from'./actions';
4+
import{tutorialVersion}from'../actions';
55

66
constnpmApiCall=name=>`https://registry.npmjs.org/${name}`;
77

@@ -27,7 +27,7 @@ function isLatestVersion({name, version}): void {
2727
.then(getLatest.bind(this,version))
2828
.then(latest=>{
2929
if(!isAboveVersion(version,latest)){
30-
store.dispatch(tutorialVersion({name, latest}))
30+
store.dispatch(tutorialVersion({name, latest}));
3131
}
3232
})
3333
.catch((err)=>console.log(`Error fetching tutorial "${name}":${err}`));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp