From 23e0fcca687768a2cfe8009fd07615a0599f0a13 Mon Sep 17 00:00:00 2001 From: Marc Hanisch <mhanisch@gfz-potsdam.de> Date: Tue, 9 Mar 2021 14:22:52 +0100 Subject: [PATCH] adds ProgressIndicator component --- components/ProgressIndicator.vue | 50 ++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 components/ProgressIndicator.vue diff --git a/components/ProgressIndicator.vue b/components/ProgressIndicator.vue new file mode 100644 index 000000000..9bd0e8993 --- /dev/null +++ b/components/ProgressIndicator.vue @@ -0,0 +1,50 @@ +<template> + <div> + <v-overlay + :value="isInProgress" + :opacity="dark ? 0.5 : 0.05" + > + <v-progress-circular + indeterminate + class="center-absolute" + /> + </v-overlay> + </div> +</template> + +<style> + .center-absolute { + position: fixed; + top: 50%; + left: 50%; + margin-top: -16px; + margin-left: -16px; + } +</style> + +<script lang="ts"> +import { Component, Vue, Prop } from 'nuxt-property-decorator' + +@Component +export default class ProgressIndicator extends Vue { + @Prop({ + default: false, + required: false, + type: Boolean + }) + // @ts-ignore + readonly value!: boolean + + @Prop({ + default: false, + required: false, + type: Boolean + }) + // @ts-ignore + readonly dark!: boolean + + get isInProgress (): boolean { + return this.value + } +} +</script> -- GitLab