Skip to content

Commit 677f4db

Browse files
committed
Rename app as AutonomiDweb and tweak UI
1 parent 0ea5287 commit 677f4db

File tree

4 files changed

+28
-14
lines changed

4 files changed

+28
-14
lines changed

dweb-app/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dweb-app"
33
version = "0.1.0"
4-
description = "Autonomi dweb app"
4+
description = "AutonomiDweb App"
55
authors = ["git@happybeing.com"]
66
edition = "2021"
77

dweb-app/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"app": {
1313
"windows": [
1414
{
15-
"title": "Autonomi dweb",
15+
"title": "AutonomiDweb",
1616
"width": 800,
1717
"height": 600
1818
}

dweb-app/src/app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8" />
55
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
7-
<title>Autonomi dweb</title>
7+
<title>AutonomiDweb App</title>
88
%sveltekit.head%
99
</head>
1010
<body data-sveltekit-preload-data="hover">

dweb-app/src/routes/+page.svelte

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,14 @@
1616
<script>
1717
import { invoke } from "@tauri-apps/api/core";
1818
import {onMount} from 'svelte';
19+
import { getVersion } from '@tauri-apps/api/app';
20+
21+
let appVersion;
22+
1923
2024
onMount(async () => {
2125
console.log("onMount() starting dweb server...");
26+
appVersion = await getVersion();
2227
await startServer();
2328
await refreshWallet();
2429
});
@@ -90,6 +95,13 @@ async function refreshWallet() {
9095
walletAddress = data.wallet_address || "";
9196
antBalance = data.ant_balance || "";
9297
ethBalance = data.eth_balance || "";
98+
99+
// If a random wallet, hide the address to prevent user sending funds to it
100+
if (antBalance == 0 && ethBalance == 0) {
101+
walletAddress = "no wallet found on device"
102+
antBalance = "-"
103+
ethBalance = "-"
104+
}
93105
walletLoading = false;
94106
return;
95107
}
@@ -118,26 +130,26 @@ async function refreshWallet() {
118130
</div>
119131
</div>
120132

121-
<h1>Autonomi dweb <a href="https://codeberg.org/happybeing/dweb#dweb" target="_blank">
133+
<h1>AutonomiDweb <a href="https://codeberg.org/happybeing/dweb#dweb" target="_blank">
122134
<img src="/dweb-logo.svg" class="logo dweb" alt="dweb Logo" />
123135
</a>
124-
</h1>
125-
126-
<div class="row">
127-
</div>
136+
</h1>
137+
v{appVersion}
128138

129-
<p><button onclick={browseAutonomi}>Browse Autonomi dweb</button></p>
130-
<p>Explore the secure peer-to-peer web on the Autonomi network</p>
139+
<p>
140+
<button title="Explore the secure web on Autonomi" onclick={browseAutonomi}>Browse the Autonomi dweb</button>
141+
</p>
131142

143+
Or open a website you know...<br/>
132144
<div class="open-input">
133145
<input
134146
type="text"
135147
bind:value={openAddress}
136-
placeholder="Open dweb app via address or name"
148+
placeholder="Enter an address or name to open"
137149
onkeydown={handleEnter}
138-
aria-label="Open dweb app via address or name"
150+
aria-label="Enter an address or name to open"
139151
/>
140-
<button onclick={openByAddress}>Open</button>
152+
<button title="Go directly to a website or app" onclick={openByAddress}>Open</button>
141153
</div>
142154
</main>
143155

@@ -206,7 +218,7 @@ async function refreshWallet() {
206218
}
207219
208220
.open-input {
209-
margin-top: 1rem;
221+
margin-top: 0;
210222
display: inline-flex;
211223
gap: 0.5rem;
212224
align-items: center;
@@ -232,9 +244,11 @@ a:hover {
232244
233245
h1 {
234246
text-align: center;
247+
margin-bottom: 0;
235248
}
236249
237250
button {
251+
margin-top: 0;
238252
border-radius: 8px;
239253
border: 1px solid transparent;
240254
padding: 0.6em 1.2em;

0 commit comments

Comments
 (0)