-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ada096c
commit ab2b0e5
Showing
23 changed files
with
204 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,5 @@ | |
"jochemvn <jochemvn@gmail.com>" | ||
], | ||
"license": "AGPL-3.0", | ||
"version": "1.2.93" | ||
"version": "1.2.103" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
apps/studio/src/components/BaseButtonGroupMinterWallet.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<template> | ||
<b-spinner v-if="!collection.wallets" small /> | ||
<BaseButtonWalletCreate v-else-if="!collection.wallets.length" :collection="collection" @submit="$emit('submit')" /> | ||
<BaseButtonMinterCreate | ||
v-else-if="collection.minters && !collection.minters.length" | ||
:collection="collection" | ||
:wallet="collection.wallets[0]" | ||
@submit="$emit('submit')" | ||
/> | ||
<b-link v-else-if="minter" :href="minter.url" target="_blank" class="text-decoration-none"> | ||
<code> | ||
{{ minter.short }} | ||
<BaseIcon icon="external-link-alt" /> | ||
</code> | ||
</b-link> | ||
<b-spinner v-else small /> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { chainInfo } from '@thxnetwork/studio/utils/chains'; | ||
import { toast } from '@thxnetwork/studio/utils/toast'; | ||
import { mapStores } from 'pinia'; | ||
import { defineComponent, PropType } from 'vue'; | ||
import { useCollectionStore } from '../stores'; | ||
import { shortenAddress } from '../utils/address'; | ||
export default defineComponent({ | ||
name: 'BaseButtonGroupMinterWallet', | ||
props: { | ||
collection: { type: Object as PropType<TERC721>, required: true }, | ||
}, | ||
data() { | ||
return { | ||
isLoading: false, | ||
}; | ||
}, | ||
computed: { | ||
...mapStores(useCollectionStore), | ||
minter() { | ||
const { minters } = this.collection; | ||
if (!minters || !minters.length) return; | ||
return { | ||
url: minters.length | ||
? chainInfo[this.collection.chainId].blockExplorer + '/address/' + minters[0]?.address | ||
: '', | ||
long: minters.length ? minters[0].address : '', | ||
short: minters.length ? shortenAddress(minters[0].address as `0x${string}`) : '', | ||
}; | ||
}, | ||
}, | ||
mounted() { | ||
this.getMinter(); | ||
}, | ||
methods: { | ||
async getMinter() { | ||
try { | ||
this.isLoading = true; | ||
await this.collectionStore.getMinter(this.collection._id); | ||
} catch (error: any) { | ||
toast(error.message, 'light', 3000, () => { | ||
return; | ||
}); | ||
} finally { | ||
this.isLoading = false; | ||
} | ||
}, | ||
}, | ||
}); | ||
</script> |
Oops, something went wrong.