@alliance-droid/status-feedback-system 1.3.13 → 1.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DevFeedback.svelte +1 -1
- package/dist/components/FeedbackForm.svelte +1 -1
- package/dist/components/StatusBanner.svelte +3 -7
- package/dist/components/StatusPage.svelte +8 -19
- package/dist/components/board/FeedbackSidebar.svelte +1 -1
- package/dist/components/dev/screenshot.js +1 -1
- package/dist/components/shared/IncidentTimeline.svelte +1 -1
- package/dist/components/shared/UptimeBar.svelte +1 -1
- package/package.json +1 -1
|
@@ -337,8 +337,8 @@
|
|
|
337
337
|
>
|
|
338
338
|
<Card variant="elevated" padding="none" class="flex flex-col max-h-[calc(100vh-2rem)] overflow-hidden">
|
|
339
339
|
<!-- Header (draggable) -->
|
|
340
|
-
<!-- svelte-ignore a11y_no_static_element_interactions — drag handle needs mousedown -->
|
|
341
340
|
<div
|
|
341
|
+
role="presentation"
|
|
342
342
|
class="flex items-center justify-between px-5 py-4 border-b border-border shrink-0 select-none"
|
|
343
343
|
style="cursor: {isDragging ? 'grabbing' : 'grab'};"
|
|
344
344
|
onmousedown={handleDragStart}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { onMount
|
|
2
|
+
import { onMount } from 'svelte';
|
|
3
3
|
import type { System, SystemStatus } from '../types.js';
|
|
4
4
|
import { createStatusClient, type StatusClient } from '../api.js';
|
|
5
5
|
import { deriveOverallStatus } from '../utils.js';
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
let { systems: systemsProp, apiUrl, apiKey, statusUrl, refreshInterval = 60 }: Props = $props();
|
|
22
22
|
|
|
23
|
-
let systems
|
|
24
|
-
let loading = $
|
|
23
|
+
let systems = $derived(systemsProp ?? []);
|
|
24
|
+
let loading = $derived(!systemsProp && !!apiUrl && !!apiKey);
|
|
25
25
|
let fetchFailed = $state(false);
|
|
26
26
|
|
|
27
27
|
let usesApi = $derived(!systemsProp && !!apiUrl && !!apiKey);
|
|
@@ -66,10 +66,6 @@
|
|
|
66
66
|
};
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
$effect(() => {
|
|
70
|
-
if (systemsProp) systems = systemsProp;
|
|
71
|
-
});
|
|
72
|
-
|
|
73
69
|
let overallStatus = $derived(deriveOverallStatus(systems));
|
|
74
70
|
|
|
75
71
|
const messages: Record<SystemStatus, string> = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { onMount
|
|
2
|
+
import { onMount } from 'svelte';
|
|
3
3
|
import type { System, Incident, StatusHistoryEntry, SystemStatus } from '../types.js';
|
|
4
4
|
import { createStatusClient, type StatusClient } from '../api.js';
|
|
5
5
|
import { deriveOverallStatus } from '../utils.js';
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
}: Props = $props();
|
|
38
38
|
|
|
39
39
|
// ── State ──
|
|
40
|
-
let systems
|
|
41
|
-
let incidents
|
|
42
|
-
let statusHistory
|
|
43
|
-
let loading = $
|
|
40
|
+
let systems = $derived(systemsProp ?? []);
|
|
41
|
+
let incidents = $derived(incidentsProp ?? []);
|
|
42
|
+
let statusHistory = $derived(statusHistoryProp ?? {});
|
|
43
|
+
let loading = $derived(!systemsProp);
|
|
44
44
|
let error = $state('');
|
|
45
45
|
|
|
46
46
|
// ── Self-fetching mode ──
|
|
@@ -95,17 +95,6 @@
|
|
|
95
95
|
};
|
|
96
96
|
});
|
|
97
97
|
|
|
98
|
-
// ── Sync props when in pass-through mode ──
|
|
99
|
-
$effect(() => {
|
|
100
|
-
if (systemsProp) systems = systemsProp;
|
|
101
|
-
});
|
|
102
|
-
$effect(() => {
|
|
103
|
-
if (incidentsProp) incidents = incidentsProp;
|
|
104
|
-
});
|
|
105
|
-
$effect(() => {
|
|
106
|
-
if (statusHistoryProp) statusHistory = statusHistoryProp;
|
|
107
|
-
});
|
|
108
|
-
|
|
109
98
|
// ── Derived state ──
|
|
110
99
|
|
|
111
100
|
let overallStatus = $derived(deriveOverallStatus(systems));
|
|
@@ -176,7 +165,7 @@
|
|
|
176
165
|
<section>
|
|
177
166
|
<h2 class="mb-4 text-lg font-semibold text-foreground">Systems</h2>
|
|
178
167
|
<div class="space-y-3">
|
|
179
|
-
{#each systems as system}
|
|
168
|
+
{#each systems as system (system.id)}
|
|
180
169
|
<SystemCard
|
|
181
170
|
{system}
|
|
182
171
|
history={statusHistory[system.id] || []}
|
|
@@ -192,7 +181,7 @@
|
|
|
192
181
|
<section>
|
|
193
182
|
<h2 class="mb-4 text-lg font-semibold text-foreground">Active Incidents</h2>
|
|
194
183
|
<div class="space-y-4">
|
|
195
|
-
{#each activeIncidents as incident}
|
|
184
|
+
{#each activeIncidents as incident (incident.id)}
|
|
196
185
|
<div class="rounded-lg border border-border bg-surface p-4">
|
|
197
186
|
<div class="flex items-start justify-between">
|
|
198
187
|
<div>
|
|
@@ -222,7 +211,7 @@
|
|
|
222
211
|
<section>
|
|
223
212
|
<h2 class="mb-4 text-lg font-semibold text-foreground">Past Incidents</h2>
|
|
224
213
|
<div class="space-y-4">
|
|
225
|
-
{#each recentResolved as incident}
|
|
214
|
+
{#each recentResolved as incident (incident.id)}
|
|
226
215
|
<div class="rounded-lg border border-border bg-surface p-4">
|
|
227
216
|
<div class="flex items-start justify-between">
|
|
228
217
|
<div>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<span class="ml-auto bg-surface-hover px-2 py-0.5 rounded-full text-xs">{board.total}</span>
|
|
32
32
|
</button>
|
|
33
33
|
|
|
34
|
-
{#each board.categories as cat}
|
|
34
|
+
{#each board.categories as cat (cat.name)}
|
|
35
35
|
<button
|
|
36
36
|
class="flex items-center gap-2 px-3 py-2 rounded-lg text-sm text-left w-full transition-colors
|
|
37
37
|
{board.activeCategory === cat.name ? 'bg-surface-secondary text-foreground font-semibold' : 'text-foreground-secondary hover:bg-surface-hover hover:text-foreground'}"
|
|
@@ -25,7 +25,7 @@ export async function captureScreenshot() {
|
|
|
25
25
|
return hasUnsupportedColor;
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
|
-
return canvas.toDataURL('image/
|
|
28
|
+
return canvas.toDataURL('image/jpeg', 0.7);
|
|
29
29
|
}
|
|
30
30
|
catch (err) {
|
|
31
31
|
console.error('[DevFeedback] Screenshot capture failed:', err);
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
</script>
|
|
37
37
|
|
|
38
38
|
<div class="space-y-4" role="list" aria-label="Incident timeline">
|
|
39
|
-
{#each updates as update}
|
|
39
|
+
{#each updates as update (update.id)}
|
|
40
40
|
{@const config = statusConfig[update.status]}
|
|
41
41
|
<div class="flex gap-3" role="listitem">
|
|
42
42
|
<div class="flex flex-col items-center">
|
package/package.json
CHANGED