|
|
|
@ -866,12 +866,20 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', |
|
|
|
|
// Save setting for playing sound on notification
|
|
|
|
|
$store.bind($scope, "soundnotification", false); |
|
|
|
|
// Save setting for font family
|
|
|
|
|
$store.bind($scope, "fontfamily", getClassStyle('monospace', 'fontFamily')); |
|
|
|
|
$store.bind($scope, "fontfamily", getClassStyle('favorite-font', 'fontFamily')); |
|
|
|
|
// Save setting for font size
|
|
|
|
|
$store.bind($scope, "fontsize", getClassStyle('monospace', 'fontSize')); |
|
|
|
|
$store.bind($scope, "fontsize", getClassStyle('favorite-font', 'fontSize')); |
|
|
|
|
// Save setting for readline keybindings
|
|
|
|
|
$store.bind($scope, "readlineBindings", false); |
|
|
|
|
|
|
|
|
|
if (!$scope.fontfamily) { |
|
|
|
|
if ($rootScope.isMobileUi()) { |
|
|
|
|
$scope.fontfamily = 'sans-serif'; |
|
|
|
|
} else { |
|
|
|
|
$scope.fontfamily = "Inconsolata, Consolas, Monaco, Ubuntu Mono, monospace"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Save setting for displaying embeds in rootScope so it can be used from service
|
|
|
|
|
$rootScope.visible = $scope.noembed === false; |
|
|
|
|
|
|
|
|
@ -947,11 +955,11 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', |
|
|
|
|
|
|
|
|
|
// Update font family when changed
|
|
|
|
|
$scope.$watch('fontfamily', function() { |
|
|
|
|
changeClassStyle('monospace', 'fontFamily', $scope.fontfamily); |
|
|
|
|
changeClassStyle('favorite-font', 'fontFamily', $scope.fontfamily); |
|
|
|
|
}); |
|
|
|
|
// Update font size when changed
|
|
|
|
|
$scope.$watch('fontsize', function() { |
|
|
|
|
changeClassStyle('monospace', 'fontSize', $scope.fontsize); |
|
|
|
|
changeClassStyle('favorite-font', 'fontSize', $scope.fontsize); |
|
|
|
|
}); |
|
|
|
|
// Crude scoping hack. The keypress listener does not live in the same scope as
|
|
|
|
|
// the checkbox, so we need to transfer this between scopes here.
|
|
|
|
|