Browse Source

Confirm leaving networks.

Adam Ierymenko 10 years ago
parent
commit
992438f054
2 changed files with 13 additions and 11 deletions
  1. 13 11
      ui/ZeroTierNetwork.jsx
  2. 0 0
      ui/ztui.min.js

+ 13 - 11
ui/ZeroTierNetwork.jsx

@@ -4,17 +4,19 @@ var ZeroTierNetwork = React.createClass({
 	},
 	},
 
 
 	leaveNetwork: function(event) {
 	leaveNetwork: function(event) {
-		Ajax.call({
-			url: 'network/'+this.props.nwid+'?auth='+this.props.authToken,
-			cache: false,
-			type: 'DELETE',
-			success: function(data) {
-				if (this.props.onNetworkDeleted)
-					this.props.onNetworkDeleted(this.props.nwid);
-			}.bind(this),
-			error: function(error) {
-			}.bind(this)
-		});
+		if (confirm("Are you sure you want to leave this network?")) {
+			Ajax.call({
+				url: 'network/'+this.props.nwid+'?auth='+this.props.authToken,
+				cache: false,
+				type: 'DELETE',
+				success: function(data) {
+					if (this.props.onNetworkDeleted)
+						this.props.onNetworkDeleted(this.props.nwid);
+				}.bind(this),
+				error: function(error) {
+				}.bind(this)
+			});
+		}
 		event.preventDefault();
 		event.preventDefault();
 	},
 	},
 
 

File diff suppressed because it is too large
+ 0 - 0
ui/ztui.min.js


Some files were not shown because too many files changed in this diff