@mapomodule/uikit 1.0.0-alpha.5 → 1.0.0-alpha.50

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.
Files changed (90) hide show
  1. package/CHANGELOG.md +873 -0
  2. package/components/ConfirmDialog.vue +58 -37
  3. package/components/Detail/Detail.vue +450 -243
  4. package/components/Detail/DetailLangSwitch.vue +9 -2
  5. package/components/DropArea.vue +63 -56
  6. package/components/Form/Form.vue +218 -0
  7. package/components/Form/FormField.vue +214 -0
  8. package/components/Form/FormGroup.vue +146 -0
  9. package/components/Form/FormTabs.vue +188 -0
  10. package/components/Form/defaults.js +97 -0
  11. package/components/Form/fields/ColorField.vue +79 -0
  12. package/components/{fields → Form/fields}/DateField.vue +20 -11
  13. package/components/Form/fields/DateTimeField.vue +271 -0
  14. package/components/Form/fields/EnhancedMediaField.vue +224 -0
  15. package/components/Form/fields/FileField.vue +125 -0
  16. package/components/Form/fields/FksField.vue +88 -0
  17. package/components/Form/fields/MediaField.vue +159 -0
  18. package/components/Form/fields/MediaM2mField.vue +149 -0
  19. package/components/Form/fields/Repeater.vue +596 -0
  20. package/components/Form/fields/SeoPreview.vue +89 -0
  21. package/components/Form/fields/TimeField.vue +154 -0
  22. package/components/Form/fields/mapField/leaflet.injector.js +39 -0
  23. package/components/Form/fields/mapField/mapField.vue +348 -0
  24. package/components/Form/fields/wygEditor/defaults.js +25 -0
  25. package/components/{fields/TinyMce → Form/fields/wygEditor}/utils/mapomedia.plugin.js +7 -6
  26. package/components/Form/fields/wygEditor/wygEditor.vue +285 -0
  27. package/components/LangSwitcher.vue +44 -0
  28. package/components/List/List.vue +103 -51
  29. package/components/List/ListActions.vue +23 -5
  30. package/components/List/ListFilters.vue +166 -114
  31. package/components/List/ListHead.vue +30 -12
  32. package/components/List/ListQuickEdit.vue +130 -61
  33. package/components/List/ListTable.vue +210 -66
  34. package/components/Login.vue +17 -7
  35. package/components/LogoutButton.vue +43 -28
  36. package/components/MediaManager/MediaBreadcrumbs.vue +45 -0
  37. package/components/MediaManager/MediaEditor.vue +297 -120
  38. package/components/MediaManager/MediaFileChanger.vue +78 -0
  39. package/components/MediaManager/MediaFolders.vue +224 -116
  40. package/components/MediaManager/MediaGallery.vue +224 -145
  41. package/components/MediaManager/MediaManager.vue +125 -159
  42. package/components/MediaManager/MediaManagerDialog.vue +36 -31
  43. package/components/MediaManager/MediaPreview.vue +258 -0
  44. package/components/MediaManager/MediaUploader.vue +91 -90
  45. package/components/MenuManager/MenuManager.vue +332 -0
  46. package/components/MenuManager/MenuNodeEditor.vue +255 -0
  47. package/components/MenuManager/MenuTreeview.vue +237 -0
  48. package/components/MenuManager/MenuTreeviewNode.vue +208 -0
  49. package/components/PagePreview.vue +58 -0
  50. package/components/SnackBar.vue +5 -7
  51. package/components/ThemeToggle.vue +13 -0
  52. package/components/layout/Sidebar/Sidebar.vue +61 -30
  53. package/components/layout/Sidebar/SidebarList.vue +19 -15
  54. package/components/layout/Sidebar/SidebarListItem.vue +122 -38
  55. package/components/layout/Sidebar/SidebarProfile.vue +42 -0
  56. package/components/layout/Sidebar/SidebarTitle.vue +45 -0
  57. package/components/layout/Topbar/Topbar.vue +11 -42
  58. package/components/layout/routebuilder.js +3 -3
  59. package/defaults/i18n.js +37 -0
  60. package/defaults/vuetify.js +34 -0
  61. package/layouts/default.vue +33 -18
  62. package/layouts/empty.vue +10 -0
  63. package/module.js +7 -5
  64. package/package.json +6 -4
  65. package/pages/index.vue +19 -18
  66. package/static/mapo/tinymce-skins/mapo-dark/content.inline.min.css +7 -0
  67. package/static/mapo/tinymce-skins/mapo-dark/content.min.css +7 -0
  68. package/static/mapo/tinymce-skins/mapo-dark/content.mobile.min.css +7 -0
  69. package/static/mapo/tinymce-skins/mapo-dark/skin.min.css +7 -0
  70. package/static/mapo/tinymce-skins/mapo-dark/skin.mobile.min.css +7 -0
  71. package/static/mapo/tinymce-skins/mapo-light/content.inline.min.css +7 -0
  72. package/static/mapo/tinymce-skins/mapo-light/content.min.css +7 -0
  73. package/static/mapo/tinymce-skins/mapo-light/content.mobile.min.css +7 -0
  74. package/static/mapo/tinymce-skins/mapo-light/skin.min.css +7 -0
  75. package/static/mapo/tinymce-skins/mapo-light/skin.mobile.min.css +7 -0
  76. package/translations/en-US.js +177 -0
  77. package/translations/it-IT.js +180 -0
  78. package/components/Detail/DetailField.vue +0 -129
  79. package/components/Detail/defaults.js +0 -50
  80. package/components/fields/M2mField.vue +0 -95
  81. package/components/fields/MediaField.vue +0 -195
  82. package/components/fields/MediaM2mField.vue +0 -238
  83. package/components/fields/TinyMce/TinyMce.vue +0 -177
  84. package/components/fields/TinyMce/defaults.js +0 -55
  85. package/components/layout/Sidebar/SidebarFooter.vue +0 -75
  86. package/defaults.js +0 -29
  87. package/layouts/error.vue +0 -45
  88. /package/components/{fields/TinyMce → Form/fields/wygEditor}/utils/events.js +0 -0
  89. /package/components/{fields/TinyMce/utils/script.injector.js → Form/fields/wygEditor/utils/tinymce.injector.js} +0 -0
  90. /package/static/{favicon.ico → mapo/favicon.ico} +0 -0
