@meddleware/walrus-ui 0.1.9 → 0.1.11
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 +2 -2
- package/src/App.vue +6 -1
- package/src/components/WalrusView.vue +52 -52
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meddleware/walrus-ui",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Standalone Vue 3 SPA for uploading blobs to Walrus decentralised storage and managing owned blobs
|
|
3
|
+
"version": "0.1.11",
|
|
4
|
+
"description": "Standalone Vue 3 SPA for uploading blobs to Walrus decentralised storage and managing owned blobs — wallet-connected, NFT-gated relay support.",
|
|
5
5
|
"author": "Meddleware <dev@meddleware.co.uk>",
|
|
6
6
|
"license": "0BSD",
|
|
7
7
|
"repository": {
|
package/src/App.vue
CHANGED
|
@@ -13,7 +13,7 @@ const { mode, set } = useColorMode('dark')
|
|
|
13
13
|
<div class="app">
|
|
14
14
|
<AppHeader variant="dark">
|
|
15
15
|
<template #brand>
|
|
16
|
-
<
|
|
16
|
+
<h1 class="brand-title">Walrus Assets</h1>
|
|
17
17
|
</template>
|
|
18
18
|
<template #actions>
|
|
19
19
|
<TipConfigBadge :host="OPERATOR_RELAY_HOSTS[NETWORK]" />
|
|
@@ -33,4 +33,9 @@ const { mode, set } = useColorMode('dark')
|
|
|
33
33
|
display: flex;
|
|
34
34
|
flex-direction: column;
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
.brand-title {
|
|
38
|
+
font: inherit;
|
|
39
|
+
margin: 0;
|
|
40
|
+
}
|
|
36
41
|
</style>
|
|
@@ -101,60 +101,60 @@ function onSettled(): void {
|
|
|
101
101
|
<div class="page">
|
|
102
102
|
<p class="sub">Upload and manage blobs on Walrus decentralised storage ({{ NETWORK }}).</p>
|
|
103
103
|
|
|
104
|
-
<
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
</nav>
|
|
123
|
-
|
|
124
|
-
<template v-if="activeTab === 'upload'">
|
|
125
|
-
<AccessGateCta
|
|
126
|
-
:gate-configured="gateState.gateConfigured"
|
|
127
|
-
:has-access="gateState.hasAccess.value"
|
|
128
|
-
:busy="purchasing"
|
|
129
|
-
:price-mist="gate?.priceMist ?? null"
|
|
130
|
-
@purchase="onPurchase"
|
|
131
|
-
/>
|
|
104
|
+
<nav class="tabs" aria-label="Feature tabs">
|
|
105
|
+
<button
|
|
106
|
+
type="button"
|
|
107
|
+
class="tab"
|
|
108
|
+
:class="{ active: activeTab === 'upload' }"
|
|
109
|
+
@click="activeTab = 'upload'"
|
|
110
|
+
>
|
|
111
|
+
Upload
|
|
112
|
+
</button>
|
|
113
|
+
<button
|
|
114
|
+
type="button"
|
|
115
|
+
class="tab"
|
|
116
|
+
:class="{ active: activeTab === 'blobs' }"
|
|
117
|
+
@click="activeTab = 'blobs'"
|
|
118
|
+
>
|
|
119
|
+
My Blobs
|
|
120
|
+
</button>
|
|
121
|
+
</nav>
|
|
132
122
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
123
|
+
<WalletGuard message="Connect a Sui wallet to upload and manage your blobs.">
|
|
124
|
+
<template v-if="activeTab === 'upload'">
|
|
125
|
+
<AccessGateCta
|
|
126
|
+
:gate-configured="gateState.gateConfigured"
|
|
127
|
+
:has-access="gateState.hasAccess.value"
|
|
128
|
+
:busy="purchasing"
|
|
129
|
+
:price-mist="gate?.priceMist ?? null"
|
|
130
|
+
@purchase="onPurchase"
|
|
131
|
+
/>
|
|
132
|
+
|
|
133
|
+
<WalrusUpload
|
|
134
|
+
:hosts="relayHosts(NETWORK)"
|
|
135
|
+
:connected="!!account"
|
|
136
|
+
:access="{ gateConfigured: gateState.gateConfigured, hasAccess: gateState.hasAccess }"
|
|
137
|
+
:perform-upload="performUpload"
|
|
138
|
+
@uploaded="onUploaded"
|
|
139
|
+
@settled="onSettled"
|
|
140
|
+
/>
|
|
141
|
+
|
|
142
|
+
<section v-if="result" class="result">
|
|
143
|
+
<h2>Uploaded ✓</h2>
|
|
144
|
+
<p><strong>Blob ID:</strong> <code>{{ result.blobId }}</code></p>
|
|
145
|
+
<p>
|
|
146
|
+
<strong>URL:</strong>
|
|
147
|
+
<a :href="result.url" target="_blank" rel="noopener">{{ result.url }}</a>
|
|
148
|
+
</p>
|
|
149
|
+
<p v-if="result.digest"><strong>Certify tx:</strong> <code>{{ result.digest }}</code></p>
|
|
150
|
+
</section>
|
|
151
|
+
</template>
|
|
152
|
+
|
|
153
|
+
<MyBlobs
|
|
154
|
+
v-if="activeTab === 'blobs'"
|
|
155
|
+
:address="account?.address ?? null"
|
|
156
|
+
:build-executor="() => buildExecutor()"
|
|
140
157
|
/>
|
|
141
|
-
|
|
142
|
-
<section v-if="result" class="result">
|
|
143
|
-
<h2>Uploaded ✓</h2>
|
|
144
|
-
<p><strong>Blob ID:</strong> <code>{{ result.blobId }}</code></p>
|
|
145
|
-
<p>
|
|
146
|
-
<strong>URL:</strong>
|
|
147
|
-
<a :href="result.url" target="_blank" rel="noopener">{{ result.url }}</a>
|
|
148
|
-
</p>
|
|
149
|
-
<p v-if="result.digest"><strong>Certify tx:</strong> <code>{{ result.digest }}</code></p>
|
|
150
|
-
</section>
|
|
151
|
-
</template>
|
|
152
|
-
|
|
153
|
-
<MyBlobs
|
|
154
|
-
v-if="activeTab === 'blobs'"
|
|
155
|
-
:address="account?.address ?? null"
|
|
156
|
-
:build-executor="() => buildExecutor()"
|
|
157
|
-
/>
|
|
158
158
|
</WalletGuard>
|
|
159
159
|
</div>
|
|
160
160
|
</template>
|