implementing snapshots

This commit is contained in:
Emily
2024-08-02 16:09:11 +02:00
parent 376b39e247
commit 93f22dfc54
16 changed files with 195 additions and 53 deletions

View File

@@ -91,6 +91,12 @@ async function loadData(timelineEndpointName: string, target: Data) {
const response = useTimeline(timelineEndpointName as any, chartSlice);
response.onRequest(() => {
target.ready = false;
target.data = [];
target.labels = [];
})
response.onResponse(data => {
if (!data.value) return;

View File

@@ -9,7 +9,7 @@ onUnmounted(() => stopWatching());
const { createAlert } = useAlert();
function copyProjectId() {
if (!navigator.clipboard) alert('NON PUOI COPIARE IN HTTP');
if (!navigator.clipboard) alert('You can\'t copy in HTTP');
navigator.clipboard.writeText((activeProject.value?._id || 0).toString());
createAlert('Success', 'Project id copied successfully.', 'far fa-circle-check', 5000);
}