Skip to content

Commit

Permalink
Merge pull request #44 from GalaxyPay/dev
Browse files Browse the repository at this point in the history
showNetworks setting
  • Loading branch information
acfunk authored Jan 8, 2025
2 parents 00d7b67 + 47ad617 commit 64b56aa
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,5 +266,5 @@ jobs:
uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: v3.0.2
tag: v3.0.3
artifacts: "Output/*"
2 changes: 1 addition & 1 deletion FUNC.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "FUNC"
#define MyAppVersion "3.0.2"
#define MyAppVersion "3.0.3"
#define MyAppPublisher "Galaxy Pay, LLC"
#define MyAppPublisherURL "https://galaxy-pay.com"
#define MyPublishPath "publish"
Expand Down
2 changes: 1 addition & 1 deletion create-package-deb.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rm -r Output

PKG=Output/func_3.0.2_linux-$1
PKG=Output/func_3.0.3_linux-$1

mkdir -p $PKG/lib/systemd/system
mkdir -p $PKG/opt/func
Expand Down
2 changes: 1 addition & 1 deletion create-package-pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ pkgbuild --root publish \
--install-location /opt/func \
--scripts pkg/scripts \
--identifier func.app \
Output/func_3.0.2_darwin-$1.pkg
Output/func_3.0.3_darwin-$1.pkg
2 changes: 1 addition & 1 deletion deb/amd64/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: func
Version: 3.0.2
Version: 3.0.3
Section: base
Priority: optional
Architecture: amd64
Expand Down
2 changes: 1 addition & 1 deletion deb/arm64/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: func
Version: 3.0.2
Version: 3.0.3
Section: base
Priority: optional
Architecture: arm64
Expand Down
2 changes: 1 addition & 1 deletion webui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "func-webui",
"version": "3.0.2",
"version": "3.0.3",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down
1 change: 1 addition & 0 deletions webui/src/components/NodeTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
>
<v-card>
<v-tabs
v-if="store.showNetworks"
:model-value="tab"
color="primary"
@update:model-value="setNetwork"
Expand Down
4 changes: 2 additions & 2 deletions webui/src/components/Participation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@
</span>
</v-col>
<v-col class="text-subtitle-1">
Blocks Proposed:
Blocks Created:
<span class="font-weight-bold">
{{ partStats[item.address]?.proposals.toLocaleString() }}
</span>
</v-col>
<v-col class="text-subtitle-1">
Blocks Voted:
Blocks Certified:
<span class="font-weight-bold">
{{ partStats[item.address]?.votes.toLocaleString() }}
</span>
Expand Down
23 changes: 23 additions & 0 deletions webui/src/components/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@
<Releases class="ml-2" @release="updateRelease" />
</v-col>
</v-row>
<v-row align="center">
<v-col>
<div>Show Alternative Networks</div>
</v-col>
<v-col>
<v-switch
v-model="store.showNetworks"
class="d-flex"
style="justify-content: right"
color="primary"
@click.prevent="setShowNetworks(!store.showNetworks)"
/>
</v-col>
</v-row>
</v-container>
</v-card>
</v-dialog>
Expand All @@ -39,11 +53,13 @@
<script lang="ts" setup>
import FUNC from "@/services/api";
import { mdiClose } from "@mdi/js";
import { NetworkId, useWallet } from "@txnlab/use-wallet-vue";
const props = defineProps({ visible: { type: Boolean, required: true } });
const emit = defineEmits(["close"]);
const store = useAppStore();
const { activeNetwork, setActiveNetwork } = useWallet();
const show = computed({
get() {
Expand All @@ -59,6 +75,7 @@ const show = computed({
let init = false;
onBeforeMount(() => {
if (activeNetwork.value !== "mainnet") setShowNetworks(true);
getVersion();
});
Expand Down Expand Up @@ -107,4 +124,10 @@ async function updateRelease(release: string) {
store.stopNodeServices = false;
store.downloading = false;
}
async function setShowNetworks(val: boolean) {
store.showNetworks = val;
localStorage.setItem("showNetworks", val.toString());
if (!val) setActiveNetwork("mainnet" as NetworkId);
}
</script>
1 change: 1 addition & 0 deletions webui/src/stores/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const useAppStore = defineStore("app", {
downloading: false,
stoppingReti: false,
goalVersion: undefined as GoalVersion | undefined,
showNetworks: localStorage.getItem("showNetworks") === "true",
}),
getters: {
isIncentiveReady(state) {
Expand Down

0 comments on commit 64b56aa

Please sign in to comment.