You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

recent-commits.js 791B

123456789101112131415161718192021
  1. import {createApp} from 'vue';
  2. export async function initRepoRecentCommits() {
  3. const el = document.getElementById('repo-recent-commits-chart');
  4. if (!el) return;
  5. const {default: RepoRecentCommits} = await import(/* webpackChunkName: "recent-commits-graph" */'../components/RepoRecentCommits.vue');
  6. try {
  7. const View = createApp(RepoRecentCommits, {
  8. locale: {
  9. loadingTitle: el.getAttribute('data-locale-loading-title'),
  10. loadingTitleFailed: el.getAttribute('data-locale-loading-title-failed'),
  11. loadingInfo: el.getAttribute('data-locale-loading-info'),
  12. },
  13. });
  14. View.mount(el);
  15. } catch (err) {
  16. console.error('RepoRecentCommits failed to load', err);
  17. el.textContent = el.getAttribute('data-locale-component-failed-to-load');
  18. }
  19. }