fixed css

This commit is contained in:
2025-12-20 23:33:47 +03:00
parent 9b7b743319
commit d05344e604
60 changed files with 939 additions and 227 deletions

View File

@@ -4,9 +4,20 @@
// @LAYER: Infra-API
import { addToast } from './toasts.js';
import { PUBLIC_WS_URL } from '$env/static/public';
const API_BASE_URL = '/api';
/**
* Returns the WebSocket URL for a specific task, with fallback logic.
* @param {string} taskId
* @returns {string}
*/
export const getWsUrl = (taskId) => {
const baseUrl = PUBLIC_WS_URL || `ws://${window.location.hostname}:8000`;
return `${baseUrl}/ws/logs/${taskId}`;
};
// [DEF:fetchApi:Function]
// @PURPOSE: Generic GET request wrapper.
// @PARAM: endpoint (string) - API endpoint.