@@ -23,8 +23,6 @@ import {sleep} from '../utils.js';
23
23
import ' chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm' ;
24
24
import $ from ' jquery' ;
25
25
26
- const {pageData } = window .config ;
27
-
28
26
const customEventListener = {
29
27
id: ' customEventListener' ,
30
28
afterEvent : (chart , args , opts ) => {
@@ -59,14 +57,17 @@ export default {
59
57
type: Object ,
60
58
required: true ,
61
59
},
60
+ repoLink: {
61
+ type: String ,
62
+ required: true ,
63
+ },
62
64
},
63
65
data : () => ({
64
66
isLoading: false ,
65
67
errorText: ' ' ,
66
68
totalStats: {},
67
69
sortedContributors: {},
68
- repoLink: pageData .repoLink || [],
69
- type: pageData .contributionType ,
70
+ type: ' commits' ,
70
71
contributorsStats: [],
71
72
xAxisStart: null ,
72
73
xAxisEnd: null ,
@@ -333,19 +334,17 @@ export default {
333
334
<!-- Contribution type -->
334
335
<div class =" ui dropdown jump" id =" repo-contributors" >
335
336
<div class =" ui basic compact button" >
336
- <span class =" text" >
337
- <span class =" not-mobile" >{{ locale.filterLabel }}  ; </span ><strong >{{ locale.contributionType[type] }}</strong >
338
- <svg-icon name =" octicon-triangle-down" :size =" 14" />
339
- </span >
337
+ <span class =" not-mobile" >{{ locale.filterLabel }}</span > <strong >{{ locale.contributionType[type] }}</strong >
338
+ <svg-icon name =" octicon-triangle-down" :size =" 14" />
340
339
</div >
341
340
<div class =" menu" >
342
- <div :class =" ['item', {'active ': type === 'commits'}]" >
341
+ <div :class =" ['item', {'selected ': type === 'commits'}]" data-value = " commits " >
343
342
{{ locale.contributionType.commits }}
344
343
</div >
345
- <div :class =" ['item', {'active ': type === 'additions'}]" >
344
+ <div :class =" ['item', {'selected ': type === 'additions'}]" data-value = " additions " >
346
345
{{ locale.contributionType.additions }}
347
346
</div >
348
- <div :class =" ['item', {'active ': type === 'deletions'}]" >
347
+ <div :class =" ['item', {'selected ': type === 'deletions'}]" data-value = " deletions " >
349
348
{{ locale.contributionType.deletions }}
350
349
</div >
351
350
</div >
0 commit comments