11<template >
22 <div class =" review-block" v-if =" showReview && canShowPromo" >
33 <p >{{ t('promoClearYoutube.message') }}</p >
4- <img height =" 15" src =" ../assets/icons/close.svg" @click =" closeBlock()" />
5- <input type =" button" :value =" t('promoClearYoutube.description')" @click =" openStore()" />
4+ <div class =" btn-block" >
5+ <img height =" 15" src =" ../assets/icons/close.svg" @click =" closeBlock()" />
6+ <input type =" button" :value =" t('promoClearYoutube.description')" @click =" openStore()" />
7+ </div >
68 </div >
79</template >
810
@@ -13,52 +15,59 @@ export default {
1315 </script >
1416
1517<script lang="ts" setup>
16- import { computed , ref } from ' vue' ;
18+ import { ref } from ' vue' ;
1719import { useI18n } from ' vue-i18n' ;
1820import { injecStorage } from ' ../storage/inject-storage' ;
1921import { StorageParams } from ' ../storage/storage-params' ;
2022import { CHROME_STORE_CLEAR_YOUTUBE_URL } from ' ../utils/chrome-url' ;
2123import { usePromoExtension } from ' ../compositions/usePromoExtension' ;
24+ import { computedAsync } from ' @vueuse/core' ;
2225
2326const { t } = useI18n ();
2427
2528const settingsStorage = injecStorage ();
26- const showReview = ref <boolean >();
29+ const showReview = ref <boolean >(true );
2730
28- const canShowPromo = computed (async () => await usePromoExtension ());
31+ const canShowPromo = computedAsync (async () => await usePromoExtension ());
2932
3033async function closeBlock() {
3134 showReview .value = false ;
3235 await settingsStorage .saveValue (StorageParams .PROMO_CLEAR_YOUTUBE , true );
3336}
3437
3538async function openStore() {
39+ showReview .value = false ;
3640 window .open (CHROME_STORE_CLEAR_YOUTUBE_URL , ' _blank' );
3741 await settingsStorage .saveValue (StorageParams .PROMO_CLEAR_YOUTUBE , true );
3842}
3943 </script >
4044
4145<style scoped>
4246.review-block {
43- width : -webkit-fill-available ;
44- position : fixed ;
45- bottom : 0 ;
46- padding : 8px 20px ;
47+ margin : 20px 0 20px 0 ;
48+ padding : 10px ;
4749 font-size : 14px ;
4850 background-color : #efefef ;
51+ border-radius : 10px ;
52+ min-width : 655px ;
53+ }
54+ .review-block .btn-block {
55+ margin : 8px 5px 0 0 ;
56+ vertical-align : top ;
57+ float : right ;
4958}
5059.review-block input [type = ' button' ] {
51- margin : 0 20px 0 0 ;
5260 float : right ;
5361 width : auto ;
5462}
5563.review-block p {
5664 display : inline-block ;
57- margin : 8px ;
58- font-size : 17px ;
65+ margin : 0 10px ;
66+ font-size : 16px ;
67+ width : 70% ;
5968}
6069.review-block img {
61- padding : 9 px 0 0 0 ;
70+ margin-left : 8 px ;
6271 cursor : pointer ;
6372 float : right ;
6473}
0 commit comments