@meddleware/dao-ui 0.1.0 → 0.1.2

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/dao-ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Meddleware DAO console — treasury overview, proposals, and governance on Sui.",
5
5
  "author": "Meddleware <dev@meddleware.co.uk>",
6
6
  "license": "0BSD",
package/src/DaoView.vue CHANGED
@@ -2,6 +2,10 @@
2
2
  // Core DAO tool UI — tab-based console with desktop-application aesthetics.
3
3
  // Rendered standalone by App.vue and embedded in the dashboard at the default route.
4
4
  // All chain reads are read-only; no wallet connection is required to view data.
5
+ //
6
+ // qt.css is imported here (not just in main.ts) so the styles are included when
7
+ // DaoView is consumed as a library by the dashboard or any other host.
8
+ import './styles/qt.css'
5
9
  import { ref, shallowRef, computed } from 'vue'
6
10
  import TabBar from './components/TabBar.vue'
7
11
  import StatusBar from './components/StatusBar.vue'
@@ -1,5 +1,7 @@
1
- // Proposals are backed by mock data until vault_dao is deployed on-chain.
2
- // When vault_dao ships, replace this composable with one that queries the on-chain
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[]>(MOCK_PROPOSALS)
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
- padding: 7px 16px 6px;
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: transparent;
79
- border: none;
80
- border-bottom: 2px solid transparent;
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
- border-bottom-color: var(--accent);
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 ────────────────────────────────────────────────────── */
@@ -9,17 +9,17 @@ const { epoch } = useEpoch()
9
9
 
10
10
  <template>
11
11
  <div>
12
- <div class="dao-notice">
13
- Governance proposals are currently scaffolded with illustrative data.
14
- On-chain voting and contributions will be enabled when <code>vault_dao</code> is deployed.
12
+ <template v-if="proposals.length > 0">
13
+ <p class="dao-section-title">Active &amp; Pending Proposals</p>
14
+ <ProposalRow
15
+ v-for="p in proposals"
16
+ :key="p.id"
17
+ :proposal="p"
18
+ :current-epoch="epoch"
19
+ />
20
+ </template>
21
+ <div v-else class="dao-placeholder">
22
+ No proposals yet.
15
23
  </div>
16
-
17
- <p class="dao-section-title">Active &amp; Pending Proposals</p>
18
- <ProposalRow
19
- v-for="p in proposals"
20
- :key="p.id"
21
- :proposal="p"
22
- :current-epoch="epoch"
23
- />
24
24
  </div>
25
25
  </template>