mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
keyboard shortcut to star/unstar an entry
This commit is contained in:
@@ -518,8 +518,10 @@ function($scope, $stateParams, $http, $route, $window, EntryService, SettingsSer
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.star = function(entry, star, event) {
|
$scope.star = function(entry, star, event) {
|
||||||
event.preventDefault();
|
if (event) {
|
||||||
event.stopPropagation();
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
}
|
||||||
if (entry.starred != star) {
|
if (entry.starred != star) {
|
||||||
entry.starred = star;
|
entry.starred = star;
|
||||||
EntryService.star({
|
EntryService.star({
|
||||||
@@ -642,6 +644,13 @@ function($scope, $stateParams, $http, $route, $window, EntryService, SettingsSer
|
|||||||
window.open($scope.current.url);
|
window.open($scope.current.url);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Mousetrap.bind('s', function(e) {
|
||||||
|
$scope.$apply(function() {
|
||||||
|
if ($scope.current) {
|
||||||
|
$scope.star($scope.current, !$scope.current.starred);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
Mousetrap.bind('?', function(e) {
|
Mousetrap.bind('?', function(e) {
|
||||||
$scope.$apply(function() {
|
$scope.$apply(function() {
|
||||||
$scope.shortcutsModal = true;
|
$scope.shortcutsModal = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user