removes redundant usage of FRONTEND_HOST variable (#102)

This commit is contained in:
Markos Gogoulos
2021-03-21 20:36:32 +02:00
committed by GitHub
parent 3b35ce0262
commit 2552551662
7 changed files with 61 additions and 61 deletions

View File

@@ -1,37 +1,37 @@
MediaCMS.url = {
home: "{{FRONTEND_HOST}}",
search: "{{FRONTEND_HOST}}/search",
latestMedia: "{{FRONTEND_HOST}}/latest",
featuredMedia: "{{FRONTEND_HOST}}/featured",
recommendedMedia: "{{FRONTEND_HOST}}/recommended",
members: "{{FRONTEND_HOST}}/members",
/* Error pages */
error404: "{{FRONTEND_HOST}}/error",
/* Taxonomies pages */
tags: "{{FRONTEND_HOST}}/tags",
categories: "{{FRONTEND_HOST}}/categories",
topics: "{{FRONTEND_HOST}}/topics",
languages: "{{FRONTEND_HOST}}/languages",
countries: "{{FRONTEND_HOST}}/countries",
/* User pages */
likedMedia: "{{FRONTEND_HOST}}/liked",
history: "{{FRONTEND_HOST}}/history",
/* Add/edit pages */
addMedia: "{{FRONTEND_HOST}}/upload",
/* User account pages */
editProfile: "{{user.edit_url}}",
{% if request.user.is_authenticated %}
signout: "{{FRONTEND_HOST}}/accounts/logout/",
editChannel: "{{user.default_channel_edit_url}}",
changePassword: "{{FRONTEND_HOST}}/accounts/password/change/",
/* Administration pages */
{% if IS_MEDIACMS_ADMIN %}admin: '/admin',{% endif %}
/* Management pages */
{% if IS_MEDIACMS_ADMIN or IS_MEDIACMS_MANAGER or IS_MEDIACMS_EDITOR %}manageMedia: "{{FRONTEND_HOST}}/manage/media",{% endif %}
{% if IS_MEDIACMS_ADMIN or IS_MEDIACMS_MANAGER %}manageUsers: "{{FRONTEND_HOST}}/manage/users",{% endif %}
{% if IS_MEDIACMS_ADMIN or IS_MEDIACMS_MANAGER or IS_MEDIACMS_EDITOR %}manageComments: "{{FRONTEND_HOST}}/manage/comments",{% endif %}
{% else %}
signin: "{{FRONTEND_HOST}}/accounts/login/",
register: "{{FRONTEND_HOST}}/accounts/signup/",
{% endif %}
};
MediaCMS.url = {
home: "/",
search: "/search",
latestMedia: "/latest",
featuredMedia: "/featured",
recommendedMedia: "/recommended",
members: "/members",
/* Error pages */
error404: "/error",
/* Taxonomies pages */
tags: "/tags",
categories: "/categories",
topics: "/topics",
languages: "/languages",
countries: "/countries",
/* User pages */
likedMedia: "/liked",
history: "/history",
/* Add/edit pages */
addMedia: "/upload",
/* User account pages */
editProfile: "{{user.edit_url}}",
{% if request.user.is_authenticated %}
signout: "/accounts/logout/",
editChannel: "{{user.default_channel_edit_url}}",
changePassword: "/accounts/password/change/",
/* Administration pages */
{% if IS_MEDIACMS_ADMIN %}admin: '/admin',{% endif %}
/* Management pages */
{% if IS_MEDIACMS_EDITOR %}manageMedia: "/manage/media",{% endif %}
{% if IS_MEDIACMS_MANAGER %}manageUsers: "/manage/users",{% endif %}
{% if IS_MEDIACMS_EDITOR %}manageComments: "/manage/comments",{% endif %}
{% else %}
signin: "/accounts/login/",
register: "/accounts/signup/",
{% endif %}
};

View File

@@ -1,8 +1,8 @@
MediaCMS.site = {
id: 'mediacms',
title: "{{PORTAL_NAME}}",
url: '{{FRONTEND_HOST}}/',
api: '{{FRONTEND_HOST}}/api/v1',
url: '{{FRONTEND_HOST}}',
api: '{{FRONTEND_HOST}}api/v1',
theme: {
mode: 'light', // Valid values: 'light', 'dark'.
switch: {
@@ -11,12 +11,12 @@ MediaCMS.site = {
},
logo:{
lightMode:{
img: "{{FRONTEND_HOST}}/static/images/logo_dark.png",
svg: "{{FRONTEND_HOST}}/static/images/logo_dark.svg",
img: "/static/images/logo_dark.png",
svg: "/static/images/logo_dark.svg",
},
darkMode:{
img: "{{FRONTEND_HOST}}/static/images/logo_light.png",
svg: "{{FRONTEND_HOST}}/static/images/logo_light.svg",
img: "/static/images/logo_light.png",
svg: "/static/images/logo_light.svg",
},
},
pages: {
@@ -49,4 +49,5 @@ MediaCMS.site = {
title: 'Categories',
},
},
};
};