@meddleware/dashboard 0.1.13 → 0.1.15

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/dashboard",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Meddleware tools hub — Vue 3 SPA listing hosted services (Walrus, Access Gate) with white-label deploy options.",
5
5
  "author": "Meddleware <dev@meddleware.co.uk>",
6
6
  "license": "0BSD",
@@ -29,7 +29,7 @@
29
29
  "@meddleware/access-gate-ui": "^0.1.5",
30
30
  "@meddleware/design-tokens": "^0.1.2",
31
31
  "@meddleware/seal-ui": "^0.0.7",
32
- "@meddleware/ui": "^0.1.8",
32
+ "@meddleware/ui": "^0.1.9",
33
33
  "@meddleware/wallet-adapter": "^0.0.5",
34
34
  "@meddleware/walrus-ui": "^0.1.7",
35
35
  "pinia": "^4.0.2",
package/src/App.vue CHANGED
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue'
3
- import { useRoute, RouterView } from 'vue-router'
3
+ import { useRoute, RouterView, RouterLink } from 'vue-router'
4
4
  import {
5
5
  AppHeader, AppSidebar,
6
6
  ColorModeControl, SidebarItem, StatusWidget, CopyableAddress,
@@ -12,6 +12,7 @@ import NetworkSelector from './components/NetworkSelector.vue'
12
12
  const { mode, set } = useColorMode('dark')
13
13
  const route = useRoute()
14
14
 
15
+ const isHome = computed(() => route.path === '/')
15
16
  const isWalrus = computed(() => route.path === '/walrus')
16
17
  const isAccessGate = computed(() => route.path === '/access-gate')
17
18
  const isSealedStorage = computed(() => route.path === '/sealed-storage')
@@ -28,8 +29,10 @@ const { account, disconnect } = useWallet({
28
29
  <div class="app-shell">
29
30
  <AppHeader class="app-shell__header" variant="dark">
30
31
  <template #brand>
31
- <span class="brand-mark" aria-hidden="true">◆</span>
32
- <span>Meddleware</span>
32
+ <RouterLink to="/" class="brand-link">
33
+ <span class="brand-mark" aria-hidden="true">◆</span>
34
+ <span>Meddleware</span>
35
+ </RouterLink>
33
36
  </template>
34
37
  <template #actions>
35
38
  <ColorModeControl :model-value="mode" @update:model-value="set" />
@@ -38,6 +41,9 @@ const { account, disconnect } = useWallet({
38
41
 
39
42
  <AppSidebar class="app-shell__sidebar" variant="dark">
40
43
  <nav aria-label="Tools">
44
+ <router-link to="/" custom v-slot="{ navigate }">
45
+ <SidebarItem label="Home" icon="🏠" :active="isHome" @click="navigate" />
46
+ </router-link>
41
47
  <router-link to="/walrus" custom v-slot="{ navigate }">
42
48
  <SidebarItem label="Walrus" icon="🗄" :active="isWalrus" @click="navigate" />
43
49
  </router-link>
@@ -50,11 +56,6 @@ const { account, disconnect } = useWallet({
50
56
  </nav>
51
57
 
52
58
  <template #body>
53
- <NetworkSelector />
54
- </template>
55
-
56
- <template #foot>
57
- <StatusWidget class="sidebar-status" />
58
59
  <div v-if="account" class="wallet-connected">
59
60
  <CopyableAddress :address="account.address" />
60
61
  <button type="button" class="wallet-disconnect" @click="disconnect">Disconnect</button>
@@ -63,6 +64,11 @@ const { account, disconnect } = useWallet({
63
64
  <span class="wallet-status-dot" aria-hidden="true"></span>
64
65
  <span class="wallet-status-label">Not connected</span>
65
66
  </div>
67
+ <NetworkSelector />
68
+ </template>
69
+
70
+ <template #foot>
71
+ <StatusWidget class="sidebar-status" />
66
72
  <p class="sidebar-copyright">© {{ new Date().getFullYear() }} Meddleware</p>
67
73
  </template>
68
74
  </AppSidebar>
@@ -78,7 +84,7 @@ const { account, disconnect } = useWallet({
78
84
  display: grid;
79
85
  grid-template-columns: var(--mw-sidebar-width, 240px) 1fr;
80
86
  grid-template-rows: var(--mw-header-height, 56px) 1fr;
81
- height: 100vh;
87
+ height: 100dvh;
82
88
  overflow: hidden;
83
89
  }
84
90
 
@@ -87,13 +93,32 @@ const { account, disconnect } = useWallet({
87
93
  }
88
94
 
89
95
  .app-shell__sidebar {
90
- height: 100%;
91
- overflow-y: auto;
96
+ min-height: 0;
97
+ overflow: hidden;
92
98
  }
93
99
 
94
100
  .app-shell__main {
95
101
  overflow-y: auto;
96
- height: 100%;
102
+ min-height: 0;
103
+ padding: 6px;
104
+ }
105
+
106
+ @media (max-width: 720px) {
107
+ .app-shell {
108
+ grid-template-columns: 1fr;
109
+ grid-template-rows: var(--mw-header-height, 56px) 1fr;
110
+ }
111
+ .app-shell__sidebar {
112
+ display: none;
113
+ }
114
+ }
115
+
116
+ .brand-link {
117
+ display: flex;
118
+ align-items: center;
119
+ gap: 0.5rem;
120
+ color: inherit;
121
+ text-decoration: none;
97
122
  }
98
123
 
99
124
  .brand-mark {
@@ -154,5 +179,6 @@ const { account, disconnect } = useWallet({
154
179
  color: var(--muted);
155
180
  margin: 0;
156
181
  opacity: 0.6;
182
+ text-align: center;
157
183
  }
158
184
  </style>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  // Network selector for the dashboard sidebar. Reads and writes the shared useNetwork()
3
3
  // singleton so every embedded tool view reacts to the chosen network immediately.
4
- import { ref, watch } from 'vue'
4
+ import { ref, watch, onMounted } from 'vue'
5
5
  import { useNetwork } from '@meddleware/wallet-adapter'
6
6
  import type { MwNetwork } from '@meddleware/wallet-adapter'
7
7
 
@@ -20,6 +20,10 @@ function commitLocalnetUrl(): void {
20
20
  const url = localnetInput.value.trim()
21
21
  if (url) setLocalnetRpc(url)
22
22
  }
23
+
24
+ onMounted(() => {
25
+ if (network.value === 'mainnet') setNetwork('testnet')
26
+ })
23
27
  </script>
24
28
 
25
29
  <template>
@@ -27,12 +31,10 @@ function commitLocalnetUrl(): void {
27
31
  <label class="ns-label" for="ns-select">Network</label>
28
32
  <select id="ns-select" class="ns-select" :value="network" @change="onNetworkChange">
29
33
  <option value="testnet">Testnet</option>
30
- <option value="mainnet">Mainnet</option>
34
+ <option value="mainnet" disabled title="Coming soon">Mainnet</option>
31
35
  <option value="localnet">Localnet</option>
32
36
  </select>
33
37
 
34
- <p v-if="network === 'mainnet'" class="ns-notice">Mainnet coming soon.</p>
35
-
36
38
  <template v-if="network === 'localnet'">
37
39
  <label class="ns-label ns-label--url" for="ns-localnet-url">RPC URL</label>
38
40
  <input
@@ -88,12 +90,6 @@ function commitLocalnetUrl(): void {
88
90
  outline-offset: 1px;
89
91
  }
90
92
 
91
- .ns-notice {
92
- font-size: 0.75rem;
93
- color: var(--muted, #888);
94
- margin: 0;
95
- }
96
-
97
93
  .ns-input {
98
94
  background: var(--surface, transparent);
99
95
  border: 1px solid var(--border, #444);
package/src/styles.css CHANGED
@@ -1,43 +1,11 @@
1
1
  /*
2
2
  * Dashboard app-layout styles. Design tokens + element defaults come from
3
3
  * @meddleware/design-tokens + @meddleware/ui/base.css (imported in main.ts).
4
- * This file holds only the app-shell grid and page-content helpers.
4
+ * App shell grid layout lives in App.vue scoped styles.
5
5
  */
6
6
 
7
7
  #app {
8
- min-height: 100vh;
9
- }
10
-
11
- /*
12
- * App shell: full-width header on top; sidebar pinned left immediately under the
13
- * header down to the bottom of the page/viewport; main fills the central space;
14
- * footer spans from the sidebar's right edge to the viewport's right edge.
15
- */
16
- .app-shell {
17
- display: grid;
18
- grid-template-columns: var(--mw-sidebar-width, 240px) 1fr;
19
- grid-template-rows: var(--mw-header-height, 56px) 1fr auto;
20
- grid-template-areas:
21
- "header header"
22
- "sidebar main"
23
- "sidebar footer";
24
- min-height: 100vh;
25
- }
26
-
27
- .app-shell__header { grid-area: header; }
28
- .app-shell__sidebar { grid-area: sidebar; }
29
- .app-shell__main { grid-area: main; min-width: 0; padding: 1.5rem; }
30
- .app-shell__footer { grid-area: footer; }
31
-
32
- @media (max-width: 720px) {
33
- .app-shell {
34
- grid-template-columns: 1fr;
35
- grid-template-areas:
36
- "header"
37
- "main"
38
- "footer";
39
- }
40
- .app-shell__sidebar { display: none; }
8
+ min-height: 100dvh;
41
9
  }
42
10
 
43
11
  .prose {