mirror of
https://github.com/go-gitea/gitea
synced 2025-07-07 02:57:20 +00:00
Refactor frontend unique id & comment (#34958)
* there is no bug of the "unique element id", but duplicate code, this PR just merges the duplicate "element id" logic and move the function from "fomaintic" to "dom" * improve comments * make "git commit graph" page update pagination links correctly
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
import {defineComponent} from 'vue';
|
||||
import {SvgIcon} from '../svg.ts';
|
||||
import {GET} from '../modules/fetch.ts';
|
||||
import {generateAriaId} from '../modules/fomantic/base.ts';
|
||||
import {generateElemId} from '../utils/dom.ts';
|
||||
|
||||
type Commit = {
|
||||
id: string,
|
||||
@ -35,8 +35,8 @@ export default defineComponent({
|
||||
commits: [] as Array<Commit>,
|
||||
hoverActivated: false,
|
||||
lastReviewCommitSha: '',
|
||||
uniqueIdMenu: generateAriaId(),
|
||||
uniqueIdShowAll: generateAriaId(),
|
||||
uniqueIdMenu: generateElemId('diff-commit-selector-menu-'),
|
||||
uniqueIdShowAll: generateElemId('diff-commit-selector-show-all-'),
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
Reference in New Issue
Block a user