mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-18 01:35:10 +02:00
converted flip treey
This commit is contained in:
parent
c7cede468b
commit
82c3e75394
3 changed files with 11 additions and 15 deletions
|
@ -10,6 +10,8 @@ var Errors = require('../util/errors');
|
|||
var CommandProcessError = Errors.CommandProcessError;
|
||||
var LocaleStore = require('../stores/LocaleStore');
|
||||
var LocaleActions = require('../actions/LocaleActions');
|
||||
var GlobalStateStore = require('../stores/GlobalStateStore');
|
||||
var GlobalStateActions = require('../actions/GlobalStateActions');
|
||||
var GitError = Errors.GitError;
|
||||
var Warning = Errors.Warning;
|
||||
var CommandResult = Errors.CommandResult;
|
||||
|
@ -60,10 +62,10 @@ var instantCommands = [
|
|||
});
|
||||
}],
|
||||
[/^flip$/, function() {
|
||||
GlobalState.flipTreeY = !GlobalState.flipTreeY;
|
||||
|
||||
var events = require('../app').getEvents();
|
||||
events.trigger('refreshTree');
|
||||
GlobalStateActions.changeFlipTreeY(
|
||||
!GlobalStateStore.getFlipTreeY()
|
||||
);
|
||||
require('../app').getEvents().trigger('refreshTree');
|
||||
throw new CommandResult({
|
||||
msg: intl.str('flip-tree-command')
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue