@oxygen-cms/ui 1.4.0 → 1.5.2

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 (69) hide show
  1. package/.eslintrc.js +23 -0
  2. package/.github/workflows/node.js.yml +4 -4
  3. package/.idea/modules.xml +8 -0
  4. package/.idea/ui.iml +10 -0
  5. package/package.json +13 -5
  6. package/src/AuthApi.js +77 -42
  7. package/src/CrudApi.js +3 -3
  8. package/src/GroupsApi.js +9 -0
  9. package/src/MediaDirectoryApi.js +1 -1
  10. package/src/PreferencesApi.js +2 -0
  11. package/src/UserPermissions.js +2 -9
  12. package/src/UserPreferences.js +0 -4
  13. package/src/UserPreferences.test.js +0 -2
  14. package/src/UsersApi.js +41 -0
  15. package/src/api.js +96 -38
  16. package/src/components/App.vue +19 -240
  17. package/src/components/AuthenticatedLayout.vue +254 -0
  18. package/src/components/AuthenticationLog.vue +86 -30
  19. package/src/components/CodeEditor.vue +16 -32
  20. package/src/components/EditButtonOnRowHover.vue +21 -0
  21. package/src/components/Error404.vue +15 -5
  22. package/src/components/EventsChooser.vue +11 -11
  23. package/src/components/EventsTable.vue +14 -8
  24. package/src/components/GenericEditableField.vue +74 -0
  25. package/src/components/GroupsChooser.vue +58 -0
  26. package/src/components/GroupsList.vue +129 -0
  27. package/src/components/ImportExport.vue +32 -1
  28. package/src/components/LegacyPage.vue +22 -23
  29. package/src/components/UserJoined.vue +35 -0
  30. package/src/components/UserManagement.vue +168 -0
  31. package/src/components/UserProfileForm.vue +214 -0
  32. package/src/components/ViewProfile.vue +7 -219
  33. package/src/components/auth/Auth404.vue +16 -0
  34. package/src/components/auth/Login.vue +135 -0
  35. package/src/components/auth/LoginLogo.vue +30 -0
  36. package/src/components/auth/Logout.vue +26 -0
  37. package/src/components/auth/PasswordRemind.vue +71 -0
  38. package/src/components/auth/PasswordReset.vue +97 -0
  39. package/src/components/auth/TwoFactorSetup.vue +115 -0
  40. package/src/components/auth/VerifyEmail.vue +71 -0
  41. package/src/components/auth/WelcomeFloat.vue +87 -0
  42. package/src/components/auth/login.scss +17 -0
  43. package/src/components/{MediaChooseDirectory.vue → media/MediaChooseDirectory.vue} +12 -12
  44. package/src/components/{MediaDirectory.vue → media/MediaDirectory.vue} +8 -8
  45. package/src/components/{MediaInsertModal.vue → media/MediaInsertModal.vue} +2 -2
  46. package/src/components/{MediaItem.vue → media/MediaItem.vue} +24 -23
  47. package/src/components/{MediaItemPreview.vue → media/MediaItemPreview.vue} +5 -5
  48. package/src/components/{MediaList.vue → media/MediaList.vue} +42 -38
  49. package/src/components/{MediaPage.vue → media/MediaPage.vue} +1 -1
  50. package/src/components/{MediaResponsiveImages.vue → media/MediaResponsiveImages.vue} +5 -5
  51. package/src/components/{MediaUpload.vue → media/MediaUpload.vue} +10 -10
  52. package/src/components/{media.scss → media/media.scss} +1 -1
  53. package/src/components/preferences/PreferencesField.vue +10 -10
  54. package/src/components/preferences/PreferencesList.vue +13 -20
  55. package/src/components/preferences/PreferencesThemeChooser.vue +9 -9
  56. package/src/components/preferences/ShowIfPermitted.vue +9 -14
  57. package/src/components/users/CreateUserModal.vue +73 -0
  58. package/src/icons.js +90 -0
  59. package/src/main.js +111 -0
  60. package/src/modules/LegacyPages.js +18 -0
  61. package/src/modules/Media.js +45 -0
  62. package/src/modules/UserManagement.js +24 -0
  63. package/src/routes/index.js +92 -0
  64. package/src/store/index.js +70 -0
  65. package/src/styles/_variables.scss +1 -0
  66. package/src/styles/app.scss +15 -2
  67. package/src/login.js +0 -17
  68. package/src/routes.js +0 -61
  69. package/src/styles/login.scss +0 -86
@@ -0,0 +1,73 @@
1
+ <template>
2
+ <b-modal :closable="false" :active="active" has-modal-card trap-focus aria-role="dialog" aria-modal @update:active="a => $emit('update:active', a)">
3
+ <div class="modal-card" style="overflow: visible">
4
+ <header class="modal-card-head">
5
+ <p class="modal-card-title">
6
+ <b-icon icon="users" size="is-normal" class="push-right"></b-icon>
7
+ Create Account
8
+ </p>
9
+ </header>
10
+ <section class="modal-card-body" style="overflow: visible">
11
+ <b-field label="Username">
12
+ <b-input v-model="username" placeholder="e.g.: johndoe"></b-input>
13
+ </b-field>
14
+ <b-field label="Email Address">
15
+ <b-input v-model="email" type="email" placeholder="e.g.: example@example.com"></b-input>
16
+ </b-field>
17
+ <b-field label="Full Name">
18
+ <b-input v-model="fullName" placeholder="e.g.: John Doe"></b-input>
19
+ </b-field>
20
+ <b-field label="Group">
21
+ <GroupsChooser :value="group" @select="g => group = g" />
22
+ </b-field>
23
+ </section>
24
+ <footer class="modal-card-foot is-flex">
25
+ <div class="is-flex-grow-1"></div>
26
+ <b-button @click="$emit('update:active', false)">Cancel</b-button>
27
+ <b-button type="is-primary" :loading="submitting" @click="submit">Create Account</b-button>
28
+ </footer>
29
+ </div>
30
+ </b-modal>
31
+ </template>
32
+
33
+ <script>
34
+ import GroupsChooser from "../GroupsChooser.vue";
35
+ import UsersApi from "../../UsersApi";
36
+ import {morphToNotification} from "../../api";
37
+ export default {
38
+ name: "CreateUserModal",
39
+ components: {GroupsChooser},
40
+ props: {
41
+ active: { type: Boolean, required: true }
42
+ },
43
+ data() {
44
+ return {
45
+ username: '',
46
+ email: '',
47
+ fullName: '',
48
+ group: null,
49
+ submitting: false,
50
+ usersApi: new UsersApi(this.$buefy)
51
+ }
52
+ },
53
+ methods: {
54
+ async submit() {
55
+ let data = { username: this.username, email: this.email, fullName: this.fullName, group: this.group };
56
+ try {
57
+ this.submitting = true;
58
+ let response = await this.usersApi.create(data);
59
+ this.$buefy.notification.open(morphToNotification(response));
60
+ this.$emit('update:active', false);
61
+ this.$emit('update:users');
62
+ } catch(e) {
63
+ // let the user try again
64
+ }
65
+ this.submitting = false;
66
+ }
67
+ }
68
+ }
69
+ </script>
70
+
71
+ <style scoped>
72
+
73
+ </style>
package/src/icons.js ADDED
@@ -0,0 +1,90 @@
1
+ import { library } from '@fortawesome/fontawesome-svg-core';
2
+
3
+ // internal icons
4
+ import {
5
+ faCheck,
6
+ faCheckCircle,
7
+ faInfoCircle,
8
+ faExternalLinkAlt,
9
+ faExclamationTriangle,
10
+ faExclamationCircle,
11
+ faArrowUp,
12
+ faAngleRight,
13
+ faAngleLeft,
14
+ faAngleDown,
15
+ faEye,
16
+ faEyeSlash,
17
+ faCaretDown,
18
+ faCaretUp,
19
+ faUpload,
20
+ faPlus,
21
+ faCogs,
22
+ faPuzzlePiece,
23
+ faPhotoVideo,
24
+ faUserPlus,
25
+ faMailBulk,
26
+ faUsers,
27
+ faArrowLeft,
28
+ faRecycle,
29
+ faList,
30
+ faFileAlt,
31
+ faFile,
32
+ faFileAudio,
33
+ faFileImage,
34
+ faFilePdf,
35
+ faUserAlt,
36
+ faStamp,
37
+ faCalendarAlt,
38
+ faAddressCard,
39
+ faFileImport,
40
+ faUser,
41
+ faFileExport,
42
+ faDownload,
43
+ faFileExcel,
44
+ faFileCsv,
45
+ faChevronCircleDown,
46
+ faChevronCircleUp,
47
+ faTrash,
48
+ faSearch,
49
+ faBan,
50
+ faShare,
51
+ faTicketAlt,
52
+ faPencilAlt,
53
+ faRedoAlt,
54
+ faTags,
55
+ faLock,
56
+ faUserSlash,
57
+ faUsersCog,
58
+ faMusic,
59
+ faCalendarDay,
60
+ faTimesCircle,
61
+ faEnvelope,
62
+ faUserCog,
63
+ faFolder,
64
+ faHome,
65
+ faSignInAlt,
66
+ faUserEdit,
67
+ faSignOutAlt,
68
+ faTag,
69
+ faFolderPlus,
70
+ faTimes,
71
+ faQuestionCircle,
72
+ faFileUpload,
73
+ faLandmark,
74
+ faFolderOpen,
75
+ faImages,
76
+ faMinusCircle
77
+ } from "@fortawesome/free-solid-svg-icons";
78
+
79
+ export const addIconsToLibrary = () => {
80
+ library.add(faCheck, faLock, faUserSlash, faUserEdit, faUsersCog, faMinusCircle, faSignInAlt,
81
+ faCheckCircle, faInfoCircle, faExclamationTriangle, faExclamationCircle, faFileAlt,
82
+ faArrowUp, faAngleRight, faEnvelope, faAngleLeft, faTicketAlt, faUserCog, faTags, faCalendarDay, faTimesCircle,
83
+ faMusic, faPencilAlt, faRedoAlt, faBan, faExternalLinkAlt,
84
+ faSearch, faAngleDown, faUserAlt, faCogs, faPhotoVideo, faPuzzlePiece, faPlus, faUserPlus, faMailBulk, faUsers,
85
+ faArrowLeft, faRecycle, faList, faStamp, faCalendarAlt, faAddressCard, faFileImport, faFileExport, faDownload,
86
+ faFileExcel, faFileCsv, faChevronCircleDown, faChevronCircleUp, faTrash,
87
+ faEye, faEyeSlash, faCaretDown, faCaretUp, faUpload, faUser, faFolder, faHome, faFilePdf, faSignOutAlt, faTag,
88
+ faFolderPlus, faTimes, faQuestionCircle, faFileUpload, faLandmark,
89
+ faFolderOpen, faFile, faFileAudio, faFileImage, faShare, faImages);
90
+ };
package/src/main.js ADDED
@@ -0,0 +1,111 @@
1
+ import Router from 'vue-router';
2
+ import App from './components/App.vue';
3
+ import UserPermissions from './UserPermissions';
4
+ import UserPreferences from './UserPreferences';
5
+ import VHotkey from 'v-hotkey';
6
+ import Buefy from 'buefy';
7
+ import AsyncComputed from 'vue-async-computed';
8
+ import { FetchBuilder } from './api';
9
+ import { addIconsToLibrary } from './icons';
10
+ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
11
+ import { AuthRoutes, makeAuthenticatedRoute } from "./routes";
12
+ import createStore from "./store/index";
13
+ import { checkAuthenticated } from "./AuthApi";
14
+ import Error404 from "./components/Error404.vue";
15
+
16
+ /**
17
+ * Creates the Vue.js Oxygen application, allowing for a few points of customization (i.e.: adding modules)
18
+ * @param Vue
19
+ * @param extraRoutes
20
+ * @param extraComponents
21
+ * @param beforeMount
22
+ */
23
+ export default class OxygenUI {
24
+ constructor(Vue) {
25
+ this.app = null;
26
+ this.Vue = Vue;
27
+ this.authenticatedRoutes = []
28
+ this.unauthenticatedRoutes = []
29
+ this.rootComponents = { App }
30
+ this.beforeMountHooks = []
31
+ }
32
+
33
+ addAuthenticatedRoutes(routes) {
34
+ for (let route of routes) {
35
+ this.authenticatedRoutes.push(route);
36
+ }
37
+ }
38
+
39
+ addRoute(route) {
40
+ this.authenticatedRoutes.push(route);
41
+ }
42
+
43
+ addUnauthenticatedRoutes(routes) {
44
+ for (let route of routes) {
45
+ this.unauthenticatedRoutes.push(route);
46
+ }
47
+ }
48
+
49
+ registerModule(module) {
50
+ module(this)
51
+ }
52
+
53
+ createApp() {
54
+ // this could occur if we encounter a bad link inside the <LegacyPage> functionality
55
+ // TODO: remove this once <LegacyPage> is gone
56
+ if (window.location !== window.parent.location) {
57
+ throw new Error('refusing to load application inside of an iframe');
58
+ }
59
+
60
+ addIconsToLibrary();
61
+ this.Vue.component('vue-fontawesome', FontAwesomeIcon);
62
+ this.Vue.use(Buefy, {
63
+ defaultIconComponent: 'vue-fontawesome',
64
+ defaultIconPack: 'fas',
65
+ });
66
+ this.Vue.use(VHotkey);
67
+ this.Vue.use(AsyncComputed);
68
+ this.Vue.use(Router);
69
+
70
+ const store = createStore(this.Vue);
71
+
72
+ const routes = AuthRoutes
73
+ .concat([
74
+ makeAuthenticatedRoute(this.authenticatedRoutes)
75
+ ])
76
+ .concat(this.unauthenticatedRoutes)
77
+ .concat([{
78
+ path: '*',
79
+ name: 'error404',
80
+ component: Error404,
81
+ meta: {title: 'Not found'}
82
+ }]);
83
+
84
+ const router = new Router({
85
+ routes: routes,
86
+ base: '/oxygen/',
87
+ mode: 'history'
88
+ });
89
+
90
+ router.beforeEach(checkAuthenticated(store));
91
+
92
+ this.app = new this.Vue({
93
+ router: router,
94
+ components: this.rootComponents,
95
+ store
96
+ });
97
+
98
+ FetchBuilder.setRouter(router);
99
+ UserPermissions.setBuefy(this.app.$buefy);
100
+ UserPreferences.setBuefy(this.app.$buefy)
101
+ return this;
102
+ }
103
+
104
+ mount(selector) {
105
+ for(let hook of this.beforeMountHooks) {
106
+ hook(this.app);
107
+ }
108
+ this.app.$mount(selector);
109
+ }
110
+ }
111
+
@@ -0,0 +1,18 @@
1
+ import LegacyPage from "../components/LegacyPage.vue";
2
+
3
+ export default function(ui) {
4
+ ui.addAuthenticatedRoutes([
5
+ {
6
+ // will match everything, try to render a legacy Oxygen page...
7
+ path: '(pages|partials|upcoming-events)/:subpath*',
8
+ component: LegacyPage,
9
+ props: (route) => {
10
+ return {
11
+ fullPath: route.fullPath,
12
+ legacyPrefix: '/oxygen/view',
13
+ adminPrefix: '/oxygen'
14
+ }
15
+ }
16
+ }
17
+ ]);
18
+ }
@@ -0,0 +1,45 @@
1
+ import MediaPage from "../components/media/MediaPage.vue";
2
+ import MediaResponsiveImages from "../components/media/MediaResponsiveImages.vue";
3
+
4
+ export default function(ui) {
5
+ ui.addAuthenticatedRoutes([
6
+ {
7
+ path: 'media/list/:currentPath(.*)?',
8
+ name: 'media.list',
9
+ props: true,
10
+ component: MediaPage,
11
+ meta: { title: 'Photos & File Uploads'}
12
+ },
13
+ {
14
+ path: 'media/list',
15
+ props: {
16
+ currentPath: ''
17
+ },
18
+ component: MediaPage,
19
+ meta: { title: 'Photos & File Uploads'}
20
+ },
21
+ {
22
+ path: 'media/trash',
23
+ name: 'media.trash',
24
+ props: {
25
+ inTrash: true,
26
+ currentPath: ''
27
+ },
28
+ component: MediaPage,
29
+ meta: { title: 'Deleted Photos & File Uploads'}
30
+ },
31
+ {
32
+ path: 'media/search/:searchQuery',
33
+ name: 'media.search',
34
+ props: true,
35
+ component: MediaPage,
36
+ meta: { title: 'Search Photos & File Uploads'}
37
+ },
38
+ {
39
+ path: 'media/responsive-images',
40
+ name: 'media.responsiveImages',
41
+ component: MediaResponsiveImages,
42
+ meta: { title: 'Responsive Images'}
43
+ }
44
+ ]);
45
+ }
@@ -0,0 +1,24 @@
1
+ import ViewProfile from "../components/ViewProfile.vue";
2
+ import AuthenticationLog from "../components/AuthenticationLog.vue";
3
+ import UserManagement from "../components/UserManagement.vue";
4
+
5
+ export default function(ui) {
6
+ ui.addAuthenticatedRoutes([
7
+ {
8
+ path: 'user/profile',
9
+ name: 'auth.viewProfile',
10
+ component: ViewProfile,
11
+ meta: { title: 'View Profile' }
12
+ },
13
+ {
14
+ path: 'user/login-log',
15
+ component: AuthenticationLog,
16
+ meta: { title: 'Logins & Login Attempts' }
17
+ },
18
+ {
19
+ path: 'users',
20
+ component: UserManagement,
21
+ meta: { title: 'Manage Users'}
22
+ }
23
+ ]);
24
+ }
@@ -0,0 +1,92 @@
1
+ import AuthenticatedLayout from "../components/AuthenticatedLayout.vue";
2
+ import Login from "../components/auth/Login.vue";
3
+ import Logout from "../components/auth/Logout.vue";
4
+ import WelcomeFloat from "../components/auth/WelcomeFloat.vue";
5
+ import TwoFactorSetup from "../components/auth/TwoFactorSetup.vue";
6
+ import PasswordRemind from "../components/auth/PasswordRemind.vue";
7
+ import PasswordReset from "../components/auth/PasswordReset.vue";
8
+ import Auth404 from "../components/auth/Auth404.vue";
9
+ import VerifyEmail from "../components/auth/VerifyEmail.vue";
10
+
11
+ export const AuthRoutes = [
12
+ {
13
+ path: '/auth',
14
+ component: WelcomeFloat,
15
+ meta: {
16
+ allowUnauthenticated: true
17
+ },
18
+ children: [
19
+ {
20
+ name: 'login',
21
+ path: 'login',
22
+ component: Login,
23
+ meta: {
24
+ title: 'Login',
25
+ allowUnauthenticated: true
26
+ }
27
+ },
28
+ {
29
+ name: 'logout',
30
+ path: 'logout',
31
+ component: Logout,
32
+ meta: {
33
+ title: 'Logout',
34
+ allowUnauthenticated: true
35
+ }
36
+ },
37
+ {
38
+ name: '2fa-setup',
39
+ path: '2fa-setup',
40
+ component: TwoFactorSetup,
41
+ meta: {
42
+ title: 'Setup two factor authentication'
43
+ }
44
+ },
45
+ {
46
+ name: 'forgot-password',
47
+ path: 'forgot-password',
48
+ component: PasswordRemind,
49
+ meta: {
50
+ title: 'Forgot Password',
51
+ allowUnauthenticated: true
52
+ }
53
+ },
54
+ {
55
+ name: 'reset-password',
56
+ path: 'reset-password',
57
+ component: PasswordReset,
58
+ meta: {
59
+ title: 'Reset Password',
60
+ allowUnauthenticated: true
61
+ }
62
+ },
63
+ {
64
+ name: 'needs-verified-email',
65
+ path: 'needs-verified-email',
66
+ component: VerifyEmail,
67
+ meta: {
68
+ title: 'Verify your email address'
69
+ }
70
+ },
71
+ {
72
+ path: '',
73
+ component: Auth404
74
+ },
75
+ {
76
+ path: '*',
77
+ component: Auth404
78
+ }
79
+ ]
80
+ }
81
+ ];
82
+
83
+ export const makeAuthenticatedRoute = (children) => {
84
+ return {
85
+ path: '/',
86
+ component: AuthenticatedLayout,
87
+ props: true,
88
+ redirect: '/dashboard',
89
+ children: children,
90
+ }
91
+ };
92
+
@@ -0,0 +1,70 @@
1
+ import Vuex from 'vuex';
2
+
3
+ import UserPermissions from "../UserPermissions";
4
+ import AuthApi from "../AuthApi";
5
+ import UserPreferences from "../UserPreferences";
6
+
7
+ export default (vue) => {
8
+ vue.use(Vuex);
9
+
10
+ return new Vuex.Store({
11
+ state: {
12
+ user: null,
13
+ loginStatus: null,
14
+ impersonating: false
15
+ },
16
+ mutations: {
17
+ setUser(state, user) {
18
+ state.user = user;
19
+ state.loginStatus = user !== null;
20
+ },
21
+ setImpersonating(state, user) {
22
+ state.user = user;
23
+ state.loginStatus = user !== null;
24
+ state.impersonating = true;
25
+ },
26
+ stopImpersonating(state, user) {
27
+ state.user = user;
28
+ state.loginStatus = user !== null;
29
+ state.impersonating = false;
30
+ }
31
+ },
32
+ getters: {
33
+ userPermissions: state => {
34
+ if(!state.user) { return null; }
35
+ return new UserPermissions(state.user.permissions);
36
+ },
37
+ userPreferences: state => {
38
+ if(!state.user) { return null; }
39
+ return new UserPreferences(state.user.preferences);
40
+ }
41
+ },
42
+ actions: {
43
+ determineLoginStatus({ commit, state }) {
44
+ return new Promise((resolve) => {
45
+ if(state.loginStatus != null) {
46
+ resolve(state.loginStatus);
47
+ return;
48
+ }
49
+
50
+ console.log('Determining login status');
51
+
52
+ let authApi = new AuthApi(null);
53
+ authApi.login(null, null, null).then((response) => {
54
+ console.log(response);
55
+ if(response.impersonating === true) {
56
+ commit('setImpersonating', response.user);
57
+ } else {
58
+ commit('setUser', response.user);
59
+ }
60
+ resolve(true);
61
+ }).catch(() => {
62
+ commit('setUser', null);
63
+ resolve(false);
64
+ })
65
+ });
66
+
67
+ }
68
+ }
69
+ });
70
+ };
@@ -19,4 +19,5 @@ $menu-item-active-color: lighten($grey, 4%);
19
19
  //$link-focus-border: $primary;
20
20
 
21
21
  // Import Bulma's core
22
+ // TODO: wtf is going on here??
22
23
  @import "~bulma/sass/utilities/_all";
@@ -50,14 +50,27 @@ pre.no-pre {
50
50
  }
51
51
 
52
52
  .slide-left-enter-active, .slide-left-leave-active {
53
- transition: transform 0.4s ease, opacity 0.4s ease;
53
+ transition: transform 0.2s ease, opacity 0.2s ease;
54
54
  }
55
55
  .slide-left-leave-to {
56
- transform: translateY(2em);
56
+ transform: translateX(1em);
57
57
  opacity: 0;
58
58
  }
59
59
 
60
60
  .slide-left-enter {
61
+ transform: translateX(-1em);
62
+ opacity: 0;
63
+ }
64
+
65
+ .slide-up-enter-active, .slide-up-leave-active {
66
+ transition: transform 0.4s ease, opacity 0.4s ease;
67
+ }
68
+ .slide-up-leave-to {
69
+ transform: translateY(2em);
70
+ opacity: 0;
71
+ }
72
+
73
+ .slide-up-enter {
61
74
  transform: translateY(-2em);
62
75
  opacity: 0;
63
76
  }
package/src/login.js DELETED
@@ -1,17 +0,0 @@
1
- import Vue from "vue";
2
- import Buefy from "buefy";
3
- import './styles/app.scss';
4
- import './styles/login.scss';
5
- import {morphToNotification} from "./api";
6
-
7
- Vue.use(Buefy, {
8
- defaultIconComponent: 'vue-fontawesome',
9
- defaultIconPack: 'fas',
10
- });
11
-
12
- var app = new Vue({
13
- }).$mount('#app');
14
-
15
- if(typeof window.OXYGEN_SESSION_NOTIFICATION !== 'undefined') {
16
- app.$buefy.toast.open(morphToNotification(window.OXYGEN_SESSION_NOTIFICATION));
17
- }
package/src/routes.js DELETED
@@ -1,61 +0,0 @@
1
- import ViewProfile from "./components/ViewProfile.vue";
2
- import AuthenticationLog from "./components/AuthenticationLog.vue";
3
- import MediaPage from "./components/MediaPage.vue";
4
- import MediaResponsiveImages from "./components/MediaResponsiveImages.vue";
5
-
6
- const UserProfileRoutes = [
7
- {
8
- path: '/auth/profile',
9
- name: 'auth.viewProfile',
10
- component: ViewProfile,
11
- meta: { title: 'View Profile' }
12
- },
13
- {
14
- path: '/auth/login-log',
15
- component: AuthenticationLog,
16
- meta: { title: 'Logins & Login Attempts' }
17
- },
18
- ];
19
-
20
- const MediaRoutes = [
21
- {
22
- path: '/media/list/:currentPath(.*)?',
23
- name: 'media.list',
24
- props: true,
25
- component: MediaPage,
26
- meta: { title: 'Photos & File Uploads'}
27
- },
28
- {
29
- path: '/media/list',
30
- props: {
31
- currentPath: ''
32
- },
33
- component: MediaPage,
34
- meta: { title: 'Photos & File Uploads'}
35
- },
36
- {
37
- path: '/media/trash',
38
- name: 'media.trash',
39
- props: {
40
- inTrash: true,
41
- currentPath: ''
42
- },
43
- component: MediaPage,
44
- meta: { title: 'Deleted Photos & File Uploads'}
45
- },
46
- {
47
- path: '/media/search/:searchQuery',
48
- name: 'media.search',
49
- props: true,
50
- component: MediaPage,
51
- meta: { title: 'Search Photos & File Uploads'}
52
- },
53
- {
54
- path: '/media/responsive-images',
55
- name: 'media.responsiveImages',
56
- component: MediaResponsiveImages,
57
- meta: { title: 'Responsive Images'}
58
- }
59
- ];
60
-
61
- export { UserProfileRoutes, MediaRoutes };