This commit is contained in:
Adrien Bouvais 2024-05-23 17:55:25 +02:00
parent 255f86e48b
commit caf94c97e5
2 changed files with 9 additions and 4 deletions

View File

@ -12,8 +12,8 @@
<!--link rel="stylesheet" href="/animations.css"-->
<link rel="stylesheet" href="/style.css">
<script src="https://unpkg.com/htmx.org@1.9.11"></script>
<script src="https://unpkg.com/htmx.org@1.9.12/dist/ext/sse.js"></script>
<script src="https://unpkg.com/htmx.org@2.0.0-beta4/dist/htmx.js"></script>
<script src="https://unpkg.com/htmx-ext-sse@2.0.0/sse.js"></script>
<script async src="https://js.stripe.com/v3/pricing-table.js"></script>
</head>

View File

@ -65,13 +65,14 @@
<textarea class="textarea is-small mb-5 has-fixed-size" id="model-prompt-input"
name="model-prompt-input"></textarea>
<div class="is-flex is-justify-content-flex-end">
<button class="button is-small is-danger is-outlined mr-2" id="cancel-create-model-button"
<button class="button is-small is-danger is-outlined mr-3" id="cancel-create-model-button"
type="button">
<span class="icon">
<i class="fa-solid fa-xmark"></i>
</span>
</button>
<button class="button is-small is-success is-outlined" id="create-model-button" type="submit">
<button disabled class="button is-small is-success" id="confirm-create-model-button"
type="submit">
<span class="icon">
<i class="fa-solid fa-check"></i>
</span>
@ -84,6 +85,10 @@
</div>
<script>
document.getElementById('model-name-input').addEventListener('input', function () {
document.getElementById('confirm-create-model-button').disabled = this.value === '';
})
document.addEventListener('click', function (event) {
if (!document.getElementById('models-dropdown').contains(event.target)) {
document.getElementById('models-dropdown').classList.remove('is-active');