schedule media

This commit is contained in:
Thomas 2019-08-10 15:30:54 +02:00
parent 89bd45107d
commit 8bf24d33eb
5 changed files with 11 additions and 13 deletions

View file

@ -8,6 +8,8 @@ security:
security: false security: false
main: main:
anonymous: ~ anonymous: ~
logout:
path: logout
# activate different ways to authenticate # activate different ways to authenticate
# https://symfony.com/doc/current/security.html#firewalls-authentication # https://symfony.com/doc/current/security.html#firewalls-authentication

View file

@ -213,11 +213,6 @@ class FediPlanController extends AbstractController
public function scheduled() public function scheduled()
{ {
if ($this->get("security.authorization_checker")->isGranted('IS_AUTHENTICATED_FULLY')){
$number = random_int(0, 100);
}else{
$number = 0;
}
return $this->render("fediplan/index.html.twig"); return $this->render("fediplan/index.html.twig");
} }
@ -227,11 +222,6 @@ class FediPlanController extends AbstractController
public function logout() public function logout()
{ {
if ($this->get("security.authorization_checker")->isGranted('IS_AUTHENTICATED_FULLY')){
$number = random_int(0, 100);
}else{
$number = 0;
}
return $this->render("fediplan/index.html.twig"); return $this->render("fediplan/index.html.twig");
} }

View file

@ -463,6 +463,7 @@ class Mastodon_api {
} }
/** /**
* accounts * accounts
* *

View file

@ -81,7 +81,7 @@
<div class="row"> <div class="row">
<div class=" col-md-6"> <div class=" col-md-6">
<div class="form-group has-feedback"> <div class="form-group has-feedback">
Counter: <span id="count"></span> Counter: <span id="count">0</span>
</div> </div>
</div> </div>
</div> </div>
@ -403,7 +403,8 @@
$('#media_container').html($('#media_container').html() + content); $('#media_container').html($('#media_container').html() + content);
}, },
url: 'https://{{ instance }}/api/v1/media' url: 'https://{{ instance }}/api/v1/media',
acceptFileTypes: /(\.|\/)(gif|jpe?g|png|mp4|mp3)$/i
}); });
// Enable iframe cross-domain access via redirect option: // Enable iframe cross-domain access via redirect option:

View file

@ -1,15 +1,18 @@
<header> <header>
<!-- Fixed navbar --> <!-- Fixed navbar -->
<nav class="navbar navbar-expand-md navbar-light fixed-top bg-light"> <nav class="navbar navbar-expand-md navbar-light fixed-top bg-light">
<a class="navbar-brand" href="#"></a> <a class="navbar-brand" href="#">FediPan</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
<div class="collapse navbar-collapse" id="navbarCollapse"> <div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto"> <ul class="navbar-nav mr-auto">
{% if not is_granted('ROLE_USER') %}
<li class="nav-item {% if app.request.attributes.get('_route') == 'index' %} active {% endif %}"> <li class="nav-item {% if app.request.attributes.get('_route') == 'index' %} active {% endif %}">
<a class="nav-link" href="{{ path('index') }}">Login <span class="sr-only">(current)</span></a> <a class="nav-link" href="{{ path('index') }}">Login <span class="sr-only">(current)</span></a>
</li> </li>
{% endif %}
{% if is_granted('ROLE_USER') %}
<li class="nav-item {% if "articles" in app.request.attributes.get('schedule') %} active {% endif %}"> <li class="nav-item {% if "articles" in app.request.attributes.get('schedule') %} active {% endif %}">
<a class="nav-link" href="{{ path('schedule') }}">Shedule</a> <a class="nav-link" href="{{ path('schedule') }}">Shedule</a>
</li> </li>
@ -19,6 +22,7 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{{ path('logout') }}" tabindex="-1" >Logout</a> <a class="nav-link" href="{{ path('logout') }}" tabindex="-1" >Logout</a>
</li> </li>
{% endif %}
</ul> </ul>
</div> </div>
</nav> </nav>