mirror of
https://github.com/karl0ss/ai_image_frame_server.git
synced 2025-06-07 19:15:08 +01:00
Compare commits
6 Commits
1abba32f18
...
aabd19dd5f
Author | SHA1 | Date | |
---|---|---|---|
aabd19dd5f | |||
423ca357f6 | |||
a7a27696d2 | |||
790c149c61 | |||
205481c4d4 | |||
80f535be45 |
@ -1,5 +1,5 @@
|
||||
[tool.bumpversion]
|
||||
current_version = "0.1.3"
|
||||
current_version = "0.1.6"
|
||||
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
||||
serialize = ["{major}.{minor}.{patch}"]
|
||||
search = "{current_version}"
|
||||
|
4
.github/workflows/docker-publish.yml
vendored
4
.github/workflows/docker-publish.yml
vendored
@ -3,7 +3,7 @@ name: Build and Publish Docker Image
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ['*'] # triggers on any tag push
|
||||
tags: ["*"] # triggers on any tag push
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@ -13,6 +13,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # ensures tags are fetched
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
@ -51,36 +51,66 @@
|
||||
button:hover {
|
||||
background: #555;
|
||||
}
|
||||
|
||||
/* ---------- spinner ---------- */
|
||||
#spinner-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
visibility: hidden; /* toggled in JS */
|
||||
z-index: 1000;
|
||||
}
|
||||
.spinner {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border: 6px solid #555;
|
||||
border-top-color: white;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
}
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="margin-bottom: 20px;">Create An Image</h1>
|
||||
<textarea id="prompt-box" placeholder="Enter your custom prompt here..."></textarea>
|
||||
<div class="button-group">
|
||||
<button onclick="location.href='/'">Back</button>
|
||||
<button onclick="showSpinner(); location.href='/'">Back</button>
|
||||
<button onclick="sendPrompt()">Send Prompt</button>
|
||||
<button onclick="location.href='/create'">Random Prompt</button>
|
||||
<button onclick="showSpinner(); location.href='/create'">Random Prompt</button>
|
||||
</div>
|
||||
|
||||
<!-- waiting overlay -->
|
||||
<div id="spinner-overlay">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const overlay = document.getElementById('spinner-overlay');
|
||||
function showSpinner() {
|
||||
overlay.style.visibility = 'visible';
|
||||
}
|
||||
|
||||
function sendPrompt() {
|
||||
showSpinner();
|
||||
const prompt = document.getElementById('prompt-box').value;
|
||||
const formData = new URLSearchParams();
|
||||
formData.append('prompt', prompt);
|
||||
|
||||
fetch('/create', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
body: formData.toString()
|
||||
}).then(response => {
|
||||
if (response.redirected) {
|
||||
window.location.href = response.url;
|
||||
} else {
|
||||
alert("Image creation request sent.");
|
||||
}
|
||||
}).catch(error => {
|
||||
})
|
||||
.then(response => {
|
||||
// If server redirects, follow it; otherwise go to /create
|
||||
window.location.href = response.redirected ? response.url : '/create';
|
||||
})
|
||||
.catch(error => {
|
||||
overlay.style.visibility = 'hidden'; // hide spinner on failure
|
||||
alert("Error sending prompt: " + error);
|
||||
});
|
||||
}
|
||||
|
@ -196,7 +196,7 @@
|
||||
|
||||
<script>
|
||||
const gallery = document.getElementById('gallery');
|
||||
const batchSize = 6; // images to load per batch
|
||||
const batchSize = 9; // images to load per batch
|
||||
let loadedCount = 0;
|
||||
let currentIndex = 0;
|
||||
const detailsCache = {}; // Cache for image details
|
||||
|
Loading…
x
Reference in New Issue
Block a user