forked from rDrama/rDrama
fix
parent
5508106a30
commit
fcdedea86f
|
@ -1,4 +1,3 @@
|
|||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
@ -8,9 +7,9 @@
|
|||
<script>
|
||||
var clipboard = new ClipboardJS('.copy-link');
|
||||
clipboard.on('success', function(e) {
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-success'));
|
||||
myToast.show();
|
||||
console.log(e);
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-success'));
|
||||
myToast.show();
|
||||
console.log(e);
|
||||
});
|
||||
|
||||
function emailVerifyText() {
|
||||
|
@ -22,8 +21,8 @@
|
|||
|
||||
<style>
|
||||
.navsettings {
|
||||
padding-left: 0.9rem !important;
|
||||
padding-right: 0.9rem !important;
|
||||
padding-left: 0.75rem !important;
|
||||
padding-right: 0.75rem !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
@ -32,235 +31,138 @@
|
|||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="icon" type="image/png" href="/assets/images/{{'SITE_NAME' | app_config}}/icon.webp?v=3">
|
||||
<link rel="icon" type="image/png" href="/assets/images/{{'SITE_NAME' | app_config}}/icon.gif">
|
||||
|
||||
<title>{% block pagetitle %}Settings - {{'SITE_NAME' | app_config}}{% endblock %}</title>
|
||||
<meta property="og:type" content="article" >
|
||||
<meta property="og:title" content="{{'SITE_NAME' | app_config}}" >
|
||||
<meta property="og:site_name" content="{{request.host}}" >
|
||||
<meta property="og:image" content="{{'SITE_NAME' | app_config}}/assets/images/{{'SITE_NAME' | app_config}}/preview.webp?v=2" >
|
||||
<meta property="og:url" content="{{request.host}}">
|
||||
<meta property="og:description" name="description" content="{{'SITE_NAME' | app_config}} - {{'SLOGAN' | app_config}}">
|
||||
<meta property="og:author" name="author" content="@{{request.host_url}}" >
|
||||
<meta property="og:site_name" content="{{request.host}}" >
|
||||
<meta property="og:type" content="article" >
|
||||
<meta property="og:title" content="{{'SITE_NAME' | app_config}}" >
|
||||
<meta property="og:site_name" content="{{request.host}}" >
|
||||
<meta property="og:image" content="{{'SITE_NAME' | app_config}}/assets/images/{{'SITE_NAME' | app_config}}/preview.gif" >
|
||||
<meta property="og:url" content="{{request.host}}">
|
||||
<meta property="og:description" name="description" content="{{'SITE_NAME' | app_config}} - {{'SLOGAN' | app_config}}">
|
||||
<meta property="og:author" name="author" content="@{{request.host_url}}" >
|
||||
<meta property="og:site_name" content="{{request.host}}" >
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@{{request.host_url}}">
|
||||
<meta name="twitter:title" content="{{'SITE_NAME' | app_config}}" >
|
||||
<meta name="twitter:creator" content="@{{request.host_url}}">
|
||||
<meta name="twitter:description" content="{{'SITE_NAME' | app_config}} - {{'SLOGAN' | app_config}}" >
|
||||
<meta name="twitter:image" content="{{'SITE_NAME' | app_config}}/assets/images/{{'SITE_NAME' | app_config}}/preview.webp?v=2" >
|
||||
<meta name="twitter:url" content="{{request.host}}" >
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@{{request.host_url}}">
|
||||
<meta name="twitter:title" content="{{'SITE_NAME' | app_config}}" >
|
||||
<meta name="twitter:creator" content="@{{request.host_url}}">
|
||||
<meta name="twitter:description" content="{{'SITE_NAME' | app_config}} - {{'SLOGAN' | app_config}}" >
|
||||
<meta name="twitter:image" content="{{'SITE_NAME' | app_config}}/assets/images/{{'SITE_NAME' | app_config}}/preview.gif" >
|
||||
<meta name="twitter:url" content="{{request.host}}" >
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
|
||||
|
||||
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=120"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=118">
|
||||
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=120">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=1019">
|
||||
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/assets/css/default.css?v=1019">
|
||||
{% if v.agendaposter %}
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=1019">
|
||||
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/assets/css/default.css?v=1019">
|
||||
<link rel="stylesheet" href="/assets/css/agendaposter.css?v=99">
|
||||
{% elif v.css %}
|
||||
<link rel="stylesheet" href="/@{{v.username}}/css">
|
||||
{% endif %}
|
||||
|
||||
<link href="/assets/css/fa.css?v=52" rel="stylesheet">
|
||||
<link href="/assets/css/fa.css?v=52" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body id="settings" style="overflow-x: hidden; {% if v and v.background %} background:url(/assets/images/backgrounds/{{v.background}}) no-repeat center center fixed !important; background-size: cover!important; background-color: #000!important;{% endif %}">
|
||||
<body class="overflow-hidden antialiased bg-cover bg-center bg-gray-900 text-gray-200" {% if v and v.background %}style="background:url(/assets/images/backgrounds/{{v.background}})"{% endif %}>
|
||||
|
||||
{% include "header.html" %}
|
||||
<div class="container">
|
||||
{% include "header-tw.html" %}
|
||||
|
||||
<div class="row justify-content-around">
|
||||
<div class="flex h-screen pt-12 sm:pt-16 bg-gray-700">
|
||||
<div class="w-full overflow-y-auto">
|
||||
|
||||
<div class="col h-100">
|
||||
|
||||
{% if error %}
|
||||
<div class="alert alert-danger alert-dismissible fade show my-3" role="alert">
|
||||
<i class="fas fa-exclamation-circle my-auto"></i>
|
||||
<span>
|
||||
{{error}}
|
||||
</span>
|
||||
<button type="button" class="close" data-bs-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true"><i class="far fa-times"></i></span>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if msg %}
|
||||
<div class="alert alert-success alert-dismissible fade show my-3" role="alert">
|
||||
<i class="fas fa-check-circle my-auto" aria-hidden="true"></i>
|
||||
<span>
|
||||
{{msg}}
|
||||
</span>
|
||||
<button type="button" class="close" data-bs-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true"><i class="far fa-times"></i></span>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
<h1 class="d-none d-md-block">Settings</h1>
|
||||
|
||||
<h2 class="h3 mt-5 d-md-none">Settings</h2>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="flex-row bg-white box-shadow-bottom sticky d-none d-sm-flex mt-3 mb-3 mb-sm-5">
|
||||
|
||||
<ul class="nav settings-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if request.path=='/settings/profile' %} active{% endif %}" href="/settings/profile">Profile</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if request.path=='/settings/content' %} active{% endif %}" href="/settings/content">Content</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if request.path=='/settings/css' %} active{% endif %}" href="/settings/css">Custom CSS</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if request.path=='/settings/profilecss' %} active{% endif %}" href="/settings/profilecss">Profile CSS</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if request.path=='/settings/security' %} active{% endif %}" href="/settings/security">Security</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if request.path=='/settings/blocks' %} active{% endif %}" href="/settings/blocks">Block users</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if request.path=='/settings/apps' %} active{% endif %}" href="/settings/apps">Apps</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex-row bg-white box-shadow-bottom sticky justify-content-center d-flex d-sm-none mt-3 mb-3 mb-sm-5">
|
||||
|
||||
<ul class="nav settings-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if request.path=='/settings/profile' %} active{% endif %} navsettings" href="/settings/profile"><i class="fas fa-cog text-base mr-0"></i></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if request.path=='/settings/content' %} active{% endif %} navsettings" href="/settings/content"><i class="fas fa-filter text-base mr-0"></i></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if request.path=='/settings/css' %} active{% endif %} navsettings" href="/settings/css"><i class="fas fa-palette text-base mr-0"></i></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if request.path=='/settings/profilecss' %} active{% endif %} navsettings" href="/settings/profilecss"><i class="fas fa-palette text-base mr-0"></i></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if request.path=='/settings/security' %} active{% endif %} navsettings" href="/settings/security"><i class="fas fa-lock-alt text-base mr-0"></i></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if request.path=='/settings/blocks' %} active{% endif %} navsettings" href="/settings/blocks"><i class="fas fa-user-minus text-base mr-0"></i></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{% if request.path=='/settings/apps' %} active{% endif %} navsettings" href="/settings/apps"><i class="fas fa-code text-base mr-0"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% if v %}
|
||||
<div class="modal fade" id="2faModal" tabindex="-1" role="dialog" aria-labelledby="2faModalTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{% if mfa_secret %}Setup two-step login{% elif mfa_secret and not v.email %}Email required for two-step login{% else %}Disable two-step login{% endif %}</h5>
|
||||
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true"><i class="far fa-times"></i></span>
|
||||
</button>
|
||||
<div class="px-4 bg-gray-900" id="sub-header-row">
|
||||
<div class="relative max-w-screen-2xl mx-auto px-4 py-4 grid grid-cols-12 rounded-t-md">
|
||||
<div class="absolute top-0 left-0 w-full h-full bg-gradient-to-t from-gray-800 to-gray-700 rounded-t-md sub-header-shadow"></div>
|
||||
<div class="relative col-span-full flex items-center">
|
||||
<div>
|
||||
<h1 class="font-bold text-xl font-heading leading-normal">
|
||||
Settings
|
||||
</h1>
|
||||
<small class="block mt-1 text-gray-400">
|
||||
Manage your rDrama account
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if mfa_secret %}
|
||||
<div>
|
||||
<form action="/settings/security" method="post">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
<input type="hidden" name="2fa_secret" value="{{mfa_secret}}">
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
<span class="font-weight-bold">Step 1:</span> Scan this barcode (or enter the code) using a two-factor authentication app such as Google Authenticator or Authy.
|
||||
</p>
|
||||
<div class="text-center mb-3">
|
||||
<img loading="lazy" class="img-fluid" width=175 src="/2faqr/{{mfa_secret}}">
|
||||
<pre></pre>
|
||||
<div class="text-small text-muted">Or enter this code: {{mfa_secret}}</div>
|
||||
</div>
|
||||
<p>
|
||||
<span class="font-weight-bold">Step 2:</span> Enter the six-digit code generated in the authenticator app and your {{'SITE_NAME' | app_config}} account password.
|
||||
</p>
|
||||
<label for="2fa_input">6-digit code</label>
|
||||
<input type="text" class="form-control mb-2" id="2fa_input" name="2fa_token" placeholder="# # # # # #" required>
|
||||
|
||||
<label for="2fa_input_password">Password</label>
|
||||
<input type="password" autocomplete="new-password" class="form-control mb-2" id="2fa_input_password" name="password" oninput="document.getElementById('enable2faButton').disabled=false" autocomplete="off" required>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-link text-muted" data-bs-dismiss="modal">Cancel</button>
|
||||
<input id="enable2faButton" class="btn btn-primary" type="submit" value="Enable 2-step login" disabled>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% else %}
|
||||
<div>
|
||||
<form action="/settings/security" method="post">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
<input type="hidden" name="2fa_secret" value="{{mfa_secret}}">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
To disable two-step login, please enter your {{'SITE_NAME' | app_config}} account password and the 6-digit code generated in your authentication app. If you no longer have your two-step device, <a href="/lost_2fa">click here</a>.
|
||||
</div>
|
||||
|
||||
<label for="2fa_input_password">Password</label>
|
||||
<input type="password" autocomplete="new-password" class="form-control mb-2" id="2fa_input_password" name="password" autocomplete="off" required>
|
||||
|
||||
<label for="2fa_input">6-digit code</label>
|
||||
<input type="text" class="form-control mb-2" id="2fa_input" name="2fa_remove" placeholder="# # # # # #" oninput="document.getElementById('disable2faButton').disabled=false" required>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-link text-muted" data-bs-dismiss="modal">Cancel</button>
|
||||
<input id="disable2faButton" class="btn btn-primary" type="submit" value="Disable 2-step login" disabled>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="w-full px-4">
|
||||
<div class="w-full max-w-screen-2xl mx-auto mb-4 px-4 grid grid-cols-12 gap-6 bg-gray-800 rounded-b-xl" id="main-content-row">
|
||||
|
||||
<div class="col-span-full xl:col-span-9">
|
||||
{% if error %}
|
||||
<div class="mt-4 mb-0 alert show fade rounded-lg shadow-lg p-3 text-gray-200 bg-red-600 border border-gray-900 shadow-inset-t-white-10" role="alert">
|
||||
<i class="fas fa-exclamation-circle fa-fw mr-1"></i>
|
||||
<span class="font-medium font-heading">
|
||||
{{error}}
|
||||
</span>
|
||||
<button type="button" class="close" data-bs-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true"><i class="far fa-times"></i></span>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if msg %}
|
||||
<div class="mt-4 mb-0 alert show fade rounded-lg shadow-lg p-3 text-gray-200 bg-green-600 border border-gray-900 shadow-inset-t-white-10" role="alert">
|
||||
<i class="fas fa-check-circle fa-fw mr-1"></i>
|
||||
<span class="font-medium font-heading">
|
||||
{{msg}}
|
||||
</span>
|
||||
<button type="button" class="close" data-bs-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true"><i class="far fa-times"></i></span>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{% include "/sidebars/SettingsSidebar.html" %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include "footer.html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% block clipboard %}
|
||||
<div class="toast clipboard" id="toast-success" role="alert" aria-live="assertive" aria-atomic="true" 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>Link copied to clipboard
|
||||
{% block clipboard %}
|
||||
<div class="toast clipboard" id="toast-success" role="alert" aria-live="assertive" aria-atomic="true" 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>Link copied to clipboard
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" 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"></span>
|
||||
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" 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"></span>
|
||||
</div>
|
||||
</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: 1000" role="alert" aria-live="assertive" aria-atomic="true" 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 class="toast" id="toast-post-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" 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>
|
||||
</div>
|
||||
|
||||
|
||||
{% if v %}
|
||||
{% include "/modals/Modal2FA.html" %}
|
||||
{% endif %}
|
||||
|
||||
{% block onload %}{% endblock %}
|
||||
{% block modals %}{% endblock %}
|
||||
|
||||
{% block onload %}{% endblock %}
|
||||
|
||||
{% block scripts %}{% endblock %}
|
||||
|
||||
<script src="/assets/js/default.js"></script>
|
||||
<script src="/assets/js/header.js?v=54"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue