@oxygen-cms/ui 1.6.2 → 1.6.3
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/package.json +1 -1
- package/src/components/CodeEditor.vue +34 -1
- package/src/components/preferences/Preferences.vue +1 -1
- package/src/components/preferences/PreferencesList.vue +1 -1
- package/src/components/preferences/PreferencesThemeChooser.vue +2 -0
- package/src/main.js +14 -1
- package/src/modules/Events.js +35 -0
- package/src/modules/{LegacyPages.js → PagesPartials.js} +1 -12
package/package.json
CHANGED
|
@@ -32,11 +32,44 @@
|
|
|
32
32
|
<script>
|
|
33
33
|
|
|
34
34
|
import AceEditor from 'vue2-ace-editor';
|
|
35
|
-
|
|
35
|
+
// language extension pre-requisite...
|
|
36
|
+
import 'brace/ext/language_tools';
|
|
36
37
|
import 'brace/mode/html';
|
|
37
38
|
import 'brace/mode/twig';
|
|
39
|
+
import 'brace/snippets/html';
|
|
40
|
+
import 'brace/snippets/twig';
|
|
38
41
|
import 'brace/theme/tomorrow_night_eighties';
|
|
39
42
|
import 'brace/theme/tomorrow_night';
|
|
43
|
+
import 'brace/theme/ambiance';
|
|
44
|
+
import 'brace/theme/chaos';
|
|
45
|
+
import 'brace/theme/clouds_midnight';
|
|
46
|
+
import 'brace/theme/cobalt';
|
|
47
|
+
import 'brace/theme/idle_fingers';
|
|
48
|
+
import 'brace/theme/merbivore';
|
|
49
|
+
import 'brace/theme/merbivore_soft';
|
|
50
|
+
import 'brace/theme/mono_industrial';
|
|
51
|
+
import 'brace/theme/monokai';
|
|
52
|
+
import 'brace/theme/pastel_on_dark';
|
|
53
|
+
import 'brace/theme/solarized_dark';
|
|
54
|
+
import 'brace/theme/terminal';
|
|
55
|
+
import 'brace/theme/tomorrow_night';
|
|
56
|
+
import 'brace/theme/tomorrow_night_blue';
|
|
57
|
+
import 'brace/theme/tomorrow_night_bright';
|
|
58
|
+
import 'brace/theme/tomorrow_night_eighties';
|
|
59
|
+
import 'brace/theme/twilight';
|
|
60
|
+
import 'brace/theme/vibrant_ink';
|
|
61
|
+
import 'brace/theme/chrome';
|
|
62
|
+
import 'brace/theme/clouds';
|
|
63
|
+
import 'brace/theme/crimson_editor';
|
|
64
|
+
import 'brace/theme/dawn';
|
|
65
|
+
import 'brace/theme/dreamweaver';
|
|
66
|
+
import 'brace/theme/eclipse';
|
|
67
|
+
import 'brace/theme/github';
|
|
68
|
+
import 'brace/theme/kr_theme';
|
|
69
|
+
import 'brace/theme/solarized_light';
|
|
70
|
+
import 'brace/theme/textmate';
|
|
71
|
+
import 'brace/theme/tomorrow';
|
|
72
|
+
import 'brace/theme/xcode';
|
|
40
73
|
|
|
41
74
|
export default {
|
|
42
75
|
name: "CodeEditor",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<b-tab-item v-if="slotProps.canAccessPrefs(['appearance.themes', 'appearance.pages', 'appearance.events'].concat(getExtraPrefsPermissions('appearance')))" label="Website Theme">
|
|
5
5
|
<PreferencesThemeChooser @theme-changed="onThemeChanged" />
|
|
6
6
|
<PreferencesPageTemplates :current-theme="currentTheme" />
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
<PreferencesSiteAppearance :current-theme="currentTheme" />
|
|
9
9
|
<component :is="pref.component" v-for="pref in getExtraPrefs('appearance')" :key="pref.key" :current-theme="currentTheme" />
|
|
10
10
|
</b-tab-item>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
<PreferencesField data-key="appearance.themes::theme" label="">
|
|
5
5
|
<template #default="slotProps">
|
|
6
6
|
<b-table
|
|
7
|
+
v-if="Object.values(slotProps.options).length > 0"
|
|
7
8
|
:data="Object.values(slotProps.options)"
|
|
8
9
|
:striped="false">
|
|
9
10
|
<b-table-column v-slot="props" label="Key">
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
<b-button v-else type="is-success" disabled>Theme is already active</b-button>
|
|
27
28
|
</b-table-column>
|
|
28
29
|
</b-table>
|
|
30
|
+
<p v-else class="has-text-centered"><em>No themes loaded.</em></p>
|
|
29
31
|
</template>
|
|
30
32
|
</PreferencesField>
|
|
31
33
|
</ShowIfPermitted>
|
package/src/main.js
CHANGED
|
@@ -12,7 +12,7 @@ import { AuthRoutes, makeAuthenticatedRoute } from "./routes";
|
|
|
12
12
|
import createStore from "./store/index";
|
|
13
13
|
import { checkAuthenticated } from "./AuthApi";
|
|
14
14
|
import Error404 from "./components/Error404.vue";
|
|
15
|
-
import
|
|
15
|
+
import Preferences from "./components/preferences/Preferences.vue";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Creates the Vue.js Oxygen application, allowing for a few points of customization (i.e.: adding modules)
|
|
@@ -29,6 +29,10 @@ export default class OxygenUI {
|
|
|
29
29
|
this.unauthenticatedRoutes = []
|
|
30
30
|
this.mainMenuItems = {}
|
|
31
31
|
this.beforeMountHooks = []
|
|
32
|
+
this.extraPrefs = {
|
|
33
|
+
'appearance': [],
|
|
34
|
+
'external': []
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
|
|
34
38
|
addAuthenticatedRoutes(routes) {
|
|
@@ -81,6 +85,15 @@ export default class OxygenUI {
|
|
|
81
85
|
|
|
82
86
|
const store = createStore(this.Vue);
|
|
83
87
|
|
|
88
|
+
this.authenticatedRoutes.push({
|
|
89
|
+
path: '/preferences',
|
|
90
|
+
component: Preferences,
|
|
91
|
+
props: {
|
|
92
|
+
extraPrefs: this.extraPrefs
|
|
93
|
+
},
|
|
94
|
+
meta: { title: 'System Preferences' }
|
|
95
|
+
});
|
|
96
|
+
|
|
84
97
|
const routes = AuthRoutes
|
|
85
98
|
.concat([
|
|
86
99
|
makeAuthenticatedRoute(this.authenticatedRoutes)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import LegacyPage from "../components/LegacyPage.vue";
|
|
2
|
+
import { WEB_CONTENT } from "../main.js";
|
|
3
|
+
import PreferencesEventTemplates from "../components/preferences/PreferencesEventTemplates.vue";
|
|
4
|
+
|
|
5
|
+
export default function(ui) {
|
|
6
|
+
ui.addMainMenuGroup(WEB_CONTENT, {
|
|
7
|
+
name: 'Events',
|
|
8
|
+
icon: 'calendar-alt',
|
|
9
|
+
listAction: '/upcoming-events',
|
|
10
|
+
listPermission: 'upcomingEvents.getList',
|
|
11
|
+
addIcon: 'calendar-plus',
|
|
12
|
+
addPermission: 'upcomingEvents.postCreate',
|
|
13
|
+
addAction: '/upcoming-events/create',
|
|
14
|
+
items: {
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
ui.extraPrefs['appearance'].push({
|
|
18
|
+
key: 'appearance.events',
|
|
19
|
+
component: PreferencesEventTemplates
|
|
20
|
+
});
|
|
21
|
+
ui.addAuthenticatedRoutes([
|
|
22
|
+
{
|
|
23
|
+
// will match everything, try to render a legacy Oxygen page...
|
|
24
|
+
path: 'upcoming-events/:subpath*',
|
|
25
|
+
component: LegacyPage,
|
|
26
|
+
props: (route) => {
|
|
27
|
+
return {
|
|
28
|
+
fullPath: route.fullPath,
|
|
29
|
+
legacyPrefix: '/oxygen/view',
|
|
30
|
+
adminPrefix: '/oxygen'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]);
|
|
35
|
+
}
|
|
@@ -24,21 +24,10 @@ export default function(ui) {
|
|
|
24
24
|
items: {
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
ui.addMainMenuGroup(WEB_CONTENT, {
|
|
28
|
-
name: 'Events',
|
|
29
|
-
icon: 'calendar-alt',
|
|
30
|
-
listAction: '/upcoming-events',
|
|
31
|
-
listPermission: 'upcomingEvents.getList',
|
|
32
|
-
addIcon: 'calendar-plus',
|
|
33
|
-
addPermission: 'upcomingEvents.postCreate',
|
|
34
|
-
addAction: '/upcoming-events/create',
|
|
35
|
-
items: {
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
27
|
ui.addAuthenticatedRoutes([
|
|
39
28
|
{
|
|
40
29
|
// will match everything, try to render a legacy Oxygen page...
|
|
41
|
-
path: '(pages|partials
|
|
30
|
+
path: '(pages|partials)/:subpath*',
|
|
42
31
|
component: LegacyPage,
|
|
43
32
|
props: (route) => {
|
|
44
33
|
return {
|