[Fun] Issue #202 -- more fun when finishing!

This commit is contained in:
Peter Cottle 2014-08-19 19:26:05 -07:00
parent 7194d5c277
commit bf6a84dd1d
4 changed files with 78 additions and 3 deletions

View file

@ -772,7 +772,6 @@ GitEngine.prototype.printBranches = function(branches) {
GitEngine.prototype.printTags = function(tags) {
var result = '';
_.each(tags, function(tag) {
console.log(tag);
result += tag.id + '\n';
});
throw new CommandResult({

View file

@ -355,6 +355,10 @@ var ModalAlert = ContainedBase.extend({
var HTML = (this.JSON.markdown) ?
require('markdown').markdown.toHTML(this.JSON.markdown) :
this.template(this.JSON);
// one more hack -- allow adding custom random HTML if specified
if (this.options._dangerouslyInsertHTML) {
HTML += this.options._dangerouslyInsertHTML;
}
// call to super, not super elegant but better than
// copy paste code
@ -456,16 +460,22 @@ var NextLevelConfirm = ConfirmCancelTerminal.extend({
}
markdown = markdown + '\n\n';
var extraHTML;
if (options.nextLevel) {
markdown = markdown + intl.str('finish-dialog-next', {nextLevel: nextLevelName});
} else {
markdown = markdown + intl.str('finish-dialog-finished');
extraHTML = '<p class="catchadream">' + intl.str('finish-dialog-finished') +
' (ノ^_^)ノ (ノ^_^)ノ (ノ^_^)ノ' +
'</p>';
}
options = _.extend(
{},
options,
{ markdown: markdown }
{
markdown: markdown,
_dangerouslyInsertHTML: extraHTML
}
);
NextLevelConfirm.__super__.initialize.apply(this, [options]);