@@ -1,238 +0,0 @@
1
- <template>
2
- <div>
3
- <v-card
4
- v-bind="{
5
- minWidth,
6
- minHeight,
7
- height,
8
- width,
9
- maxHeight,
10
- maxWidth,
11
- elevation,
12
- dark,
13
- light: !dark,
14
- }"
15
- >
16
- <v-card-title v-if="!pages">Media Carousel</v-card-title>
17
- <v-card-actions>
18
- <v-row justify="center" class="ma-1" no-gutters>
19
- <v-col>
20
- <v-btn
21
- @click="mmdialog = true"
22
- block
23
- outlined
24
- :min-height="pages ? undefined : minHeight"
25
- >
26
- <div v-if="pages">New Selection</div>
27
- <v-icon v-else size="80"> mdi-plus-circle-outline </v-icon>
28
- </v-btn>
29
- </v-col>
30
- </v-row>
31
- </v-card-actions>
32
-
33
- <v-window v-model="page">
34
- <v-window-item
35
- class="page"
36
- v-for="(pageMedias, i) in paginatedMedias"
37
- :key="i"
38
- >
39
- <v-container class="pa-0">
40
- <v-row
41
- v-for="row in rows"
42
- :key="row"
43
- align="center"
44
- align-content="center"
45
- justify="center"
46
- >
47
- <v-col v-for="col in cols" :key="col">
48
- <MediaElement
49
- v-if="pageMedias[getIndexFromGrid(row, col)]"
50
- v-model="pageMedias[getIndexFromGrid(row, col)]"
51
- :aspect-ratio="1"
52
- :dark="dark"
53
- rm-add-btn
54
- @changed-media="checkMediaEdit($event, i, row, col)"
55
- />
56
- <div v-else class="placeholder"></div>
57
- </v-col>
58
- </v-row>
59
- </v-container>
60
- </v-window-item>
61
- </v-window>
62
-
63
- <v-card-actions class="paginator mt-auto" v-if="pages">
64
- <v-row justify="center" class="py-2">
65
- <v-btn text @click="prev">
66
- <v-icon>mdi-chevron-left</v-icon>
67
- </v-btn>
68
- <v-item-group v-model="page" class="text-center mx-1" mandatory>
69
- <v-item
70
- v-for="n in pages"
71
- :key="`btn-${n}`"
72
- v-slot="{ active, toggle }"
73
- >
74
- <v-btn :input-value="active" icon @click="toggle">
75
- <v-icon>mdi-record</v-icon>
76
- </v-btn>
77
- </v-item>
78
- </v-item-group>
79
- <v-btn text @click="next">
80
- <v-icon>mdi-chevron-right</v-icon>
81
- </v-btn>
82
- </v-row>
83
- </v-card-actions>
84
- </v-card>
85
-
86
- <media-manager-dialog
87
- v-model="mmdialog"
88
- select="multi"
89
- v-on:selectionChange="update"
90
- :light="!dark"
91
- :dark="dark"
92
- >
93
- </media-manager-dialog>
94
- </div>
95
- </template>
96
-
97
- <style scoped>
98
- .v-card {
99
- display: flex;
100
- flex-direction: column;
101
- }
102
-
103
- .v-window {
104
- overflow: hidden;
105
- position: relative;
106
- width: 100%;
107
- }
108
-
109
- .placeholder {
110
- padding-bottom: 100%;
111
- }
112
- </style>
113
-
114
- <script>
115
- export default {
116
- name: "MediaM2mField",
117
- transition: "tasks-transition",
118
- data() {
119
- return {
120
- child_medias: [],
121
-
122
- page: 0,
123
- mmdialog: false,
124
- };
125
- },
126
-
127
- props: {
128
- medias: {
129
- type: Array,
130
- default: () => [],
131
- },
132
- cols: {
133
- type: Number,
134
- default: 2,
135
- },
136
- rows: {
137
- type: Number,
138
- default: 2,
139
- },
140
-
141
- //reflections
142
- minWidth: {
143
- type: Number | String,
144
- default: 300,
145
- },
146
- minHeight: {
147
- type: Number | String,
148
- default: 300,
149
- },
150
- height: {
151
- type: Number | String,
152
- },
153
- width: {
154
- type: Number | String,
155
- },
156
- maxHeight: {
157
- type: Number | String,
158
- },
159
- maxWidth: {
160
- type: Number | String,
161
- },
162
-
163
- elevation: {
164
- type: Number | String,
165
- default: undefined,
166
- },
167
- flat: {
168
- type: Boolean,
169
- default: false,
170
- },
171
-
172
- dark: {
173
- type: Boolean,
174
- default: false,
175
- },
176
- },
177
-
178
- model: {
179
- prop: "medias",
180
- event: "changed-selection",
181
- },
182
-
183
- mounted() {
184
- if (this.medias) this.child_medias = this.medias;
185
- },
186
-
187
- computed: {
188
- mediasPerPage() {
189
- return this.cols * this.rows;
190
- },
191
- pages() {
192
- return Math.ceil(this.child_medias.length / this.mediasPerPage);
193
- },
194
- paginatedMedias() {
195
- var array = new Array(this.pages);
196
- for (let i = 0; i < array.length; i++) {
197
- array[i] = this.child_medias.slice(
198
- i * this.mediasPerPage,
199
- (i + 1) * this.mediasPerPage
200
- );
201
- }
202
- return array;
203
- },
204
- },
205
-
206
- methods: {
207
- getIndexFromGrid(row, col) {
208
- return (row - 1) * this.cols + col - 1;
209
- },
210
- update(selection) {
211
- this.child_medias = [...selection];
212
- this.$emit("changed-selection", [...selection]);
213
- },
214
- checkMediaEdit(event, page, row, col) {
215
- //if event is not empty, then exit
216
- let index = this.mediasPerPage * page + this.getIndexFromGrid(row, col);
217
- if (event) {
218
- this.child_medias[index] = event;
219
- } else {
220
- this.child_medias.splice(index, 1);
221
- }
222
- this.update(this.child_medias);
223
- },
224
- next() {
225
- this.page = this.page + 1 === this.length ? 0 : this.page + 1;
226
- },
227
- prev() {
228
- this.page = this.page - 1 < 0 ? this.length - 1 : this.page - 1;
229
- },
230
- },
231
-
232
- watch: {
233
- medias(val) {
234
- this.child_medias = val;
235
- },
236
- },
237
- };
238
- </script>
@@ -1,177 +0,0 @@
1
- <template>
2
- <div>
3
- <media-manager-dialog ref="mediaManager"></media-manager-dialog>
4
- <span v-if="label">{{ label }}:</span>
5
- <div ref="editorNode">
6
- <v-skeleton-loader
7
- type="table-heading, list-item-two-line, list-item-avatar-two-line, list-item-three-lineimage, table-tfoot"
8
- ></v-skeleton-loader>
9
- </div>
10
- <div class="mt-2">
11
- <v-messages :value="errorMessages" color="error"></v-messages>
12
- </div>
13
- </div>
14
- </template>
15
-
16
- <script>
17
- import initMapoMedia from "./utils/mapomedia.plugin.js";
18
- import injectScript from "./utils/script.injector.js";
19
- import defaults from "./defaults.js";
20
- import validEvents from "./utils/events.js";
21
-
22
- /**
23
- * This component wraps a [TinyMce](https://www.tiny.cloud/) instance. With the use of the v-model you can use this component to edit any content you like.
24
- */
25
-
26
- export default {
27
- name: "TinyMce",
28
- props: {
29
- // V-model property. Is the content that will populate the TinyMce instance.
30
- value: {
31
- type: String,
32
- default: "",
33
- },
34
- // This is the main configuration of TinyMce. If setted will be merged with this component defaults.
35
- conf: {
36
- type: Object,
37
- default: () => ({}),
38
- },
39
- // This label will be shown at the top of the editor.
40
- label: String,
41
- // This is an array of validation errors that will be displayed under the editor.
42
- errorMessages: Array,
43
- // This set the component status to disabled, stopping the user interaction.
44
- disabled: {
45
- type: Boolean,
46
- default: false,
47
- },
48
- // Use this prop to bind events. If set to true the component will emit every [TinyMce Event](https://www.tiny.cloud/docs/advanced/events/).
49
- bindevents: {
50
- type: Boolean,
51
- default: false,
52
- },
53
- },
54
-
55
- data() {
56
- return {
57
- editorInstance: null,
58
- editorContent: "",
59
- };
60
- },
61
-
62
- computed: {
63
- editor: {
64
- cache: false,
65
- get() {
66
- return this.editorInstance;
67
- },
68
- },
69
- },
70
-
71
- mounted() {
72
- injectScript().then(this.initEditor);
73
- },
74
-
75
- methods: {
76
- initEditor() {
77
- initMapoMedia(this.insertImgCallback);
78
- window.tinymce.init(
79
- Object.assign(defaults, this.conf, {
80
- target: this.$refs.editorNode,
81
- readonly: this.disabled,
82
- setup: (ctx) => this.setupEditor(ctx),
83
- })
84
- );
85
- },
86
- setupEditor(editor) {
87
- this.editorInstance = editor;
88
- editor.on("init", () => {
89
- editor.setContent(this.value || "");
90
- this.emitContent(editor);
91
- editor.on("change input undo redo keyup", () =>
92
- this.emitContent(editor)
93
- );
94
- });
95
- this.bindEvents(editor);
96
- },
97
- emitContent(editor) {
98
- this.editorContent = editor.getContent();
99
- // Fired when the v-model changes
100
- //@arg Emits the content of the editor
101
- this.$emit("input", this.editorContent);
102
- },
103
- bindEvents(editor) {
104
- if (this.bindevents) {
105
- validEvents.forEach((eventName) => {
106
- // This is a dynamic event emitter. If you activate the bindevents prop, you will be able to listen to every [TinyMce Event](https://www.tiny.cloud/docs/advanced/events/).
107
- editor.on(eventName, (event) => this.$emit(eventName, event));
108
- });
109
- }
110
- },
111
- insertImgCallback: async function () {
112
- return new Promise((resolve, reject) => {
113
- this.$refs.mediaManager
114
- .open()
115
- .then((result) =>
116
- result
117
- ? resolve(`<img width="50%" src="${result.file}">`)
118
- : reject("No image selected")
119
- )
120
- .catch((error) => reject(error));
121
- });
122
- },
123
- },
124
- beforeDestroy() {
125
- window && window.tinymce && window.tinymce.remove(this.editor);
126
- },
127
- watch: {
128
- value(val) {
129
- if (this.editor && this.editor.initialized && val !== this.editorContent) {
130
- this.editorContent = val
131
- this.editor.setContent(val);
132
- }
133
- },
134
- disabled(val) {
135
- if (this.editor && this.editor.initialized) {
136
- this.editor.setMode(val ? "readonly" : "design");
137
- }
138
- },
139
- },
140
- };
141
- </script>
142
-
143
- <style>
144
- .tox-notifications-container,
145
- .tox-statusbar__branding {
146
- display: none;
147
- }
148
- </style>
149
-
150
- <docs>
151
-
152
- ### Defaults
153
-
154
- This is the default [TinyMce configuration](https://www.tiny.cloud/docs/configure/).
155
-
156
- ```js
157
- {
158
- plugins: 'mapomedia preview paste importcss searchreplace autolink directionality code visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern noneditable help charmap quickbars emoticons',
159
- menubar: 'file edit view insert format tools table help',
160
- toolbar: 'undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview | insertfile image mapomedia media template link anchor codesample | ltr rtl',
161
- toolbar_sticky: true,
162
- image_advtab: true,
163
- importcss_append: true,
164
- template_cdate_format: '[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]',
165
- template_mdate_format: '[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]',
166
- height: 600,
167
- image_caption: true,
168
- quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',
169
- noneditable_noneditable_class: 'mceNonEditable',
170
- toolbar_mode: 'sliding',
171
- contextmenu: 'link image imagetools table',
172
- skin: useDarkMode ? 'oxide-dark' : 'oxide',
173
- content_css: useDarkMode ? 'dark' : 'default',
174
- content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
175
- }
176
- ```
177
- </docs>
@@ -1,55 +0,0 @@
1
- var useDarkMode = false;
2
-
3
- export default {
4
- plugins: 'mapomedia preview paste importcss searchreplace autolink directionality code visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern noneditable help charmap quickbars emoticons',
5
- // imagetools_cors_hosts: ['picsum.photos'],
6
- menubar: 'file edit view insert format tools table help',
7
- toolbar: 'undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview | insertfile image mapomedia media template link anchor codesample | ltr rtl',
8
- toolbar_sticky: true,
9
- image_advtab: true,
10
- // link_list: [
11
- // { title: 'My page 1', value: 'https://www.tiny.cloud' },
12
- // { title: 'My page 2', value: 'http://www.moxiecode.com' }
13
- // ],
14
- // image_list: [
15
- // { title: 'My page 1', value: 'https://www.tiny.cloud' },
16
- // { title: 'My page 2', value: 'http://www.moxiecode.com' }
17
- // ],
18
- // image_class_list: [
19
- // { title: 'None', value: '' },
20
- // { title: 'Some class', value: 'class-name' }
21
- // ],
22
- importcss_append: true,
23
- // file_picker_callback: function (callback, value, meta) {
24
- // /* Provide file and text for the link dialog */
25
- // if (meta.filetype === 'file') {
26
- // callback('https://www.google.com/logos/google.jpg', { text: 'My text' });
27
- // }
28
-
29
- // /* Provide image and alt text for the image dialog */
30
- // if (meta.filetype === 'image') {
31
- // callback('https://www.google.com/logos/google.jpg', { alt: 'My alt text' });
32
- // }
33
-
34
- // /* Provide alternative source and posted for the media dialog */
35
- // if (meta.filetype === 'media') {
36
- // callback('movie.mp4', { source2: 'alt.ogg', poster: 'https://www.google.com/logos/google.jpg' });
37
- // }
38
- // },
39
- // templates: [
40
- // { title: 'New Table', description: 'creates a new table', content: '<div class="mceTmpl"><table width="98%%" border="0" cellspacing="0" cellpadding="0"><tr><th scope="col"> </th><th scope="col"> </th></tr><tr><td> </td><td> </td></tr></table></div>' },
41
- // { title: 'Starting my story', description: 'A cure for writers block', content: 'Once upon a time...' },
42
- // { title: 'New list with dates', description: 'New List with dates', content: '<div class="mceTmpl"><span class="cdate">cdate</span><br /><span class="mdate">mdate</span><h2>My List</h2><ul><li></li><li></li></ul></div>' }
43
- // ],
44
- template_cdate_format: '[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]',
45
- template_mdate_format: '[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]',
46
- height: 600,
47
- image_caption: true,
48
- quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',
49
- noneditable_noneditable_class: 'mceNonEditable',
50
- toolbar_mode: 'sliding',
51
- contextmenu: 'link image imagetools table',
52
- skin: useDarkMode ? 'oxide-dark' : 'oxide',
53
- content_css: useDarkMode ? 'dark' : 'default',
54
- content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
55
- }
@@ -1,75 +0,0 @@
1
- <template>
2
- <div class="sidebar__ender">
3
- <sidebar-list-item
4
- class="sidebar__ender__item"
5
- v-for="(item, i) in routes"
6
- :key="i"
7
- :link="item.link"
8
- :label="item.label"
9
- :childrens="item.childrens"
10
- :icon="item.icon"
11
- />
12
- <logout-button class="sidebar__ender__item sidebar__ender__item--logout" />
13
- </div>
14
- </template>
15
-
16
- <style lang="scss" scoped>
17
- @import "@mapomodule/uikit/assets/variables.scss";
18
-
19
- .sidebar {
20
- &__ender {
21
- margin-top: auto;
22
- display: flex;
23
- flex-direction: column;
24
- &__icon {
25
- font-size: 1rem;
26
- margin-right: 0.5rem;
27
- }
28
- &__item {
29
- display: block;
30
- width: 100%;
31
- text-decoration: none;
32
- color: white;
33
- background: $b-2;
34
- transition: all linear 0.25s;
35
- border-radius: 0;
36
- &:hover {
37
- background: rgba($b-2, 0.25);
38
- }
39
- &--logout {
40
- background: $black !important;
41
- &:hover {
42
- background: rgba($black, 0.25) !important;
43
- }
44
- }
45
- }
46
- }
47
- }
48
- </style>
49
-
50
- <script>
51
- import { buildRoutes } from "../routebuilder";
52
-
53
- // @vuese
54
- export default {
55
- name: "SidebarFooter",
56
- data() {
57
- return {
58
- defaultIcon: ({label}) => `mdi-alpha-${label[0]}-box`.toLowerCase(),
59
- routes: this.routes,
60
- };
61
- },
62
- mounted: function () {
63
- this.routes = this.buildRoutes(
64
- this.$router.options.routes.filter(
65
- (route) => route.meta && route.meta.sidebarFooter === true
66
- )
67
- );
68
- },
69
- methods: {
70
- buildRoutes(routes) {
71
- return buildRoutes(routes, this.defaultIcon);
72
- },
73
- },
74
- };
75
- </script>
package/defaults.js DELETED
@@ -1,29 +0,0 @@
1
- import colors from 'vuetify/es5/util/colors'
2
-
3
- export default {
4
- customVariables: ['@mapomodule/uikit/assets/variables.scss'],
5
- theme: {
6
- dark: true,
7
- themes: {
8
- dark: {
9
- primary: '#309A00',
10
- accent: colors.grey.darken3,
11
- secondary: colors.amber.darken3,
12
- info: colors.teal.lighten1,
13
- warning: colors.amber.base,
14
- error: '#FF5252',
15
- success: colors.green.accent3
16
- },
17
- light: {
18
- primary: '#309A00',
19
- accent: colors.indigo.accent1,
20
- secondary: colors.amber.accent2,
21
- info: colors.teal.lighten1,
22
- warning: colors.amber.base,
23
- error: '#FF5252',
24
- success: colors.green.accent3
25
- }
26
- }
27
- },
28
- treeShake: false
29
- }
package/layouts/error.vue DELETED
@@ -1,45 +0,0 @@
1
- <template>
2
- <v-app>
3
- <h1 v-if="error.statusCode === 404">
4
- {{ pageNotFound }}
5
- </h1>
6
- <h1 v-else>
7
- {{ otherError }}
8
- </h1>
9
- <NuxtLink to="/">
10
- Home page
11
- </NuxtLink>
12
- <root-components />
13
- </v-app>
14
- </template>
15
-
16
- <script>
17
- export default {
18
- layout: 'empty',
19
- props: {
20
- error: {
21
- type: Object,
22
- default: null
23
- }
24
- },
25
- data () {
26
- return {
27
- pageNotFound: '404 Not Found',
28
- otherError: 'An error occurred'
29
- }
30
- },
31
- head () {
32
- const title =
33
- this.error.statusCode === 404 ? this.pageNotFound : this.otherError
34
- return {
35
- title
36
- }
37
- }
38
- }
39
- </script>
40
-
41
- <style scoped>
42
- h1 {
43
- font-size: 20px;
44
- }
45
- </style>
File without changes