@visualizevalue/mint-app-base 0.1.12 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,14 +8,16 @@
8
8
  <small v-if="copied">copied...</small>
9
9
  <small v-else-if="! hideAddress">{{ shortAddress(address) }}</small>
10
10
  </h1>
11
- <p v-if="artist?.description">{{ artist.description }}</p>
11
+ <p v-if="description">{{ description }}</p>
12
12
 
13
- <Actions v-if="hasTags">
14
- <ButtonProfileWebsite :profile="artist" />
15
- <ButtonProfileEmail :profile="artist" />
16
- <ButtonProfileTwitter :profile="artist" />
17
- <ButtonProfileGithub :profile="artist" />
18
- </Actions>
13
+ <slot name="tags">
14
+ <Actions v-if="hasTags">
15
+ <ButtonProfileWebsite :profile="artist" />
16
+ <ButtonProfileEmail :profile="artist" />
17
+ <ButtonProfileTwitter :profile="artist" />
18
+ <ButtonProfileGithub :profile="artist" />
19
+ </Actions>
20
+ </slot>
19
21
  </header>
20
22
  </template>
21
23
 
@@ -28,6 +30,7 @@ const props = defineProps({
28
30
  address: String,
29
31
  avatar: String,
30
32
  name: String,
33
+ description: String,
31
34
  hideAddress: Boolean,
32
35
  })
33
36
 
@@ -38,6 +41,7 @@ const artist = computed(() => store.artist(props.address))
38
41
  const name = computed(() => props.name || artist.value?.ens || shortAddress(props.address))
39
42
  const artistAddress = computed(() => props.address)
40
43
  const { copy, copied } = useClipboard({ source: artistAddress })
44
+ const description = computed(() => props.description || artist.value.description)
41
45
 
42
46
  const hasTags = computed(() => artist.value.url ||
43
47
  artist.value.email ||
@@ -25,6 +25,7 @@
25
25
  <Actions v-if="step === 'chain'">
26
26
  <Button @click="cancel" class="secondary">Cancel</Button>
27
27
  </Actions>
28
+
28
29
  <Actions v-if="step === 'confirm' || step === 'error'">
29
30
  <Button @click="cancel" class="secondary">Cancel</Button>
30
31
  <Button @click="() => initializeRequest()">{{ text.action[step] || 'Execute' }}</Button>
@@ -34,7 +35,7 @@
34
35
 
35
36
  <script setup>
36
37
  import { useChainId } from '@wagmi/vue'
37
- import { waitForTransactionReceipt } from '@wagmi/core'
38
+ import { waitForTransactionReceipt, watchChainId } from '@wagmi/core'
38
39
  const checkChain = useEnsureChainIdCheck()
39
40
  const chainId = useChainId()
40
41
 
@@ -69,14 +70,16 @@ const emit = defineEmits(['complete', 'cancel'])
69
70
  const open = ref(false)
70
71
 
71
72
  const switchChain = ref(false)
72
- watch(chainId, async () => {
73
- if (! switchChain.value) return
73
+ watchChainId($wagmi, {
74
+ async onChange() {
75
+ if (! switchChain.value) return
74
76
 
75
- if (await checkChain()) {
76
- switchChain.value = false
77
- initializeRequest()
78
- } else {
79
- switchChain.value = true
77
+ if (await checkChain()) {
78
+ switchChain.value = false
79
+ initializeRequest()
80
+ } else {
81
+ switchChain.value = true
82
+ }
80
83
  }
81
84
  })
82
85
 
@@ -13,7 +13,7 @@ export const useEnsureChainIdCheck = () => {
13
13
 
14
14
  return async () => {
15
15
  if (chainId !== currentChainId.value) {
16
- await switchChain({ chainId })
16
+ switchChain({ chainId })
17
17
  }
18
18
 
19
19
  if (chainId === currentChainId.value) {
@@ -7,7 +7,7 @@ export const useArtistScope = () => {
7
7
  return creatorAddress || subdomain.value
8
8
  }
9
9
 
10
- export const useShowArtistInHeader = () => {
10
+ export const useHideArtistInHeader = () => {
11
11
  const isMe = useIsMe()
12
12
  const scope = useArtistScope()
13
13
 
@@ -36,7 +36,7 @@ onMounted(async () => {
36
36
  await maybeCheckBalance()
37
37
  })
38
38
 
39
- const hideArtist = useShowArtistInHeader()
39
+ const hideArtist = useHideArtistInHeader()
40
40
  const breadcrumb = computed(() => {
41
41
  const path = hideArtist.value ? [] : [
42
42
  {
@@ -17,7 +17,7 @@ const collection = computed(() => props.collection)
17
17
  const id = useArtistId()
18
18
  const store = useOnchainStore()
19
19
 
20
- const hideArtist = useShowArtistInHeader()
20
+ const hideArtist = useHideArtistInHeader()
21
21
  const breadcrumb = computed(() => {
22
22
  const path = hideArtist.value ? [] : [
23
23
  {
@@ -20,7 +20,8 @@ const id = useArtistId()
20
20
  const isMe = useIsMe()
21
21
  const store = useOnchainStore()
22
22
 
23
- const hideArtist = useShowArtistInHeader()
23
+ const appTitle = useAppTitle()
24
+ const hideArtist = useHideArtistInHeader()
24
25
  const breadcrumb = computed(() => {
25
26
  if (hideArtist.value) return []
26
27
 
@@ -32,7 +33,7 @@ const breadcrumb = computed(() => {
32
33
  })
33
34
 
34
35
  useMetaData({
35
- title: store.displayName(id.value),
36
+ title: hideArtist.value ? appTitle.value : store.displayName(id.value),
36
37
  })
37
38
  </script>
38
39
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visualizevalue/mint-app-base",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "dependencies": {