Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

Commit

Permalink
open automatically if exact search match
Browse files Browse the repository at this point in the history
  • Loading branch information
montyanderson committed Nov 20, 2019
1 parent 0cd9567 commit 7ea8170
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions www/assets/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,23 @@ const app = new Vue({
this.page = i;
this.totalPages = totalPages;
this.totalUsers = total;
},
async loadRepos(user) {
return location.replace(`${location.origin}/?q=${user.username}`);

if(typeof this.repos[user.username] !== 'undefined') {
this.repos = {};
return;
}
for(const user of this.users) {
if(this.q === user.username) {
if(typeof this.repos[user.username] !== 'undefined') {
this.repos = {};
return;
}

const {data} = await axios.get(`/user/${user.username}/repos`);
const {data} = await axios.get(`/user/${user.username}/repos`);

this.repos = {};
this.repos[user.username] = data;
this.repos = {};
this.repos[user.username] = data;
}
}
},
async loadRepos(user) {
return location.replace(`${location.origin}/?q=${user.username}`);
},
async loadStats() {
const {data} = await axios.get('/stats');
Expand Down

0 comments on commit 7ea8170

Please sign in to comment.