-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add miner and include filters to win page
- Loading branch information
Showing
14 changed files
with
117 additions
and
74 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<script setup lang="ts"> | ||
import { useQuery } from '@vue/apollo-composable' | ||
import { computed, ComputedRef } from 'vue' | ||
import { Actor } from '@/typed-graph' | ||
import { GetActorAddresses } from '@/gql/actor' | ||
const emit = defineEmits(['update:modelValue']) | ||
const props = defineProps({ | ||
modelValue: { | ||
type: String, | ||
default: undefined, | ||
}, | ||
label: { | ||
type: String, | ||
default: 'Miner', | ||
}, | ||
}) | ||
const { result, loading } = useQuery(GetActorAddresses, null, () => ({ | ||
fetchPolicy: 'cache-first', | ||
})) | ||
const miners: ComputedRef<[Actor]> = computed(() => result.value?.actors || []) | ||
const localValue = computed({ | ||
get () { | ||
return props.modelValue | ||
}, | ||
set (value) { | ||
emit('update:modelValue', value) | ||
}, | ||
}) | ||
</script> | ||
|
||
<template> | ||
<v-autocomplete | ||
v-model="localValue" | ||
clearable | ||
color="primary" | ||
density="compact" | ||
:disabled="loading" | ||
item-title="address" | ||
:items="miners" | ||
:label="props.label" | ||
role="link" | ||
single-line | ||
variant="outlined" | ||
/> | ||
</template> | ||
|
||
<style scoped lang="scss"> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import gql from 'graphql-tag' | ||
|
||
export const GetActorAddresses = gql` | ||
query GetActorAddresses { | ||
actors { | ||
id | ||
address | ||
} | ||
} | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.