@alliance-droid/status-feedback-system 1.3.12 → 1.3.13
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.
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
showOnboarding?: boolean;
|
|
32
32
|
/** URL to the feedback board page. If omitted, "View Open Issues" is hidden from the context menu. */
|
|
33
33
|
boardUrl?: string;
|
|
34
|
-
/**
|
|
34
|
+
/** Authenticated user email. Required for submitting feedback. */
|
|
35
35
|
userEmail?: string;
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -115,7 +115,8 @@
|
|
|
115
115
|
let formType = $state<'bug' | 'feature'>('bug');
|
|
116
116
|
let formTitle = $state('');
|
|
117
117
|
let formMessage = $state('');
|
|
118
|
-
|
|
118
|
+
|
|
119
|
+
let isAuthenticated = $derived(!!userEmail);
|
|
119
120
|
let submitting = $state(false);
|
|
120
121
|
let submitResult = $state<'success' | 'error' | null>(null);
|
|
121
122
|
|
|
@@ -233,7 +234,6 @@
|
|
|
233
234
|
formType = type;
|
|
234
235
|
formTitle = '';
|
|
235
236
|
formMessage = '';
|
|
236
|
-
formEmail = userEmail ?? '';
|
|
237
237
|
submitResult = null;
|
|
238
238
|
menuOpen = false;
|
|
239
239
|
formOpen = true;
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
async function handleSubmit() {
|
|
252
|
-
if (!formMessage.trim()) return;
|
|
252
|
+
if (!formMessage.trim() || !isAuthenticated) return;
|
|
253
253
|
submitting = true;
|
|
254
254
|
submitResult = null;
|
|
255
255
|
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
title: formTitle.trim() || undefined,
|
|
287
287
|
message: formMessage.trim(),
|
|
288
288
|
category: formType === 'bug' ? 'bug' : 'feature',
|
|
289
|
-
email:
|
|
289
|
+
email: userEmail,
|
|
290
290
|
pageUrl: window.location.href,
|
|
291
291
|
metadata,
|
|
292
292
|
});
|
|
@@ -372,7 +372,17 @@
|
|
|
372
372
|
{formType === 'bug' ? "We'll look into this." : "Thanks for the suggestion!"}
|
|
373
373
|
</p>
|
|
374
374
|
</div>
|
|
375
|
+
{:else if !isAuthenticated}
|
|
376
|
+
<div class="text-center py-6 text-foreground-tertiary">
|
|
377
|
+
<i class="fa-solid fa-lock text-2xl" aria-hidden="true"></i>
|
|
378
|
+
<p class="mt-2 text-sm">Sign in to submit feedback</p>
|
|
379
|
+
</div>
|
|
375
380
|
{:else}
|
|
381
|
+
<div class="flex items-center gap-1.5 text-xs text-foreground-tertiary">
|
|
382
|
+
<i class="fa-solid fa-user" aria-hidden="true"></i>
|
|
383
|
+
<span>Submitting as <span class="font-medium text-foreground-secondary">{userEmail}</span></span>
|
|
384
|
+
</div>
|
|
385
|
+
|
|
376
386
|
<Input
|
|
377
387
|
bind:value={formTitle}
|
|
378
388
|
placeholder={formType === 'bug' ? 'Brief summary of the bug' : 'Feature title'}
|
|
@@ -388,13 +398,6 @@
|
|
|
388
398
|
rows={4}
|
|
389
399
|
/>
|
|
390
400
|
|
|
391
|
-
<Input
|
|
392
|
-
type="email"
|
|
393
|
-
bind:value={formEmail}
|
|
394
|
-
placeholder="your@email.com (optional)"
|
|
395
|
-
label="Email"
|
|
396
|
-
/>
|
|
397
|
-
|
|
398
401
|
<!-- Auto-captured context (bugs only) -->
|
|
399
402
|
{#if formType === 'bug'}
|
|
400
403
|
<div class="space-y-2">
|
|
@@ -470,7 +473,7 @@
|
|
|
470
473
|
</div>
|
|
471
474
|
|
|
472
475
|
<!-- Footer -->
|
|
473
|
-
{#if submitResult !== 'success'}
|
|
476
|
+
{#if submitResult !== 'success' && isAuthenticated}
|
|
474
477
|
<div class="flex justify-end gap-2 px-5 py-4 border-t border-border shrink-0">
|
|
475
478
|
<Button variant="neutral" style="outline" onclick={() => (formOpen = false)}>
|
|
476
479
|
Cancel
|
|
@@ -9,7 +9,7 @@ interface Props {
|
|
|
9
9
|
showOnboarding?: boolean;
|
|
10
10
|
/** URL to the feedback board page. If omitted, "View Open Issues" is hidden from the context menu. */
|
|
11
11
|
boardUrl?: string;
|
|
12
|
-
/**
|
|
12
|
+
/** Authenticated user email. Required for submitting feedback. */
|
|
13
13
|
userEmail?: string;
|
|
14
14
|
}
|
|
15
15
|
declare const DevFeedback: import("svelte").Component<Props, {}, "">;
|
package/package.json
CHANGED