Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn msg update #749

Merged
merged 3 commits into from
May 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/branches/branches.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ BranchesViewModel.prototype.updateBranches = function() {

BranchesViewModel.prototype.branchRemove = function(branch) {
var self = this;
var diag = components.create('yesnodialog', { title: 'Are you sure?', details: 'This operation cannot be undone with ungit.'});
var diag = components.create('yesnodialog', { title: 'Are you sure?', details: 'Deleting ' + branch.name + ' branch cannot be undone with ungit.'});
diag.closed.add(function() {
if (diag.result()) {
self.server.del('/branches', { name: branch.name, path: self.repoPath() }, function(err) {
Expand Down
7 changes: 4 additions & 3 deletions components/graph/git-graph-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ GraphActions.Reset.prototype.createHoverGraphic = function() {
GraphActions.Reset.prototype.perform = function(callback) {
var self = this;
var context = this.graph.currentActionContext();
var diag = components.create('yesnodialog', { title: 'Are you sure?', details: 'This operation cannot be undone with ungit.'});
var remoteRef = context.getRemoteRef(self.graph.currentRemote());
var diag = components.create('yesnodialog', { title: 'Are you sure?', details: 'Resetting to ref: ' + remoteRef.name + ' cannot be undone with ungit.'});
diag.closed.add(function() {
if (diag.result()) {
var remoteRef = context.getRemoteRef(self.graph.currentRemote());
self.server.post('/reset', { path: self.graph.repoPath(), to: remoteRef.name, mode: 'hard' }, function() {
context.node(remoteRef.node());
callback();
Expand Down Expand Up @@ -272,7 +272,8 @@ GraphActions.Delete.prototype.style = 'delete';
GraphActions.Delete.prototype.icon = 'glyphicon glyphicon-remove';
GraphActions.Delete.prototype.perform = function(callback) {
var context = this.graph.currentActionContext();
var diag = components.create('yesnodialog', { title: 'Are you sure?', details: 'This operation cannot be undone with ungit.'});
var name = context.isRemoteBranch ? "remote " + context.localRefName : context.localRefName;
var diag = components.create('yesnodialog', { title: 'Are you sure?', details: 'Deleting ' + name + ' branch or tag cannot be undone with ungit.'});
diag.closed.add(function() {
if (diag.result()) {
context.remove(callback);
Expand Down
2 changes: 1 addition & 1 deletion components/remotes/remotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ RemotesViewModel.prototype.showAddRemoteDialog = function() {

RemotesViewModel.prototype.remoteRemove = function(remote) {
var self = this;
var diag = components.create('yesnodialog', { title: 'Are you sure?', details: 'This operation cannot be undone with ungit.'});
var diag = components.create('yesnodialog', { title: 'Are you sure?', details: 'Deleting ' + remote.name + ' remote cannot be undone with ungit.'});
diag.closed.add(function() {
if (diag.result()) {
self.fetchingProgressBar.start();
Expand Down
2 changes: 1 addition & 1 deletion components/submodules/submodules.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ SubmodulesViewModel.prototype.submodulePathClick = function(submodule) {

SubmodulesViewModel.prototype.submoduleRemove = function(submodule) {
var self = this;
var diag = components.create('yesnodialog', { title: 'Are you sure?', details: 'This operation cannot be undone with ungit.'});
var diag = components.create('yesnodialog', { title: 'Are you sure?', details: 'Deleting ' + submodule.name + ' submodule cannot be undone with ungit.'});
diag.closed.add(function() {
if (diag.result()) {
self.fetchProgressBar.start();
Expand Down