mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-02-26 15:23:18 +01:00
Merge pull request #26 from mediacms-io/frontend-updates
playlist support and fixes!
This commit is contained in:
commit
4c4861500f
13
README.md
13
README.md
@ -94,6 +94,19 @@ cd /home/mediacms.io/mediacms/ && bash ./install.sh
|
||||
The script will ask if you have a URL where you want to deploy MediaCMS, otherwise it will use localhost. If you provide a URL, it will use Let's Encrypt service to install a valid ssl certificate.
|
||||
|
||||
|
||||
## Update
|
||||
|
||||
If you've used the above way to install MediaCMS, update with the following:
|
||||
|
||||
```bash
|
||||
cd /home/mediacms.io/mediacms # enter mediacms directory
|
||||
source /home/mediacms.io/bin/activate # use virtualenv
|
||||
git pull # update code
|
||||
python manage.py migrate # run Django migrations
|
||||
sudo systemctl restart mediacms celery_long celery_short # restart services
|
||||
```
|
||||
|
||||
|
||||
## Configure
|
||||
|
||||
Several options are available on cms/settings.py, most of the things that are allowed or should be disallowed are described there. It is advisable to override any of them by adding it to cms/local_settings.py. All configuration options will be documented gradually on the [Configuration](docs/Configuration.md) page.
|
||||
|
@ -27,6 +27,7 @@ class MediaForm(forms.ModelForm):
|
||||
"thumbnail_time",
|
||||
"reported_times",
|
||||
"is_reviewed",
|
||||
"allow_download"
|
||||
)
|
||||
widgets = {
|
||||
"tags": MultipleSelect(),
|
||||
|
@ -23,7 +23,10 @@ class MediaSerializer(serializers.ModelSerializer):
|
||||
)
|
||||
|
||||
def get_thumbnail_url(self, obj):
|
||||
return self.context["request"].build_absolute_uri(obj.thumbnail_url)
|
||||
if obj.thumbnail_url:
|
||||
return self.context["request"].build_absolute_uri(obj.thumbnail_url)
|
||||
else:
|
||||
return None
|
||||
|
||||
def get_author_profile(self, obj):
|
||||
return self.context["request"].build_absolute_uri(obj.author_profile())
|
||||
|
@ -1,3 +1,4 @@
|
||||
from datetime import datetime, timedelta
|
||||
from django.shortcuts import render
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.conf import settings
|
||||
@ -713,6 +714,7 @@ class MediaSearch(APIView):
|
||||
media_type = params.get("media_type", "").strip()
|
||||
|
||||
author = params.get("author", "").strip()
|
||||
upload_date = params.get('upload_date', '').strip()
|
||||
|
||||
sort_by_options = ["title", "add_date", "edit_date", "views", "likes"]
|
||||
if sort_by not in sort_by_options:
|
||||
@ -760,6 +762,24 @@ class MediaSearch(APIView):
|
||||
if author:
|
||||
media = media.filter(user__username=author)
|
||||
|
||||
if upload_date:
|
||||
gte = lte = None
|
||||
if upload_date == 'today':
|
||||
gte = datetime.now().date()
|
||||
if upload_date == 'this_week':
|
||||
gte = datetime.now() - timedelta(days=7)
|
||||
if upload_date == 'this_month':
|
||||
year = datetime.now().date().year
|
||||
month = datetime.now().date().month
|
||||
gte = datetime(year,month,1)
|
||||
if upload_date == 'this_year':
|
||||
year = datetime.now().date().year
|
||||
gte = datetime(year,1,1)
|
||||
if lte:
|
||||
media = media.filter(add_date__lte=lte)
|
||||
if gte:
|
||||
media = media.filter(add_date__gte=gte)
|
||||
|
||||
media = media.order_by(f"{ordering}{sort_by}")
|
||||
|
||||
if self.request.query_params.get("show", "").strip() == "titles":
|
||||
@ -876,7 +896,7 @@ class PlaylistDetail(APIView):
|
||||
|
||||
if action in ["add", "remove", "ordering"]:
|
||||
media = Media.objects.filter(
|
||||
friendly_token=media_friendly_token, state="public", media_type="video"
|
||||
friendly_token=media_friendly_token, state="public"
|
||||
).first()
|
||||
if media:
|
||||
if action == "add":
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
static/css/playlist.css
Normal file
1
static/css/playlist.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
static/css/profile-playlists.css
Normal file
1
static/css/profile-playlists.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
!function(){"use strict";var n={6814:function(n,t,r){(0,r(2667).X)()},9009:function(n,t,r){r(6394),r(5334),r(7588),r(4559),r(6028)},8024:function(n,t,r){function e(n,t){n.classList?n.classList.remove(t):n.className=n.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function o(n,t){n.classList?n.classList.add(t):n.className+=" "+t}r.d(t,{dt:function(){return e},Ec:function(){return o}}),r(7441),r(7390),r(2322),r(4669),r(3296),r(9268)},3140:function(n,t,r){r(2322),r(9268)},4135:function(n,t,r){r(717),r(6660)},6203:function(n,t,r){r(2322),r(9268),r(3233)},8420:function(n,t,r){r.d(t,{A_:function(){return e.Z},v$:function(){return o.Z}});var e=r(1712),o=(r(9752),r(84),r(9009),r(1438));r(4135),r(3140),r(1752),r(7514),r(1569),r(6203),r(7188)},84:function(n,t,r){r(6394),r(5334),r(7588),r(4559),r(6028)},8349:function(n,t,r){r.d(t,{sc:function(){return u},Zr:function(){return i},vh:function(){return c},Qb:function(){return f}});var e=r(8416),o=r.n(e);function u(){o().dispatch({type:"TOGGLE_PAGE_SIDEBAR"})}function i(n){o().dispatch({type:"INIT_SIDEBAR",page:n})}function c(n){o().dispatch({type:"TOGGLE_MOBILE_SEARCH_FIELD",open:n})}function f(n){o().dispatch({type:"TOGGLE_DARK_THEME"})}}},t={};function r(e){if(t[e])return t[e].exports;var o=t[e]={exports:{}};return n[e].call(o.exports,o,o.exports,r),o.exports}r.m=n,r.x=function(){},r.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(t,{a:t}),t},r.d=function(n,t){for(var e in t)r.o(t,e)&&!r.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.j=443,function(){var n={443:0},t=[[6814,431]],e=function(){},o=function(o,u){for(var i,c,f=u[0],s=u[1],a=u[2],l=u[3],p=0,d=[];p<f.length;p++)c=f[p],r.o(n,c)&&n[c]&&d.push(n[c][0]),n[c]=0;for(i in s)r.o(s,i)&&(r.m[i]=s[i]);for(a&&a(r),o&&o(u);d.length;)d.shift()();return l&&t.push.apply(t,l),e()},u=self.webpackChunk_mediacms_frontend=self.webpackChunk_mediacms_frontend||[];function i(){for(var e,o=0;o<t.length;o++){for(var u=t[o],i=!0,c=1;c<u.length;c++){var f=u[c];0!==n[f]&&(i=!1)}i&&(t.splice(o--,1),e=r(r.s=u[0]))}return 0===t.length&&(r.x(),r.x=function(){}),e}u.forEach(o.bind(null,0)),u.push=o.bind(null,u.push.bind(u));var c=r.x;r.x=function(){return r.x=c||function(){},(e=i)()}}(),r.x()}();
|
||||
!function(){var n={6814:function(n,t,e){"use strict";(0,e(2667).X)()},8416:function(n,t,e){var r=e(4835).Dispatcher;n.exports=new r},2331:function(n,t,e){"use strict";e.d(t,{O:function(){return o}});var r=e(5466),i=e(3074),u=e.n(i);function o(n){return n.type&&""!==n.type?r.createElement("i",{className:"material-icons","data-icon":n.type}):null}o.propTypes={type:u().string.isRequired}},2880:function(n,t,e){"use strict";var r=e(5466),i=e(4547),u=r.createContext((0,i.v)(window.MediaCMS).member);u.Consumer,t.Z=u},9009:function(n,t,e){"use strict";e(6394),e(5334),e(7588),e(4559),e(6028)},8024:function(n,t,e){"use strict";function r(n,t){n.classList?n.classList.remove(t):n.className=n.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function i(n,t){n.classList?n.classList.add(t):n.className+=" "+t}e.d(t,{dt:function(){return r},Ec:function(){return i}}),e(7441),e(7390),e(2322),e(4669),e(3296),e(9268)},3140:function(n,t,e){"use strict";e(2322),e(9268)},4135:function(n,t,e){"use strict";e(717),e(6660)},6203:function(n,t,e){"use strict";e(2322),e(9268),e(3233)},1712:function(n,t,e){"use strict";e(6394),e(5334),e(7588);var r=e(4559);function i(n,t,e,r,i,u,o){try{var c=n[u](o),s=c.value}catch(n){return void e(n)}c.done?t(s):Promise.resolve(s).then(r,i)}function u(n){return function(){var t=this,e=arguments;return new Promise((function(r,u){var o=n.apply(t,e);function c(n){i(o,r,u,c,s,"next",n)}function s(n){i(o,r,u,c,s,"throw",n)}c(void 0)}))}}function o(){return(o=u(regeneratorRuntime.mark((function n(t,e,i,u){var o,c,s;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(s=function(n){if(u instanceof Function){var t=n;if(void 0===n.response)t={type:"network",error:n};else if(void 0!==n.response.status)switch(n.response.status){case 401:t={type:"private",error:n,message:"Media is private"};break;case 400:t={type:"unavailable",error:n,message:"Media is unavailable"}}u(t)}},c=function(n){i instanceof Function&&i(n)},o={timeout:null,maxContentLength:null},!e){n.next=8;break}return n.next=6,(0,r.get)(t,o).then(c).catch(s||null);case 6:n.next=9;break;case 8:(0,r.get)(t,o).then(c).catch(s||null);case 9:case"end":return n.stop()}}),n)})))).apply(this,arguments)}e(6028),t.Z=function(n,t,e,r){return o.apply(this,arguments)}},8420:function(n,t,e){"use strict";e.d(t,{A_:function(){return r.Z},v$:function(){return i.Z}});var r=e(1712),i=(e(9752),e(84),e(9009),e(1438));e(4135),e(3140),e(1752),e(7514),e(1569),e(6203),e(7188)},9752:function(n,t,e){"use strict";e(6394),e(5334),e(7588),e(4559),e(6028)},84:function(n,t,e){"use strict";e(6394),e(5334),e(7588),e(4559),e(6028)},8349:function(n,t,e){"use strict";e(8416)}},t={};function e(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return n[r].call(i.exports,i,i.exports,e),i.exports}e.m=n,e.x=function(){},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,{a:t}),t},e.d=function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.j=443,function(){var n={443:0},t=[[6814,431]],r=function(){},i=function(i,u){for(var o,c,s=u[0],a=u[1],f=u[2],l=u[3],p=0,v=[];p<s.length;p++)c=s[p],e.o(n,c)&&n[c]&&v.push(n[c][0]),n[c]=0;for(o in a)e.o(a,o)&&(e.m[o]=a[o]);for(f&&f(e),i&&i(u);v.length;)v.shift()();return l&&t.push.apply(t,l),r()},u=self.webpackChunk_mediacms_frontend=self.webpackChunk_mediacms_frontend||[];function o(){for(var r,i=0;i<t.length;i++){for(var u=t[i],o=!0,c=1;c<u.length;c++){var s=u[c];0!==n[s]&&(o=!1)}o&&(t.splice(i--,1),r=e(e.s=u[0]))}return 0===t.length&&(e.x(),e.x=function(){}),r}u.forEach(i.bind(null,0)),u.push=i.bind(null,u.push.bind(u));var c=e.x;e.x=function(){return e.x=c||function(){},(r=o)()}}(),e.x()}();
|
@ -1 +1 @@
|
||||
!function(){"use strict";var n={2772:function(n,t,r){(0,r(2667).X)()},9009:function(n,t,r){r(6394),r(5334),r(7588),r(4559),r(6028)},8024:function(n,t,r){function e(n,t){n.classList?n.classList.remove(t):n.className=n.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function o(n,t){n.classList?n.classList.add(t):n.className+=" "+t}r.d(t,{dt:function(){return e},Ec:function(){return o}}),r(7441),r(7390),r(2322),r(4669),r(3296),r(9268)},3140:function(n,t,r){r(2322),r(9268)},4135:function(n,t,r){r(717),r(6660)},6203:function(n,t,r){r(2322),r(9268),r(3233)},8420:function(n,t,r){r.d(t,{A_:function(){return e.Z},v$:function(){return o.Z}});var e=r(1712),o=(r(9752),r(84),r(9009),r(1438));r(4135),r(3140),r(1752),r(7514),r(1569),r(6203),r(7188)},84:function(n,t,r){r(6394),r(5334),r(7588),r(4559),r(6028)},8349:function(n,t,r){r.d(t,{sc:function(){return u},Zr:function(){return i},vh:function(){return c},Qb:function(){return f}});var e=r(8416),o=r.n(e);function u(){o().dispatch({type:"TOGGLE_PAGE_SIDEBAR"})}function i(n){o().dispatch({type:"INIT_SIDEBAR",page:n})}function c(n){o().dispatch({type:"TOGGLE_MOBILE_SEARCH_FIELD",open:n})}function f(n){o().dispatch({type:"TOGGLE_DARK_THEME"})}}},t={};function r(e){if(t[e])return t[e].exports;var o=t[e]={exports:{}};return n[e].call(o.exports,o,o.exports,r),o.exports}r.m=n,r.x=function(){},r.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(t,{a:t}),t},r.d=function(n,t){for(var e in t)r.o(t,e)&&!r.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.j=841,function(){var n={841:0},t=[[2772,431]],e=function(){},o=function(o,u){for(var i,c,f=u[0],s=u[1],a=u[2],l=u[3],p=0,d=[];p<f.length;p++)c=f[p],r.o(n,c)&&n[c]&&d.push(n[c][0]),n[c]=0;for(i in s)r.o(s,i)&&(r.m[i]=s[i]);for(a&&a(r),o&&o(u);d.length;)d.shift()();return l&&t.push.apply(t,l),e()},u=self.webpackChunk_mediacms_frontend=self.webpackChunk_mediacms_frontend||[];function i(){for(var e,o=0;o<t.length;o++){for(var u=t[o],i=!0,c=1;c<u.length;c++){var f=u[c];0!==n[f]&&(i=!1)}i&&(t.splice(o--,1),e=r(r.s=u[0]))}return 0===t.length&&(r.x(),r.x=function(){}),e}u.forEach(o.bind(null,0)),u.push=o.bind(null,u.push.bind(u));var c=r.x;r.x=function(){return r.x=c||function(){},(e=i)()}}(),r.x()}();
|
||||
!function(){var n={2772:function(n,t,e){"use strict";(0,e(2667).X)()},8416:function(n,t,e){var r=e(4835).Dispatcher;n.exports=new r},2331:function(n,t,e){"use strict";e.d(t,{O:function(){return o}});var r=e(5466),i=e(3074),u=e.n(i);function o(n){return n.type&&""!==n.type?r.createElement("i",{className:"material-icons","data-icon":n.type}):null}o.propTypes={type:u().string.isRequired}},2880:function(n,t,e){"use strict";var r=e(5466),i=e(4547),u=r.createContext((0,i.v)(window.MediaCMS).member);u.Consumer,t.Z=u},9009:function(n,t,e){"use strict";e(6394),e(5334),e(7588),e(4559),e(6028)},8024:function(n,t,e){"use strict";function r(n,t){n.classList?n.classList.remove(t):n.className=n.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function i(n,t){n.classList?n.classList.add(t):n.className+=" "+t}e.d(t,{dt:function(){return r},Ec:function(){return i}}),e(7441),e(7390),e(2322),e(4669),e(3296),e(9268)},3140:function(n,t,e){"use strict";e(2322),e(9268)},4135:function(n,t,e){"use strict";e(717),e(6660)},6203:function(n,t,e){"use strict";e(2322),e(9268),e(3233)},1712:function(n,t,e){"use strict";e(6394),e(5334),e(7588);var r=e(4559);function i(n,t,e,r,i,u,o){try{var c=n[u](o),s=c.value}catch(n){return void e(n)}c.done?t(s):Promise.resolve(s).then(r,i)}function u(n){return function(){var t=this,e=arguments;return new Promise((function(r,u){var o=n.apply(t,e);function c(n){i(o,r,u,c,s,"next",n)}function s(n){i(o,r,u,c,s,"throw",n)}c(void 0)}))}}function o(){return(o=u(regeneratorRuntime.mark((function n(t,e,i,u){var o,c,s;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(s=function(n){if(u instanceof Function){var t=n;if(void 0===n.response)t={type:"network",error:n};else if(void 0!==n.response.status)switch(n.response.status){case 401:t={type:"private",error:n,message:"Media is private"};break;case 400:t={type:"unavailable",error:n,message:"Media is unavailable"}}u(t)}},c=function(n){i instanceof Function&&i(n)},o={timeout:null,maxContentLength:null},!e){n.next=8;break}return n.next=6,(0,r.get)(t,o).then(c).catch(s||null);case 6:n.next=9;break;case 8:(0,r.get)(t,o).then(c).catch(s||null);case 9:case"end":return n.stop()}}),n)})))).apply(this,arguments)}e(6028),t.Z=function(n,t,e,r){return o.apply(this,arguments)}},8420:function(n,t,e){"use strict";e.d(t,{A_:function(){return r.Z},v$:function(){return i.Z}});var r=e(1712),i=(e(9752),e(84),e(9009),e(1438));e(4135),e(3140),e(1752),e(7514),e(1569),e(6203),e(7188)},9752:function(n,t,e){"use strict";e(6394),e(5334),e(7588),e(4559),e(6028)},84:function(n,t,e){"use strict";e(6394),e(5334),e(7588),e(4559),e(6028)},8349:function(n,t,e){"use strict";e(8416)}},t={};function e(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return n[r].call(i.exports,i,i.exports,e),i.exports}e.m=n,e.x=function(){},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,{a:t}),t},e.d=function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.j=841,function(){var n={841:0},t=[[2772,431]],r=function(){},i=function(i,u){for(var o,c,s=u[0],a=u[1],f=u[2],l=u[3],p=0,v=[];p<s.length;p++)c=s[p],e.o(n,c)&&n[c]&&v.push(n[c][0]),n[c]=0;for(o in a)e.o(a,o)&&(e.m[o]=a[o]);for(f&&f(e),i&&i(u);v.length;)v.shift()();return l&&t.push.apply(t,l),r()},u=self.webpackChunk_mediacms_frontend=self.webpackChunk_mediacms_frontend||[];function o(){for(var r,i=0;i<t.length;i++){for(var u=t[i],o=!0,c=1;c<u.length;c++){var s=u[c];0!==n[s]&&(o=!1)}o&&(t.splice(i--,1),r=e(e.s=u[0]))}return 0===t.length&&(e.x(),e.x=function(){}),r}u.forEach(i.bind(null,0)),u.push=i.bind(null,u.push.bind(u));var c=e.x;e.x=function(){return e.x=c||function(){},(r=o)()}}(),e.x()}();
|
@ -1 +1 @@
|
||||
!function(){"use strict";var n={9980:function(n,t,r){(0,r(2667).X)()},9009:function(n,t,r){r(6394),r(5334),r(7588),r(4559),r(6028)},8024:function(n,t,r){function e(n,t){n.classList?n.classList.remove(t):n.className=n.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function o(n,t){n.classList?n.classList.add(t):n.className+=" "+t}r.d(t,{dt:function(){return e},Ec:function(){return o}}),r(7441),r(7390),r(2322),r(4669),r(3296),r(9268)},3140:function(n,t,r){r(2322),r(9268)},4135:function(n,t,r){r(717),r(6660)},6203:function(n,t,r){r(2322),r(9268),r(3233)},8420:function(n,t,r){r.d(t,{A_:function(){return e.Z},v$:function(){return o.Z}});var e=r(1712),o=(r(9752),r(84),r(9009),r(1438));r(4135),r(3140),r(1752),r(7514),r(1569),r(6203),r(7188)},84:function(n,t,r){r(6394),r(5334),r(7588),r(4559),r(6028)},8349:function(n,t,r){r.d(t,{sc:function(){return u},Zr:function(){return i},vh:function(){return c},Qb:function(){return f}});var e=r(8416),o=r.n(e);function u(){o().dispatch({type:"TOGGLE_PAGE_SIDEBAR"})}function i(n){o().dispatch({type:"INIT_SIDEBAR",page:n})}function c(n){o().dispatch({type:"TOGGLE_MOBILE_SEARCH_FIELD",open:n})}function f(n){o().dispatch({type:"TOGGLE_DARK_THEME"})}}},t={};function r(e){if(t[e])return t[e].exports;var o=t[e]={exports:{}};return n[e].call(o.exports,o,o.exports,r),o.exports}r.m=n,r.x=function(){},r.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(t,{a:t}),t},r.d=function(n,t){for(var e in t)r.o(t,e)&&!r.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.j=348,function(){var n={348:0},t=[[9980,431]],e=function(){},o=function(o,u){for(var i,c,f=u[0],s=u[1],a=u[2],l=u[3],p=0,d=[];p<f.length;p++)c=f[p],r.o(n,c)&&n[c]&&d.push(n[c][0]),n[c]=0;for(i in s)r.o(s,i)&&(r.m[i]=s[i]);for(a&&a(r),o&&o(u);d.length;)d.shift()();return l&&t.push.apply(t,l),e()},u=self.webpackChunk_mediacms_frontend=self.webpackChunk_mediacms_frontend||[];function i(){for(var e,o=0;o<t.length;o++){for(var u=t[o],i=!0,c=1;c<u.length;c++){var f=u[c];0!==n[f]&&(i=!1)}i&&(t.splice(o--,1),e=r(r.s=u[0]))}return 0===t.length&&(r.x(),r.x=function(){}),e}u.forEach(o.bind(null,0)),u.push=o.bind(null,u.push.bind(u));var c=r.x;r.x=function(){return r.x=c||function(){},(e=i)()}}(),r.x()}();
|
||||
!function(){var n={9980:function(n,t,e){"use strict";(0,e(2667).X)()},8416:function(n,t,e){var r=e(4835).Dispatcher;n.exports=new r},2331:function(n,t,e){"use strict";e.d(t,{O:function(){return o}});var r=e(5466),i=e(3074),u=e.n(i);function o(n){return n.type&&""!==n.type?r.createElement("i",{className:"material-icons","data-icon":n.type}):null}o.propTypes={type:u().string.isRequired}},2880:function(n,t,e){"use strict";var r=e(5466),i=e(4547),u=r.createContext((0,i.v)(window.MediaCMS).member);u.Consumer,t.Z=u},9009:function(n,t,e){"use strict";e(6394),e(5334),e(7588),e(4559),e(6028)},8024:function(n,t,e){"use strict";function r(n,t){n.classList?n.classList.remove(t):n.className=n.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function i(n,t){n.classList?n.classList.add(t):n.className+=" "+t}e.d(t,{dt:function(){return r},Ec:function(){return i}}),e(7441),e(7390),e(2322),e(4669),e(3296),e(9268)},3140:function(n,t,e){"use strict";e(2322),e(9268)},4135:function(n,t,e){"use strict";e(717),e(6660)},6203:function(n,t,e){"use strict";e(2322),e(9268),e(3233)},1712:function(n,t,e){"use strict";e(6394),e(5334),e(7588);var r=e(4559);function i(n,t,e,r,i,u,o){try{var c=n[u](o),s=c.value}catch(n){return void e(n)}c.done?t(s):Promise.resolve(s).then(r,i)}function u(n){return function(){var t=this,e=arguments;return new Promise((function(r,u){var o=n.apply(t,e);function c(n){i(o,r,u,c,s,"next",n)}function s(n){i(o,r,u,c,s,"throw",n)}c(void 0)}))}}function o(){return(o=u(regeneratorRuntime.mark((function n(t,e,i,u){var o,c,s;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(s=function(n){if(u instanceof Function){var t=n;if(void 0===n.response)t={type:"network",error:n};else if(void 0!==n.response.status)switch(n.response.status){case 401:t={type:"private",error:n,message:"Media is private"};break;case 400:t={type:"unavailable",error:n,message:"Media is unavailable"}}u(t)}},c=function(n){i instanceof Function&&i(n)},o={timeout:null,maxContentLength:null},!e){n.next=8;break}return n.next=6,(0,r.get)(t,o).then(c).catch(s||null);case 6:n.next=9;break;case 8:(0,r.get)(t,o).then(c).catch(s||null);case 9:case"end":return n.stop()}}),n)})))).apply(this,arguments)}e(6028),t.Z=function(n,t,e,r){return o.apply(this,arguments)}},8420:function(n,t,e){"use strict";e.d(t,{A_:function(){return r.Z},v$:function(){return i.Z}});var r=e(1712),i=(e(9752),e(84),e(9009),e(1438));e(4135),e(3140),e(1752),e(7514),e(1569),e(6203),e(7188)},9752:function(n,t,e){"use strict";e(6394),e(5334),e(7588),e(4559),e(6028)},84:function(n,t,e){"use strict";e(6394),e(5334),e(7588),e(4559),e(6028)},8349:function(n,t,e){"use strict";e(8416)}},t={};function e(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return n[r].call(i.exports,i,i.exports,e),i.exports}e.m=n,e.x=function(){},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,{a:t}),t},e.d=function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.j=348,function(){var n={348:0},t=[[9980,431]],r=function(){},i=function(i,u){for(var o,c,s=u[0],a=u[1],f=u[2],l=u[3],p=0,v=[];p<s.length;p++)c=s[p],e.o(n,c)&&n[c]&&v.push(n[c][0]),n[c]=0;for(o in a)e.o(a,o)&&(e.m[o]=a[o]);for(f&&f(e),i&&i(u);v.length;)v.shift()();return l&&t.push.apply(t,l),r()},u=self.webpackChunk_mediacms_frontend=self.webpackChunk_mediacms_frontend||[];function o(){for(var r,i=0;i<t.length;i++){for(var u=t[i],o=!0,c=1;c<u.length;c++){var s=u[c];0!==n[s]&&(o=!1)}o&&(t.splice(i--,1),r=e(e.s=u[0]))}return 0===t.length&&(e.x(),e.x=function(){}),r}u.forEach(i.bind(null,0)),u.push=i.bind(null,u.push.bind(u));var c=e.x;e.x=function(){return e.x=c||function(){},(r=o)()}}(),e.x()}();
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
static/js/playlist.js
Normal file
1
static/js/playlist.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
static/js/profile-playlists.js
Normal file
1
static/js/profile-playlists.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
17
templates/cms/playlist.html
Executable file
17
templates/cms/playlist.html
Executable file
@ -0,0 +1,17 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block headtitle %}Playlist - {{PORTAL_NAME}}{% endblock headtitle %}
|
||||
|
||||
{% block topimports %}
|
||||
<link href="{% static "css/playlist.css" %}" rel="preload" as="style">
|
||||
<link href="{% static "css/playlist.css" %}" rel="stylesheet">
|
||||
{%endblock topimports %}
|
||||
|
||||
{% block content %}
|
||||
{% if user %}<div id="page-playlist"></div>{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block bottomimports %}
|
||||
<script src="{% static "js/playlist.js" %}"></script>
|
||||
{% endblock bottomimports %}
|
33
templates/cms/user_playlists.html
Executable file
33
templates/cms/user_playlists.html
Executable file
@ -0,0 +1,33 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block headtitle %}{% if user.name %}{{user.name}} - {% endif %}Playlists - {{PORTAL_NAME}}{% endblock headtitle %}
|
||||
|
||||
{% block headermeta %}
|
||||
|
||||
<meta property="og:title" content="{% if user.name %}{{user.name}} - {% endif %}Playlists - {{PORTAL_NAME}}">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:description" content="">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
|
||||
{% endblock headermeta %}
|
||||
|
||||
{% block topimports %}
|
||||
<link href="{% static "css/profile-playlists.css" %}" rel="preload" as="style">
|
||||
<link href="{% static "css/profile-playlists.css" %}" rel="stylesheet">
|
||||
{%endblock topimports %}
|
||||
|
||||
{% block innercontent %}
|
||||
{% if user %}{% else %}
|
||||
No such user
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if user %}<div id="page-profile-playlists"></div>{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block bottomimports %}
|
||||
<script src="{% static "js/profile-playlists.js" %}"></script>
|
||||
{% endblock bottomimports %}
|
@ -1,5 +1,6 @@
|
||||
MediaCMS.api = {
|
||||
media: "/media",
|
||||
playlists: "/playlists",
|
||||
comments: '/comments',
|
||||
search: "/search",
|
||||
tags: '/tags',
|
||||
|
@ -23,5 +23,6 @@ MediaCMS.user = {
|
||||
pages: {
|
||||
home: '/user/{{request.user.username}}',
|
||||
about: '/user/{{request.user.username}}/about',
|
||||
playlists: '/user/{{request.user.username}}/playlists',
|
||||
}
|
||||
};
|
||||
|
@ -17,6 +17,7 @@ MediaCMS.features = {
|
||||
dislike: {% if CAN_DISLIKE_MEDIA %}true{% else %}false{% endif %},
|
||||
download: true,
|
||||
comment: true,
|
||||
save: true,
|
||||
},
|
||||
shareOptions: [ 'embed', 'fb', 'tw', 'whatsapp', 'telegram', 'reddit', 'tumblr', 'vk', 'pinterest', 'mix', 'linkedin', 'email' ],
|
||||
},
|
||||
@ -25,4 +26,7 @@ MediaCMS.features = {
|
||||
hideViews: false,
|
||||
hideAuthor: false,
|
||||
},
|
||||
};
|
||||
playlists:{
|
||||
mediaTypes: ['audio', 'video'],
|
||||
}
|
||||
};
|
||||
|
@ -6,6 +6,9 @@ MediaCMS.pages = {
|
||||
},
|
||||
},
|
||||
},
|
||||
search:{
|
||||
advancedFilters: true,
|
||||
},
|
||||
media: {
|
||||
categoriesWithTitle: false,
|
||||
htmlInDescription: false,
|
||||
|
@ -11,12 +11,12 @@ MediaCMS.site = {
|
||||
},
|
||||
logo:{
|
||||
lightMode:{
|
||||
img: "{{FRONTEND_HOST}}/static/images/logo_light.png",
|
||||
svg: "{{FRONTEND_HOST}}/static/images/logo_light.svg",
|
||||
img: "{{FRONTEND_HOST}}/static/images/logo_dark.png",
|
||||
svg: "{{FRONTEND_HOST}}/static/images/logo_dark.svg",
|
||||
},
|
||||
darkMode:{
|
||||
img: "{{FRONTEND_HOST}}/static/images/logo_dark.png",
|
||||
svg: "{{FRONTEND_HOST}}/static/images/logo_dark.svg",
|
||||
img: "{{FRONTEND_HOST}}/static/images/logo_light.png",
|
||||
svg: "{{FRONTEND_HOST}}/static/images/logo_light.svg",
|
||||
},
|
||||
},
|
||||
pages: {
|
||||
|
Loading…
Reference in New Issue
Block a user