mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-23 22:28:37 +08:00
21331be30c
Continuation of https://github.com/go-gitea/gitea/pull/25439. Fixes #847 Before: <img width="1296" alt="image" src="https://github.com/go-gitea/gitea/assets/32161460/24571ac8-b254-43c9-b178-97340f0dc8a9"> ---- After: <img width="1296" alt="image" src="https://github.com/go-gitea/gitea/assets/32161460/c60b2459-9d10-4d42-8d83-d5ef0f45bf94"> --- #### Overview This is the implementation of a requested feature: Contributors graph (#847) It makes Activity page a multi-tab page and adds a new tab called Contributors. Contributors tab shows the contribution graphs over time since the repository existed. It also shows per user contribution graphs for top 100 contributors. Top 100 is calculated based on the selected contribution type (commits, additions or deletions). --- #### Demo (The demo is a bit old but still a good example to show off the main features) <video src="https://github.com/go-gitea/gitea/assets/32161460/9f68103f-8145-4cc2-94bc-5546daae7014" controls width="320" height="240"> <a href="https://github.com/go-gitea/gitea/assets/32161460/9f68103f-8145-4cc2-94bc-5546daae7014">Download</a> </video> #### Features: - Select contribution type (commits, additions or deletions) - See overall and per user contribution graphs for the selected contribution type - Zoom and pan on graphs to see them in detail - See top 100 contributors based on the selected contribution type and selected time range - Go directly to users' profile by clicking their name if they are registered gitea users - Cache the results so that when the same repository is visited again fetching data will be faster --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: hiifong <i@hiif.ong> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: yp05327 <576951401@qq.com>
190 lines
6.7 KiB
JavaScript
190 lines
6.7 KiB
JavaScript
// bootstrap module must be the first one to be imported, it handles webpack lazy-loading and global errors
|
|
import './bootstrap.js';
|
|
|
|
import {initRepoActivityTopAuthorsChart} from './components/RepoActivityTopAuthors.vue';
|
|
import {initScopedAccessTokenCategories} from './components/ScopedAccessTokenSelector.vue';
|
|
import {initDashboardRepoList} from './components/DashboardRepoList.vue';
|
|
|
|
import {initGlobalCopyToClipboardListener} from './features/clipboard.js';
|
|
import {initContextPopups} from './features/contextpopup.js';
|
|
import {initRepoGraphGit} from './features/repo-graph.js';
|
|
import {initHeatmap} from './features/heatmap.js';
|
|
import {initImageDiff} from './features/imagediff.js';
|
|
import {initRepoMigration} from './features/repo-migration.js';
|
|
import {initRepoProject} from './features/repo-projects.js';
|
|
import {initTableSort} from './features/tablesort.js';
|
|
import {initAdminUserListSearchForm} from './features/admin/users.js';
|
|
import {initAdminConfigs} from './features/admin/config.js';
|
|
import {initMarkupAnchors} from './markup/anchors.js';
|
|
import {initNotificationCount, initNotificationsTable} from './features/notification.js';
|
|
import {initRepoIssueContentHistory} from './features/repo-issue-content.js';
|
|
import {initStopwatch} from './features/stopwatch.js';
|
|
import {initFindFileInRepo} from './features/repo-findfile.js';
|
|
import {initCommentContent, initMarkupContent} from './markup/content.js';
|
|
import {initPdfViewer} from './render/pdf.js';
|
|
|
|
import {initUserAuthLinkAccountView, initUserAuthOauth2} from './features/user-auth.js';
|
|
import {
|
|
initRepoIssueDue,
|
|
initRepoIssueReferenceRepositorySearch,
|
|
initRepoIssueTimeTracking,
|
|
initRepoIssueWipTitle,
|
|
initRepoPullRequestMergeInstruction,
|
|
initRepoPullRequestAllowMaintainerEdit,
|
|
initRepoPullRequestReview, initRepoIssueSidebarList, initArchivedLabelHandler,
|
|
} from './features/repo-issue.js';
|
|
import {
|
|
initRepoEllipsisButton,
|
|
initRepoCommitLastCommitLoader,
|
|
initCommitStatuses,
|
|
} from './features/repo-commit.js';
|
|
import {
|
|
initFootLanguageMenu,
|
|
initGlobalButtonClickOnEnter,
|
|
initGlobalButtons,
|
|
initGlobalCommon,
|
|
initGlobalDropzone,
|
|
initGlobalEnterQuickSubmit,
|
|
initGlobalFormDirtyLeaveConfirm,
|
|
initGlobalLinkActions,
|
|
initHeadNavbarContentToggle,
|
|
} from './features/common-global.js';
|
|
import {initRepoTopicBar} from './features/repo-home.js';
|
|
import {initAdminEmails} from './features/admin/emails.js';
|
|
import {initAdminCommon} from './features/admin/common.js';
|
|
import {initRepoTemplateSearch} from './features/repo-template.js';
|
|
import {initRepoCodeView} from './features/repo-code.js';
|
|
import {initSshKeyFormParser} from './features/sshkey-helper.js';
|
|
import {initUserSettings} from './features/user-settings.js';
|
|
import {initRepoArchiveLinks} from './features/repo-common.js';
|
|
import {initRepoMigrationStatusChecker} from './features/repo-migrate.js';
|
|
import {
|
|
initRepoSettingGitHook,
|
|
initRepoSettingsCollaboration,
|
|
initRepoSettingSearchTeamBox,
|
|
} from './features/repo-settings.js';
|
|
import {initRepoDiffView} from './features/repo-diff.js';
|
|
import {initOrgTeamSearchRepoBox, initOrgTeamSettings} from './features/org-team.js';
|
|
import {initUserAuthWebAuthn, initUserAuthWebAuthnRegister} from './features/user-auth-webauthn.js';
|
|
import {initRepoRelease, initRepoReleaseNew} from './features/repo-release.js';
|
|
import {initRepoEditor} from './features/repo-editor.js';
|
|
import {initCompSearchUserBox} from './features/comp/SearchUserBox.js';
|
|
import {initInstall} from './features/install.js';
|
|
import {initCompWebHookEditor} from './features/comp/WebHookEditor.js';
|
|
import {initRepoBranchButton} from './features/repo-branch.js';
|
|
import {initCommonOrganization} from './features/common-organization.js';
|
|
import {initRepoWikiForm} from './features/repo-wiki.js';
|
|
import {initRepoCommentForm, initRepository} from './features/repo-legacy.js';
|
|
import {initCopyContent} from './features/copycontent.js';
|
|
import {initCaptcha} from './features/captcha.js';
|
|
import {initRepositoryActionView} from './components/RepoActionView.vue';
|
|
import {initGlobalTooltips} from './modules/tippy.js';
|
|
import {initGiteaFomantic} from './modules/fomantic.js';
|
|
import {onDomReady} from './utils/dom.js';
|
|
import {initRepoIssueList} from './features/repo-issue-list.js';
|
|
import {initCommonIssueListQuickGoto} from './features/common-issue-list.js';
|
|
import {initRepoContributors} from './features/contributors.js';
|
|
import {initRepoDiffCommitBranchesAndTags} from './features/repo-diff-commit.js';
|
|
import {initDirAuto} from './modules/dirauto.js';
|
|
|
|
// Init Gitea's Fomantic settings
|
|
initGiteaFomantic();
|
|
initDirAuto();
|
|
|
|
onDomReady(() => {
|
|
initGlobalCommon();
|
|
|
|
initGlobalTooltips();
|
|
initGlobalButtonClickOnEnter();
|
|
initGlobalButtons();
|
|
initGlobalCopyToClipboardListener();
|
|
initGlobalDropzone();
|
|
initGlobalEnterQuickSubmit();
|
|
initGlobalFormDirtyLeaveConfirm();
|
|
initGlobalLinkActions();
|
|
|
|
initCommonOrganization();
|
|
initCommonIssueListQuickGoto();
|
|
|
|
initCompSearchUserBox();
|
|
initCompWebHookEditor();
|
|
|
|
initInstall();
|
|
|
|
initHeadNavbarContentToggle();
|
|
initFootLanguageMenu();
|
|
|
|
initCommentContent();
|
|
initContextPopups();
|
|
initHeatmap();
|
|
initImageDiff();
|
|
initMarkupAnchors();
|
|
initMarkupContent();
|
|
initSshKeyFormParser();
|
|
initStopwatch();
|
|
initTableSort();
|
|
initFindFileInRepo();
|
|
initCopyContent();
|
|
|
|
initAdminCommon();
|
|
initAdminEmails();
|
|
initAdminUserListSearchForm();
|
|
initAdminConfigs();
|
|
|
|
initDashboardRepoList();
|
|
|
|
initNotificationCount();
|
|
initNotificationsTable();
|
|
|
|
initOrgTeamSearchRepoBox();
|
|
initOrgTeamSettings();
|
|
|
|
initRepoActivityTopAuthorsChart();
|
|
initRepoArchiveLinks();
|
|
initRepoBranchButton();
|
|
initRepoCodeView();
|
|
initRepoCommentForm();
|
|
initRepoEllipsisButton();
|
|
initRepoDiffCommitBranchesAndTags();
|
|
initRepoCommitLastCommitLoader();
|
|
initRepoEditor();
|
|
initRepoGraphGit();
|
|
initRepoIssueContentHistory();
|
|
initRepoIssueDue();
|
|
initRepoIssueList();
|
|
initRepoIssueSidebarList();
|
|
initArchivedLabelHandler();
|
|
initRepoIssueReferenceRepositorySearch();
|
|
initRepoIssueTimeTracking();
|
|
initRepoIssueWipTitle();
|
|
initRepoMigration();
|
|
initRepoMigrationStatusChecker();
|
|
initRepoProject();
|
|
initRepoPullRequestMergeInstruction();
|
|
initRepoPullRequestAllowMaintainerEdit();
|
|
initRepoPullRequestReview();
|
|
initRepoRelease();
|
|
initRepoReleaseNew();
|
|
initRepoSettingGitHook();
|
|
initRepoSettingSearchTeamBox();
|
|
initRepoSettingsCollaboration();
|
|
initRepoTemplateSearch();
|
|
initRepoTopicBar();
|
|
initRepoWikiForm();
|
|
initRepository();
|
|
initRepositoryActionView();
|
|
initRepoContributors();
|
|
|
|
initCommitStatuses();
|
|
initCaptcha();
|
|
|
|
initUserAuthLinkAccountView();
|
|
initUserAuthOauth2();
|
|
initUserAuthWebAuthn();
|
|
initUserAuthWebAuthnRegister();
|
|
initUserSettings();
|
|
initRepoDiffView();
|
|
initPdfViewer();
|
|
initScopedAccessTokenCategories();
|
|
});
|