Skip to content

Commit 3ec2a47

Browse files
authored
add r binding (#52)
1 parent 1c6cdf1 commit 3ec2a47

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/views/RepositoriesPanel.vue

+5
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ import { computed, onMounted, ref } from 'vue';
9393
import { useRouter } from 'vue-router';
9494
import type { RepositoryEnrichedRead, VCSProviders } from '@/services/shema-to-types';
9595
import { BTable, type TableItem } from 'bootstrap-vue-next';
96+
import { onKeyStroke } from '@vueuse/core';
97+
import { shouldIgnoreKeystroke } from '@/utils/keybind-utils';
9698
9799
const loadedData = ref(false);
98100
const router = useRouter();
@@ -281,6 +283,9 @@ function fetchDistinctRepositories() {
281283
});
282284
}
283285
286+
/* istanbul ignore next @preserve */
287+
onKeyStroke('r', () => !shouldIgnoreKeystroke() && fetchPaginatedRepositories(), { eventName: 'keydown' });
288+
284289
onMounted(() => {
285290
fetchDistinctProjects();
286291
fetchDistinctRepositories();

0 commit comments

Comments
 (0)