@meddleware/access-gate-ui 0.1.7 → 0.1.9
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meddleware/access-gate-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Operator console for creating and managing on-chain Sui access gates — create gates, configure settings, airdrop NFTs, and freeze gates via a wallet-connected SPA.",
|
|
5
5
|
"author": "Meddleware <dev@meddleware.co.uk>",
|
|
6
6
|
"license": "0BSD",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@meddleware/design-tokens": "^0.1.2",
|
|
41
|
-
"@meddleware/ui": "^0.1.
|
|
41
|
+
"@meddleware/ui": "^0.1.10",
|
|
42
42
|
"@meddleware/nft-gate-client": "^0.0.6",
|
|
43
43
|
"@meddleware/wallet-adapter": "^0.0.5",
|
|
44
44
|
"@mysten/sui": "^2.30.0",
|
package/src/App.vue
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
// Standalone shell for the Access Gate SPA: app header + footer wrapping the core tool view.
|
|
3
3
|
// The core UI lives in AccessGateView.vue (also exported for inline embedding in the dashboard).
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
AppHeader, AppFooter, ColorModeControl, UiButton, CopyableAddress, ExplorerLink,
|
|
6
|
+
suiExplorerUrl, useColorMode,
|
|
7
|
+
} from '@meddleware/ui'
|
|
5
8
|
import { useWallet } from './wallet.js'
|
|
9
|
+
import { NETWORK } from './config.js'
|
|
6
10
|
import AccessGateView from './components/AccessGateView.vue'
|
|
7
11
|
|
|
8
12
|
const { mode, set } = useColorMode('dark')
|
|
@@ -22,7 +26,9 @@ async function onConnect(): Promise<void> {
|
|
|
22
26
|
</template>
|
|
23
27
|
<template #actions>
|
|
24
28
|
<template v-if="account">
|
|
25
|
-
<CopyableAddress :address="account.address"
|
|
29
|
+
<CopyableAddress :address="account.address">
|
|
30
|
+
<ExplorerLink :href="suiExplorerUrl('account', account.address, NETWORK)" :value="account.address" />
|
|
31
|
+
</CopyableAddress>
|
|
26
32
|
<UiButton variant="ghost" @click="disconnect">Disconnect</UiButton>
|
|
27
33
|
</template>
|
|
28
34
|
<template v-else>
|
|
@@ -68,9 +68,9 @@ async function submit(): Promise<void> {
|
|
|
68
68
|
</label>
|
|
69
69
|
|
|
70
70
|
<label class="field">
|
|
71
|
-
<span>Default
|
|
71
|
+
<span>Default credits</span>
|
|
72
72
|
<input v-model="defaultUses" type="number" min="0" step="1" />
|
|
73
|
-
<small>0 = unlimited pass; N =
|
|
73
|
+
<small>0 = unlimited pass; N = NFT granting N upload credits.</small>
|
|
74
74
|
</label>
|
|
75
75
|
|
|
76
76
|
<label class="check">
|
|
@@ -80,7 +80,7 @@ async function submit(): Promise<void> {
|
|
|
80
80
|
|
|
81
81
|
<label class="check">
|
|
82
82
|
<input v-model="autoBurnAtZero" type="checkbox" />
|
|
83
|
-
<span>Auto-burn
|
|
83
|
+
<span>Auto-burn NFTs at zero credits</span>
|
|
84
84
|
</label>
|
|
85
85
|
|
|
86
86
|
<label class="field">
|
|
@@ -34,7 +34,7 @@ function priceLabel(mist: bigint): string {
|
|
|
34
34
|
</div>
|
|
35
35
|
<div class="badges">
|
|
36
36
|
<span class="badge">{{ priceLabel(gate.priceMist) }}</span>
|
|
37
|
-
<span class="badge">{{ gate.defaultUses === 0n ? 'Unlimited' : `${gate.defaultUses}
|
|
37
|
+
<span class="badge">{{ gate.defaultUses === 0n ? 'Unlimited' : `${gate.defaultUses} credits` }}</span>
|
|
38
38
|
<span v-if="gate.soulbound" class="badge">Soulbound</span>
|
|
39
39
|
<span v-if="gate.paused" class="badge badge--warn">Paused</span>
|
|
40
40
|
<span v-if="gate.frozen" class="badge badge--warn">Frozen</span>
|
|
@@ -78,7 +78,7 @@ const ctx = () => adminContext(props.gate)
|
|
|
78
78
|
</div>
|
|
79
79
|
|
|
80
80
|
<div class="row">
|
|
81
|
-
<label>Default
|
|
81
|
+
<label>Default credits</label>
|
|
82
82
|
<input v-model="defaultUses" type="number" min="0" step="1" />
|
|
83
83
|
<UiButton variant="secondary" :disabled="busy !== null" @click="run('uses', () => buildSetDefaultUsesTx(ctx(), BigInt(defaultUses || '0')))">
|
|
84
84
|
{{ busy === 'uses' ? '…' : 'Update' }}
|