Comparing version 1.0.9 to 1.1.0
@@ -38,2 +38,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
exports.__esModule = true; | ||
var __1 = require(".."); | ||
var select_list_1 = require("../../../Terminal/User Interactions/select-list"); | ||
@@ -60,19 +61,3 @@ var request_confirmation_1 = require("../../../Terminal/User Interactions/request-confirmation"); | ||
onChange: function (response) { | ||
var option = _this.options[response.index]; | ||
if (_this.options[response.index]) { | ||
_this.app.gitCommand.push(option["function"]); | ||
} | ||
if (option) { | ||
_this.t.interactor | ||
.moveCursorToBottom() | ||
.clearLine() | ||
.write('>>> ' + _this.app.gitCommand.command()) | ||
.moveCursor.moveTo(0, 0); | ||
} | ||
else { | ||
_this.t.interactor | ||
.moveCursorToBottom() | ||
.clearLine() | ||
.moveCursor.moveTo(0, 0); | ||
} | ||
__1.showGitCommandForSelectList(response, _this.options, _this.t, _this.app); | ||
} | ||
@@ -79,0 +64,0 @@ }); |
exports.__esModule = true; | ||
function showGitCommandForSelectList(response, options, t, app) { | ||
var option = options[response.index]; | ||
if (options[response.index]) { | ||
app.gitCommand.push(option["function"]); | ||
} | ||
if (option) { | ||
t.interactor | ||
.moveCursorToBottom() | ||
.clearLine() | ||
.write('>>> ' + app.gitCommand.command()) | ||
.moveCursor.moveTo(0, 0); | ||
} | ||
else { | ||
t.interactor | ||
.moveCursorToBottom() | ||
.clearLine() | ||
.moveCursor.moveTo(0, 0); | ||
} | ||
} | ||
exports.showGitCommandForSelectList = showGitCommandForSelectList; |
@@ -38,2 +38,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
exports.__esModule = true; | ||
var _1 = require("."); | ||
var select_list_1 = require("../../Terminal/User Interactions/select-list"); | ||
@@ -43,2 +44,3 @@ var status_1 = require("./status"); | ||
var No_Git_Folder_1 = require("./No Git Folder"); | ||
var commit_1 = require("./commit"); | ||
var MainPage = /** @class */ (function () { | ||
@@ -62,2 +64,8 @@ function MainPage(app, t) { | ||
} | ||
}, | ||
{ | ||
name: 'Commit', | ||
"function": { | ||
base: 'git commit -m' | ||
} | ||
} | ||
@@ -70,19 +78,3 @@ ]; | ||
onChange: function (response) { | ||
var option = _this.options[response.index]; | ||
if (_this.options[response.index]) { | ||
_this.app.gitCommand.push(option["function"]); | ||
} | ||
if (option) { | ||
_this.t.interactor | ||
.moveCursorToBottom() | ||
.clearLine() | ||
.write('>>> ' + _this.app.gitCommand.command()) | ||
.moveCursor.moveTo(0, 0); | ||
} | ||
else { | ||
_this.t.interactor | ||
.moveCursorToBottom() | ||
.clearLine() | ||
.moveCursor.moveTo(0, 0); | ||
} | ||
_1.showGitCommandForSelectList(response, _this.options, _this.t, _this.app); | ||
} | ||
@@ -131,2 +123,5 @@ }); | ||
} | ||
case 2: { | ||
return [2 /*return*/, new commit_1.CommitPage(this.app, this.t)]; | ||
} | ||
} | ||
@@ -133,0 +128,0 @@ return [2 /*return*/, this]; |
@@ -38,2 +38,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
exports.__esModule = true; | ||
var __1 = require(".."); | ||
var select_list_1 = require("../../../Terminal/User Interactions/select-list"); | ||
@@ -59,19 +60,3 @@ var NoGitFolderPage = /** @class */ (function () { | ||
onChange: function (response) { | ||
var option = _this.options[response.index]; | ||
if (_this.options[response.index]) { | ||
_this.app.gitCommand.push(option["function"]); | ||
} | ||
if (option) { | ||
_this.t.interactor | ||
.moveCursorToBottom() | ||
.clearLine() | ||
.write('>>> ' + _this.app.gitCommand.command()) | ||
.moveCursor.moveTo(0, 0); | ||
} | ||
else { | ||
_this.t.interactor | ||
.moveCursorToBottom() | ||
.clearLine() | ||
.moveCursor.moveTo(0, 0); | ||
} | ||
__1.showGitCommandForSelectList(response, _this.options, _this.t, _this.app); | ||
} | ||
@@ -78,0 +63,0 @@ }); |
@@ -116,3 +116,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
Input.prototype.moveCursor = function (x, y) { | ||
console.log(this.cursorLocation); | ||
return; // for now | ||
var _a = __read(this.t.interactor.widthAndHeight(), 2), width = _a[0], height = _a[1]; | ||
@@ -134,6 +134,8 @@ if (x != 0 && this.cursorLocation.x + x < width && this.cursorLocation.x + x > 0) { | ||
Input.prototype.removeInput = function () { | ||
this.input; | ||
this.input = this.input.slice(0, -1); | ||
}; | ||
Input.prototype.addInput = function (char) { | ||
this.input += char; | ||
if (this.input.length + 7 < this.t.interactor.getWidth()) { | ||
this.input += char; | ||
} | ||
}; | ||
@@ -171,4 +173,4 @@ Input.prototype.run = function () { | ||
.restoreCursorSpot() | ||
.write('Input: ') | ||
.newLine() | ||
.clearLine() | ||
.write(this.t.interactor.color.blue(this.t.interactor.decorate.bold(this.config.prompt))) | ||
.write(this.input); | ||
@@ -175,0 +177,0 @@ }; |
{ | ||
"name": "agita", | ||
"version": "1.0.9", | ||
"version": "1.1.0", | ||
"main": "bin/index.js", | ||
@@ -5,0 +5,0 @@ "author": "Joel Huggett", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84141
28
1835