mirror of
https://github.com/web3privacy/explorer-app.git
synced 2024-10-15 16:46:26 +02:00
fix(codecheck): fix typecheck and lint errors
This commit is contained in:
parent
22d11fa9fa
commit
83facaf232
12 changed files with 71 additions and 27 deletions
|
@ -65,7 +65,10 @@ function onOptionSelected(value: string) {
|
||||||
:class="[selected ? 'font-semibold' : 'font-normal']"
|
:class="[selected ? 'font-semibold' : 'font-normal']"
|
||||||
>
|
>
|
||||||
{{ option.label }}
|
{{ option.label }}
|
||||||
<span v-if="titleShowCount" opacity-50>({{ option.count }})</span>
|
<span
|
||||||
|
v-if="titleShowCount"
|
||||||
|
opacity-50
|
||||||
|
>({{ option.count }})</span>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
</HeadlessListboxOption>
|
</HeadlessListboxOption>
|
||||||
|
|
|
@ -220,7 +220,12 @@ const logo = props.project?.logos?.at(0)?.url
|
||||||
lg:flex-row
|
lg:flex-row
|
||||||
items-center
|
items-center
|
||||||
>
|
>
|
||||||
<p text="12px lg:16px" leading="16px lg:24px">Openess:</p>
|
<p
|
||||||
|
text="12px lg:16px"
|
||||||
|
leading="16px lg:24px"
|
||||||
|
>
|
||||||
|
Openess:
|
||||||
|
</p>
|
||||||
<ProjectRating
|
<ProjectRating
|
||||||
:rating="project.ratings.openess"
|
:rating="project.ratings.openess"
|
||||||
type="openess"
|
type="openess"
|
||||||
|
@ -234,7 +239,12 @@ const logo = props.project?.logos?.at(0)?.url
|
||||||
lg:flex-row
|
lg:flex-row
|
||||||
items-center
|
items-center
|
||||||
>
|
>
|
||||||
<p text="12px lg:16px" leading="16px lg:24px">Technology:</p>
|
<p
|
||||||
|
text="12px lg:16px"
|
||||||
|
leading="16px lg:24px"
|
||||||
|
>
|
||||||
|
Technology:
|
||||||
|
</p>
|
||||||
<ProjectRating
|
<ProjectRating
|
||||||
:rating="project.ratings.technology"
|
:rating="project.ratings.technology"
|
||||||
type="technology"
|
type="technology"
|
||||||
|
@ -248,7 +258,12 @@ const logo = props.project?.logos?.at(0)?.url
|
||||||
lg:flex-row
|
lg:flex-row
|
||||||
items-center
|
items-center
|
||||||
>
|
>
|
||||||
<p text="12px lg:16px" leading="16px lg:24px">Privacy:</p>
|
<p
|
||||||
|
text="12px lg:16px"
|
||||||
|
leading="16px lg:24px"
|
||||||
|
>
|
||||||
|
Privacy:
|
||||||
|
</p>
|
||||||
<ProjectRating
|
<ProjectRating
|
||||||
:rating="project.ratings.privacy"
|
:rating="project.ratings.privacy"
|
||||||
type="privacy"
|
type="privacy"
|
||||||
|
@ -263,7 +278,8 @@ const logo = props.project?.logos?.at(0)?.url
|
||||||
justify-end
|
justify-end
|
||||||
w-full
|
w-full
|
||||||
gap-16px
|
gap-16px
|
||||||
mt--8px lg:mt-0
|
mt--8px
|
||||||
|
lg:mt-0
|
||||||
>
|
>
|
||||||
<h2
|
<h2
|
||||||
hidden
|
hidden
|
||||||
|
|
|
@ -29,7 +29,7 @@ defineProps<{
|
||||||
:check-undefined="project.history?.time"
|
:check-undefined="project.history?.time"
|
||||||
title="Date of creation"
|
title="Date of creation"
|
||||||
>
|
>
|
||||||
{{ formatDate(project.history?.time) }}
|
{{ formatDate(project.history!.time!) }}
|
||||||
</ProjectInfoItem>
|
</ProjectInfoItem>
|
||||||
</div>
|
</div>
|
||||||
</ProjectDetailContainer>
|
</ProjectDetailContainer>
|
||||||
|
|
|
@ -301,8 +301,8 @@ defineProps<{
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ProjectOpenessTeamMembers
|
<ProjectOpenessTeamMembers
|
||||||
v-if="projcet?.team"
|
v-if="project?.team"
|
||||||
:members="project.team.teammembers"
|
:members="project.team"
|
||||||
mt-24px
|
mt-24px
|
||||||
/>
|
/>
|
||||||
<div mt-32px>
|
<div mt-32px>
|
||||||
|
@ -313,7 +313,8 @@ defineProps<{
|
||||||
Funding
|
Funding
|
||||||
</h3>
|
</h3>
|
||||||
<div
|
<div
|
||||||
v-if="project.funding"
|
v-for="funding of project.funding"
|
||||||
|
:key="funding.name"
|
||||||
flex
|
flex
|
||||||
items-center
|
items-center
|
||||||
justify-between
|
justify-between
|
||||||
|
@ -329,10 +330,10 @@ defineProps<{
|
||||||
leading="20px lg:24px"
|
leading="20px lg:24px"
|
||||||
font-700
|
font-700
|
||||||
>
|
>
|
||||||
{{ project.funding.name }}
|
{{ funding.name }}
|
||||||
</h3>
|
</h3>
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
:to="project.funding.link"
|
:to="funding.link"
|
||||||
external
|
external
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
|
@ -343,7 +344,7 @@ defineProps<{
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
</div>
|
</div>
|
||||||
<h3
|
<h3
|
||||||
v-else
|
v-if="!project.funding?.length"
|
||||||
text="app-text-grey 14px lg:16px"
|
text="app-text-grey 14px lg:16px"
|
||||||
leading-24px
|
leading-24px
|
||||||
>
|
>
|
||||||
|
|
|
@ -43,8 +43,20 @@ const props = defineProps<{
|
||||||
:alt="member.name"
|
:alt="member.name"
|
||||||
/>
|
/>
|
||||||
</template> -->
|
</template> -->
|
||||||
<div flex items-center justify-center text-black w="40px lg:48px" h="40px lg:48px" rounded-full bg-app-bg-team-grey>
|
<div
|
||||||
<div i-heroicons-solid-user text-24px></div>
|
flex
|
||||||
|
items-center
|
||||||
|
justify-center
|
||||||
|
text-black
|
||||||
|
w="40px lg:48px"
|
||||||
|
h="40px lg:48px"
|
||||||
|
rounded-full
|
||||||
|
bg-app-bg-team-grey
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
i-heroicons-solid-user
|
||||||
|
text-24px
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
flex
|
flex
|
||||||
|
|
|
@ -25,7 +25,11 @@ defineProps<{
|
||||||
>
|
>
|
||||||
Audits
|
Audits
|
||||||
</h2>
|
</h2>
|
||||||
<div flex flex-col gap="12px lg:16px">
|
<div
|
||||||
|
flex
|
||||||
|
flex-col
|
||||||
|
gap="12px lg:16px"
|
||||||
|
>
|
||||||
<template
|
<template
|
||||||
v-for="audit in project.audits"
|
v-for="audit in project.audits"
|
||||||
:key="audit.name"
|
:key="audit.name"
|
||||||
|
|
|
@ -13,11 +13,13 @@ defineProps<{
|
||||||
lg:grid
|
lg:grid
|
||||||
lg:grid-cols-2
|
lg:grid-cols-2
|
||||||
rounded-full
|
rounded-full
|
||||||
py-12px px-16px
|
py-12px
|
||||||
|
px-16px
|
||||||
bg-app-bg-audits-card
|
bg-app-bg-audits-card
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
grid grid-cols-3
|
grid
|
||||||
|
grid-cols-3
|
||||||
w-full
|
w-full
|
||||||
>
|
>
|
||||||
<h2
|
<h2
|
||||||
|
@ -48,7 +50,7 @@ defineProps<{
|
||||||
text-14px
|
text-14px
|
||||||
leading-20px
|
leading-20px
|
||||||
>
|
>
|
||||||
{{ formatDate(date) }}
|
{{ date ? formatDate(date) : 'N/A' }}
|
||||||
</h2>
|
</h2>
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
flex
|
flex
|
||||||
|
|
|
@ -54,7 +54,7 @@ defineProps<{
|
||||||
title="Technology type"
|
title="Technology type"
|
||||||
bold
|
bold
|
||||||
>
|
>
|
||||||
{{ project.technology.type.toUpperCase() }}
|
{{ project.technology?.type.toUpperCase() }}
|
||||||
</ProjectInfoItem>
|
</ProjectInfoItem>
|
||||||
<ProjectInfoItem
|
<ProjectInfoItem
|
||||||
:check-undefined="project.blockchain_features?.p2p"
|
:check-undefined="project.blockchain_features?.p2p"
|
||||||
|
|
|
@ -8,11 +8,11 @@ const selectedEcosystemId = ref('all')
|
||||||
const selectedAssetsUsedId = ref('all')
|
const selectedAssetsUsedId = ref('all')
|
||||||
const selectedFeaturesId = ref('all')
|
const selectedFeaturesId = ref('all')
|
||||||
|
|
||||||
const categoryOptions = ref<InputOption>(categories.value ? [{ label: 'Category', value: 'all' }, ...categories.value.map(c => ({ label: c.name, value: c.id, count: c.projectsCount }))] : [])
|
const categoryOptions = ref<InputOption[]>(categories.value ? [{ label: 'Category', value: 'all' }, ...categories.value.map(c => ({ label: c.name, value: c.id, count: c.projectsCount }))] : [])
|
||||||
const usecaseOptions = ref<InputOption>(usecases.value ? [{ label: 'Usecase', value: 'all' }, ...usecases.value.map(u => ({ label: u.name, value: u.id }))] : [])
|
const usecaseOptions = ref<InputOption[]>(usecases.value ? [{ label: 'Usecase', value: 'all' }, ...usecases.value.map(u => ({ label: u.name, value: u.id }))] : [])
|
||||||
const ecosystemOptions = ref<InputOption>(ecosystems.value ? [{ label: 'Ecosystem', value: 'all' }, ...ecosystems.value.map(e => ({ label: e.name, value: e.id }))] : [])
|
const ecosystemOptions = ref<InputOption[]>(ecosystems.value ? [{ label: 'Ecosystem', value: 'all' }, ...ecosystems.value.map(e => ({ label: e.name, value: e.id }))] : [])
|
||||||
const assetOptions = ref<InputOption>(assets.value ? [{ label: 'Asset used', value: 'all' }, ...assets.value.map(a => ({ label: a.name, value: a.id }))] : [])
|
const assetOptions = ref<InputOption[]>(assets.value ? [{ label: 'Asset used', value: 'all' }, ...assets.value.map(a => ({ label: a.name, value: a.id }))] : [])
|
||||||
const featureOptions = ref<InputOption>(features.value ? [{ label: 'Feature', value: 'all' }, ...features.value.map(f => ({ label: f.name, value: f.id }))] : [])
|
const featureOptions = ref<InputOption[]>(features.value ? [{ label: 'Feature', value: 'all' }, ...features.value.map(f => ({ label: f.name, value: f.id }))] : [])
|
||||||
// const selectedCategory = computed(() => {
|
// const selectedCategory = computed(() => {
|
||||||
// return categories.value.find(c => c.id === selectedCategoryId.value)
|
// return categories.value.find(c => c.id === selectedCategoryId.value)
|
||||||
// })
|
// })
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
const dataStore = useData()
|
const dataStore = useData()
|
||||||
const { selectedCategoryId, filteredProjects } = storeToRefs(dataStore)
|
const { selectedCategoryId, categories, filteredProjects } = storeToRefs(dataStore)
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
|
@ -8,8 +8,10 @@ onMounted(() => {
|
||||||
if (route.params.id)
|
if (route.params.id)
|
||||||
selectedCategoryId.value = route.params.id as string
|
selectedCategoryId.value = route.params.id as string
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const group = [{ title: categories.value.find(c => c.id === selectedCategoryId.value)!.name, projects: filteredProjects.value }]
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ProjectGrid :projects="filteredProjects" />
|
<ProjectGrid :projects="group" />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -32,7 +32,10 @@ useSeoMeta({
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-if="project">
|
<div v-if="project">
|
||||||
<div app-container px-16px>
|
<div
|
||||||
|
app-container
|
||||||
|
px-16px
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
flex
|
flex
|
||||||
flex-col
|
flex-col
|
||||||
|
|
|
@ -35,6 +35,7 @@ export interface Project {
|
||||||
telegram?: string
|
telegram?: string
|
||||||
discord?: string
|
discord?: string
|
||||||
blog?: string
|
blog?: string
|
||||||
|
governance?: string
|
||||||
facebook?: string
|
facebook?: string
|
||||||
block_explorer?: string
|
block_explorer?: string
|
||||||
whitepaper?: string
|
whitepaper?: string
|
||||||
|
|
Loading…
Reference in a new issue