Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SiteWithoutData.vue « SiteWithoutData « src « vue « SitesManager « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4c279bdb7c0e0eed05c5fad74744db4203997a2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!--
  Matomo - free/libre analytics platform
  @link https://matomo.org
  @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
-->

<template>
  <div>
    <ContentBlock :content-title="`${translate('SitesManager_SiteWithoutDataTitle')} 🚀`">
      <p>&nbsp;</p>
      <p v-html="$sanitize(siteWithoutDataDesc)"></p>
      <p>{{ translate('SitesManager_SiteWithoutDataMessageDisappears') }}</p>

      <h3>{{ translate('SitesManager_SiteWithoutDataChoosePreferredWay') }}</h3>

      <WidgetLoader
        :widget-params="{module: 'SitesManager', action: 'siteWithoutDataTabs'}"
        :loading-message="`${translate('SitesManager_DetectingYourSite')}...`"
      />

      <hr/>

      <a
        class="btn"
        id="emailTrackingCodeBtn"
        :href="emailInstructionsLink"
      >{{ translate('SitesManager_EmailInstructionsButton') }}</a>

      <VueEntryContainer :html="afterIntroEventContent"/>

      <br />
      <a :href="ignoreSitesWithoutDataLink"
         class="btn ignoreSitesWithoutData"
      >
        {{ translate('SitesManager_SiteWithoutDataIgnoreMessage') }}
      </a>
    </ContentBlock>

    <VueEntryContainer :html="afterTrackingHelpEventContent"/>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import {
  ContentBlock,
  translate,
  MatomoUrl,
  WidgetLoader,
  VueEntryContainer,
} from 'CoreHome';

export default defineComponent({
  props: {
    emailBody: {
      type: String,
      required: true,
    },
    afterIntroEventContent: String,
    afterTrackingHelpEventContent: String,
  },
  components: {
    ContentBlock,
    WidgetLoader,
    VueEntryContainer,
  },
  computed: {
    siteWithoutDataDesc() {
      return translate(
        'SitesManager_SiteWithoutDataDescription',
        `<a href="${this.emailInstructionsLink}">`,
        '</a>',
      );
    },
    emailInstructionsLink() {
      return `mailto:?${MatomoUrl.stringify({
        subject: translate('SitesManager_EmailInstructionsSubject'),
        body: this.emailBody,
      })}`;
    },
    ignoreSitesWithoutDataLink() {
      return `?${MatomoUrl.stringify({
        ...MatomoUrl.urlParsed.value,
        module: 'SitesManager',
        action: 'ignoreNoDataMessage',
      })}`;
    },
  },
});
</script>