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']"
|
||||
>
|
||||
{{ option.label }}
|
||||
<span v-if="titleShowCount" opacity-50>({{ option.count }})</span>
|
||||
<span
|
||||
v-if="titleShowCount"
|
||||
opacity-50
|
||||
>({{ option.count }})</span>
|
||||
</span>
|
||||
</li>
|
||||
</HeadlessListboxOption>
|
||||
|
|
|
@ -220,7 +220,12 @@ const logo = props.project?.logos?.at(0)?.url
|
|||
lg:flex-row
|
||||
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
|
||||
:rating="project.ratings.openess"
|
||||
type="openess"
|
||||
|
@ -234,7 +239,12 @@ const logo = props.project?.logos?.at(0)?.url
|
|||
lg:flex-row
|
||||
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
|
||||
:rating="project.ratings.technology"
|
||||
type="technology"
|
||||
|
@ -248,7 +258,12 @@ const logo = props.project?.logos?.at(0)?.url
|
|||
lg:flex-row
|
||||
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
|
||||
:rating="project.ratings.privacy"
|
||||
type="privacy"
|
||||
|
@ -263,7 +278,8 @@ const logo = props.project?.logos?.at(0)?.url
|
|||
justify-end
|
||||
w-full
|
||||
gap-16px
|
||||
mt--8px lg:mt-0
|
||||
mt--8px
|
||||
lg:mt-0
|
||||
>
|
||||
<h2
|
||||
hidden
|
||||
|
|
|
@ -29,7 +29,7 @@ defineProps<{
|
|||
:check-undefined="project.history?.time"
|
||||
title="Date of creation"
|
||||
>
|
||||
{{ formatDate(project.history?.time) }}
|
||||
{{ formatDate(project.history!.time!) }}
|
||||
</ProjectInfoItem>
|
||||
</div>
|
||||
</ProjectDetailContainer>
|
||||
|
|
|
@ -301,8 +301,8 @@ defineProps<{
|
|||
</div>
|
||||
</div>
|
||||
<ProjectOpenessTeamMembers
|
||||
v-if="projcet?.team"
|
||||
:members="project.team.teammembers"
|
||||
v-if="project?.team"
|
||||
:members="project.team"
|
||||
mt-24px
|
||||
/>
|
||||
<div mt-32px>
|
||||
|
@ -313,7 +313,8 @@ defineProps<{
|
|||
Funding
|
||||
</h3>
|
||||
<div
|
||||
v-if="project.funding"
|
||||
v-for="funding of project.funding"
|
||||
:key="funding.name"
|
||||
flex
|
||||
items-center
|
||||
justify-between
|
||||
|
@ -329,10 +330,10 @@ defineProps<{
|
|||
leading="20px lg:24px"
|
||||
font-700
|
||||
>
|
||||
{{ project.funding.name }}
|
||||
{{ funding.name }}
|
||||
</h3>
|
||||
<NuxtLink
|
||||
:to="project.funding.link"
|
||||
:to="funding.link"
|
||||
external
|
||||
target="_blank"
|
||||
>
|
||||
|
@ -343,7 +344,7 @@ defineProps<{
|
|||
</NuxtLink>
|
||||
</div>
|
||||
<h3
|
||||
v-else
|
||||
v-if="!project.funding?.length"
|
||||
text="app-text-grey 14px lg:16px"
|
||||
leading-24px
|
||||
>
|
||||
|
|
|
@ -43,8 +43,20 @@ const props = defineProps<{
|
|||
:alt="member.name"
|
||||
/>
|
||||
</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 i-heroicons-solid-user text-24px></div>
|
||||
<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
|
||||
flex
|
||||
|
|
|
@ -25,7 +25,11 @@ defineProps<{
|
|||
>
|
||||
Audits
|
||||
</h2>
|
||||
<div flex flex-col gap="12px lg:16px">
|
||||
<div
|
||||
flex
|
||||
flex-col
|
||||
gap="12px lg:16px"
|
||||
>
|
||||
<template
|
||||
v-for="audit in project.audits"
|
||||
:key="audit.name"
|
||||
|
|
|
@ -13,11 +13,13 @@ defineProps<{
|
|||
lg:grid
|
||||
lg:grid-cols-2
|
||||
rounded-full
|
||||
py-12px px-16px
|
||||
py-12px
|
||||
px-16px
|
||||
bg-app-bg-audits-card
|
||||
>
|
||||
<div
|
||||
grid grid-cols-3
|
||||
grid
|
||||
grid-cols-3
|
||||
w-full
|
||||
>
|
||||
<h2
|
||||
|
@ -48,7 +50,7 @@ defineProps<{
|
|||
text-14px
|
||||
leading-20px
|
||||
>
|
||||
{{ formatDate(date) }}
|
||||
{{ date ? formatDate(date) : 'N/A' }}
|
||||
</h2>
|
||||
<NuxtLink
|
||||
flex
|
||||
|
|
|
@ -54,7 +54,7 @@ defineProps<{
|
|||
title="Technology type"
|
||||
bold
|
||||
>
|
||||
{{ project.technology.type.toUpperCase() }}
|
||||
{{ project.technology?.type.toUpperCase() }}
|
||||
</ProjectInfoItem>
|
||||
<ProjectInfoItem
|
||||
:check-undefined="project.blockchain_features?.p2p"
|
||||
|
|
|
@ -8,11 +8,11 @@ const selectedEcosystemId = ref('all')
|
|||
const selectedAssetsUsedId = 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 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 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 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 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 featureOptions = ref<InputOption[]>(features.value ? [{ label: 'Feature', value: 'all' }, ...features.value.map(f => ({ label: f.name, value: f.id }))] : [])
|
||||
// const selectedCategory = computed(() => {
|
||||
// return categories.value.find(c => c.id === selectedCategoryId.value)
|
||||
// })
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
const dataStore = useData()
|
||||
const { selectedCategoryId, filteredProjects } = storeToRefs(dataStore)
|
||||
const { selectedCategoryId, categories, filteredProjects } = storeToRefs(dataStore)
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
|
@ -8,8 +8,10 @@ onMounted(() => {
|
|||
if (route.params.id)
|
||||
selectedCategoryId.value = route.params.id as string
|
||||
})
|
||||
|
||||
const group = [{ title: categories.value.find(c => c.id === selectedCategoryId.value)!.name, projects: filteredProjects.value }]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ProjectGrid :projects="filteredProjects" />
|
||||
<ProjectGrid :projects="group" />
|
||||
</template>
|
||||
|
|
|
@ -32,7 +32,10 @@ useSeoMeta({
|
|||
|
||||
<template>
|
||||
<div v-if="project">
|
||||
<div app-container px-16px>
|
||||
<div
|
||||
app-container
|
||||
px-16px
|
||||
>
|
||||
<div
|
||||
flex
|
||||
flex-col
|
||||
|
|
|
@ -35,6 +35,7 @@ export interface Project {
|
|||
telegram?: string
|
||||
discord?: string
|
||||
blog?: string
|
||||
governance?: string
|
||||
facebook?: string
|
||||
block_explorer?: string
|
||||
whitepaper?: string
|
||||
|
|
Loading…
Reference in a new issue