136
136
<button class =" nq-button" @click =" onboard" @mousedown.prevent >{{ $t('Signup') }}</button >
137
137
</template >
138
138
139
+ <transition name =" fadeY" >
140
+ <div class =" promo-box nq-light-blue-bg flex-column" v-if =" promoBoxVisible" >
141
+ <div class =" flex-row" >
142
+ <EventIcon />
143
+ <h2 class =" nq-h2" >
144
+ {{ $t('You did it – time to spread the word. Promote Nimiq and get your fiat back! ') }}
145
+ </h2 >
146
+ </div >
147
+ <ul >
148
+ <li >{{ $t('Tweet about your experience with a Twitter account that’s at least 1 month old.') }}</li >
149
+ <li >{{ $t('Include #NimiqOASIS') }}</li >
150
+ <li class =" flex-row" >
151
+ <ArrowRightSmallIcon />
152
+ {{ $t('Until end of March, 10 swaps will get their fiat back.') }}
153
+ <a class =" nq-button-s inverse light-blue flex-row"
154
+ href =" https://twitter.com/intent/tweet?hashtags=NimiqOasis"
155
+ target =" _blank" rel =" noopener" >
156
+ <svg xmlns =" http://www.w3.org/2000/svg" fill =" none" viewBox =" 0 0 16 14" >
157
+ <!-- eslint-disable-next-line max-len -->
158
+ <path fill =" #fff" d =" M15.8 3.15a.34.34 0 00-.15-.6l-.54-.13a.34.34 0 01-.23-.49l.3-.6a.34.34 0 00-.4-.49l-1.37.39a.34.34 0 01-.3-.06A3.44 3.44 0 007.6 3.92v.25a.17.17 0 01-.16.18c-1.93.22-3.78-.76-5.78-3.06a.35.35 0 00-.35-.1.34.34 0 00-.2.28 5.22 5.22 0 00.33 3.48.17.17 0 01-.2.16l-.76-.15a.34.34 0 00-.4.4 3.55 3.55 0 001.7 2.67.17.17 0 01-.07.25l-.36.14a.34.34 0 00-.18.48 3 3 0 002.2 1.7.17.17 0 01.09.27.17.17 0 01-.09.06c-.93.39-1.94.58-2.95.57a.35.35 0 10-.14.69c1.76.83 3.67 1.28 5.6 1.33 1.72.02 3.4-.45 4.83-1.38a8.6 8.6 0 003.83-7.18v-.6a.35.35 0 01.12-.26l1.13-.95z" />
159
+ </svg >
160
+ {{ $t('Tweet') }}
161
+ </a >
162
+ </li >
163
+ </ul >
164
+ <CrossCloseButton @click =" setPromoBoxVisible(false)" />
165
+ </div >
166
+ </transition >
167
+
139
168
<MobileActionBar />
140
169
141
170
<Portal >
148
177
149
178
<script lang="ts">
150
179
import { defineComponent , ref , watch , computed } from ' @vue/composition-api' ;
151
- import { Identicon , GearIcon , Copyable , ArrowRightSmallIcon , ArrowLeftIcon , MenuDotsIcon } from ' @nimiq/vue-components' ;
180
+ import {
181
+ Identicon ,
182
+ GearIcon ,
183
+ Copyable ,
184
+ ArrowRightSmallIcon ,
185
+ ArrowLeftIcon ,
186
+ MenuDotsIcon ,
187
+ CrossIcon ,
188
+ } from ' @nimiq/vue-components' ;
152
189
// @ts-expect-error missing types for this package
153
190
import { Portal } from ' @linusborg/vue-simple-portal' ;
154
191
// @ts-expect-error missing types for this package
@@ -171,13 +208,17 @@ import { onboard, rename } from '../../hub';
171
208
import { useWindowSize } from ' ../../composables/useWindowSize' ;
172
209
import { BTC_ADDRESS_GAP , CryptoCurrency } from ' ../../lib/Constants' ;
173
210
import { checkHistory } from ' ../../electrum' ;
211
+ import EventIcon from ' ../icons/EventIcon.vue' ;
212
+ import { useSwapsStore } from ' ../../stores/Swaps' ;
213
+ import CrossCloseButton from ' ../CrossCloseButton.vue' ;
174
214
175
215
export default defineComponent ({
176
216
name: ' address-overview' ,
177
217
setup() {
178
218
const { activeAccountId, activeCurrency } = useAccountStore ();
179
219
const { activeAddressInfo, activeAddress } = useAddressStore ();
180
220
const { accountBalance : btcAccountBalance } = useBtcAddressStore ();
221
+ const { promoBoxVisible, setPromoBoxVisible } = useSwapsStore ();
181
222
182
223
const searchString = ref (' ' );
183
224
@@ -237,6 +278,8 @@ export default defineComponent({
237
278
addressMaskedWidth ,
238
279
btcAccountBalance ,
239
280
CryptoCurrency ,
281
+ promoBoxVisible ,
282
+ setPromoBoxVisible ,
240
283
};
241
284
},
242
285
components: {
@@ -256,6 +299,9 @@ export default defineComponent({
256
299
MenuDotsIcon ,
257
300
MobileActionBar ,
258
301
Portal ,
302
+ EventIcon ,
303
+ CrossIcon ,
304
+ CrossCloseButton ,
259
305
},
260
306
directives: {
261
307
responsive: ResponsiveDirective ,
@@ -624,6 +670,125 @@ export default defineComponent({
624
670
flex-grow : 1 ;
625
671
}
626
672
673
+ .promo-box {
674
+ position : absolute ;
675
+ bottom : 3rem ;
676
+ right : 3rem ;
677
+ border-radius : 0.75rem ;
678
+ width : 48rem ;
679
+ padding : 2.25rem ;
680
+
681
+ .flex-row {
682
+ align-items : center ;
683
+
684
+ .nq-h2 {
685
+ font-size : 16px ;
686
+ margin : 0 ;
687
+ line-height : 130% ;
688
+ }
689
+
690
+ svg {
691
+ width : 29px ;
692
+ height : 29px ;
693
+ flex-shrink : 0 ;
694
+ margin-right : 1.5rem ;
695
+ }
696
+ }
697
+
698
+ ul {
699
+ padding-left : 2.25rem ;
700
+ margin : 0 ;
701
+
702
+ li {
703
+ padding-top : 1.5rem ;
704
+ font-size : 14px ;
705
+ color : rgba (white , 0.8 );
706
+ font-weight : 600 ;
707
+
708
+ & .flex-row {
709
+ margin-left : -2.25rem ;
710
+ list-style-type : none ;
711
+ position : relative ;
712
+ align-items : flex-start ;
713
+
714
+ .nq-icon {
715
+ opacity : .7 ;
716
+ width : 12px ;
717
+ height : auto ;
718
+ padding-top : 6px ;
719
+ }
720
+
721
+ .nq-button-s {
722
+ font-size : 14px ;
723
+ line-height : 18px ;
724
+ margin-left : 2rem ;
725
+
726
+ & :hover ,
727
+ & :focus ,
728
+ & :active {
729
+ color : white ;
730
+ }
731
+
732
+ svg {
733
+ width : 15px ;
734
+ height : auto ;
735
+ }
736
+ }
737
+ }
738
+
739
+ & ::marker {
740
+ color : rgba (white , .7 );
741
+ transform : translateX (2px );
742
+ font-size : 12px ;
743
+ }
744
+ }
745
+ }
746
+
747
+ .cross-close-button {
748
+ height : 12px ;
749
+ width : 12px ;
750
+ opacity : .7 ;
751
+ position : absolute ;
752
+ top : 12px ;
753
+ right : 12px ;
754
+ padding : 0 ;
755
+ }
756
+
757
+ & .fadeY-enter-active , & .fadeY-leave-active {
758
+ will-change : opacity , transform ;
759
+ transition : {
760
+ property : opacity , transform ;
761
+ duration : 200ms ;
762
+ timing-function : cubic-bezier (0.5 , 0 , 0.15 , 1 );
763
+ }
764
+ }
765
+
766
+ & .fadeY-leave-active {
767
+ position : absolute ;
768
+ width : 100% ;
769
+ }
770
+
771
+ & .fadeY-enter-active {
772
+ transition-delay : 50ms ;
773
+ }
774
+
775
+ & .fadeY-leave ,
776
+ & .fadeY-enter-to {
777
+ transform : translateY (0 );
778
+ }
779
+
780
+ & .fadeY-enter {
781
+ opacity : 0 ;
782
+ transform : translateY (1rem );
783
+ }
784
+
785
+ & .fadeY-leave-to {
786
+ opacity : 0 ;
787
+ transform : translateY (-1rem );
788
+ }
789
+
790
+ }
791
+
627
792
@media (max-width : 700px ) { // Full mobile breakpoint
628
793
.address-overview {
629
794
position : relative ;
@@ -709,5 +874,10 @@ export default defineComponent({
709
874
0px 0px 32.0004px rgba (31 , 35 , 72 , 0.058643 ),
710
875
0px 0px 80px rgba (31 , 35 , 72 , 0.07 );
711
876
}
877
+
878
+ .promo-box {
879
+ width : 90% ;
880
+ bottom : 10rem ;
881
+ }
712
882
}
713
883
</style >
0 commit comments