fix(ui): show commit icon in branch dropdown button when viewing a commit (#7571)
Closes https://codeberg.org/forgejo/forgejo/issues/7570 Fixed never running repo-home e2e test for language switcher Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7571 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Co-authored-by: Beowulf <beowulf@beocode.eu> Co-committed-by: Beowulf <beowulf@beocode.eu>
This commit is contained in:
parent
6d7b1f87e4
commit
3f673ce4d4
5 changed files with 50 additions and 25 deletions
|
@ -54,12 +54,12 @@ const sfc = {
|
|||
if (this.viewType === 'tree') {
|
||||
this.isViewTree = true;
|
||||
this.refNameText = this.commitIdShort;
|
||||
} else if (this.viewType === 'tag') {
|
||||
} else if (this.viewType === 'branch') {
|
||||
this.isViewBranch = true;
|
||||
this.refNameText = this.viewType;
|
||||
} else {
|
||||
this.isViewTag = true;
|
||||
this.refNameText = this.tagName;
|
||||
} else {
|
||||
this.isViewBranch = true;
|
||||
this.refNameText = this.branchName;
|
||||
}
|
||||
|
||||
document.body.addEventListener('click', (event) => {
|
||||
|
@ -252,7 +252,8 @@ export default sfc; // activate IDE's Vue plugin
|
|||
<template v-if="release">{{ textReleaseCompare }}</template>
|
||||
<template v-else>
|
||||
<svg-icon v-if="isViewTag" name="octicon-tag"/>
|
||||
<svg-icon v-else name="octicon-git-branch"/>
|
||||
<svg-icon v-else-if="isViewBranch" name="octicon-git-branch"/>
|
||||
<svg-icon v-else name="octicon-git-commit"/>
|
||||
<strong ref="dropdownRefName" class="tw-ml-2 tw-inline-block gt-ellipsis">{{ refNameText }}</strong>
|
||||
</template>
|
||||
</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue