summaryrefslogtreecommitdiffstats
path: root/src/components/ProcessingScreen.vue
blob: fbb635ad6f444024696b25b557ae28463c6d900b (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
<template>
	<EmptyContent class="processing-screen__wrapper">
		<template #icon>
			<IconContact :size="20" />
		</template>
		<slot />
		<template #desc>
			<div class="processing-screen__progress">
				<progress :max="total" :value="progress" />
			</div>
			<div class="processing-screen__desc">
				<slot name="desc" />
			</div>
		</template>
	</EmptyContent>
</template>

<script>
import EmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent'
import IconContact from 'vue-material-design-icons/AccountMultiple'
export default {
	name: 'ProcessingScreen',

	components: {
		EmptyContent,
		IconContact,
	},

	props: {
		total: {
			type: Number,
			required: true,
		},
		progress: {
			type: Number,
			required: true,
		},
	},
}
</script>

<style lang="scss" scoped>
.processing-screen {
	&__wrapper {
		display: flex;
		flex-direction: column;
		width: auto;
		margin: 50px;

		// Progress &desc wrapper
		&::v-deep > p {
			display: flex;
			align-items: center;
			flex-direction: column;
			width: 80%;
			margin: auto;
		}
	}

	&__progress {
		display: flex;
		width: 100%;
	}

	&__desc {
		display: inline-flex;
		align-items: center;
		width: 100%;
		margin-top: 22px;
		color: var(--color-text-maxcontrast);

		&::v-deep button {
			min-width: 100px;
			height: 44px;
			padding: 10px 20px;

			// Put buttons at the end
			&:first-of-type {
				margin-left: auto;
			}
		}
	}
}

</style>