@konfuzio/document-validation-ui 0.1.29-dev.2 → 0.1.29-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/app.css +1 -1
- package/dist/index.html +1 -1
- package/dist/js/app.js +1 -1
- package/dist/js/app.js.map +1 -1
- package/dist/js/chunk-vendors.js +2 -2
- package/dist/js/chunk-vendors.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/scss/error_page.scss +14 -0
- package/src/assets/scss/theme.scss +17 -0
- package/src/components/App.vue +6 -1
- package/src/components/DocumentPage/DocumentToolbar.vue +2 -1
- package/src/components/ErrorPage.vue +26 -0
- package/src/icons.js +3 -1
- package/src/store/display.js +8 -0
- package/src/store/document.js +3 -0
package/package.json
CHANGED
|
@@ -39,6 +39,16 @@
|
|
|
39
39
|
-ms-text-size-adjust: 100%;
|
|
40
40
|
text-size-adjust: 100%;
|
|
41
41
|
box-sizing: border-box;
|
|
42
|
+
|
|
43
|
+
h1 {
|
|
44
|
+
font-size: 48px;
|
|
45
|
+
color: $text-color;
|
|
46
|
+
}
|
|
47
|
+
h2 {
|
|
48
|
+
font-size: 24px;
|
|
49
|
+
color: $text-color;
|
|
50
|
+
}
|
|
51
|
+
|
|
42
52
|
button {
|
|
43
53
|
&.is-primary {
|
|
44
54
|
background-color: $primary !important;
|
|
@@ -621,6 +631,13 @@
|
|
|
621
631
|
margin: 0 !important;
|
|
622
632
|
}
|
|
623
633
|
|
|
634
|
+
.icon.is-48 {
|
|
635
|
+
svg {
|
|
636
|
+
height: 48px;
|
|
637
|
+
width: 48px;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
624
641
|
.icon.is-24 {
|
|
625
642
|
svg {
|
|
626
643
|
height: 24px;
|
package/src/components/App.vue
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="dv-ui-app-container dv-ui-theme">
|
|
3
3
|
<DocumentsList v-if="showDocumentsList" />
|
|
4
|
-
<DocumentDashboard />
|
|
4
|
+
<DocumentDashboard v-if="!pageError" />
|
|
5
|
+
<ErrorPage v-else :error="pageError" />
|
|
5
6
|
</div>
|
|
6
7
|
</template>
|
|
7
8
|
<script>
|
|
8
9
|
import Vue from "vue";
|
|
10
|
+
import { mapState } from "vuex";
|
|
9
11
|
import * as Sentry from "@sentry/vue";
|
|
10
12
|
import DocumentDashboard from "./DocumentDashboard";
|
|
13
|
+
import ErrorPage from "./ErrorPage";
|
|
11
14
|
import { DocumentsList } from "./DocumentsList";
|
|
12
15
|
import { getURLQueryParam, getURLPath } from "../utils/utils";
|
|
13
16
|
import { Integrations } from "@sentry/tracing";
|
|
@@ -18,6 +21,7 @@ export default {
|
|
|
18
21
|
components: {
|
|
19
22
|
DocumentsList,
|
|
20
23
|
DocumentDashboard,
|
|
24
|
+
ErrorPage,
|
|
21
25
|
},
|
|
22
26
|
props: {
|
|
23
27
|
document: {
|
|
@@ -86,6 +90,7 @@ export default {
|
|
|
86
90
|
},
|
|
87
91
|
},
|
|
88
92
|
computed: {
|
|
93
|
+
...mapState("display", ["pageError"]),
|
|
89
94
|
documentId() {
|
|
90
95
|
if (getURLQueryParam("document")) {
|
|
91
96
|
return getURLQueryParam("document");
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</b-tooltip>
|
|
26
26
|
<div v-if="isEditModeAvailable" class="toolbar-divider" />
|
|
27
27
|
<div
|
|
28
|
-
v-if="!publicView"
|
|
28
|
+
v-if="!publicView && !editMode"
|
|
29
29
|
class="search-document icons"
|
|
30
30
|
@click="toggleSearch"
|
|
31
31
|
>
|
|
@@ -115,6 +115,7 @@ export default {
|
|
|
115
115
|
},
|
|
116
116
|
computed: {
|
|
117
117
|
...mapState("display", ["scale"]),
|
|
118
|
+
...mapState("edit", ["editMode"]),
|
|
118
119
|
...mapGetters("edit", ["isEditModeAvailable"]),
|
|
119
120
|
...mapState("document", [
|
|
120
121
|
"selectedDocument",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="error-page">
|
|
3
|
+
<b-icon icon="circle-exclamation" size="is-48" class="error-icon" />
|
|
4
|
+
<h1>
|
|
5
|
+
{{ $t("document_error_title") }}
|
|
6
|
+
</h1>
|
|
7
|
+
<h2>
|
|
8
|
+
{{ error ? error : "" }}
|
|
9
|
+
</h2>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
export default {
|
|
15
|
+
name: "ErrorPage",
|
|
16
|
+
props: {
|
|
17
|
+
error: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: false,
|
|
20
|
+
default: null,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<style scoped lang="scss" src="../assets/scss/error_page.scss"></style>
|
package/src/icons.js
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
faSearch,
|
|
22
22
|
faTrashArrowUp,
|
|
23
23
|
faFloppyDisk,
|
|
24
|
+
faCircleExclamation,
|
|
24
25
|
} from "@fortawesome/free-solid-svg-icons";
|
|
25
26
|
import { FontAwesomeIcon as Icons } from "@fortawesome/vue-fontawesome";
|
|
26
27
|
|
|
@@ -45,7 +46,8 @@ library.add(
|
|
|
45
46
|
faDownload,
|
|
46
47
|
faSearch,
|
|
47
48
|
faTrashArrowUp,
|
|
48
|
-
faFloppyDisk
|
|
49
|
+
faFloppyDisk,
|
|
50
|
+
faCircleExclamation
|
|
49
51
|
);
|
|
50
52
|
|
|
51
53
|
export default Icons;
|
package/src/store/display.js
CHANGED
|
@@ -42,6 +42,7 @@ const state = {
|
|
|
42
42
|
currentSearchResult: null,
|
|
43
43
|
detailsUrl: null,
|
|
44
44
|
reviewFilter: false,
|
|
45
|
+
pageError: null,
|
|
45
46
|
};
|
|
46
47
|
|
|
47
48
|
const getters = {
|
|
@@ -342,6 +343,10 @@ const actions = {
|
|
|
342
343
|
commit("SET_CURRENT_SEARCH", currentSearch);
|
|
343
344
|
},
|
|
344
345
|
|
|
346
|
+
setPageError({ commit }, value) {
|
|
347
|
+
commit("SET_PAGE_ERROR", value);
|
|
348
|
+
},
|
|
349
|
+
|
|
345
350
|
setCurrentSearchResult({ commit, state }, n) {
|
|
346
351
|
let newSearchResult = state.currentSearchResult + n;
|
|
347
352
|
const searchResultsMaxIndex = state.searchResults.length - 1;
|
|
@@ -425,6 +430,9 @@ const mutations = {
|
|
|
425
430
|
SET_REVIEW_FILTER: (state, value) => {
|
|
426
431
|
state.reviewFilter = value;
|
|
427
432
|
},
|
|
433
|
+
SET_PAGE_ERROR: (state, value) => {
|
|
434
|
+
state.pageError = value;
|
|
435
|
+
},
|
|
428
436
|
};
|
|
429
437
|
|
|
430
438
|
export default {
|
package/src/store/document.js
CHANGED