ui: include font-awesome
This commit is contained in:
parent
a09a1793ec
commit
1285ba6fbb
|
@ -13,6 +13,7 @@
|
||||||
<link rel="shortcut icon" type="image/png" href="{% static 'passbook/logo.png' %}">
|
<link rel="shortcut icon" type="image/png" href="{% static 'passbook/logo.png' %}">
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'node_modules/@patternfly/patternfly/patternfly.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'node_modules/@patternfly/patternfly/patternfly.css' %}">
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'node_modules/@patternfly/patternfly/patternfly-addons.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'node_modules/@patternfly/patternfly/patternfly-addons.css' %}">
|
||||||
|
<link rel="stylesheet" type="text/css" href="{% static 'node_modules/@fortawesome/fontawesome-free/css/fontawesome.min.css' %}">
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'passbook/pf.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'passbook/pf.css' %}">
|
||||||
{% block head %}
|
{% block head %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -6,44 +6,62 @@
|
||||||
{% load passbook_user_settings %}
|
{% load passbook_user_settings %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<section class="pf-c-page__main-section">
|
||||||
<div class="col-md-3 ">
|
<div class="pf-l-split pf-m-gutter">
|
||||||
<div class="nav-category">
|
<div class="pf-l-split__item">
|
||||||
<h2>{% trans 'User Settings'%}</h2>
|
<div class="pf-c-card">
|
||||||
<ul class="nav nav-pills nav-stacked">
|
<div class="pf-c-card__body">
|
||||||
<li class="{% is_active 'passbook_core:user-settings' %}">
|
<nav class="pf-c-nav" aria-label="Global">
|
||||||
<a href="{% url 'passbook_core:user-settings' %}">
|
<section class="pf-c-nav__section">
|
||||||
<i class="fa pficon-edit"></i> {% trans 'Details' %}
|
<h2 class="pf-c-nav__section-title">{% trans 'General Settings' %}</h2>
|
||||||
</a>
|
<ul class="pf-c-nav__list">
|
||||||
|
<li class="pf-c-nav__item">
|
||||||
|
<a href="{% url 'passbook_core:user-settings' %}" class="pf-c-nav__link {% is_active 'passbook_core:user-settings' %}">{% trans 'User Details' %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% user_factors as uf %}
|
</ul>
|
||||||
{% if uf %}
|
</section>
|
||||||
<li class="nav-divider"></li>
|
{% user_factors as user_factors_loc %}
|
||||||
{% endif %}
|
{% if user_factors_loc %}
|
||||||
{% for user_settings in uf %}
|
<section class="pf-c-nav__section">
|
||||||
<li class="{% is_active user_settings.view_name %}">
|
<h2 class="pf-c-nav__section-title">{% trans 'Factors' %}</h2>
|
||||||
<a href="{% url user_settings.view_name %}">
|
<ul class="pf-c-nav__list">
|
||||||
<i class="{{ user_settings.icon }}"></i> {{ user_settings.name }}
|
{% for factor in user_factors_loc %}
|
||||||
</a>
|
<li class="pf-c-nav__item">
|
||||||
</li>
|
<a href="{% url factor.view_name %}" class="pf-c-nav__link {% is_active factor.view_name %}">
|
||||||
{% endfor %}
|
<i class="{{ factor.icon }}"></i>
|
||||||
{% user_sources as us %}
|
{{ factor.name }}
|
||||||
{% if us %}
|
|
||||||
<li class="nav-divider"></li>
|
|
||||||
{% endif %}
|
|
||||||
{% for user_settings in us %}
|
|
||||||
<li class="{% if user_settings.view_name == request.get_full_path %} active {% endif %}">
|
|
||||||
<a href="{{ user_settings.view_name }}">
|
|
||||||
<i class="{{ user_settings.icon }}"></i> {{ user_settings.name }}
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
</section>
|
||||||
|
{% endif %}
|
||||||
|
{% user_sources as user_sources_loc %}
|
||||||
|
{% if user_sources_loc %}
|
||||||
|
<section class="pf-c-nav__section">
|
||||||
|
<h2 class="pf-c-nav__section-title">{% trans 'Sources' %}</h2>
|
||||||
|
<ul class="pf-c-nav__list">
|
||||||
|
{% for source in user_sources_loc %}
|
||||||
|
<li class="pf-c-nav__item">
|
||||||
|
<a href="{{ source.view_name }}" class="pf-c-nav__link {% if user_settings.view_name == request.get_full_path %} pf-m-current {% endif %}">
|
||||||
|
<i class="{{ source.icon }}"></i>
|
||||||
|
{{ source.name }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
{% endif %}
|
||||||
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9">
|
</div>
|
||||||
|
<div class="pf-l-split__item">
|
||||||
|
<div class="pf-c-card">
|
||||||
{% block page %}
|
{% block page %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -3,11 +3,22 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block page %}
|
{% block page %}
|
||||||
<h1>{% trans 'Update details' %}</h1>
|
<div class="pf-c-card__header pf-c-title pf-m-md">
|
||||||
<form action="" method="post" class="form-horizontal">
|
<h1>{% trans 'Update details' %}</h1>
|
||||||
{% csrf_token %}
|
</div>
|
||||||
{% include 'partials/form.html' %}
|
<div class="pf-c-card__body">
|
||||||
<input class="btn btn-primary" type="submit" value="{% trans 'Update' %}">
|
<form action="" method="post" class="pf-c-form pf-m-horizontal">
|
||||||
<a class="btn btn-danger" href="{% url 'passbook_core:user-delete' %}?back={{ request.get_full_path }}">{% trans 'Delete user' %}</a>
|
{% include 'partials/form_horizontal.html' with form=form %}
|
||||||
</form>
|
{% block beneath_form %}
|
||||||
|
{% endblock %}
|
||||||
|
<div class="pf-c-form__group pf-m-action">
|
||||||
|
<div class="pf-c-form__horizontal-group">
|
||||||
|
<div class="pf-c-form__actions">
|
||||||
|
<input class="pf-c-button pf-m-primary" type="submit" value="{% trans 'Update' %}" />
|
||||||
|
<a class="pf-c-button pf-m-danger" href="{% url 'passbook_core:user-delete' %}?back={{ request.get_full_path }}">{% trans "Delete account" %}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -3,15 +3,12 @@
|
||||||
{% load utils %}
|
{% load utils %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}
|
|
||||||
{% title "OTP" %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block page %}
|
{% block page %}
|
||||||
<h1>
|
<div class="pf-c-card__header pf-c-title pf-m-md">
|
||||||
<clr-icon shape="two-way-arrows" size="48"></clr-icon>{% trans "One-Time Passwords" %}
|
<h1>{% trans "One-Time Passwords" %}</h1>
|
||||||
</h1>
|
</div>
|
||||||
<div class="row">
|
<div class="pf-c-card__body">
|
||||||
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
<p>
|
<p>
|
||||||
|
@ -42,9 +39,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<pre>{% for token in static_tokens %}{{ token.token }}
|
<pre>{% for token in static_tokens %}{{ token.token }}
|
||||||
{% empty %}{% trans 'N/A' %}{% endfor %}</pre>
|
{% empty %}{% trans 'N/A' %}{% endfor %}</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
|
@ -52,7 +52,7 @@ class OAuthSource(Source):
|
||||||
icon_type = self.provider_type
|
icon_type = self.provider_type
|
||||||
if icon_type == "azure ad":
|
if icon_type == "azure ad":
|
||||||
icon_type = "windows"
|
icon_type = "windows"
|
||||||
icon_class = f"fa fa-{icon_type}"
|
icon_class = f"fab fa-{icon_type}"
|
||||||
view_name = "passbook_sources_oauth:oauth-client-user"
|
view_name = "passbook_sources_oauth:oauth-client-user"
|
||||||
return UIUserSettings(
|
return UIUserSettings(
|
||||||
name=self.name,
|
name=self.name,
|
||||||
|
|
|
@ -3,16 +3,20 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block page %}
|
{% block page %}
|
||||||
<h1>{{ source.name }}</h1>
|
<div class="pf-c-card__header pf-c-title pf-m-md">
|
||||||
{% if connections.exists %}
|
<h1>{{ source.name }}</h1>
|
||||||
<p>{% trans 'Connected.' %}</p>
|
</div>
|
||||||
<a class="btn btn-danger" href="{% url 'passbook_sources_oauth:oauth-client-disconnect' source_slug=source.slug %}">
|
<div class="pf-c-card__body">
|
||||||
|
{% if connections.exists %}
|
||||||
|
<p>{% trans 'Connected.' %}</p>
|
||||||
|
<a class="pf-c-button pf-m-danger" href="{% url 'passbook_sources_oauth:oauth-client-disconnect' source_slug=source.slug %}">
|
||||||
{% trans 'Disconnect' %}
|
{% trans 'Disconnect' %}
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>Not connected.</p>
|
<p>Not connected.</p>
|
||||||
<a class="btn btn-primary" href="{% url 'passbook_sources_oauth:oauth-client-login' source_slug=source.slug %}">
|
<a class="pf-c-button pf-m-primary" href="{% url 'passbook_sources_oauth:oauth-client-login' source_slug=source.slug %}">
|
||||||
{% trans 'Connect' %}
|
{% trans 'Connect' %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@fortawesome/fontawesome-free": "^5.12.1",
|
||||||
"@patternfly/patternfly": "^2.65.3",
|
"@patternfly/patternfly": "^2.65.3",
|
||||||
"codemirror": "^5.52.0"
|
"codemirror": "^5.52.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,11 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
"@fortawesome/fontawesome-free@^5.12.1":
|
||||||
|
version "5.12.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.12.1.tgz#2a98fea9fbb8a606ddc79a4680034e9d5591c550"
|
||||||
|
integrity sha512-ZtjIIFplxncqxvogq148C3hBLQE+W3iJ8E4UvJ09zIJUgzwLcROsWwFDErVSXY2Plzao5J9KUYNHKHMEUYDMKw==
|
||||||
|
|
||||||
"@patternfly/patternfly@^2.65.3":
|
"@patternfly/patternfly@^2.65.3":
|
||||||
version "2.65.3"
|
version "2.65.3"
|
||||||
resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-2.65.3.tgz#0856d6ca13d971f18b1d7889a60a73eb78cad3c8"
|
resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-2.65.3.tgz#0856d6ca13d971f18b1d7889a60a73eb78cad3c8"
|
||||||
|
|
Reference in New Issue