Browse Source

Show 'shutdown complete' modal (fixes #251)

Jakob Borg 11 years ago
parent
commit
4235175966
3 changed files with 23 additions and 2 deletions
  1. 0 0
      auto/gui.files.go
  2. 3 2
      gui/app.js
  3. 20 0
      gui/index.html

File diff suppressed because it is too large
+ 0 - 0
auto/gui.files.go


+ 3 - 2
gui/app.js

@@ -263,14 +263,15 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
 
     $scope.restart = function () {
         restarting = true;
-        $('#restarting').modal('show');
+        $('#restarting').modal({backdrop: 'static', keyboard: false});
         $http.post(urlbase + '/restart');
         $scope.configInSync = true;
     };
 
     $scope.shutdown = function () {
+        restarting = true;
         $http.post(urlbase + '/shutdown').success(function () {
-            setTimeout($scope.refresh(), 250);
+            $('#shutdown').modal({backdrop: 'static', keyboard: false});
         });
         $scope.configInSync = true;
     };

+ 20 - 0
gui/index.html

@@ -353,6 +353,26 @@
     </div>
   </div>
 
+  <!-- Shutdown modal -->
+
+  <div id="shutdown" class="modal fade">
+    <div class="modal-dialog">
+      <div class="modal-content">
+        <div class="modal-header alert alert-success">
+          <h4 class="modal-title">
+            <span class="glyphicon glyphicon-off"></span>
+            Shutdown Complete
+          </h4>
+        </div>
+        <div class="modal-body">
+          <p>
+            Syncthing has been shut down.
+          </p>
+        </div>
+      </div>
+    </div>
+  </div>
+
   <!-- Node editor modal -->
 
   <div id="editNode" class="modal fade">

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