Update side menu

master
DjVinnii 4 years ago
parent c97728289b
commit 6b3170cb4c

@ -3,17 +3,21 @@ import jQuery from 'jquery';
import 'select2/dist/css/select2.css'; import 'select2/dist/css/select2.css';
// bootstrap // bootstrap
import 'bootstrap/less/bootstrap.less'; // import 'bootstrap/less/bootstrap.less';
import 'bootstrap'; // import 'bootstrap';
// FA // FA
import 'font-awesome/scss/font-awesome.scss'; // import 'font-awesome/scss/font-awesome.scss'; // FA is included with AdminLTE
import 'admin-lte/plugins/fontawesome-free/css/fontawesome.css';
import 'admin-lte/plugins/fontawesome-free/css/regular.css';
import 'admin-lte/plugins/fontawesome-free/css/solid.css';
// AdminLTE // AdminLTE
import 'admin-lte/build/less/AdminLTE-without-plugins.less'; import 'admin-lte/build/scss/adminlte.scss';
import 'admin-lte/build/less/select2.less'; // import 'admin-lte/build/less/AdminLTE-without-plugins.less'; // doesn't exist
import 'admin-lte/build/less/skins/skin-blue.less'; // import 'admin-lte/build/less/select2.less'; // doesn't exist
// import 'admin-lte/build/less/skins/skin-blue.less'; // doesn't exist
import 'admin-lte/build/js/Layout.js'; import 'admin-lte/build/js/Layout.js';
import 'admin-lte/build/js/ControlSidebar.js'; import 'admin-lte/build/js/ControlSidebar.js';
import 'admin-lte/build/js/PushMenu.js'; import 'admin-lte/build/js/PushMenu.js';
import 'admin-lte/build/js/BoxRefresh.js'; // import 'admin-lte/build/js/BoxRefresh.js'; // doesn't exist

@ -8,43 +8,47 @@
<link rel="stylesheet" href="{{ url_for('.static', filename='app.css') }}"> <link rel="stylesheet" href="{{ url_for('.static', filename='app.css') }}">
<title>Mailu-Admin - {{ config["SITENAME"] }}</title> <title>Mailu-Admin - {{ config["SITENAME"] }}</title>
</head> </head>
<body class="hold-transition skin-blue sidebar-mini"> <body class="hold-transition sidebar-mini">
<div class="wrapper"> <div class="wrapper">
<header class="main-header"> <nav class="main-header navbar navbar-expand navbar-white navbar-light">
<div class="logo"> <ul class="navbar-nav">
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button"> <li class="nav-item">
<span class="sr-only">Toggle navigation</span> <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
</a> </li>
<a href="{{ config["WEB_ADMIN"] }}"> </ul>
<span class="logo-lg">{{ config["SITENAME"] }}</span> </nav>
</a> <aside class="main-sidebar sidebar-dark-primary">
</div> <a href="{{ config["WEB_ADMIN"] }}" class="brand-link">
</header> <span class="brand-text font-weight-light">{{ config["SITENAME"] }}</span>
<aside class="main-sidebar"> </a>
{% block sidebar %} {% block sidebar %}
{% include "sidebar.html" %} {% include "sidebar.html" %}
{% endblock %} {% endblock %}
</aside> </aside>
<div class="content-wrapper"> <div class="content-wrapper">
<section class="content-header"> <section class="content-header">
<div class="pull-right"> <div class="container-fluid">
{% block main_action %} <div class="row mb-2">
{% endblock %} <div class="col-sm-6">
<h1 class="m-0">{% block title %}{% endblock %}</h1>
<small>{% block subtitle %}{% endblock %}</small>
</div>
<div class="col-sm-6">
{% block main_action %}
{% endblock %}
</div>
</div>
</div> </div>
<h1>
{% block title %}{% endblock %}
<small>{% block subtitle %}{% endblock %}</small>
</h1>
</section> </section>
<section class="content"> <div class="content">
{{ utils.flashed_messages(container=False) }} {{ utils.flashed_messages(container=False) }}
{% block content %}{% endblock %} {% block content %}{% endblock %}
</section> </div>
</div> </div>
<footer class="main-footer"> <footer class="main-footer">
Built with <i class="fa fa-heart"></i> using <a class="white-text" href="http://flask.pocoo.org/">Flask</a> and Built with <i class="fa fa-heart"></i> using <a class="white-text" href="http://flask.pocoo.org/">Flask</a> and
<a class="white-text" href="https://almsaeedstudio.com/preview">AdminLTE</a> <a class="white-text" href="https://adminlte.io/themes/v3/index3.html">AdminLTE</a>
<span class="pull-right"><i class="fa fa-code-fork"></i> on <a class="white-text" href="https://github.com/Mailu/Mailu">Github</a></a></span> <span class="pull-right"><i class="fa fa-code-fork"></i> on <a class="white-text" href="https://github.com/Mailu/Mailu">Github</a></a></span>
</footer> </footer>
</div> </div>

