Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds directory page #150

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions components/Avatar.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
<template>
<v-avatar color="transparent" :size="size">
<v-img v-if="avatar" :src="avatar.src" aspect-ratio="1" :width="size" />
<v-img
v-else
src="\logo\art-by-city\art-by-city-x.png"
contained
aspect-ratio="1"
:width="size"
/>
<v-img :src="avatar ? avatar.src : ''" aspect-ratio="1" :width="size">
<template v-slot:error>
<v-img
src="\logo\art-by-city\art-by-city-x.png"
contained
aspect-ratio="1"
:width="size"
/>
</template>
<template v-slot:placeholder>
<v-img
src="\logo\art-by-city\art-by-city-x.png"
contained
aspect-ratio="1"
:width="size"
/>
</template>
</v-img>

</v-avatar>
</template>

Expand All @@ -23,7 +34,14 @@ const {
data: avatar,
refresh
} = useLazyAsyncData(`avatar-${props.address}`, async () => {
return await abc.legacy.fetchAvatar(props.address)
const avatar = await abc.legacy.fetchAvatar(props.address)

// CORS error with data url i guess
if (avatar && !avatar.src.startsWith('data')) {
return avatar
}

return null
})

watch(() => props.address, async () => { await refresh() })
Expand Down
10 changes: 10 additions & 0 deletions components/TopNavButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<div class="nav-buttons-container">
<v-container class="px-0">
<v-row dense>
<v-col class="mx-sm-5">
<v-btn
color="white"
density="comfortable"
variant="text"
to="/directory"
>
ARTISTS
</v-btn>
</v-col>
<v-col class="mx-sm-5">
<v-btn
color="white"
Expand Down
9 changes: 6 additions & 3 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { replaceCodePlugin } from './plugins/vite-plugin-replace'
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: false },

ssr: false,

app: {
Expand Down Expand Up @@ -42,9 +41,11 @@ export default defineNuxtConfig({
'vuetify/lib/styles/main.sass',
'@mdi/font/css/materialdesignicons.min.css'
],

build: {
transpile: ['vuetify'],
},

vite: {
define: {
'process.env.DEBUG': false,
Expand Down Expand Up @@ -105,5 +106,7 @@ exports.randomFillSync = randomFillSync`,
compilerOptions: {
isCustomElement: (tag: string) => tag === 'model-viewer'
}
}
})
},

compatibilityDate: '2024-09-20'
})
92 changes: 92 additions & 0 deletions pages/directory/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<template>
<v-container id="discover-page">
<v-row>
<v-col>
<span class="text-h4">Verified Artist Directory</span>
</v-col>
</v-row>
<v-row
justify="center"
>
<v-col v-for="user in users" :key="user" cols="4">
<!-- <v-list lines="one">
<v-list-item
v-for="user in users"
:key="user"
> -->
<Avatar :address="user" class="mr-2" />
<ResolveUsername :address="user" />
<!-- </v-list-item>
</v-list> -->
</v-col>
</v-row>
</v-container>
</template>

<script setup lang="ts">
const users = [
"0EeHrLUiUepAW3IZ8ZrNRu8bxEOlumouTdMYKBPPPTM",
"1KZdIq1mkiTjb1gf6f5c__MUkheFyU6UK8-MMciSKnE",
"1cX5WcLKn2kPWmiXPKbRIPpAWm5YP9H1172HpkYN1QI",
"1qXUQWHAqdk7JWk8PWcXlkhUdBuSH8hOZ010gVNexbc",
"2aLkIcBH52s2LtZoyRQC_YaFGGSB2r2yGUtgYM5MjZc",
"3VOaO9LbI-zbta_u5Lw_KOTb-MAcRWikcV4X9fVvqBA",
"3iqkDExLuyVn_Q3ojigg0pWmS_MgQjU_R5LCyo82CkE",
"3tt4qUpZSL5iFk5kMtu1Q_hgdsxd6FgyuRN37OICJes",
"4T0gyN4fDHrKSitSl-sw5_FuxGLg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