PluginProbe
Hostinger Tools / 3.0.12
Hostinger Tools v3.0.12
3.0.77 3.0.76 3.0.75 3.0.74 3.0.73 3.0.72 3.0.71 3.0.70 3.0.69 3.0.68 3.0.67 3.0.66 1.8.1 1.8.2 1.8.3 1.9.1 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.4 All 108 releases
hostinger / vue-frontend / src / components / PluginSplitNotice.vue

PluginSplitNotice.vue in Hostinger Tools 3.0.12, at vue-frontend/src/components/PluginSplitNotice.vue

68 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <script setup lang="ts">
2
3 import Card from "@/components/Card.vue";
4 import Button from "@/components/Button/Button.vue";
5 import {isNewerVerison, translate} from "@/utils/helpers";
6 import {computed, ref} from "vue";
7
8 const showNotice = ref(true);
9
10 const dismissNotice = () => {
11 showNotice.value = false;
12
13 fetch(ajaxurl, {
14 method: 'POST',
15 headers: {
16 'Content-Type': 'application/x-www-form-urlencoded',
17 },
18 body: new URLSearchParams({
19 'action': 'hostinger_dismiss_plugin_split_notice',
20 'nonce': hostinger_tools_data.hts_close_plugin_split_nonce
21 }),
22 })
23 .then(response => {
24 if (!response.ok) {
25 throw new Error('Network response was not ok ' + response.statusText);
26 }
27 return response.json();
28 })
29 .then(data => {
30 showNotice.value = false;
31 })
32 .catch(error => {
33 console.error('Error:', error);
34 });
35 };
36
37 const isNoticeShown = computed(() => {
38 return showNotice.value && parseInt(hostinger_tools_data.plugin_split_notice) > 0;
39 });
40
41 </script>
42 <template>
43 <Card v-if="isNoticeShown">
44 <template #header>
45 <div class="d-flex justify-content-between w-100">
46 <div class="d-flex">
47 <h2 class="h-m-0">
48 {{ translate("hostinger_tools_split_title") }}
49 </h2>
50 </div>
51 </div>
52 </template>
53 <p class="text-body-2">
54 {{ translate("hostinger_tools_split_body") }}
55 </p>
56 <Button
57 class="h-mt-20"
58 @click="dismissNotice"
59 >
60 {{ translate("hostinger_tools_split_got_it") }}
61 </Button>
62 </Card>
63 </template>
64
65 <style scoped lang="scss">
66
67 </style>
68