diff --git a/src/pages/Explore/Trending/Trending.vue b/src/pages/Explore/Trending/Trending.vue index 28ff754..7076304 100644 --- a/src/pages/Explore/Trending/Trending.vue +++ b/src/pages/Explore/Trending/Trending.vue @@ -344,6 +344,9 @@ } let data = [] + Object.entries(dataHolder).forEach(key=>{ + + }) for(let key in dataHolder) { data.push(dataHolder[key]) } diff --git a/src/pages/Repository/Commits/components/CommitItem.vue b/src/pages/Repository/Commits/components/CommitItem.vue index 49c7781..2251adb 100644 --- a/src/pages/Repository/Commits/components/CommitItem.vue +++ b/src/pages/Repository/Commits/components/CommitItem.vue @@ -43,8 +43,8 @@ import {AnimatedHeightWrapper,ImgWrapper} from '@/components' import {CommitStatusIcon} from '../../components' import {CommitAuthorAvatar} from '@/pages/Repository/components' - import {mapState,mapActions} from 'vuex' - import * as actionTypes from '@/store/modules/graphqlListData/actionTypes' + import {mapActions} from 'vuex' + import * as actionTypes from '@/store/modules/graphqlData/actionTypes' export default { props: { commit: { @@ -53,11 +53,6 @@ } }, computed: { - ...mapState({ - commitGraphqlData(state){ - return state.graphqlListData.commits.filter(i => i.id == this.commit.node_id)[0] - } - }), committedNotByAuthor() { if(!this.commit.author) return if(!this.commit.committer) return @@ -68,11 +63,35 @@ } }, created() { - if(!this.commitGraphqlData) this.action_getCommitGraphqlData({id:this.commit.node_id}) + if(!this.commitGraphqlData) this.action_getCommitGraphqlData({ + id: this.commit.node_id, + graphql: ` + query($ids:[ID!]!){ + nodes(ids: $ids) { + ... on Commit { + id + authors (first: 4) { + nodes { + name + user { + avatarUrl + login + name + } + } + } + status { + state + } + } + } + } + ` + }) }, methods: { ...mapActions({ - action_getCommitGraphqlData: actionTypes.GET_COMMITS + action_getCommitGraphqlData: actionTypes.GET_NODES }) }, components: { diff --git a/src/pages/Repository/Commits/components/graphql.js b/src/pages/Repository/Commits/components/graphql.js new file mode 100644 index 0000000..203c43f --- /dev/null +++ b/src/pages/Repository/Commits/components/graphql.js @@ -0,0 +1,22 @@ +export const NODES_COMMIT = ` +query($ids:[ID!]!,$withAuthors:Boolean!,$withState:Boolean!){ + nodes(ids: $ids) { + ... on Commit { + id + authors (first: 4) @include(if: $withAuthors) { + nodes { + name + user { + avatarUrl + login + name + } + } + } + status @include(if: $withState) { + state + } + } + } + } +` \ No newline at end of file diff --git a/src/pages/Repository/Issues/IssueDetail/components/Reactions.vue b/src/pages/Repository/Issues/IssueDetail/components/Reactions.vue index 47cd944..cfcac9d 100644 --- a/src/pages/Repository/Issues/IssueDetail/components/Reactions.vue +++ b/src/pages/Repository/Issues/IssueDetail/components/Reactions.vue @@ -1,14 +1,14 @@