Skip to content

Commit 116c071

Browse files
authored
Merge pull request #60 from GalaxyPay/dev
feat: showMachineName
2 parents 0bb01c8 + 082da3a commit 116c071

File tree

14 files changed

+54
-9
lines changed

14 files changed

+54
-9
lines changed

.github/workflows/go.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,5 +266,5 @@ jobs:
266266
uses: ncipollo/release-action@v1
267267
with:
268268
allowUpdates: true
269-
tag: v3.2.5
269+
tag: v3.3.0
270270
artifacts: "Output/*"

FUNC.iss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "FUNC"
5-
#define MyAppVersion "3.2.5"
5+
#define MyAppVersion "3.3.0"
66
#define MyAppPublisher "Galaxy Pay, LLC"
77
#define MyAppPublisherURL "https://galaxy-pay.com"
88
#define MyPublishPath "publish"

FUNC/Models/NodeStatus.cs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
public class NodeStatus
44
{
5+
public required string MachineName { get; set; }
56
public required string ServiceStatus { get; set; }
67
public required int Port { get; set; }
78
public required string Token { get; set; }

FUNC/Node.cs

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ private static async Task ExtractTemplate(string name)
1515

1616
public static async Task<NodeStatus> Get(string name)
1717
{
18+
string machineName = Environment.MachineName;
1819
int port = 0;
1920
string token = string.Empty;
2021
try { token = File.ReadAllText(Path.Combine(Utils.NodeDataParent(name), name, "algod.admin.token")); } catch { }
@@ -47,6 +48,7 @@ public static async Task<NodeStatus> Get(string name)
4748

4849
NodeStatus nodeStatus = new()
4950
{
51+
MachineName = machineName,
5052
ServiceStatus = serviceStatus,
5153
Port = port,
5254
Token = token,

create-package-deb.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
rm -r Output
22

3-
PKG=Output/func_3.2.5_linux-$1
3+
PKG=Output/func_3.3.0_linux-$1
44

55
mkdir -p $PKG/lib/systemd/system
66
mkdir -p $PKG/opt/func

create-package-pkg.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ pkgbuild --root publish \
55
--install-location /opt/func \
66
--scripts pkg/scripts \
77
--identifier func.app \
8-
Output/func_3.2.5_darwin-$1.pkg
8+
Output/func_3.3.0_darwin-$1.pkg

deb/amd64/control

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: func
2-
Version: 3.2.5
2+
Version: 3.3.0
33
Section: base
44
Priority: optional
55
Architecture: amd64

deb/arm64/control

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: func
2-
Version: 3.2.5
2+
Version: 3.3.0
33
Section: base
44
Priority: optional
55
Architecture: arm64

webui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "func-webui",
3-
"version": "3.2.5",
3+
"version": "3.3.0",
44
"scripts": {
55
"dev": "vite",
66
"build": "vite build",

webui/src/components/AppBar.vue

+20-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
<NodeIcon color="currentColor" :width="30" class="ml-3 text-primary" />
44
<div class="ml-2 text-subtitle-1 text-blu">
55
FUNC
6+
{{
7+
store.showMachineName && store.machineName
8+
? `(${store.machineName})`
9+
: ""
10+
}}
611
<div class="ml-1 app-version text-grey">{{ appVersion }}</div>
712
</div>
813
<v-spacer />
@@ -18,8 +23,18 @@
1823
/>
1924
<v-tooltip text="Settings" activator="parent" location="bottom" />
2025
</v-btn>
21-
<v-btn color="primary" variant="tonal" class="mr-3">
22-
{{ formatAddr(activeAccount?.address) || "Connect Wallet" }}
26+
<v-btn
27+
color="primary"
28+
variant="tonal"
29+
:icon="store.showMachineName && xs"
30+
class="mr-3"
31+
>
32+
<template v-if="!store.showMachineName || !xs">
33+
{{ formatAddr(activeAccount?.address) || "Connect Wallet" }}
34+
</template>
35+
<template v-else>
36+
<v-icon :icon="mdiWallet" />
37+
</template>
2338
<v-menu activator="parent" v-model="store.connectMenu" scrim>
2439
<v-list>
2540
<v-container :min-width="350">
@@ -131,13 +146,16 @@ import {
131146
mdiLightningBoltOutline,
132147
mdiMinusCircleOutline,
133148
mdiPlusCircleOutline,
149+
mdiWallet,
134150
} from "@mdi/js";
135151
import { Wallet, WalletAccount, useWallet } from "@txnlab/use-wallet-vue";
136152
import { modelsv2 } from "algosdk";
153+
import { useDisplay } from "vuetify";
137154
138155
const store = useAppStore();
139156
const { activeAccount, activeNetwork, activeWallet, algodClient, wallets } =
140157
useWallet();
158+
const { xs } = useDisplay();
141159
142160
const appVersion = __APP_VERSION__;
143161
const account = ref<modelsv2.Account>();

webui/src/components/Node.vue

+1
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ async function getNodeStatus() {
323323
: undefined;
324324
const resp = await FuncApi.get(props.name);
325325
nodeStatus.value = resp.data;
326+
store.machineName = nodeStatus.value?.machineName;
326327
if (nodeStatus.value?.serviceStatus !== "Running") {
327328
refreshing = false;
328329
}

webui/src/components/Settings.vue

+20
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,21 @@
5555
</v-btn>
5656
</v-col>
5757
</v-row>
58+
<v-row align="center">
59+
<v-col>
60+
<div>Show Machine Name</div>
61+
<div class="text-caption text-grey">In App Bar</div>
62+
</v-col>
63+
<v-col>
64+
<v-switch
65+
v-model="store.showMachineName"
66+
class="d-flex"
67+
style="justify-content: right"
68+
color="primary"
69+
@click.prevent="setShowMachineName(!store.showMachineName)"
70+
/>
71+
</v-col>
72+
</v-row>
5873
<v-row align="center">
5974
<v-col>
6075
<div>Show Alternative Networks</div>
@@ -161,4 +176,9 @@ async function setShowNetworks(val: boolean) {
161176
localStorage.setItem("showNetworks", val.toString());
162177
if (!val) setActiveNetwork("mainnet" as NetworkId);
163178
}
179+
180+
async function setShowMachineName(val: boolean) {
181+
store.showMachineName = val;
182+
localStorage.setItem("showMachineName", val.toString());
183+
}
164184
</script>

webui/src/stores/app.ts

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ export const useAppStore = defineStore("app", {
2020
stoppingReti: false,
2121
goalVersion: undefined as GoalVersion | undefined,
2222
showNetworks: localStorage.getItem("showNetworks") === "true",
23+
showMachineName: localStorage.getItem("showMachineName") === "true",
24+
machineName: undefined as string | undefined,
2325
}),
2426
actions: {
2527
async setSnackbar(text: string, color = "info", timeout = 4000) {

webui/src/types.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { modelsv2 } from "algosdk";
22

33
export interface NodeStatus {
4+
machineName: string;
45
serviceStatus: string;
56
port: number;
67
token: string;

0 commit comments

Comments
 (0)