MarseyWorld/files/templates/settings/apps.html

140 lines
6.8 KiB
HTML
Raw Normal View History

2022-05-04 23:09:46 +00:00
{% extends "settings.html" %}
[DO NOT MERGE] titlesssssssssss (#468) * titles * testing * self * Revert "self" This reverts commit d6c12d5a5ba125feb44673f55e1fdac75f151cb5. * Revert "testing" This reverts commit 86d800f9fd552196b31f0e0b3891d4fc072a9bc0. * testing on devrama * rewrite the html head * reference error or smth idk * tempalte debug * template debug redux * default2 * rename default2 -> root, page title * fix settings2 * include the set_variables block * root scope variables 2 * test 3 * remove unnecessary set * add pagetitles to all settings2 pages * add pagetitle to casino * remove bloat * remove duplicate site name thingy * page titles 2 * page titles 3 * remove duplicate imports and add page titles everywhere iirc * ok but actually this time * remove unnecessary newlines * fix title lol * > * fsdfsfsfsfsfs * fsfs * template configurations * fix 500 * reduce login template bloat * move files and add status codes where needful * move authfroms to login * remove 2fa bloat * verification code * sign up fixes * readability * fssfsfsfs * move forgot password to login/ * readability * don't emit comments * add page titles where needful * gsgsgs * modals: move to respective pages * testing on devrama * get home garbage out of title * remove insane amount of icon duplication * sign up text * add votes pagetitle * fix blank lines * Revert "fix blank lines" This reverts commit b2c54339970725d00b6fc82bb458c1757909952c. * Fix blank lines on sign_up.html. * title: votes.html more meaningful identifier. * titles: Lottery, Directory, Notifications * head final in submission.html * fix missing comma * > * test * title: /comments * fsfsfsfsf * titles: user_cards * head: only load video and audio meta attributes if they actually exist * titlessssss: /admin/lottery/participants * titlessssssss: extra quote in search.html * titlessssss: userpage voters. * titties: /h/<sub>/{followers,blockers,exilees[sic]} * test banner * Revert "test banner" This reverts commit c3d875d03f3e60d72a60dab7d28bf108554a5826. * make submit.html inherit from default.html Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-21 08:52:22 +00:00
{% block pagetitle %}Apps/Bots{% endblock %}
2022-05-04 23:09:46 +00:00
{% block content %}
2023-10-29 12:51:00 +00:00
<div class="row">
<div class="col col-lg-8">
<div class="settings">
<h5>API Guide</h5>
<a style="font-size:18px" href="/api">{{SITE_FULL}}/api</a>
2023-08-11 21:50:23 +00:00
2023-10-29 12:51:00 +00:00
<h5 class="mt-6">Your API Applications</h5>
{% for app in v.applications if app.client_id %}
<form id="edit-app-{{app.id}}" action="/edit_app/{{app.id}}" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="name-{{app.id}}">{{app.app_name}}</label>
</div>
<div class="body w-lg-100">
<input hidden name="formkey" value="{{v|formkey}}">
<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}}">
2023-01-01 11:36:20 +00:00
2023-10-29 12:51:00 +00:00
{% 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 copy-link" type="text" name="name" value="{{app.client_id}}" data-clipboard-text="{{app.client_id}}" readonly="readonly">
{% endif %}
2023-01-01 11:36:20 +00:00
2023-10-29 12:51:00 +00:00
<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}}">
<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">{{app.description}}</textarea>
</div>
</div>
<div class="footer">
<div class="d-flex">
<button type="button" class="btn btn-secondary ml-auto" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/reroll/{{app.id}}')">Reroll Client ID</button>
<input type="submit" class="btn btn-primary ml-2" value="Save Changes">
</div>
</div>
</div>
</form>
{% else %}
<p>None</p>
{% endfor %}
2022-05-04 23:09:46 +00:00
2023-10-29 12:51:00 +00:00
<h5 class="mt-6">API Applications Awaiting Approval</h5>
{% for app in v.applications if not app.client_id %}
<form id="edit-app-{{app.id}}" action="/edit_app/{{app.id}}" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="name-{{app.id}}">{{app.app_name}}</label>
</div>
<div class="body w-lg-100">
<input hidden name="formkey" value="{{v|formkey}}">
<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}}" maxlength="50" required>
2022-05-04 23:09:46 +00:00
2023-10-29 12:51:00 +00:00
{% 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 copy-link" type="text" name="name" value="{{app.client_id}}" data-clipboard-text="{{app.client_id}}" readonly>
{% endif %}
2022-05-04 23:09:46 +00:00
2023-10-29 12:51:00 +00:00
<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}}" maxlength="4096" required>
<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" required>{{app.description}}</textarea>
</div>
</div>
<div class="footer">
<div class="d-flex">
<input type="submit" class="btn btn-primary ml-auto" value="Save Changes">
</div>
</div>
</div>
</form>
{% else %}
<p>None</p>
{% endfor %}
2022-05-04 23:09:46 +00:00
2023-10-29 12:51:00 +00:00
<h5 class="mt-6">Your Authorized Applications</h5>
{% for auth in v.authorizations %}
<div id="auth-{{auth.id}}" class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="name-{{auth.application.id}}">{{auth.application.app_name}}</label>
</div>
<div class="body w-lg-100">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="mb-0 w-lg-25">Description</label>
<textarea autocomplete="off" class="form-control" name="description" maxlength="256" readonly="readonly">{{auth.application.description}}</textarea>
</div>
</div>
<div class="footer">
<div class="d-flex">
<button type="button" class="btn btn-primary ml-auto text-white" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/rescind/{{auth.application.id}}')">Revoke</button>
</div>
</div>
</div>
{% else %}
<p>None</p>
{% endfor %}
2022-05-04 23:09:46 +00:00
2023-10-29 12:51:00 +00:00
<h5 class="mt-6">Request API Keys</h2>
2022-05-04 23:09:46 +00:00
2023-10-29 12:51:00 +00:00
<form id="api-key-request-form" action="/api_keys" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="body w-lg-100">
<input hidden name="formkey" value="{{v|formkey}}">
<label for="form-username">Username</label>
<input autocomplete="off" type="text" id="form-username" class="form-control" name="username" value="{{v.username}}" readonly>
<label for="form-appname">Application Name</label>
<input autocomplete="off" type="text" id="form-appname" class="form-control" name="name" maxlength="50" required>
<label for="form-redirect">Redirect URI</label>
<input autocomplete="off" type="text" id="form-redirect" class="form-control" name="redirect_uri" maxlength="4096" required>
<label for="form-username">Description</label>
<textarea autocomplete="off" form="api-key-request-form" id="form-desc" class="form-control" name="description" maxlength="256" required></textarea>
</div>
</div>
<div class="footer">
<div class="d-flex">
<input type="submit" class="btn btn-primary ml-auto" value="Request API Key">
</div>
</div>
</div>
</form>
2022-05-04 23:09:46 +00:00
</div>
</div>
</div>
{% endblock %}
2023-10-29 12:51:00 +00:00
2022-05-04 23:09:46 +00:00
{% block clipboard %}
2023-10-29 12:51:00 +00:00
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Token copied to clipboard
</div>
2022-05-04 23:09:46 +00:00
</div>
{% endblock %}