Refactor: Extract inline JS to external files
New JS files: - auth.js: Password toggle, confirmation validation, copy, regenerate - generate.js: Form controls, credential display, memory story generation Updated templates to use external JS: - login.html, setup.html, account.html - admin/user_new.html, user_created.html, password_reset.html - generate.html (now uses generate.js + minimal Jinja-dependent inline) Core stegasoo.js (943 lines) unchanged - already handles encode/decode 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,17 +45,5 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script>
|
||||
function togglePassword(inputId, btn) {
|
||||
const input = document.getElementById(inputId);
|
||||
const icon = btn.querySelector('i');
|
||||
if (input.type === 'password') {
|
||||
input.type = 'text';
|
||||
icon.classList.replace('bi-eye', 'bi-eye-slash');
|
||||
} else {
|
||||
input.type = 'password';
|
||||
icon.classList.replace('bi-eye-slash', 'bi-eye');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script src="{{ url_for('static', filename='js/auth.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user