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

Commit683b0f5

Browse files
committed
fix task run styles, lower timeout values
1 parentc93d997 commit683b0f5

File tree

26 files changed

+66
-90
lines changed

26 files changed

+66
-90
lines changed

‎lib/atom/actions/file.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
varfs_1=require('fs');
33
varexists_1=require('../../services/exists');
44
vareditor_1=require('./editor');
5+
varopenTimeout=200;
56
functionopenFolder(){
67
atom.open();
78
}
@@ -19,7 +20,7 @@ function open(filePath, options) {
1920
atom.workspace.open(filePath,options);
2021
setTimeout(function(){
2122
resolve();
22-
},200);
23+
},openTimeout);
2324
});
2425
}
2526
exports.open=open;

‎lib/atom/actions/terminal.js‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
"use strict";
22
functionopenTerminal(){
3-
if(atom.packages.isPackageActive('terminal-plus')){
4-
if(!document.getElementsByClassName('xterm')[0]){
5-
atom.commands.dispatch(document.getElementsByTagName('atom-workspace')[0],'terminal-plus:toggle');
6-
}
7-
returntrue;
8-
}
93
returnfalse;
104
}
115
exports.openTerminal=openTerminal;

‎lib/atom/actions/write.js‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ function set(text) {
1717
exports.set=set;
1818
functioninsert(text,options){
1919
if(options===void0){options={};}
20-
options=Object.assign(options,{
21-
autoIndent:true,
22-
});
2320
returnwrite('insert',text,options);
2421
}
2522
exports.insert=insert;

‎lib/components/Page/Task/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ function getStatus(index, taskPosition, testRun) {
2727
exports.Task=function(_a){
2828
vartask=_a.task,taskPosition=_a.taskPosition,index=_a.index,testRun=_a.testRun;
2929
varbackgroundColor=getStatus(index,taskPosition,testRun);
30-
varcurrentTask=taskPosition===index;
31-
return(React.createElement(List_1.ListItem,{key:index,style:Object.assign({},styles,{backgroundColor:backgroundColor})},taskCheckbox_1.taskCheckbox(task,testRun),React.createElement("span",{style:indexStyles},index+1,"."),React.createElement("div",{style:descriptionStyles},React.createElement(index_1.Markdown,null,task.description))));
30+
varisCurrentTask=taskPosition===index;
31+
return(React.createElement(List_1.ListItem,{key:index,style:Object.assign({},styles,{backgroundColor:backgroundColor})},taskCheckbox_1.taskCheckbox(isCurrentTask,testRun),React.createElement("span",{style:indexStyles},index+1,"."),React.createElement("div",{style:descriptionStyles},React.createElement(index_1.Markdown,null,task.description))));
3232
};

‎lib/components/Page/Task/taskCheckbox.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ var styles = {
66
position:'absolute',
77
top:'15px'
88
};
9-
functiontaskCheckbox(currentTask,testRun){
10-
if(!currentTask||!testRun){
9+
functiontaskCheckbox(isCurrentTask,testRun){
10+
if(!isCurrentTask||!testRun){
1111
returnnull;
1212
}
1313
return(React.createElement("span",{style:styles},React.createElement(indeterminate_check_box_1.default,{color:colors_1.orange500})));

‎lib/reducers/editor-actions/actions.js‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ function editorActions(actionString) {
1313
varparams=action_helpers_1.getParams(actionString);
1414
switch(command){
1515
caseType.OPEN:
16-
varobj=action_helpers_1.getOptions(params[0]);
17-
varfile=obj.param;
18-
varoptions=obj.options;
16+
var_a=action_helpers_1.getOptions(params[0]),param=_a.param,options=_a.options;
1917
if(params.length===1){
20-
editor_1.open(file,options);
18+
editor_1.open(param,options);
2119
setTimeout(function(){
2220
resolve();
2321
},100);

‎lib/reducers/editor-actions/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function editorActionsReducer(editorActions, action) {
1818
handleEditorActions(actions.shift());
1919
returnactions;
2020
case_types_1.TEST_RESULT:
21-
actions=action.payload.actions;
21+
actions=action.payload.actions||[];
2222
varnextTaskPosition=action.payload.result.taskPosition;
2323
if(nextTaskPosition>currentTaskPosition){
2424
for(vari=0;i<nextTaskPosition-currentTaskPosition;i++){

‎lib/reducers/progress/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ function progressReducer(progress, action) {
2727
})
2828
};
2929
case_types_1.COMPLETE_PAGE:
30-
varposition=action.payload.position;
31-
progress.chapters[position.chapter].pages[position.page]=true;
30+
var_a=action.payload.position,chapter=_a.chapter,page=_a.page;
31+
progress.chapters[chapter].pages[page]=true;
3232
local_storage_1.saveToLocalStorage(progress);
3333
returnprogress;
3434
case_types_1.COMPLETE_CHAPTER:

‎lib/reducers/route/index.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ function routeReducer(route, action) {
55
if(route===void0){route=_route;}
66
switch(action.type){
77
case_types_1.ROUTE_SET:
8-
varnext=action.payload.route;
98
returnaction.payload.route;
109
default:
1110
returnroute;

‎lib/reducers/task-tests/index.js‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,15 @@ function taskTestsReducer(taskTests, action) {
66
if(taskTests===void0){taskTests='';}
77
switch(action.type){
88
case_types_1.TESTS_LOAD:
9-
vartasks=store_1.default.getState().tasks;
10-
vartests=[].concat.apply([],tasks.map(function(task){returntask.tests||[];}));
11-
varoutput_1='';
12-
tests.forEach(function(file){
9+
return[].concat.apply([],store_1.default.getState().tasks.map(function(task){returntask.tests||[];})).reduce(function(output,file){
1310
try{
14-
vardata=fs_1.readFileSync(file,'utf8');
15-
output_1+=data+'\n';
11+
output+=fs_1.readFileSync(file,'utf8')+'\n';
1612
}
1713
catch(e){
1814
console.log('Error reading test file',e);
1915
}
20-
});
21-
returnoutput_1;
16+
returnoutput;
17+
},'');
2218
default:
2319
returntaskTests;
2420
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp