Compare commits

...

2 Commits

Author SHA1 Message Date
Giteabot
bacc69db83
Make pull request and issue history more compact (#34588) (#34594)
Backport #34588 by @silverwind

Before, waste of space in multiple places:

<img width="962" alt="Screenshot 2025-06-02 at 23 11 08"
src="https://github.com/user-attachments/assets/ecddf247-d690-434c-a865-9d5e6c690b7d"
/>

After, reduced spacing around history entries and inside commits list,
also fixed unequal horizontal spacing inside commit badge.

<img width="946" alt="Screenshot 2025-06-02 at 23 10 45"
src="https://github.com/user-attachments/assets/fe92f8e6-28af-4647-ac3a-1aced23d3b27"
/>

Also, here's a rendering of issue history events, it's more compact now
at 8px padding:

<img width="565" alt="image"
src="https://github.com/user-attachments/assets/cdbf7c0a-a9a2-4942-85fc-c388abb36e15"
/>

Co-authored-by: silverwind <me@silverwind.io>
2025-06-04 00:04:07 +00:00
Giteabot
c5da032193
fixed incorrect page navigation with up and down arrow on last item of dashboard repos (#34570) (#34596)
Backport #34570 by metiftikci

Co-authored-by: metiftikci <metiftikci@hotmail.com>
2025-06-04 07:13:39 +08:00
2 changed files with 15 additions and 12 deletions

View File

@ -523,7 +523,7 @@ td .commit-summary {
.repository.view.issue .comment-list .timeline-item,
.repository.view.issue .comment-list .timeline-item-group {
padding: 16px 0;
padding: 8px 0;
}
.repository.view.issue .comment-list .timeline-item-group .timeline-item {
@ -577,6 +577,11 @@ td .commit-summary {
justify-content: center;
}
.repository.view.issue .comment-list .timeline-item.commits-list .badge {
margin-right: 0;
height: 28px;
}
.repository.view.issue .comment-list .timeline-item .badge .svg {
width: 22px;
height: 22px;
@ -601,10 +606,6 @@ td .commit-summary {
padding-top: 0;
}
.repository.view.issue .comment-list .timeline-item.commits-list .ui.avatar {
margin-right: 0.25em;
}
.repository.view.issue .comment-list .timeline-item.event > .commit-status-link {
float: right;
margin-right: 8px;

View File

@ -218,7 +218,9 @@ export default defineComponent({
this.searchRepos();
},
changePage(page: number) {
async changePage(page: number) {
if (this.isLoading) return;
this.page = page;
if (this.page > this.finalPage) {
this.page = this.finalPage;
@ -228,7 +230,7 @@ export default defineComponent({
}
this.repos = [];
this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`] = 0;
this.searchRepos();
await this.searchRepos();
},
async searchRepos() {
@ -298,7 +300,7 @@ export default defineComponent({
return commitStatus[status].color;
},
reposFilterKeyControl(e: KeyboardEvent) {
async reposFilterKeyControl(e: KeyboardEvent) {
switch (e.key) {
case 'Enter':
document.querySelector<HTMLAnchorElement>('.repo-owner-name-list li.active a')?.click();
@ -307,7 +309,7 @@ export default defineComponent({
if (this.activeIndex > 0) {
this.activeIndex--;
} else if (this.page > 1) {
this.changePage(this.page - 1);
await this.changePage(this.page - 1);
this.activeIndex = this.searchLimit - 1;
}
break;
@ -316,17 +318,17 @@ export default defineComponent({
this.activeIndex++;
} else if (this.page < this.finalPage) {
this.activeIndex = 0;
this.changePage(this.page + 1);
await this.changePage(this.page + 1);
}
break;
case 'ArrowRight':
if (this.page < this.finalPage) {
this.changePage(this.page + 1);
await this.changePage(this.page + 1);
}
break;
case 'ArrowLeft':
if (this.page > 1) {
this.changePage(this.page - 1);
await this.changePage(this.page - 1);
}
break;
}