-
-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathDefaultPageError.vue
More file actions
125 lines (109 loc) · 2.57 KB
/
DefaultPageError.vue
File metadata and controls
125 lines (109 loc) · 2.57 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!--
- SPDX-FileCopyrightText: 2021 LibreCode coop and LibreCode contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<div class="error-page">
<div class="logo-header">
<img :src="logoLibreSign"
:alt="t('libresign', 'LibreSign')"
class="logo-icon">
</div>
<div class="error-container">
<NcEmptyContent :name="t('libresign', 'Page not found')"
:description="paragrath">
<template #icon>
<AlertCircleOutline :size="80" class="alert-icon" />
</template>
<template #action>
<div v-if="errors.length" class="error-messages">
<NcNoteCard v-for="(error, index) in errors"
:key="index"
type="error">
{{ error.message }}
</NcNoteCard>
</div>
</template>
</NcEmptyContent>
</div>
</div>
</template>
<script>
import { loadState } from '@nextcloud/initial-state'
import { translate as t } from '@nextcloud/l10n'
import NcEmptyContent from '@nextcloud/vue/components/NcEmptyContent'
import NcNoteCard from '@nextcloud/vue/components/NcNoteCard'
import AlertCircleOutline from 'vue-material-design-icons/AlertCircleOutline.vue'
import logoLibreSign from '../../img/logo-gray.svg'
export default {
name: 'DefaultPageError',
components: {
NcEmptyContent,
NcNoteCard,
AlertCircleOutline,
},
data() {
return {
logoLibreSign,
paragrath: t('libresign', 'Sorry but the page you are looking for does not exist, has been removed, moved or is temporarily unavailable.'),
}
},
computed: {
errors() {
const errors = loadState('libresign', 'errors', [])
if (errors.length) {
return errors
}
const errorMessage = loadState('libresign', 'error', {})?.message
if (errorMessage) {
return [{ message: errorMessage }]
}
return []
},
},
}
</script>
<style lang="scss" scoped>
.error-page {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 40px 20px;
gap: 24px;
background: var(--color-background-dark);
.logo-header {
.logo-icon {
height: 80px;
@media (max-width: 768px) {
height: 60px;
}
}
}
.error-container {
max-width: 800px;
width: 100%;
padding: 48px 32px;
background: var(--color-main-background);
border-radius: var(--border-radius-large);
box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
.error-messages {
display: flex;
flex-direction: column;
gap: 12px;
width: 100%;
min-width: 500px;
@media (max-width: 768px) {
min-width: auto;
}
}
@media (max-width: 768px) {
padding: 32px 24px;
}
}
.alert-icon {
color: #e53c3c;
}
}
</style>