@meddleware/seal-ui 0.0.9 → 0.0.10
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/components/SealView.vue +8 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meddleware/seal-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "Standalone Vue 3 SPA for Sealed Storage — client-side Seal encryption + access-gated, decentralised Walrus storage on Sui.",
|
|
5
5
|
"author": "MeddleWare <meddleware@proton.me>",
|
|
6
6
|
"license": "0BSD",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@meddleware/design-tokens": "^0.1.2",
|
|
41
41
|
"@meddleware/seal-client": "^0.0.2",
|
|
42
|
-
"@meddleware/ui": "^0.1.
|
|
42
|
+
"@meddleware/ui": "^0.1.11",
|
|
43
43
|
"@meddleware/wallet-adapter": "^0.0.5",
|
|
44
44
|
"@mysten/seal": "^1.4.7",
|
|
45
45
|
"@mysten/sui": "^2.30.0",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
// global stylesheet (which restyles body / #app / bare inputs). The standalone app keeps those
|
|
9
9
|
// globals via main.ts → styles.css.
|
|
10
10
|
import { computed, onMounted, ref } from 'vue'
|
|
11
|
+
import { AppTabNav, type AppTab } from '@meddleware/ui'
|
|
11
12
|
import { Transaction } from '@mysten/sui/transactions'
|
|
12
13
|
import {
|
|
13
14
|
buildPublishSealedContentTx,
|
|
@@ -27,8 +28,12 @@ const { account, signPersonalMessage, signAndExecute } = useWallet()
|
|
|
27
28
|
const providers = registry.list() as SealPolicyProvider[]
|
|
28
29
|
const disabled = computed(() => !SEAL_CONFIGURED)
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
const TABS: AppTab[] = [
|
|
32
|
+
{ id: 'encrypt', label: 'Encrypt' },
|
|
33
|
+
{ id: 'decrypt', label: 'Decrypt' },
|
|
34
|
+
{ id: 'unlock', label: 'Unlock' },
|
|
35
|
+
]
|
|
36
|
+
const tab = ref<string>('encrypt')
|
|
32
37
|
|
|
33
38
|
// Deep-link from access-gate-ui: ?gate=<id> preselects the nft-gate policy + gate.
|
|
34
39
|
onMounted(() => {
|
|
@@ -286,11 +291,7 @@ async function performUnlock(item: SealedContentPointer): Promise<void> {
|
|
|
286
291
|
</div>
|
|
287
292
|
|
|
288
293
|
<WalletGuard message="Connect a Sui wallet to encrypt and decrypt sealed content.">
|
|
289
|
-
<
|
|
290
|
-
<button :class="{ active: tab === 'encrypt' }" @click="tab = 'encrypt'">Encrypt</button>
|
|
291
|
-
<button :class="{ active: tab === 'decrypt' }" @click="tab = 'decrypt'">Decrypt</button>
|
|
292
|
-
<button :class="{ active: tab === 'unlock' }" @click="tab = 'unlock'">Unlock</button>
|
|
293
|
-
</nav>
|
|
294
|
+
<AppTabNav :tabs="TABS" v-model="tab" style="margin: 1rem 0" />
|
|
294
295
|
|
|
295
296
|
<div v-if="errorMsg" class="notice notice--error">{{ errorMsg }}</div>
|
|
296
297
|
|
|
@@ -450,25 +451,6 @@ async function performUnlock(item: SealedContentPointer): Promise<void> {
|
|
|
450
451
|
.notice--warn { background: color-mix(in srgb, #d29922 15%, transparent); }
|
|
451
452
|
.notice--error { background: color-mix(in srgb, #f85149 18%, transparent); }
|
|
452
453
|
|
|
453
|
-
.tabs {
|
|
454
|
-
display: flex;
|
|
455
|
-
gap: 0.25rem;
|
|
456
|
-
margin: 1rem 0;
|
|
457
|
-
border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
|
|
458
|
-
}
|
|
459
|
-
.tabs button {
|
|
460
|
-
background: transparent;
|
|
461
|
-
border: 0;
|
|
462
|
-
color: inherit;
|
|
463
|
-
padding: 0.5rem 0.9rem;
|
|
464
|
-
cursor: pointer;
|
|
465
|
-
opacity: 0.7;
|
|
466
|
-
border-bottom: 2px solid transparent;
|
|
467
|
-
}
|
|
468
|
-
.tabs button.active {
|
|
469
|
-
opacity: 1;
|
|
470
|
-
border-bottom-color: var(--accent, #c0503f);
|
|
471
|
-
}
|
|
472
454
|
|
|
473
455
|
.card {
|
|
474
456
|
background: var(--surface, #1e1917);
|