Hide archived repos by default in repo-list (#11440)
As discussed in #11268 hide archived repos by default in the dashboard repo-list Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
aaaaeb7050
commit
c18144086f
|
@ -2681,7 +2681,7 @@ function initVueComponents() {
|
||||||
|
|
||||||
let archivedFilter = params.get('repo-search-archived');
|
let archivedFilter = params.get('repo-search-archived');
|
||||||
if (!archivedFilter) {
|
if (!archivedFilter) {
|
||||||
archivedFilter = 'both';
|
archivedFilter = 'unarchived';
|
||||||
}
|
}
|
||||||
|
|
||||||
let searchQuery = params.get('repo-search-query');
|
let searchQuery = params.get('repo-search-query');
|
||||||
|
@ -2778,8 +2778,8 @@ function initVueComponents() {
|
||||||
$('#archivedFilterCheckbox').checkbox('set indeterminate');
|
$('#archivedFilterCheckbox').checkbox('set indeterminate');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.archivedFilter = 'both';
|
this.archivedFilter = 'unarchived';
|
||||||
$('#archivedFilterCheckbox').checkbox('set indeterminate');
|
$('#archivedFilterCheckbox').checkbox('set unchecked');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch (this.privateFilter) {
|
switch (this.privateFilter) {
|
||||||
|
@ -2828,7 +2828,7 @@ function initVueComponents() {
|
||||||
params.set('repo-search-private', this.privateFilter);
|
params.set('repo-search-private', this.privateFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.archivedFilter === 'both') {
|
if (this.archivedFilter === 'unarchived') {
|
||||||
params.delete('repo-search-archived');
|
params.delete('repo-search-archived');
|
||||||
} else {
|
} else {
|
||||||
params.set('repo-search-archived', this.archivedFilter);
|
params.set('repo-search-archived', this.archivedFilter);
|
||||||
|
@ -2861,7 +2861,7 @@ function initVueComponents() {
|
||||||
this.archivedFilter = 'both';
|
this.archivedFilter = 'both';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.archivedFilter = 'both';
|
this.archivedFilter = 'unarchived';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
|
@ -2916,7 +2916,7 @@ function initVueComponents() {
|
||||||
case 'archived':
|
case 'archived':
|
||||||
return repo.archived;
|
return repo.archived;
|
||||||
default:
|
default:
|
||||||
return true;
|
return !repo.archived;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue