mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-01-24 09:03:00 -05:00
Frontent dev env (#247)
* Added frontend development files/environment * More items-categories related removals * Improvements in pages templates (inc. static pages) * Improvements in video player * Added empty home page message + cta * Updates in media, playlist and management pages * Improvements in material icons font loading * Replaced media & playlists links in frontend dev-env * frontend package version update * chnaged frontend dev url port * static files update * Changed default position of theme switcher * enabled frontend docker container
This commit is contained in:
15
frontend/src/templates/config/core/api.config.js
Executable file
15
frontend/src/templates/config/core/api.config.js
Executable file
@@ -0,0 +1,15 @@
|
||||
module.exports = {
|
||||
media: '/media',
|
||||
playlists: '/playlists',
|
||||
comments: '/comments',
|
||||
search: '/search',
|
||||
tags: '/tags',
|
||||
categories: '/categories',
|
||||
members: '/users',
|
||||
liked: '/user/action/like',
|
||||
history: '/user/action/watch',
|
||||
actions: '/actions',
|
||||
manage_media: '/manage_media',
|
||||
manage_users: '/manage_users',
|
||||
manage_comments: '/manage_comments',
|
||||
};
|
||||
32
frontend/src/templates/config/core/url.config.js
Executable file
32
frontend/src/templates/config/core/url.config.js
Executable file
@@ -0,0 +1,32 @@
|
||||
module.exports = {
|
||||
home: './index.html',
|
||||
search: './search.html',
|
||||
latestMedia: './latest.html',
|
||||
featuredMedia: './featured.html',
|
||||
recommendedMedia: './recommended.html',
|
||||
members: './members.html',
|
||||
/* Error pages */
|
||||
error404: './error.html',
|
||||
/* Archive pages */
|
||||
tags: './tags.html',
|
||||
categories: './categories.html',
|
||||
/* User pages */
|
||||
likedMedia: './liked.html',
|
||||
history: './history.html',
|
||||
/* Add pages */
|
||||
addMedia: './add-media.html',
|
||||
/* Profile/account edit pages */
|
||||
editProfile: './edit-profile.html',
|
||||
editChannel: './edit-channel.html',
|
||||
/* User account pages */
|
||||
signin: './signin.html',
|
||||
signout: './signout.html',
|
||||
register: './register.html',
|
||||
changePassword: './change-password.html',
|
||||
/* Administration pages */
|
||||
admin: '/admin',
|
||||
/* Management pages */
|
||||
manageMedia: './manage-media.html',
|
||||
manageUsers: './manage-users.html',
|
||||
manageComments: './manage-comments.html',
|
||||
};
|
||||
35
frontend/src/templates/config/core/user.config.js
Normal file
35
frontend/src/templates/config/core/user.config.js
Normal file
@@ -0,0 +1,35 @@
|
||||
let name = undefined !== process.env.MEDIACMS_USER_NAME ? process.env.MEDIACMS_USER_NAME : 'Full Name';
|
||||
let username = undefined !== process.env.MEDIACMS_USER_USERNAME ? process.env.MEDIACMS_USER_USERNAME : 'Username';
|
||||
let thumbnail = undefined !== process.env.MEDIACMS_USER_THUMB ? process.env.MEDIACMS_USER_THUMB : null;
|
||||
let admin = 'true' === process.env.MEDIACMS_USER_IS_ADMIN;
|
||||
let anonymous = 'true' === process.env.MEDIACMS_USER_IS_ANONYMOUS;
|
||||
|
||||
module.exports = {
|
||||
name,
|
||||
username,
|
||||
thumbnail,
|
||||
is: {
|
||||
admin,
|
||||
anonymous,
|
||||
},
|
||||
can: {
|
||||
addMedia: true,
|
||||
editMedia: true,
|
||||
deleteMedia: true,
|
||||
editSubtitle: true,
|
||||
readComment: true,
|
||||
addComment: true,
|
||||
deleteComment: true,
|
||||
editProfile: true,
|
||||
deleteProfile: true,
|
||||
manageMedia: true,
|
||||
manageUsers: true,
|
||||
manageComments: true,
|
||||
contactUser: false,
|
||||
},
|
||||
pages: {
|
||||
about: './profile-about.html',
|
||||
media: './profile-media.html',
|
||||
playlists: './profile-playlists.html',
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
module.exports = {
|
||||
header: {
|
||||
right: '',
|
||||
},
|
||||
sidebar: {
|
||||
navMenuItems: [
|
||||
{
|
||||
text: 'About',
|
||||
link: './about.html',
|
||||
icon: 'contact_support',
|
||||
},
|
||||
{
|
||||
text: 'Terms',
|
||||
link: './terms.html',
|
||||
icon: 'description',
|
||||
},
|
||||
{
|
||||
text: 'Contact',
|
||||
link: './contact.html',
|
||||
icon: 'alternate_email',
|
||||
},
|
||||
],
|
||||
belowNavMenu: null,
|
||||
footer: 'Powered by <a href="//demo.mediacms.io" title="mediacms.io" target="_blank">mediacms.io</a>',
|
||||
},
|
||||
uploader: {
|
||||
belowUploadArea: '',
|
||||
postUploadMessage: '',
|
||||
},
|
||||
notifications: {
|
||||
messages: {
|
||||
addToLiked: 'Added to liked media',
|
||||
removeFromLiked: 'Removed from liked media',
|
||||
addToDisliked: 'Added to disliked media',
|
||||
removeFromDisliked: 'Removed from disliked media',
|
||||
},
|
||||
},
|
||||
};
|
||||
50
frontend/src/templates/config/installation/features.config.js
Executable file
50
frontend/src/templates/config/installation/features.config.js
Executable file
@@ -0,0 +1,50 @@
|
||||
module.exports = {
|
||||
embeddedVideo: {
|
||||
initialDimensions: {
|
||||
width: 560, // In pixels.
|
||||
height: 315, // In pixels.
|
||||
},
|
||||
},
|
||||
headerBar: {
|
||||
hideLogin: false,
|
||||
hideRegister: false,
|
||||
},
|
||||
sideBar: {
|
||||
hideHomeLink: false,
|
||||
hideTagsLink: false,
|
||||
hideCategoriesLink: false,
|
||||
},
|
||||
media: {
|
||||
actions: {
|
||||
share: true,
|
||||
report: true,
|
||||
like: true,
|
||||
dislike: true,
|
||||
download: true,
|
||||
comment: true,
|
||||
save: true,
|
||||
},
|
||||
shareOptions: [
|
||||
'embed',
|
||||
'fb',
|
||||
'tw',
|
||||
'whatsapp',
|
||||
'telegram',
|
||||
'reddit',
|
||||
'tumblr',
|
||||
'vk',
|
||||
'pinterest',
|
||||
'mix',
|
||||
'linkedin',
|
||||
'email',
|
||||
],
|
||||
},
|
||||
mediaItem: {
|
||||
hideDate: false,
|
||||
hideViews: false,
|
||||
hideAuthor: false,
|
||||
},
|
||||
playlists: {
|
||||
mediaTypes: ['audio', 'video'],
|
||||
},
|
||||
};
|
||||
25
frontend/src/templates/config/installation/pages.config.js
Normal file
25
frontend/src/templates/config/installation/pages.config.js
Normal file
@@ -0,0 +1,25 @@
|
||||
module.exports = {
|
||||
home: {
|
||||
sections: {
|
||||
latest: {
|
||||
title: 'Latest',
|
||||
},
|
||||
},
|
||||
},
|
||||
search: {
|
||||
advancedFilters: true,
|
||||
},
|
||||
media: {
|
||||
categoriesWithTitle: false,
|
||||
htmlInDescription: false,
|
||||
hideViews: false,
|
||||
related: {
|
||||
initialSize: 15,
|
||||
},
|
||||
},
|
||||
profile: {
|
||||
htmlInDescription: false,
|
||||
includeHistory: false,
|
||||
includeLikedMedia: false,
|
||||
},
|
||||
};
|
||||
53
frontend/src/templates/config/installation/site.config.js
Executable file
53
frontend/src/templates/config/installation/site.config.js
Executable file
@@ -0,0 +1,53 @@
|
||||
module.exports = {
|
||||
devEnv: 'true' === process.env.WEBPACK_DEV_SERVER,
|
||||
id: process.env.MEDIACMS_ID || 'mediacms-frontend',
|
||||
title: process.env.MEDIACMS_TITLE || 'MediaCMS Demo',
|
||||
url: process.env.MEDIACMS_URL || 'UNDEFINED_URL',
|
||||
api: process.env.MEDIACMS_API || 'UNDEFINED_API',
|
||||
theme: {
|
||||
mode: 'light', // Valid values: 'light', 'dark'.
|
||||
switch: {
|
||||
position: 'sidebar', // Valid values: 'header', 'sidebar'.
|
||||
},
|
||||
},
|
||||
logo: {
|
||||
lightMode: {
|
||||
svg: './static/images/logo_dark.svg',
|
||||
img: './static/images/logo_dark.png',
|
||||
},
|
||||
darkMode: {
|
||||
svg: './static/images/logo_light.svg',
|
||||
img: './static/images/logo_light.png',
|
||||
},
|
||||
},
|
||||
pages: {
|
||||
latest: {
|
||||
title: 'Recent uploads',
|
||||
},
|
||||
featured: {
|
||||
title: 'Featured',
|
||||
},
|
||||
recommended: {
|
||||
title: 'Recommended',
|
||||
},
|
||||
members: {
|
||||
title: 'Members',
|
||||
},
|
||||
},
|
||||
userPages: {
|
||||
liked: {
|
||||
title: 'Liked media',
|
||||
},
|
||||
history: {
|
||||
title: 'History',
|
||||
},
|
||||
},
|
||||
taxonomies: {
|
||||
tags: {
|
||||
title: 'Tags',
|
||||
},
|
||||
categories: {
|
||||
title: 'Categories',
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user