HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/web/matomo.vdk/plugins/Marketplace/vue/src/PluginList/DownloadButton.vue
<!--
  Matomo - free/libre analytics platform

  @link    https://matomo.org
  @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
-->

<template>
  <template
    v-if="plugin.missingRequirements.length === 0 && plugin.isDownloadable && !isAutoUpdatePossible"
  >
    <span onclick="$(this).css('display', 'none')">
      <template v-if="showOr">&nbsp;{{ translate('General_Or') }}&nbsp;</template>
      <a tabindex="7"
         class="plugin-details download"
         :href="linkTo({
            module: 'Marketplace',
            action: 'download',
            pluginName: plugin.name,
            nonce: plugin.downloadNonce,
          })"
      >{{ translate('General_Download') }}</a></span>
  </template>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import { MatomoUrl } from 'CoreHome';

export default defineComponent({
  props: {
    plugin: {
      type: Object,
      required: true,
    },
    showOr: {
      type: Boolean,
      default: false,
    },
    isAutoUpdatePossible: {
      type: Boolean,
      required: true,
    },
  },
  methods: {
    linkTo(params: QueryParameters) {
      return `?${MatomoUrl.stringify({
        ...MatomoUrl.urlParsed.value,
        ...params,
      })}`;
    },
  },
});
</script>