mirror of
https://github.com/karl0ss/ai_image_frame_server.git
synced 2025-06-08 11:25:07 +01:00
Compare commits
No commits in common. "aabd19dd5f65e6e3e210daf3e9c5ad5e9e901ea0" and "1abba32f18dff67da34a38781152f38c2caf8fc6" have entirely different histories.
aabd19dd5f
...
1abba32f18
@ -1,5 +1,5 @@
|
|||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "0.1.6"
|
current_version = "0.1.3"
|
||||||
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
||||||
serialize = ["{major}.{minor}.{patch}"]
|
serialize = ["{major}.{minor}.{patch}"]
|
||||||
search = "{current_version}"
|
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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
tags: ["*"] # triggers on any tag push
|
tags: ['*'] # triggers on any tag push
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -13,8 +13,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0 # ensures tags are fetched
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
@ -51,66 +51,36 @@
|
|||||||
button:hover {
|
button:hover {
|
||||||
background: #555;
|
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>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 style="margin-bottom: 20px;">Create An Image</h1>
|
<h1 style="margin-bottom: 20px;">Create An Image</h1>
|
||||||
<textarea id="prompt-box" placeholder="Enter your custom prompt here..."></textarea>
|
<textarea id="prompt-box" placeholder="Enter your custom prompt here..."></textarea>
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<button onclick="showSpinner(); location.href='/'">Back</button>
|
<button onclick="location.href='/'">Back</button>
|
||||||
<button onclick="sendPrompt()">Send Prompt</button>
|
<button onclick="sendPrompt()">Send Prompt</button>
|
||||||
<button onclick="showSpinner(); location.href='/create'">Random Prompt</button>
|
<button onclick="location.href='/create'">Random Prompt</button>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- waiting overlay -->
|
|
||||||
<div id="spinner-overlay">
|
|
||||||
<div class="spinner"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const overlay = document.getElementById('spinner-overlay');
|
|
||||||
function showSpinner() {
|
|
||||||
overlay.style.visibility = 'visible';
|
|
||||||
}
|
|
||||||
|
|
||||||
function sendPrompt() {
|
function sendPrompt() {
|
||||||
showSpinner();
|
|
||||||
const prompt = document.getElementById('prompt-box').value;
|
const prompt = document.getElementById('prompt-box').value;
|
||||||
const formData = new URLSearchParams();
|
const formData = new URLSearchParams();
|
||||||
formData.append('prompt', prompt);
|
formData.append('prompt', prompt);
|
||||||
|
|
||||||
fetch('/create', {
|
fetch('/create', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
},
|
||||||
body: formData.toString()
|
body: formData.toString()
|
||||||
})
|
}).then(response => {
|
||||||
.then(response => {
|
if (response.redirected) {
|
||||||
// If server redirects, follow it; otherwise go to /create
|
window.location.href = response.url;
|
||||||
window.location.href = response.redirected ? response.url : '/create';
|
} else {
|
||||||
})
|
alert("Image creation request sent.");
|
||||||
.catch(error => {
|
}
|
||||||
overlay.style.visibility = 'hidden'; // hide spinner on failure
|
}).catch(error => {
|
||||||
alert("Error sending prompt: " + error);
|
alert("Error sending prompt: " + error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -196,7 +196,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
const gallery = document.getElementById('gallery');
|
const gallery = document.getElementById('gallery');
|
||||||
const batchSize = 9; // images to load per batch
|
const batchSize = 6; // images to load per batch
|
||||||
let loadedCount = 0;
|
let loadedCount = 0;
|
||||||
let currentIndex = 0;
|
let currentIndex = 0;
|
||||||
const detailsCache = {}; // Cache for image details
|
const detailsCache = {}; // Cache for image details
|
||||||
|
Loading…
x
Reference in New Issue
Block a user