Skip to content

Commit

Permalink
Remove the Refresh button (#349)
Browse files Browse the repository at this point in the history
* Remove the Refresh button

* Remove unused animations

* Remove unused `updating` variable
  • Loading branch information
JSKitty authored Apr 17, 2024
1 parent 65e5a83 commit 91bd9f7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 70 deletions.
35 changes: 4 additions & 31 deletions assets/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -276,37 +276,6 @@ progress[value]::-moz-progress-bar {
animation-timing-function: linear;
}

.reload {
font-family: Lucida Sans Unicode;
cursor: pointer;
margin-left: 10px;
}

.reload i {
animation-name: spinner;
animation-duration: 0.75s;
animation-play-state: paused;
animation-iteration-count: infinite;
animation-timing-function: linear;
font-size:21px;
width: 21px;
height: 21px;
}

.playAnim {
animation-play-state: running!important;
}

@keyframes spinner {
0% {
transform: translate3d(0%, 0%, 0) rotate(0deg);
}

100% {
transform: translate3d(0%, 0%, 0) rotate(360deg);
}
}

.noselect {
-webkit-touch-callout: none;
/* iOS Safari */
Expand Down Expand Up @@ -501,6 +470,10 @@ progress[value]::-moz-progress-bar {
background: linear-gradient(0.25turn, rgba(122, 122, 122, 0.5), rgba(115, 0, 255, 0.4));
}

.balance-title {
height: 35px;
}

#bal-title {
float: right;
padding: 45px 50px;
Expand Down
1 change: 0 additions & 1 deletion scripts/dashboard/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,6 @@ defineExpose({
:price="price"
:displayDecimals="displayDecimals"
:shieldEnabled="wallet.hasShield"
@reload="refreshChainData()"
@send="showTransferMenu = true"
@exportPrivKeyOpen="showExportModal = true"
class="col-12 p-0 mb-5"
Expand Down
23 changes: 2 additions & 21 deletions scripts/dashboard/WalletBalance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const isCreatingTx = ref(false);
const txPercentageCreation = ref(0.0);
const txCreationStr = 'Creating SHIELD transaction...';
const updating = ref(false);
const balanceStr = computed(() => {
const nCoins = balance.value / COIN;
const strBal = nCoins.toFixed(displayDecimals.value);
Expand Down Expand Up @@ -102,11 +101,7 @@ const balanceValue = computed(() => {
const ticker = computed(() => cChainParams.current.TICKER);
getEventEmitter().on('sync-status', (value) => {
updating.value = value === 'start';
});
const emit = defineEmits(['reload', 'send', 'exportPrivKeyOpen']);
const emit = defineEmits(['send', 'exportPrivKeyOpen']);
getEventEmitter().on('transparent-sync-status-update', (str, finished) => {
syncTStr.value = str;
Expand All @@ -130,13 +125,6 @@ getEventEmitter().on(
txPercentageCreation.value = percentage;
}
);
function reload() {
if (!updating) {
updating.value = true;
emit('reload');
}
}
</script>

<template>
Expand All @@ -147,14 +135,7 @@ function reload() {
class="col-6 d-flex dcWallet-topLeftMenu"
style="justify-content: flex-start"
>
<h3 class="noselect balance-title">
<span class="reload noselect" @click="reload()"
><i
class="fa-solid fa-rotate-right"
:class="{ playAnim: updating }"
></i
></span>
</h3>
<h3 class="noselect balance-title"></h3>
</div>

<div
Expand Down
11 changes: 0 additions & 11 deletions scripts/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,17 +276,6 @@ function subscribeToNetworkEvents() {
'<i class="fa-solid fa-' + (value ? 'wifi' : 'ban') + '"></i>';
});

getEventEmitter().on('sync-status', (value) => {
switch (value) {
case 'start':
doms.domBalanceReloadStaking.classList.add('playAnim');
break;
case 'stop':
doms.domBalanceReloadStaking.classList.remove('playAnim');
break;
}
});

getEventEmitter().on('new-block', (block) => {
console.log(`New block detected! ${block}`);

Expand Down
8 changes: 2 additions & 6 deletions scripts/stake/StakeBalance.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { computed, defineEmits, ref, toRefs, watch, nextTick } from 'vue';
import { optimiseCurrencyLocale, refreshChainData } from '../global.js';
import { optimiseCurrencyLocale } from '../global.js';
import { translation, ALERTS } from '../i18n.js';
import Modal from '../Modal.vue';
import { createAlert, isColdAddress } from '../misc';
Expand Down Expand Up @@ -61,11 +61,7 @@ function submit() {
class="col-6 d-flex dcWallet-topLeftMenu"
style="justify-content: flex-start"
>
<h3 class="noselect balance-title">
<span class="reload noselect" @click="refreshChainData()"
><i class="fa-solid fa-rotate-right cur-pointer"></i
></span>
</h3>
<h3 class="noselect balance-title"></h3>
</div>

<div
Expand Down

0 comments on commit 91bd9f7

Please sign in to comment.