Merge pull request '#26: mise à jour' (#40) from fix-1.0-26 into develop-1.0

Reviewed-on: rc/aircox#40
This commit is contained in:
Thomas Kairos
2022-03-20 12:31:32 +01:00
95 changed files with 14054 additions and 36412 deletions

View File

@ -14,7 +14,7 @@
</nav>
<a-statistics class="column">
<template v-slot:default="{counts}">
<template v-slot="{counts}">
<table class="table is-hoverable is-fullwidth">
<thead>
<tr>

View File

@ -2,36 +2,55 @@
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head>
<title>{% block title %}{% endblock %}</title>
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{% static "aircox/vendor.css" %}">
<link rel="stylesheet" type="text/css" href="{% static "admin/css/base.css" %}">
<!-- <link rel="stylesheet" type="text/css" href="{% static "aircox/vendor.css" %}"> -->
<link rel="stylesheet" type="text/css" href="{% static "admin/css/base.css" %}">
<link rel="stylesheet" type="text/css" href="{% static "aircox/css/chunk-common.css" %}"/>
<link rel="stylesheet" type="text/css" href="{% static "aircox/css/chunk-vendors.css" %}"/>
<link rel="stylesheet" type="text/css" href="{% static "aircox/css/admin.css" %}"/>
<script src="{% static "aircox/js/chunk-common.js" %}"></script>
<script src="{% static "aircox/js/chunk-vendors.js" %}"></script>
<script src="{% static "aircox/js/admin.js" %}"></script>
<script src="{% static "aircox/vendor.js" %}"></script>
<script src="{% static "aircox/admin.js" %}"></script>
{% block extrastyle %}{% endblock %}
{% block extrastyle %}{% endblock %}
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}">{% endif %}
<link rel="stylesheet" type="text/css" href="{% static "aircox/main.css" %}">
<link rel="stylesheet" type="text/css" href="{% static "aircox/admin.css" %}">
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}">{% endif %}
{% block extrahead %}{% endblock %}
{% block responsive %}
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" type="text/css" href="{% static "admin/css/responsive.css" %}">
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% static "admin/css/responsive_rtl.css" %}">{% endif %}
{% endblock %}
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE">{% endblock %}
{% block extrahead %}{% endblock %}
{% block responsive %}
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" type="text/css" href="{% static "admin/css/responsive.css" %}">
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% static "admin/css/responsive_rtl.css" %}">{% endif %}
{% endblock %}
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE">{% endblock %}
</head>
{% load i18n %}
<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}"
data-admin-utc-offset="{% now "Z" %}">
<script id="init-script">
function vuePre(selector) {
const elms = document.querySelectorAll(selector)
for(const elm of elms) {
elm.setAttribute('v-pre', true)
}
}
window.addEventListener('load', function() {
{% block init-scripts %}
aircox.init(null, {
hotReload: false,
{% if not init_app %}
initBuilder: false,
{% endif %}
})
{% endblock %}
})
</script>
<!-- Container -->
<div>
<div class="admin">
{% if not is_popup %}
<!-- Header -->
<nav class="navbar is-dark has-shadow">
@ -156,21 +175,27 @@
{% endblock messages %}
<!-- Content -->
<div id="app">
<div id="content" class="{% block coltype %}colM{% endblock %}">
{% block pretitle %}{% endblock %}
{% block content_title %}{% if title %}<h1 class="title is-3">{{ title }}</h1>{% endif %}{% endblock %}
{% block content %}
{% block object-tools %}{% endblock %}
{{ content }}
{% block object-tools %}{% endblock %}
{{ content }}
{% endblock %}
{% block sidebar %}{% endblock %}
<br class="clear">
</div>
</div>
<!-- END Content -->
{% block footer %}<div id="footer"></div>{% endblock %}
</div>
<!-- END Container -->
{% block player %}
<div id="player">{% include "aircox/widgets/player.html" %}</div>
{% endblock %}
</body>
</html>

View File

@ -0,0 +1,6 @@
{% extends "admin/change_form.html" %}
{% block content %}
<div v-pre>{{ block.super }}</div>
{% endblock %}

View File

@ -22,10 +22,11 @@ Usefull context:
<link rel="icon" href="{% thumbnail site.favicon 32x32 crop %}" />
{% block assets %}
<link rel="stylesheet" type="text/css" href="{% static "aircox/vendor.css" %}"/>
<link rel="stylesheet" type="text/css" href="{% static "aircox/main.css" %}"/>
<script src="{% static "aircox/vendor.js" %}"></script>
<script src="{% static "aircox/main.js" %}"></script>
<link rel="stylesheet" type="text/css" href="{% static "aircox/css/chunk-common.css" %}"/>
<link rel="stylesheet" type="text/css" href="{% static "aircox/css/chunk-vendors.css" %}"/>
<script src="{% static "aircox/js/chunk-common.js" %}"></script>
<script src="{% static "aircox/js/chunk-vendors.js" %}"></script>
<script src="{% static "aircox/js/core.js" %}"></script>
{% endblock %}
<title>
@ -39,6 +40,13 @@ Usefull context:
{% block head_extra %}{% endblock %}
</head>
<body>
<script id="init-script">
window.addEventListener('load', function() {
{% block init-scripts %}
aircox.init(null, {hotReload:window})
{% endblock %}
})
</script>
<div id="app">
<nav class="navbar has-shadow" role="navigation" aria-label="main navigation">
<div class="container">
@ -112,7 +120,7 @@ Usefull context:
{% block main %}
{% block content %}
{% if page and page.content %}
<section class="page-content">{{ page.content|safe }}</section>
<section class="page-content mb-2">{{ page.content|safe }}</section>
{% endif %}
{% endblock %}
{% endblock main %}

View File

@ -0,0 +1,18 @@
{% extends "aircox/page_list.html" %}
{% load i18n %}
{% block filters %}
{{ block.super }}
<div class="field is-horizontal">
<div class="field-label">
<label class="label">{% trans "Podcasts" %}</label>
</div>
<div class="field-body">
<div class="checkbox">
<input type="checkbox" class="checkbox" name="podcast" value="True"
{% if filterset_data.podcast %}checked{% endif %} />
</div>
</div>
</div>
{% endblock %}

View File

@ -40,7 +40,7 @@ Context:
<div class="media box">
<div class="media-content">
<p>
<strong>{{ comment.nickname }}</strong>
<strong class="mr-2">{{ comment.nickname }}</strong>
<time datetime="{{ comment.date }}" title="{{ comment.date }}">
<small>{{ comment.date|naturaltime }}</small>
</time>

View File

@ -40,11 +40,9 @@ The audio player
<div class="">[[ live.current.data.info ]]</div>
</div>
<h4 v-else class="title is-4" aria-description="{% trans "Currently playing" %}">
{{ station.name }}
{{ request.station.name }}
</h4>
</template>
</template>
</a-player>
</div>

View File

@ -8,7 +8,7 @@ List item for a podcast.
{% if object.embed %}
{{ object.embed|safe }}
{% else %}
<audio src="{{ object.url }}" controls>
<audio src="{{ object.file.url }}" controls>
{% endif %}
{% endcomment %}
<a-sound-item :data="{{ object|json }}" :player="player"