@meddleware/dao-ui 0.1.0 → 0.1.1
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 +1 -1
- package/src/composables/useProposals.ts +5 -36
- package/src/styles/qt.css +23 -7
- package/src/tabs/ProposalsTab.vue +14 -9
package/package.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
// Proposals
|
|
2
|
-
//
|
|
1
|
+
// Proposals will be sourced from the vault_dao on-chain module once it is deployed.
|
|
2
|
+
// Until then this composable returns an empty list — the ProposalsTab shows a
|
|
3
|
+
// "coming soon" notice when the list is empty.
|
|
4
|
+
// When vault_dao ships, replace this file with a composable that queries the on-chain
|
|
3
5
|
// proposal registry. The Proposal type and return shape are kept stable.
|
|
4
6
|
|
|
5
7
|
import { ref, readonly } from 'vue'
|
|
@@ -16,41 +18,8 @@ export interface Proposal {
|
|
|
16
18
|
status: ProposalStatus
|
|
17
19
|
}
|
|
18
20
|
|
|
19
|
-
const MOCK_PROPOSALS: Proposal[] = [
|
|
20
|
-
{
|
|
21
|
-
id: 'prop-001',
|
|
22
|
-
title: 'mwSUI Vault Strategy — Haedal LST Allocation',
|
|
23
|
-
description:
|
|
24
|
-
'Allocate 10% of vault AUM to haSUI (Haedal liquid-staked SUI) to diversify yield sources beyond Spring Finance sSUI. Requires at least 50 SUI in community endorsement to enact.',
|
|
25
|
-
targetMist: 50_000_000_000n,
|
|
26
|
-
contributedMist: 0n,
|
|
27
|
-
endEpoch: 620,
|
|
28
|
-
status: 'active',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: 'prop-002',
|
|
32
|
-
title: 'Commission Rate Reduction — 0.20% → 0.15%',
|
|
33
|
-
description:
|
|
34
|
-
'Reduce the access-gate platform commission from 20 bps to 15 bps to stay competitive with comparable NFT-gated relay services.',
|
|
35
|
-
targetMist: 25_000_000_000n,
|
|
36
|
-
contributedMist: 0n,
|
|
37
|
-
endEpoch: 640,
|
|
38
|
-
status: 'active',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: 'prop-003',
|
|
42
|
-
title: 'Sealed Storage Relay Integration',
|
|
43
|
-
description:
|
|
44
|
-
'Route Seal uploads through the Meddleware Walrus relay so relay tips are captured and included in the fee distribution cycle.',
|
|
45
|
-
targetMist: 100_000_000_000n,
|
|
46
|
-
contributedMist: 0n,
|
|
47
|
-
endEpoch: 680,
|
|
48
|
-
status: 'pending',
|
|
49
|
-
},
|
|
50
|
-
]
|
|
51
|
-
|
|
52
21
|
export function useProposals() {
|
|
53
|
-
const proposals = ref<Proposal[]>(
|
|
22
|
+
const proposals = ref<Proposal[]>([])
|
|
54
23
|
const loading = ref(false)
|
|
55
24
|
|
|
56
25
|
return { proposals: readonly(proposals), loading: readonly(loading) }
|
package/src/styles/qt.css
CHANGED
|
@@ -61,36 +61,52 @@
|
|
|
61
61
|
.dao-tabs {
|
|
62
62
|
display: flex;
|
|
63
63
|
align-items: flex-end;
|
|
64
|
+
/* 1px bottom border that active tabs "punch through" via margin-bottom: -1px */
|
|
64
65
|
border-bottom: 1px solid var(--border);
|
|
65
66
|
background: var(--surface);
|
|
66
67
|
flex-shrink: 0;
|
|
67
68
|
overflow-x: auto;
|
|
68
69
|
scrollbar-width: none;
|
|
70
|
+
padding: 4px 4px 0;
|
|
71
|
+
gap: 2px;
|
|
69
72
|
}
|
|
70
73
|
|
|
71
74
|
.dao-tabs::-webkit-scrollbar { display: none; }
|
|
72
75
|
|
|
73
76
|
.dao-tab {
|
|
74
|
-
|
|
77
|
+
/* Reset browser UA button defaults */
|
|
78
|
+
appearance: none;
|
|
79
|
+
border-radius: 0;
|
|
80
|
+
/* Classic raised-tab shape: visible top + sides, no bottom border on active */
|
|
81
|
+
padding: 5px 14px 6px;
|
|
75
82
|
font-size: 0.8rem;
|
|
76
83
|
font-weight: 500;
|
|
77
84
|
color: var(--muted);
|
|
78
|
-
background:
|
|
79
|
-
border:
|
|
80
|
-
border-
|
|
85
|
+
background: var(--lift);
|
|
86
|
+
border-top: 2px solid transparent;
|
|
87
|
+
border-left: 1px solid transparent;
|
|
88
|
+
border-right: 1px solid transparent;
|
|
89
|
+
border-bottom: 1px solid var(--border);
|
|
90
|
+
margin-bottom: -1px; /* sit flush on the tab bar bottom border */
|
|
81
91
|
cursor: pointer;
|
|
82
92
|
white-space: nowrap;
|
|
83
|
-
transition: color 0.1s, border-color 0.1s;
|
|
93
|
+
transition: color 0.1s, background 0.1s, border-color 0.1s;
|
|
84
94
|
letter-spacing: 0.01em;
|
|
85
95
|
}
|
|
86
96
|
|
|
87
|
-
.dao-tab:hover {
|
|
97
|
+
.dao-tab:hover:not(.dao-tab--active) {
|
|
88
98
|
color: var(--text);
|
|
99
|
+
background: var(--surface);
|
|
89
100
|
}
|
|
90
101
|
|
|
91
102
|
.dao-tab--active {
|
|
92
103
|
color: var(--text);
|
|
93
|
-
|
|
104
|
+
background: var(--bg); /* same as .dao-content — visually "opens" into content */
|
|
105
|
+
border-top-color: var(--accent);
|
|
106
|
+
border-left-color: var(--border);
|
|
107
|
+
border-right-color: var(--border);
|
|
108
|
+
border-bottom-color: var(--bg); /* erase the bottom border, merging with content */
|
|
109
|
+
font-weight: 600;
|
|
94
110
|
}
|
|
95
111
|
|
|
96
112
|
/* ── Tab content area ────────────────────────────────────────────────────── */
|
|
@@ -10,16 +10,21 @@ const { epoch } = useEpoch()
|
|
|
10
10
|
<template>
|
|
11
11
|
<div>
|
|
12
12
|
<div class="dao-notice">
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
On-chain governance proposals will appear here once <code>vault_dao</code> is deployed.
|
|
14
|
+
Contributions and voting will be enabled at that point.
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
<template v-if="proposals.length > 0">
|
|
18
|
+
<p class="dao-section-title">Active & Pending Proposals</p>
|
|
19
|
+
<ProposalRow
|
|
20
|
+
v-for="p in proposals"
|
|
21
|
+
:key="p.id"
|
|
22
|
+
:proposal="p"
|
|
23
|
+
:current-epoch="epoch"
|
|
24
|
+
/>
|
|
25
|
+
</template>
|
|
26
|
+
<div v-else class="dao-placeholder">
|
|
27
|
+
No proposals yet.
|
|
28
|
+
</div>
|
|
24
29
|
</div>
|
|
25
30
|
</template>
|