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

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CoreHome/vue/src/Progressbar/Progressbar.vue')
-rw-r--r--plugins/CoreHome/vue/src/Progressbar/Progressbar.vue45
1 files changed, 45 insertions, 0 deletions
diff --git a/plugins/CoreHome/vue/src/Progressbar/Progressbar.vue b/plugins/CoreHome/vue/src/Progressbar/Progressbar.vue
new file mode 100644
index 0000000000..ea0166589c
--- /dev/null
+++ b/plugins/CoreHome/vue/src/Progressbar/Progressbar.vue
@@ -0,0 +1,45 @@
+<!--
+ 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 class="progressbar">
+ <div class="progress">
+ <div
+ class="determinate"
+ style="width: 0"
+ :style="{ width: `${actualProgress}%` }"
+ />
+ </div>
+ <span v-show="!!label">
+ <img src="plugins/Morpheus/images/loading-blue.gif" />
+ <span class="label" v-html="$sanitize(label)" />
+ </span>
+ </div>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+
+export default defineComponent({
+ props: {
+ progress: Number,
+ label: String,
+ },
+ computed: {
+ actualProgress() {
+ if (this.progress > 100) {
+ return 100;
+ }
+
+ if (this.progress < 0) {
+ return 0;
+ }
+
+ return this.progress;
+ },
+ },
+});
+</script>