Skip to content

Commit

Permalink
Hide archived repos by default in repo-list (go-gitea#11440)
Browse files Browse the repository at this point in the history
As discussed in go-gitea#11268 hide archived repos by default in the
dashboard repo-list

Signed-off-by: Andrew Thornton <[email protected]>
  • Loading branch information
zeripath authored and Yohann Delafollye committed Jul 31, 2020
1 parent d8c1608 commit e7e2f3b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions web_src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2681,7 +2681,7 @@ function initVueComponents() {

let archivedFilter = params.get('repo-search-archived');
if (!archivedFilter) {
archivedFilter = 'both';
archivedFilter = 'unarchived';
}

let searchQuery = params.get('repo-search-query');
Expand Down Expand Up @@ -2778,8 +2778,8 @@ function initVueComponents() {
$('#archivedFilterCheckbox').checkbox('set indeterminate');
break;
default:
this.archivedFilter = 'both';
$('#archivedFilterCheckbox').checkbox('set indeterminate');
this.archivedFilter = 'unarchived';
$('#archivedFilterCheckbox').checkbox('set unchecked');
break;
}
switch (this.privateFilter) {
Expand Down Expand Up @@ -2828,7 +2828,7 @@ function initVueComponents() {
params.set('repo-search-private', this.privateFilter);
}

if (this.archivedFilter === 'both') {
if (this.archivedFilter === 'unarchived') {
params.delete('repo-search-archived');
} else {
params.set('repo-search-archived', this.archivedFilter);
Expand Down Expand Up @@ -2861,7 +2861,7 @@ function initVueComponents() {
this.archivedFilter = 'both';
break;
default:
this.archivedFilter = 'both';
this.archivedFilter = 'unarchived';
break;
}
this.page = 1;
Expand Down Expand Up @@ -2916,7 +2916,7 @@ function initVueComponents() {
case 'archived':
return repo.archived;
default:
return true;
return !repo.archived;
}
},

Expand Down

0 comments on commit e7e2f3b

Please sign in to comment.