Skip to content

Commit f983cae

Browse files
committed
new deployment
1 parent bec2537 commit f983cae

File tree

5 files changed

+1989
-120
lines changed

5 files changed

+1989
-120
lines changed

compiled/coder.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compiled/coder.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,20 @@ document.getElementsByClassName('brand')[0].textContent = short_title;
2020

2121
let url_user = `https://api.github.com/users/${github_user}`,
2222
url_repos = `${url_user}/repos?sort=pushed&per_page=100`,
23+
url_issues = `https://api.github.com/search/issues?q=user:${github_user}&sort=updated&order=desc`,
2324
months_short = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
2425

2526
if (DEV) {
2627
url_user = '/data/user.json';
2728
url_repos = '/data/repos.json';
29+
url_issues = '/data/issues.json';
2830
}
2931

3032
let coder = new Vue({
3133
el: '#coder',
3234
data: {
35+
activetab: 'repos',
36+
latest_issues: null,
3337
repos: [],
3438
response: {},
3539
sort_orders: {},
@@ -122,6 +126,12 @@ let coder = new Vue({
122126
series: this.repo_types.values });
123127
},
124128
methods: {
129+
fetchIssues: function () {
130+
this.$http.get(url_issues).then(response => {
131+
this.response.issues = response;
132+
this.latest_issues = response.body.items;
133+
});
134+
},
125135
fetchRepos: function () {
126136
this.$http.get(url_repos).then(response => {
127137
this.response.repos = response;
@@ -150,11 +160,17 @@ let coder = new Vue({
150160
repoRanking: function (property) {
151161
return this.repos_pushed.filter(d => d[property]).sort((a, b) => b[property] - a[property]);
152162
},
153-
sortBy: function (key, type = 'number') {
163+
showTab: function (name) {
164+
this.activetab = name;
165+
if (!this.latest_issues) {
166+
this.fetchIssues();
167+
}
168+
},
169+
sortBy: function (key, type = 'number', property = 'repos') {
154170
let default_value = type === 'string' ? '' : 0;
155171
this.sort_key = key;
156172
this.sort_orders[key] = (this.sort_orders[key] || 1) * -1;
157-
this.repos.sort((a, b) => {
173+
this[property].sort((a, b) => {
158174
let x = a[key] || default_value,
159175
y = b[key] || default_value;
160176
if (type === 'string') {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy