diff --git a/Auto-Image.js b/Auto-Image.js
index 35def4c..6833205 100644
--- a/Auto-Image.js
+++ b/Auto-Image.js
@@ -201,7 +201,7 @@
pixels: "Pixels",
charges: "Charges",
estimatedTime: "Estimated time",
- initMessage: "Click 'Start Auto-BOT' to begin",
+ initMessage: "Click 'Upload Image' to begin",
waitingInit: "Waiting for initialization...",
resizeSuccess: "✅ Image resized to {width}x{height}",
paintingPaused: "⏸️ Painting paused at position X: {x}, Y: {y}",
@@ -261,7 +261,7 @@
pixels: "Пиксели",
charges: "Заряды",
estimatedTime: "Примерное время",
- initMessage: "Нажмите 'Запустить Авто-БОТ', чтобы начать",
+ initMessage: "Нажмите 'Загрузить изображение', чтобы начать",
waitingInit: "Ожидание инициализации...",
resizeSuccess: "✅ Изображение изменено до {width}x{height}",
paintingPaused: "⏸️ Рисование приостановлено на позиции X: {x}, Y: {y}",
@@ -321,7 +321,7 @@
pixels: "Pixels",
charges: "Cargas",
estimatedTime: "Tempo estimado",
- initMessage: "Clique em 'Iniciar Auto-BOT' para começar",
+ initMessage: "Clique em 'Upload da Imagem' para começar",
waitingInit: "Aguardando inicialização...",
resizeSuccess: "✅ Imagem redimensionada para {width}x{height}",
paintingPaused: "⏸️ Pintura pausada na posição X: {x}, Y: {y}",
@@ -381,7 +381,7 @@
pixels: "Pixel",
charges: "Điện tích",
estimatedTime: "Thời gian ước tính",
- initMessage: "Nhấp 'Khởi động Auto-BOT' để bắt đầu",
+ initMessage: "Nhấp 'Tải lên hình ảnh' để bắt đầu",
waitingInit: "Đang chờ khởi tạo...",
resizeSuccess: "✅ Đã thay đổi kích thước hình ảnh thành {width}x{height}",
paintingPaused: "⏸️ Tạm dừng vẽ tại vị trí X: {x}, Y: {y}",
@@ -441,7 +441,7 @@
pixels: "Pixels",
charges: "Charges",
estimatedTime: "Temps estimé",
- initMessage: "Cliquez sur 'Démarrer Auto-BOT' pour commencer",
+ initMessage: "Cliquez sur 'Télécharger l'image' pour commencer",
waitingInit: "En attente d'initialisation...",
resizeSuccess: "✅ Image redimensionnée en {width}x{height}",
paintingPaused: "⏸️ Peinture en pause à la position X: {x}, Y: {y}",
@@ -1160,6 +1160,39 @@
}
// --- END: Color Palette Functions ---
+ // Refactored function to handle color checking
+ async function checkAndSetColors() {
+ // If colors are already checked, no need to do it again.
+ if (state.colorsChecked) return true;
+
+ try {
+ updateUI("checkingColors", "default");
+ state.availableColors = Utils.extractAvailableColors();
+
+ if (state.availableColors.length === 0) {
+ Utils.showAlert(Utils.t("noColorsFound"), "error");
+ updateUI("noColorsFound", "error");
+ return false; // Indicate failure
+ }
+
+ state.colorsChecked = true;
+
+ // Enable other buttons now that we're initialized
+ const selectPosBtn = document.getElementById('selectPosBtn');
+ if(selectPosBtn) selectPosBtn.disabled = false;
+
+ updateUI("colorsFound", "success", {
+ count: state.availableColors.length,
+ });
+ updateStats();
+ return true; // Indicate success
+ } catch (e) {
+ console.error("Error checking colors:", e);
+ updateUI("imageError", "error");
+ return false; // Indicate failure
+ }
+ }
+
async function createUI() {
await detectLanguage()
@@ -2318,23 +2351,12 @@
-
-
-
🤖 Bot Setup
-
-
-
-
-
🖼️ Image Management
-