Skip to content

Commit

Permalink
Merge branch 'main' into fix/bsx/balance
Browse files Browse the repository at this point in the history
  • Loading branch information
vikiival authored Feb 9, 2023
2 parents 7b8f337 + 30fef10 commit 985d5ae
Show file tree
Hide file tree
Showing 23 changed files with 168 additions and 177 deletions.
24 changes: 0 additions & 24 deletions components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ import PrefixMixin from '@/utils/mixins/prefixMixin'
import ColorModeButton from '~/components/common/ColorModeButton.vue'
import MobileLanguageOption from '~/components/navbar/MobileLanguageOption.vue'
import { createVisible } from '@/utils/config/permision.config'
import { identityStore } from '@/utils/idbStore'
import AuthMixin from '@/utils/mixins/authMixin'
import ExperimentMixin from '@/utils/mixins/experimentMixin'
import ChainSelectDropdown from '~/components/navbar/ChainSelectDropdown.vue'
Expand Down Expand Up @@ -257,22 +256,6 @@ export default class NavbarMenu extends mixins(
return !this.isLandingPage || !this.showTopNavbar || this.isBurgerMenuOpened
}
get navBarTitle(): string {
let title = ''
if (this.inCollectionPage) {
title = this.currentCollection.name
} else if (this.inGalleryDetailPage) {
title = this.currentGalleryItemName
} else if (this.inUserProfilePage) {
const address = this.$route.params.id
title = this.artistName ? this.artistName : address
if (!this.artistName) {
this.fetchArtistIdentity(address)
}
}
return title
}
public openWalletConnectModal(): void {
this.closeBurgerMenu()
Expand All @@ -287,13 +270,6 @@ export default class NavbarMenu extends mixins(
this.setBodyScroll(!this.isBurgerMenuOpened)
}
async fetchArtistIdentity(address) {
const identity = await get(address, identityStore)
if (identity && identity.display) {
this.artistName = identity.display
}
}
onScroll() {
const currentScrollPosition = document.documentElement.scrollTop
const searchBarPosition = document
Expand Down
25 changes: 7 additions & 18 deletions components/bsx/Create/CreateToken.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ import resolveQueryPath from '@/utils/queryPathResolver'
import { unwrapSafe } from '@/utils/uniquery'
import { Royalty, isRoyaltyValid } from '@/utils/royalty'
import { fetchCollectionMetadata, preheatFileFromIPFS } from '@/utils/ipfs'
import { getMany, update } from 'idb-keyval'
import ApiUrlMixin from '@/utils/mixins/apiUrlMixin'
import { getKusamaAssetId } from '@/utils/api/bsx/query'
import { uploadDirectWhenMultiple } from '@/utils/directUpload'
Expand Down Expand Up @@ -234,27 +233,17 @@ export default class CreateToken extends mixins(
}
protected async loadCollectionMeta() {
const storedMetadata = await getMany(
this.collections.map(({ metadata }: any) => metadata)
)
const metadata = this.collections.map(({ metadata }) => metadata)
storedMetadata.forEach(async (m, i) => {
if (!m) {
try {
const meta = await fetchCollectionMetadata(this.collections[i])
this.$set(this.collections, i, {
...this.collections[i],
...meta,
})
update(this.collections[i].metadata, () => meta)
} catch (e) {
this.$consola.warn('[ERR] unable to get metadata')
}
} else {
metadata.forEach(async (m, i) => {
try {
const meta = await fetchCollectionMetadata(this.collections[i])
this.$set(this.collections, i, {
...this.collections[i],
...m,
...meta,
})
} catch (e) {
this.$consola.warn('[ERR] unable to get metadata')
}
})
}
Expand Down
12 changes: 3 additions & 9 deletions components/bsx/Create/GenerativeMint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@
@select="handleImageSelect" />
</b-step-item>

<b-step-item step="3" label="Contact" :clickable="isStepsClickable">
<ContactForm @select="handleMailSubmit" />
</b-step-item>

<b-step-item
step="4"
step="3"
label="Finish"
:clickable="isStepsClickable"
:type="{ 'is-success': true }">
Expand Down Expand Up @@ -51,10 +47,6 @@ const ImageSelectGrid = defineAsyncComponent(
() => import('@/components/generative/ImageSelectGrid.vue')
)
const ContactForm = defineAsyncComponent(
() => import('@/components/generative/ContactForm.vue')
)
const CongratsView = defineAsyncComponent(
() => import('@/components/generative/CongratsView.vue')
)
Expand All @@ -67,6 +59,7 @@ const image = ref<string>('')
const email = ref('')
const isLoading = ref(false)
const status = ref('')
const { accountId } = useAuth()
const handlePrediction = (generation: PredictionStatus) => {
predicion.value = generation
Expand All @@ -76,6 +69,7 @@ const handlePrediction = (generation: PredictionStatus) => {
const handleImageSelect = (imageURI: string) => {
image.value = imageURI
goToStep(2)
handleMailSubmit(accountId.value)
}
const handleMailSubmit = (mail: string) => {
Expand Down
3 changes: 2 additions & 1 deletion components/gallery/GalleryItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
:src="nftImage"
:animation-src="nftAnimation"
:mime-type="nftMimeType"
:title="nft?.name || nft?.id" />
:title="nft?.name || nft?.id"
is-detail />
</div>
<div class="py-6 column">
<div
Expand Down
18 changes: 15 additions & 3 deletions components/generative/CongratsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@
<section>
<br />
<p class="title is-size-3">Waii you made it! ✨</p>
<p class="title is-size-4">Our interns will process it soon!</p>
<p class="title is-size-4">Your NFT should be ready in 1 minute</p>
<nuxt-link
class="is-size-4 link"
:to="{
name: `${urlPrefix}-collection-id`,
params: { id: collectionId },
}">
In the meanwhile, click here to check the collection ♥️🍷
</nuxt-link>
<b-image
src="https://imagedelivery.net/jk5b6spi_m_-9qC4VTnjpg/4a50ce48-9cbc-4f58-c6a9-755968205500/aaa" />
src="https://imagedelivery.net/jk5b6spi_m_-9qC4VTnjpg/bafkreiao33lq57laoccwj47gw46tnf76xypfug66p7aj2amwkjtf2k52r4/aaa" />
<br />

<SubmitButton
icon="sync"
type="is-success"
Expand All @@ -17,10 +24,15 @@
</template>

<script setup lang="ts">
import { COLLECTION_ID } from './promptBuilder'
const SubmitButton = defineAsyncComponent(
() => import('@/components/base/SubmitButton.vue')
)
const { urlPrefix } = usePrefix()
const collectionId = COLLECTION_ID
const emit = defineEmits(['select'])
const submit = () => {
Expand Down
6 changes: 3 additions & 3 deletions components/generative/GenerativeMintForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<section>
<br />
<Loader v-model="isLoading" :status="status" />
<p class="title is-size-3">Mint your Christmas waifu</p>
<p class="title is-size-3">Mint your {{ NAME }} waifu</p>

<p class="title is-size-4">I want to be</p>
<RadioSelect v-model="form.gender" :options="gender" />
Expand Down Expand Up @@ -48,7 +48,7 @@
<p class="title is-size-5">art inspired by</p>
<RadioSelect
v-model="form.inspiredBy"
:options="inspiredBy"
:options="inspirations"
separated
show-empty />

Expand Down Expand Up @@ -77,7 +77,7 @@ import {
lights,
styles,
} from './options'
import { Options, buildPrompt } from './promptBuilder'
import { NAME, Options, buildPrompt } from './promptBuilder'
const Loader = defineAsyncComponent(
() => import('@/components/shared/Loader.vue')
Expand Down
11 changes: 8 additions & 3 deletions components/generative/ImageSelectGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
<p class="title is-size-4">
🎉 loaded {{ predicion.output.length }} predictions
</p>
<p v-if="4 - predicion.output.length" class="title is-size-4">
{{ 4 - predicion.output.length }} prediction(s) was marked as NFSW 🔞
<p
v-if="expectedOutput - predicion.output.length"
class="title is-size-4">
{{ expectedOutput - predicion.output.length }} prediction(s) was marked
as NFSW 🔞
</p>
</template>
<ImageGrid
Expand All @@ -19,12 +22,14 @@
</template>

<script setup lang="ts">
import { PredictionStatus } from '@/services/replicate'
import { OUTPUTS, PredictionStatus } from '@/services/replicate'
const ImageGrid = defineAsyncComponent(
() => import('@/components/shared/view/ImageGrid.vue')
)
const expectedOutput = Number(OUTPUTS)
const emit = defineEmits(['select'])
const handleSelectImage = (image: string) => {
Expand Down
56 changes: 34 additions & 22 deletions components/generative/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,21 @@ export const vibes = [
export const art = ['photo', 'painting']

export const lights = [
'soft',
'ambient',
'ring',
'cinematic',
'glow',
'natural',
'nostalgic',
'pink neon',
'red neon',
'ring',
'soft',
'street',
'studio',
'sun rays',
'cinematic',
'purple neon',
'sunrise',
'sunset',
'vaporwave',
]

export const framing = [
Expand All @@ -47,36 +53,34 @@ export const framing = [
]

export const clothes = [
'business suit',
'christmas costume',
'christmas sweater',
'christmas uniform',
'elf costume',
'kimono',
'angel wings',
'kogal',
'maid constume',
'school uniform',
'red dress',
'turtleneck sweater',
'school uniform',
'sensual costume',
'v-shaped dress',
'valentine uniform',
]

export const accessories = [
'angel wings',
'angel halo',
'cat ears',
'cat on the shoulder',
'chain pendant',
'christmas hat',
'chocolate box',
'cigarette',
'cone hat',
'eye patch',
'flower bouquet',
'flower crown',
'fox tail',
'glasses',
'headphones',
'glass of wine',
'heart-shaped glasses',
'kitsune ears',
'mask',
'oni horns',
'rabbit ears',
'reindeer antlers',
'reindeer nose',
'sensual mask',
'tanuki ears',
]

Expand All @@ -90,18 +94,22 @@ export const filmTypes = [
]

export const styles = [
'abstract',
'acrylic',
'ballpoint pen',
'chalk',
'charcoal',
'digital',
'grafitti',
'fantasy',
'high-quality',
'low-poly',
'oil',
'pastel',
'pencil sketch',
'photorealistic',
'pixel art',
'stencil',
'pop art',
'realistic',
'ukiyo-e',
'watercolor',
]
Expand All @@ -116,14 +124,18 @@ export const inspiredBy = [
]

export const inspirations = [
'Akira Toriyama',
'Eiichiro Oda',
'Hayao Miyazaki',
'Hideaki Anno',
'Hiroshi Yoshida',
'Ivan Bilibin',
'Ivan Shishkin',
'Katsuhiro Otomo',
'Kentaro Miura',
'Kuniyoshi',
'Makoto Shinkai',
'Masashi Kishimoto',
'Satoshi Kon',
'Toshi Yoshida',
'Yoji Shinkawa',
]
Expand Down
Loading

0 comments on commit 985d5ae

Please sign in to comment.