AdSelect and delete repos

This commit is contained in:
Joscha 2025-01-28 12:53:27 +01:00
parent 136e736a51
commit ccc41f96d8
3 changed files with 38 additions and 9 deletions

View file

@ -30,7 +30,8 @@ export const useReposStore = defineStore("repos", () => {
selectedRepoId.value = repo.id;
}
function removeRepo(id: string) {
function removeRepo(id: string | undefined) {
if (id === undefined) return;
const i = repoIdsByName.value.indexOf(id);
repos.value.delete(id);
if (i >= 0) {
@ -51,5 +52,6 @@ export const useReposStore = defineStore("repos", () => {
selectedRepoId,
addRepo,
removeRepo,
selectRepo,
};
});