@meddleware/walrus-ui 0.1.28 → 0.1.30
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 +3 -2
- package/src/App.vue +2 -1
- package/src/components/WalrusView.vue +7 -44
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meddleware/walrus-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
|
+
"homepage": "https://docs.meddleware.co.uk/blockchain/sui/walrus-storage/",
|
|
4
5
|
"description": "Standalone Vue 3 SPA for uploading blobs to Walrus decentralised storage and managing owned blobs — wallet-connected, NFT-gated relay support.",
|
|
5
6
|
"author": "Meddleware <dev@meddleware.co.uk>",
|
|
6
7
|
"license": "0BSD",
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"dependencies": {
|
|
43
44
|
"@meddleware/design-tokens": "^0.1.2",
|
|
44
45
|
"@meddleware/nft-gate-client": "^0.0.6",
|
|
45
|
-
"@meddleware/ui": "^0.1.
|
|
46
|
+
"@meddleware/ui": "^0.1.11",
|
|
46
47
|
"@meddleware/wallet-adapter": "^0.0.5",
|
|
47
48
|
"@meddleware/walrus-client": "^0.0.11",
|
|
48
49
|
"@meddleware/walrus-relay": "^0.1.12",
|
package/src/App.vue
CHANGED
|
@@ -7,6 +7,7 @@ import { NETWORK, OPERATOR_RELAY_HOSTS } from './config.js'
|
|
|
7
7
|
import WalrusView from './components/WalrusView.vue'
|
|
8
8
|
|
|
9
9
|
const { mode, set } = useColorMode('dark')
|
|
10
|
+
const DOCS_URL = import.meta.env.VITE_DOCS_URL || 'https://docs.meddleware.co.uk/blockchain/sui/walrus-storage/'
|
|
10
11
|
</script>
|
|
11
12
|
|
|
12
13
|
<template>
|
|
@@ -23,7 +24,7 @@ const { mode, set } = useColorMode('dark')
|
|
|
23
24
|
|
|
24
25
|
<WalrusView />
|
|
25
26
|
|
|
26
|
-
<AppFooter />
|
|
27
|
+
<AppFooter :docs-url="DOCS_URL" />
|
|
27
28
|
</div>
|
|
28
29
|
</template>
|
|
29
30
|
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
useAccessGate,
|
|
11
11
|
} from '@meddleware/walrus-relay'
|
|
12
12
|
import type { UploadResult, UploadProgress, ExistingCopy } from '@meddleware/walrus-relay'
|
|
13
|
-
import { CopyableAddress, ExplorerLink, UiNotice, suiExplorerUrl } from '@meddleware/ui'
|
|
13
|
+
import { AppTabNav, CopyableAddress, ExplorerLink, UiNotice, suiExplorerUrl, type AppTab } from '@meddleware/ui'
|
|
14
14
|
// Lightweight URL import — just the wasm asset URL (does not pull the walrus client).
|
|
15
15
|
import walrusWasmUrl from '@mysten/walrus-wasm/web/walrus_wasm_bg.wasm?url'
|
|
16
16
|
import { WalletGuard } from '@meddleware/wallet-adapter'
|
|
@@ -33,8 +33,11 @@ import {
|
|
|
33
33
|
import { useOwnedBlobs } from '../composables/useOwnedBlobs.js'
|
|
34
34
|
import MyBlobs from './MyBlobs.vue'
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
const TABS: AppTab[] = [
|
|
37
|
+
{ id: 'upload', label: 'Upload' },
|
|
38
|
+
{ id: 'blobs', label: 'My Blobs' },
|
|
39
|
+
]
|
|
40
|
+
const activeTab = ref<string>('upload')
|
|
38
41
|
|
|
39
42
|
const { account, signPersonalMessage, buildExecutor } = useWallet()
|
|
40
43
|
|
|
@@ -230,24 +233,7 @@ function onSettled(): void {
|
|
|
230
233
|
<div class="page">
|
|
231
234
|
<p class="sub">Upload and manage blobs on Walrus decentralised storage ({{ NETWORK }}).</p>
|
|
232
235
|
|
|
233
|
-
<
|
|
234
|
-
<button
|
|
235
|
-
type="button"
|
|
236
|
-
class="tab"
|
|
237
|
-
:class="{ active: activeTab === 'upload' }"
|
|
238
|
-
@click="activeTab = 'upload'"
|
|
239
|
-
>
|
|
240
|
-
Upload
|
|
241
|
-
</button>
|
|
242
|
-
<button
|
|
243
|
-
type="button"
|
|
244
|
-
class="tab"
|
|
245
|
-
:class="{ active: activeTab === 'blobs' }"
|
|
246
|
-
@click="activeTab = 'blobs'"
|
|
247
|
-
>
|
|
248
|
-
My Blobs
|
|
249
|
-
</button>
|
|
250
|
-
</nav>
|
|
236
|
+
<AppTabNav :tabs="TABS" v-model="activeTab" aria-label="Feature tabs" style="margin: 1rem 0 0.5rem" />
|
|
251
237
|
|
|
252
238
|
<WalletGuard message="Connect a Sui wallet to upload and manage your blobs.">
|
|
253
239
|
<template v-if="activeTab === 'upload'">
|
|
@@ -381,27 +367,4 @@ function onSettled(): void {
|
|
|
381
367
|
line-height: 1.5;
|
|
382
368
|
}
|
|
383
369
|
|
|
384
|
-
.tabs {
|
|
385
|
-
display: flex;
|
|
386
|
-
gap: 0.25rem;
|
|
387
|
-
margin: 1rem 0 0.5rem;
|
|
388
|
-
border-bottom: 2px solid var(--border);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.tab {
|
|
392
|
-
background: none;
|
|
393
|
-
border: none;
|
|
394
|
-
border-bottom: 2px solid transparent;
|
|
395
|
-
padding: 0.5rem 1rem;
|
|
396
|
-
margin-bottom: -2px;
|
|
397
|
-
cursor: pointer;
|
|
398
|
-
font-size: 0.95rem;
|
|
399
|
-
color: var(--muted);
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.tab.active {
|
|
403
|
-
border-bottom-color: var(--accent);
|
|
404
|
-
color: var(--text);
|
|
405
|
-
font-weight: 600;
|
|
406
|
-
}
|
|
407
370
|
</style>
|