Skip to content

Commit f3774ae

Browse files
committed
Remove dev widgets and experiments
1 parent 1d31f9e commit f3774ae

File tree

8 files changed

+30
-537
lines changed

8 files changed

+30
-537
lines changed

src/components/layouts/AccountOverview.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
<MenuIcon/>
3232
<AttentionDot v-if="updateAvailable"/>
3333
</button>
34-
<DevBar v-if="isMobile" />
3534
<button class="reset consensus" @click="$router.push('/network').catch(() => {})">
3635
<ConsensusIcon/>
3736
</button>
@@ -139,8 +138,6 @@ import { CryptoCurrency } from '../../lib/Constants';
139138
import { useBtcNetworkStore } from '../../stores/BtcNetwork';
140139
import { useSettingsStore } from '../../stores/Settings';
141140
142-
import DevBar from '../widgets/DevBar.vue';
143-
144141
const BTC_ACTIVATION_SHOWN_STORAGE_KEY = 'btc-activation-modal-shown';
145142
146143
export default defineComponent({
@@ -253,7 +250,6 @@ export default defineComponent({
253250
Amount,
254251
FiatConvertedAmount,
255252
AttentionDot,
256-
DevBar,
257253
StakingSummary,
258254
},
259255
});

src/components/layouts/AddressOverview.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<template>
22
<div class="address-overview"
33
:class="{ 'no-accounts flex-column': !activeAddressInfo && activeCurrency !== CryptoCurrency.BTC }">
4-
<DevBar v-if="!isMobile" />
54
<template v-if="activeAddressInfo || activeCurrency === CryptoCurrency.BTC">
65
<div class="actions-mobile flex-row">
76
<button class="reset icon-button" @click="$router.back()"><ArrowLeftIcon/></button>
@@ -206,7 +205,6 @@ import StakeButtonPartial from '../stake/partials/StakeButtonPartial.vue';
206205
207206
import RenameIcon from '../icons/AccountMenu/RenameIcon.vue';
208207
import RefreshIcon from '../icons/RefreshIcon.vue';
209-
import DevBar from '../widgets/DevBar.vue';
210208
211209
import { useAccountStore } from '../../stores/Account';
212210
import { useAddressStore } from '../../stores/Address';
@@ -262,7 +260,6 @@ export default defineComponent({
262260
});
263261
264262
const { width: windowWidth } = useWindowSize();
265-
const isMobile = computed(() => windowWidth.value <= 700);
266263
267264
const addressMaskedWidth = computed(() => windowWidth.value > 1160
268265
? 396
@@ -313,7 +310,6 @@ export default defineComponent({
313310
promoBoxVisible,
314311
setPromoBoxVisible,
315312
onTransactionListScroll,
316-
isMobile,
317313
};
318314
},
319315
components: {
@@ -337,7 +333,6 @@ export default defineComponent({
337333
EventIcon,
338334
CrossIcon,
339335
CrossCloseButton,
340-
DevBar,
341336
StakePreviewPartial,
342337
StakeButtonPartial,
343338
},

src/components/stake/StakeAmountSlider.vue

Lines changed: 12 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,12 @@
3939
<div class="slider-controls" ref="$slide" @click="onMove($event, true);">
4040
<div class="slider-controls-wrapper">
4141
<div class="slider-progress-bar" ref="$progressBar" />
42-
<div class="slider-dual"
43-
v-if="ENABLED.dualSlider"
44-
ref="$dualSlider" />
4542
<div class="slider-knob"
4643
ref="$knob"
4744
@touchstart="atClick"
4845
@mousedown="atClick">
49-
<OneLeafStakingIcon v-if="currentPercentage < 50 && !ENABLED.dualSlider" />
50-
<StakingIcon v-else-if="currentPercentage < 75 && !ENABLED.dualSlider" />
46+
<OneLeafStakingIcon v-if="currentPercentage < 50" />
47+
<StakingIcon v-else-if="currentPercentage < 75" />
5148
<ThreeLeafStakingIcon v-else />
5249
</div>
5350
</div>
@@ -60,7 +57,6 @@
6057
import { Ref, defineComponent, ref, computed, onMounted } from '@vue/composition-api';
6158
import { Amount } from '@nimiq/vue-components';
6259
import { useAddressStore } from '../../stores/Address';
63-
import { ENABLED_FEATURES as ENABLED } from '../widgets/DevBar.vue';
6460
import { calculateDisplayedDecimals, formatAmount } from '../../lib/NumberFormatting';
6561
6662
import StakingIcon from '../icons/Staking/StakingIcon.vue';
@@ -115,6 +111,12 @@ const extractEventPosition = (e: MouseEvent | TouchEvent):Point => {
115111
};
116112
117113
export default defineComponent({
114+
props: {
115+
stakedAmount: {
116+
type: Number,
117+
required: true,
118+
},
119+
},
118120
setup(props, context) {
119121
const { activeAddressInfo } = useAddressStore();
120122
@@ -161,7 +163,6 @@ export default defineComponent({
161163
const $container = ref<HTMLElement>(null);
162164
const $knob = ref<HTMLElement>(null);
163165
const $slide = ref<HTMLElement>(null);
164-
const $dualSlider = ref<HTMLElement>(null);
165166
const $backgroundLinesLeft = ref<HTMLElement>(null);
166167
const $backgroundMiddlePlant = ref<HTMLElement>(null);
167168
const $backgroundLinesRight = ref<HTMLElement>(null);
@@ -249,31 +250,13 @@ export default defineComponent({
249250
const offsetX = getPointAtPercent(percent);
250251
currentAmount.value = (percent / 100) * availableAmount.value!;
251252
252-
if (alreadyStaked.value === true) {
253+
if (alreadyStaked.value) {
253254
if (percent < alreadyStakedPercentage.value) {
254255
if (!skipSignals) {
255256
context.emit('amount-unstaked', alreadyStakedAmount.value - currentAmount.value);
256257
}
257-
if (ENABLED.dualSlider) {
258-
$dualSlider.value!.style.display = 'inline-block';
259-
$dualSlider.value!.style.width = `${(initialX + knobBox.width) - offsetX}px`;
260-
$dualSlider.value!.style.left = `${offsetX}px`;
261-
$dualSlider.value!.style.border = '0.25rem solid var(--nimiq-gold)';
262-
$dualSlider.value!.style.background = 'radial-gradient(100% 100% at 100% 100%'
263-
+ ', rgba(33, 186, 163, 0.1) 0%, rgba(33, 186, 163, 0.9) 100%)';
264-
}
265-
} else {
266-
if (ENABLED.dualSlider && percent > alreadyStakedPercentage.value) {
267-
$dualSlider.value!.style.display = 'inline-block';
268-
$dualSlider.value!.style.width = `${(offsetX - initialX) + knobBox.width}px`;
269-
$dualSlider.value!.style.left = `${initialX}px`;
270-
$dualSlider.value!.style.border = '0';
271-
$dualSlider.value!.style.background = 'radial-gradient(100% 100% at 100% 100%'
272-
+ ', #15a2da 0%, #0582ca 100%)';
273-
}
274-
if (!skipSignals) {
275-
context.emit('amount-unstaked', 0);
276-
}
258+
} else if (!skipSignals) {
259+
context.emit('amount-unstaked', 0);
277260
}
278261
}
279262
if (!skipSignals) {
@@ -351,16 +334,13 @@ export default defineComponent({
351334
if (alreadyStaked.value) {
352335
$dotIndicator.value!.style.left = `${getPointAtPercent(alreadyStakedPercentage.value!)
353336
+ (knobBox.width / 2) - 5}px`;
354-
if (!ENABLED.dualSlider) {
355-
fillBackground(0, alreadyStakedPercentage.value);
356-
}
337+
fillBackground(0, alreadyStakedPercentage.value);
357338
}
358339
});
359340
return {
360341
NIM_DECIMALS,
361342
STAKING_CURRENCY: CryptoCurrency.NIM,
362343
DISPLAYED_DECIMALS: calculateDisplayedDecimals(availableAmount.value!, CryptoCurrency.NIM),
363-
ENABLED,
364344
readonly,
365345
atClick,
366346
onMove,
@@ -383,16 +363,9 @@ export default defineComponent({
383363
$backgroundRightPlant,
384364
$progressBar,
385365
$dotIndicator,
386-
$dualSlider,
387366
buildSVG,
388367
};
389368
},
390-
props: {
391-
stakedAmount: {
392-
type: Number,
393-
required: true,
394-
},
395-
},
396369
components: {
397370
Amount,
398371
StakingIcon,
@@ -550,16 +523,6 @@ export default defineComponent({
550523
height: 100%;
551524
border-radius: 3rem;
552525
}
553-
.slider-dual {
554-
display: none;
555-
position: absolute;
556-
left: 0;
557-
top: 0;
558-
background: none;
559-
height: 100%;
560-
border: 0.25rem solid var(--nimiq-gold);
561-
border-radius: 3rem;
562-
}
563526
.slider-knob {
564527
display: flex;
565528
position: absolute;

src/components/stake/StakeInfoPage.vue

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,11 @@
1515
</PageHeader>
1616
<PageBody>
1717
<div class="staking-rounded-background">
18-
<div class="staking-icons-lace" :class="{ necklace: ENABLED.necklace }">
18+
<div class="staking-icons-lace">
1919
<img v-for="(icon, index) in orderOfValidators"
2020
:key="index"
2121
:src="`/img/staking/providers/${icon}`"
22-
:style="{
23-
top: `${((Math.sin((index + 1) * (Math.PI / 10))) * 25)
24-
+ (ENABLED.necklace ? progression(index, orderOfValidators.length)*28 : 0)}px`,
25-
width: ENABLED.necklace?`${progression(index, orderOfValidators.length) * 7.0}rem`:'',
26-
height: ENABLED.necklace?`${progression(index, orderOfValidators.length) * 7.0}rem`:'',
27-
}"
22+
:style="{top: `${((Math.sin((index + 1) * (Math.PI / 10))) * 25)}px`}"
2823
/>
2924
</div>
3025
<div class="staking-under-icons-text">
@@ -43,7 +38,6 @@
4338
import { defineComponent } from '@vue/composition-api';
4439
import { PageHeader, PageBody } from '@nimiq/vue-components';
4540
import { ValidatorData } from '../../stores/Staking';
46-
import { ENABLED_FEATURES as ENABLED } from '../widgets/DevBar.vue';
4741
import StakingHeroIcon from '../icons/Staking/StakingHeroIcon.vue';
4842
4943
const progression = (i:number, n:number) => {
@@ -61,7 +55,6 @@ export default defineComponent({
6155
(validator: ValidatorData) => validator.icon,
6256
);
6357
return {
64-
ENABLED,
6558
progression,
6659
orderOfValidators: sortedSequence.reverse().concat(
6760
sortedSequence.filter((item, index) => (index > 0)),
@@ -132,10 +125,7 @@ export default defineComponent({
132125
white-space: nowrap;
133126
width: 95%;
134127
margin: auto;
135-
&.necklace {
136-
top: -3.5rem;
137-
left: -2.5rem;
138-
}
128+
139129
img {
140130
position: relative;
141131
width: 5.375rem;

src/components/stake/partials/StakeButtonPartial.vue

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<div slot="trigger">
99
<button class="stake"
1010
:class="{
11-
stackattack: stackattack,
1211
disabled: !activeAddressInfo || !activeAddressInfo.balance,
1312
inverse: inversePalette,
1413
}" @click="$router.push('/stake')"
@@ -24,7 +23,6 @@
2423
<div class="stake"
2524
v-if="!asButton"
2625
:class="{
27-
stackattack: stackattack,
2826
inverse: inversePalette,
2927
}">
3028
<StakingHeroIcon />
@@ -38,13 +36,11 @@ import { Tooltip } from '@nimiq/vue-components';
3836
import { useAddressStore } from '../../../stores/Address';
3937
import { useAccountStore } from '../../../stores/Account';
4038
import { useStakingStore } from '../../../stores/Staking';
41-
import { ENABLED_FEATURES as ENABLED } from '../../widgets/DevBar.vue';
4239
4340
import StakingHeroIcon from '../../icons/Staking/StakingHeroIcon.vue';
4441
4542
export default defineComponent({
4643
setup() {
47-
const stackattack = computed(() => ENABLED.stackattack);
4844
const { activeAddressInfo } = useAddressStore();
4945
const { activeCurrency } = useAccountStore();
5046
const { activeValidator } = useStakingStore();
@@ -53,7 +49,6 @@ export default defineComponent({
5349
5450
return {
5551
visible,
56-
stackattack,
5752
activeCurrency,
5853
activeAddressInfo,
5954
};
@@ -85,27 +80,26 @@ export default defineComponent({
8580
padding: 0;
8681
margin-left: 0.5rem;
8782
transition: opacity 1s ease-in-out;
83+
8884
svg {
8985
width: 6.75rem;
9086
height: 6.75rem;
91-
}
92-
&.stackattack {
93-
svg {
94-
animation: flicker 15s ease alternate infinite;
95-
path:nth-child(1), path:nth-child(2), path:nth-child(4) {
96-
animation: fastwave 3s ease alternate infinite;
97-
}
98-
path:nth-child(1) {
99-
animation-delay: .5s;
100-
}
101-
path:nth-child(2) {
102-
animation-delay: .7s;
103-
}
104-
path:nth-child(4) {
105-
animation-delay: .9s;
106-
}
87+
88+
animation: flicker 15s ease alternate infinite;
89+
path:nth-child(1), path:nth-child(2), path:nth-child(4) {
90+
animation: fastwave 3s ease alternate infinite;
91+
}
92+
path:nth-child(1) {
93+
animation-delay: .5s;
94+
}
95+
path:nth-child(2) {
96+
animation-delay: .7s;
97+
}
98+
path:nth-child(4) {
99+
animation-delay: .9s;
107100
}
108101
}
102+
109103
&.disabled {
110104
svg {
111105
animation: initial;

0 commit comments

Comments
 (0)