68 lines
3.2 KiB
HTML
68 lines
3.2 KiB
HTML
{% extends "default.html" %}
|
|
{% block pagetitle %}API App Administration{% endblock %}
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="col col-lg-8">
|
|
<div class="settings">
|
|
{% for app in apps %}
|
|
<div class="settings-section rounded">
|
|
<div class="d-lg-flex">
|
|
<div class="title w-lg-25">
|
|
<label for="over18"><a href="{{app.permalink}}/posts" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %}>{{app.app_name}}</a></label>
|
|
</div>
|
|
|
|
<div class="body w-lg-100">
|
|
<label for="edit-{{app.id}}-author" class="mb-0 w-lg-25">User</label>
|
|
<input autocomplete="off" id="edit-{{app.id}}-author" class="form-control" type="text" name="name" value="{{app.author.username}}" readonly=readonly>
|
|
|
|
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label>
|
|
<input autocomplete="off" id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}" readonly=readonly>
|
|
|
|
{% if app.client_id %}
|
|
<label for="edit-{{app.id}}-client-id" class="mb-0 w-lg-25">Client ID</label>
|
|
<input autocomplete="off" id="edit-{{app.id}}-client-id" class="form-control" type="text" name="name" value="{{app.client_id}}" readonly="readonly">
|
|
{% endif %}
|
|
|
|
|
|
<label for="edit-{{app.id}}-redirect" class="mb-0 w-lg-25">Redirect URI</label>
|
|
<input autocomplete="off" id="edit-{{app.id}}-redirect" class="form-control" type="text" name="redirect_uri" value="{{app.redirect_uri}}" readonly="readonly">
|
|
<label for="edit-{{app.id}}-desc" class="mb-0 w-lg-25">Description</label>
|
|
<textarea rows="10" autocomplete="off" form="edit-app-{{app.id}}" class="form-control" name="description" id="edit-{{app.id}}-desc" maxlength="256" readonly="readonly">{{app.description}}</textarea>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<div class="d-flex">
|
|
{% if not app.client_id %}
|
|
|
|
<button type="button" class="btn btn-primary ml-auto mr-2" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/admin/app/approve/{{app.id}}')">Approve</button>
|
|
<button type="button" class="btn btn-secondary mr-0" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/admin/app/reject/{{app.id}}')">Reject</button>
|
|
|
|
{% else %}
|
|
|
|
<button type="button" class="btn btn-primary ml-auto" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/admin/app/revoke/{{app.id}}')">Revoke</button>
|
|
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 100000" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
|
<div class="toast-body bg-success text-center text-white">
|
|
<i class="fas fa-comment-alt-smile mr-2"></i><span id="toast-post-success-text">Action successful!</span>
|
|
</div>
|
|
</div>
|
|
<div class="toast" id="toast-post-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 100000" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
|
<div class="toast-body bg-danger text-center text-white">
|
|
<i class="fas fa-exclamation-circle mr-2"></i><span id="toast-post-error-text">Error, please try again later.</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|