@ -1,120 +1,144 @@
<section class="sidebar"> <div class="sidebar">
{% if current_user.is_authenticated %} {% if current_user.is_authenticated %}
<h4 class="text-center text-primary">{{ current_user }}</h4> <div class="user-panel mt-3 pb-3 mb-3 d-flex">
<div class="info">
<span class="text-center text-primary">{{ current_user }}</span>
</div>
</div>
{% endif %} {% endif %}
<ul class="sidebar-menu" data-widget="tree"> <nav class="mt-2">
{% if current_user.is_authenticated %} <ul class="nav nav-pills nav-sidebar flex-column" role="menu">
<li class="header">{% trans %}My account{% endtrans %}</li> {% if current_user.is_authenticated %}
<li> <li class="nav-header">{% trans %}My account{% endtrans %}</li>
<a href="{{ url_for('.user_settings') }}"> <li class="nav-item">
<i class="fa fa-wrench"></i> <span>{% trans %}Settings{% endtrans %}</span> <a href="{{ url_for('.user_settings') }}" class="nav-link">
</a> <i class="nav-icon fa fa-wrench"></i>
</li> <p>{% trans %}Settings{% endtrans %}</p>
<li> </a>
<a href="{{ url_for('.user_password') }}"> </li>
<i class="fa fa-lock"></i> <span>{% trans %}Update password{% endtrans %}</span> <li class="nav-item">
</a> <a href="{{ url_for('.user_password') }}" class="nav-link">
</li> <i class="nav-icon fa fa-lock"></i>
<li> <p>{% trans %}Update password{% endtrans %}</p>
<a href="{{ url_for('.user_reply') }}"> </a>
<i class="fa fa-plane"></i> <span>{% trans %}Auto-reply{% endtrans %}</span> </li>
</a> <li class="nav-item">
</li> <a href="{{ url_for('.user_reply') }}" class="nav-link">
<li> <i class="nav-icon fa fa-plane"></i>
<a href="{{ url_for('.fetch_list') }}"> <p>{% trans %}Auto-reply{% endtrans %}</p>
<i class="fa fa-download"></i> <span>{% trans %}Fetched accounts{% endtrans %}</span> </a>
</a> </li>
</li> <li class="nav-item">
<li> <a href="{{ url_for('.fetch_list') }}" class="nav-link">
<a href="{{ url_for('.token_list') }}"> <i class="nav-icon fas fa-download"></i>
<i class="fa fa-ticket"></i> <span>{% trans %}Authentication tokens{% endtrans %}</span> <p>{% trans %}Fetched accounts{% endtrans %}</p>
</a> </a>
</li> </li>
<li class="nav-item">
<a href="{{ url_for('.token_list') }}" class="nav-link">
<i class="nav-icon fas fa-ticket-alt"></i>
<p>{% trans %}Authentication tokens{% endtrans %}</p>
</a>
</li>
{% if current_user.manager_of or current_user.global_admin %} {% if current_user.manager_of or current_user.global_admin %}
<li class="header">{% trans %}Administration{% endtrans %}</li> <li class="nav-header">{% trans %}Administration{% endtrans %}</li>
{% endif %} {% endif %}
{% if current_user.global_admin %} {% if current_user.global_admin %}
<li> <li class="nav-item">
<a href="{{ url_for('.announcement') }}"> <a href="{{ url_for('.announcement') }}" class="nav-link">
<i class="fa fa-bullhorn"></i> <span>{% trans %}Announcement{% endtrans %}</span> <i class="nav-icon fa fa-bullhorn"></i>
</a> <p>{% trans %}Announcement{% endtrans %}</p>
</li> </a>
<li> </li>
<a href="{{ url_for('.admin_list') }}"> <li class="nav-item">
<i class="fa fa-user"></i> <span>{% trans %}Administrators{% endtrans %}</span> <a href="{{ url_for('.admin_list') }}" class="nav-link">
</a> <i class="nav-icon fa fa-user"></i>
</li> <p>{% trans %}Administrators{% endtrans %}</p>
<li> </a>
<a href="{{ url_for('.relay_list') }}"> </li>
<i class="fa fa-reply-all"></i> <span>{% trans %}Relayed domains{% endtrans %}</span> <li class="nav-item">
</a> <a href="{{ url_for('.relay_list') }}" class="nav-link">
</li> <i class="nav-icon fa fa-reply-all"></i>
<li> <p>{% trans %}Relayed domains{% endtrans %}</p>
<a href="{{ config["WEB_ADMIN"] }}/antispam/" target="_blank"> </a>
<i class="fa fa-trash-o"></i> <span>{% trans %}Antispam{% endtrans %}</span> </li>
</a> <li class="nav-item">
</li> <a href="{{ config["WEB_ADMIN"] }}/antispam/" target="_blank" class="nav-link">
{% endif %} <i class="nav-icon fas fa-trash-alt"></i>
{% if current_user.manager_of or current_user.global_admin %} <p>{% trans %}Antispam{% endtrans %}</p>
<li> </a>
<a href="{{ url_for('.domain_list') }}"> </li>
<i class="fa fa-envelope"></i> <span>{% trans %}Mail domains{% endtrans %}</span> {% endif %}
</a> {% if current_user.manager_of or current_user.global_admin %}
</li> <li class="nav-item">
{% endif %} <a href="{{ url_for('.domain_list') }}" class="nav-link">
{% endif %} <i class="nav-icon fa fa-envelope"></i>
<p>{% trans %}Mail domains{% endtrans %}</p>
</a>
</li>
{% endif %}
{% endif %}
<li class="header">{% trans %}Go to{% endtrans %}</li> <li class="nav-header">{% trans %}Go to{% endtrans %}</li>
{% if config["WEBMAIL"] != "none" %} {% if config["WEBMAIL"] != "none" %}
<li> <li class="nav-item">
<a href="{{ config["WEB_WEBMAIL"] }}" target="_blank"> <a href="{{ config["WEB_WEBMAIL"] }}" target="_blank" class="nav-link">
<i class="fa fa-envelope-o"></i> <span>{% trans %}Webmail{% endtrans %}</span> <i class="nav-icon far fa-envelope"></i>
</a> <p>{% trans %}Webmail{% endtrans %}</p>
</li> </a>
{% endif %} </li>
<li> {% endif %}
<a href="{{ url_for('.client') }}"> <li class="nav-item">
<i class="fa fa-laptop"></i> <span>{% trans %}Client setup{% endtrans %}</span> <a href="{{ url_for('.client') }}" class="nav-link">
</a> <i class="nav-icon fa fa-laptop"></i>
</li> <p>{% trans %}Client setup{% endtrans %}</p>
<li> </a>
<a href="{{ config["WEBSITE"] }}" target="_blank"> </li>
<i class="fa fa-globe"></i> <span>{% trans %}Website{% endtrans %}</span> <li class="nav-item">
</a> <a href="{{ config["WEBSITE"] }}" target="_blank" class="nav-link">
</li> <i class="nav-icon fa fa-globe"></i>
<li> <p>{% trans %}Website{% endtrans %}</p>
<a href="https://mailu.io" target="_blank"> </a>
<i class="fa fa-life-ring"></i> <span>{% trans %}Help{% endtrans %}</span> </li>
</a> <li class="nav-item">
</li> <a href="https://mailu.io" target="_blank" class="nav-link">
{% if config['DOMAIN_REGISTRATION'] %} <i class="nav-icon fa fa-life-ring"></i>
<li> <p>{% trans %}Help{% endtrans %}</p>
<a href="{{ url_for('.domain_signup') }}"> </a>
<i class="fa fa-plus-square"></i> <span>{% trans %}Register a domain{% endtrans %}</span> </li>
</a> {% if config['DOMAIN_REGISTRATION'] %}
</li> <li class="nav-item">
{% endif %} <a href="{{ url_for('.domain_signup') }}" class="nav-link">
{% if current_user.is_authenticated %} <i class="nav-icon fa fa-plus-square"></i>
<li> <p>{% trans %}Register a domain{% endtrans %}</p>
<a href="{{ url_for('.logout') }}"> </a>
<i class="fa fa-sign-out"></i> <span>{% trans %}Sign out{% endtrans %}</span> </li>
</a> {% endif %}
</li> {% if current_user.is_authenticated %}
{% else %} <li class="nav-item">
<li> <a href="{{ url_for('.logout') }}" class="nav-link">
<a href="{{ url_for('.login') }}"> <i class="nav-icon fas fa-sign-out-alt"></i>
<i class="fa fa-sign-in"></i> <span>{% trans %}Sign in{% endtrans %}</span> <p>{% trans %}Sign out{% endtrans %}</p>
</a> </a>
</li> </li>
{% if signup_domains %} {% else %}
<li> <li class="nav-item">
<a href="{{ url_for('.user_signup') }}"> <a href="{{ url_for('.login') }}" class="nav-link">
<i class="fa fa-user-plus"></i> <span>{% trans %}Sign up{% endtrans %}</span> <i class="nav-icon fa fa-sign-in"></i>
</a> <p>{% trans %}Sign in{% endtrans %}</p>
</li> </a>
{% endif %} </li>
{% endif %} {% if signup_domains %}
</ul> <li class="nav-item">
</section> <a href="{{ url_for('.user_signup') }}" class="nav-link">
<i class="nav-icon fa fa-user-plus"></i>
<p>{% trans %}Sign up{% endtrans %}</p>
</a>
</li>
{% endif %}
{% endif %}
</ul>
</nav>
</div>

Loading…
Cancel
Save