mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-24 15:07:17 +00:00
fix: make the feedback dialog's privacy note match what is shared
The note unconditionally said 'Your email address will be shared with the developer so they can respond', but AppFeedbackService shares the username always and the email only when it exists and is verified — an unverified or temp-user sender was promised a reply path that never materializes, and nobody was told about the username. Show 'username and email' when the signed-in user's email is verified, and 'username' otherwise.
This commit is contained in:
@@ -322,7 +322,8 @@ export class AppFeedbackService extends PuterService {
|
||||
// signup, never proven), so using it as Reply-To would let a sender
|
||||
// point the developer's reply at a stranger's inbox. Unverified
|
||||
// senders still get their feedback delivered, just without a
|
||||
// reply path. The dialog tells the user their email will be shared.
|
||||
// reply path. The dialog's privacy note mirrors this split (see
|
||||
// app_feedback_privacy_note / app_feedback_privacy_note_no_email).
|
||||
const senderEmail =
|
||||
sender?.email && sender.email_confirmed ? sender.email : null;
|
||||
|
||||
|
||||
@@ -59,6 +59,15 @@ async function UIWindowAppFeedback (options) {
|
||||
? { app: options.app }
|
||||
: { origin: options.origin };
|
||||
|
||||
// Mirror what AppFeedbackService actually shares: the username
|
||||
// always, the sender's email only when it exists and is verified
|
||||
// (unverified addresses get no Reply-To, so the developer cannot
|
||||
// respond). The note must not promise either more or less.
|
||||
const shares_email = Boolean(window.user?.email && window.user?.email_confirmed);
|
||||
const privacy_note_key = shares_email
|
||||
? 'app_feedback_privacy_note'
|
||||
: 'app_feedback_privacy_note_no_email';
|
||||
|
||||
const titleId = `${modal_id}-title`;
|
||||
const h = `
|
||||
<div class="app-feedback-overlay" role="dialog" aria-modal="true" aria-labelledby="${titleId}">
|
||||
@@ -87,7 +96,7 @@ async function UIWindowAppFeedback (options) {
|
||||
<p class="app-feedback-c2a">${i18n('app_feedback_c2a')}</p>
|
||||
<textarea class="app-feedback-message" maxlength="${MESSAGE_MAX_LENGTH}" placeholder="${html_encode(i18n('app_feedback_placeholder'))}"></textarea>
|
||||
<div class="app-feedback-counter">0 / ${MESSAGE_MAX_LENGTH}</div>
|
||||
<p class="app-feedback-note">${i18n('app_feedback_privacy_note')}</p>
|
||||
<p class="app-feedback-note">${i18n(privacy_note_key)}</p>
|
||||
<p class="app-feedback-error" role="alert" style="display:none;"></p>
|
||||
<div class="app-feedback-actions">
|
||||
<button type="button" class="app-feedback-btn app-feedback-cancel-btn">${i18n('cancel')}</button>
|
||||
|
||||
@@ -46,7 +46,8 @@ const en = {
|
||||
app_feedback_error: 'Something went wrong. Please try again.',
|
||||
app_feedback_not_available: 'This app is not accepting feedback right now.',
|
||||
app_feedback_placeholder: 'What is working well? What could be better?',
|
||||
app_feedback_privacy_note: 'Your email address will be shared with the developer so they can respond.',
|
||||
app_feedback_privacy_note: 'Your username and email address will be shared with the developer so they can respond.',
|
||||
app_feedback_privacy_note_no_email: 'Your username will be shared with the developer.',
|
||||
app_feedback_rate_limited: "You've sent a lot of feedback recently. Please try again later.",
|
||||
app_feedback_sent: 'Feedback sent. Thank you!',
|
||||
app_feedback_title: 'Send Feedback',
|
||||
|
||||
Reference in New Issue
Block a user