<commit_before>/**
 * @fileOverview GuiNotifyCtrl Angular Controller
 */

'use strict';

define(['./module', 'frontend/port'], function (controllers, Port) {
  controllers.controller('GuiNotifyCtrl', ['$scope', 'notify', function($scope, notify) {

  // Gui service, connect to report events on page.
  Port.connectNg('gui', $scope, function(data) {
      if (data.type == 'balance') {
      }
      else if (data.type == 'height') {
          $scope.currentHeight = data.value;
      }
      else if (data.type == 'text' || data.type == 'note') {
          notify.note('gui', data.text);
      }
      else if (data.type == 'error') {
          notify.error(data.title || 'gui', data.text);
      }
      else if (data.type == 'warning') {
          notify.warning('gui', data.text);
      }
      if (['height', 'balance', 'timestamps'].indexOf(data.type) > -1) {
          if (!$scope.$$phase) {
              $scope.$apply();
          }
      }
  });


  }]);
});<commit_msg>notes for mixer events so we have a bit more feedback atm.<commit_after>/**
 * @fileOverview GuiNotifyCtrl Angular Controller
 */

'use strict';

define(['./module', 'frontend/port'], function (controllers, Port) {
  controllers.controller('GuiNotifyCtrl', ['$scope', 'notify', function($scope, notify) {

  // Gui service, connect to report events on page.
  Port.connectNg('gui', $scope, function(data) {
      if (data.type == 'balance') {
      }
      else if (data.type == 'height') {
          $scope.currentHeight = data.value;
      }
      else if (data.type == 'text' || data.type == 'note') {
          notify.note('gui', data.text);
      }
      else if (data.type == 'error') {
          notify.error(data.title || 'gui', data.text);
      }
      else if (data.type == 'mixer') {
          notify.note('mixing', data.state);
      }
      else if (data.type == 'warning') {
          notify.warning('gui', data.text);
      }
      if (['height', 'balance', 'timestamps'].indexOf(data.type) > -1) {
          if (!$scope.$$phase) {
              $scope.$apply();
          }
      }
  });


  }]);
});
{'fraction_non_alphanumeric': 0.18979494515975204, 'fraction_numerical': 0.0009537434430138292, 'mean_word_length': 2.3354531001589827, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6597172', 'n_tokens_mistral': 660, 'n_tokens_neox': 650, 'n_words': 149}