WIP: Staged all changes

This commit is contained in:
2025-12-19 22:40:28 +03:00
parent 8f4b469c96
commit ce703322c2
64 changed files with 5985 additions and 833 deletions

View File

@@ -0,0 +1,40 @@
import { writable } from 'svelte/store';
import { api } from './api.js';
// Store for the list of available plugins
export const plugins = writable([]);
// Store for the list of tasks
export const tasks = writable([]);
// Store for the currently selected plugin
export const selectedPlugin = writable(null);
// Store for the currently selected task
export const selectedTask = writable(null);
// Store for the logs of the currently selected task
export const taskLogs = writable([]);
// Function to fetch plugins from the API
export async function fetchPlugins() {
try {
const data = await api.getPlugins();
console.log('Fetched plugins:', data); // Add console log
plugins.set(data);
} catch (error) {
console.error('Error fetching plugins:', error);
// Handle error appropriately in the UI
}
}
// Function to fetch tasks from the API
export async function fetchTasks() {
try {
const data = await api.getTasks();
tasks.set(data);
} catch (error) {
console.error('Error fetching tasks:', error);
// Handle error appropriately in the UI
}
}