Promote development → master (initial production release: pre-release line + Stage 18) #104
@@ -31,15 +31,14 @@
|
|||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
<section class="panel"><h2>Actions</h2>
|
<section class="panel"><h2>Actions</h2>
|
||||||
<form class="form" method="post" action="/_gm/feedback/{{.ID}}/read"><button type="submit">Mark read</button></form>
|
{{if not .Read}}<form class="form" method="post" action="/_gm/feedback/{{.ID}}/read"><button type="submit">Mark read</button></form>{{end}}
|
||||||
<form class="form" method="post" action="/_gm/feedback/{{.ID}}/archive"><button type="submit">Archive</button></form>
|
{{if not .Archived}}<form class="form" method="post" action="/_gm/feedback/{{.ID}}/archive"><button type="submit">Archive</button></form>{{end}}
|
||||||
<form class="form col" method="post" action="/_gm/feedback/{{.ID}}/delete">
|
<form class="form col" method="post" action="/_gm/feedback/{{.ID}}/delete">
|
||||||
<label><input type="checkbox" name="block" value="1"> ban the player from feedback</label>
|
<label><input type="checkbox" name="block" value="1"> ban the player from feedback</label>
|
||||||
<div><button type="submit">Delete</button></div>
|
<div>
|
||||||
</form>
|
<button type="submit">Delete</button>
|
||||||
<form class="form col" method="post" action="/_gm/feedback/{{.ID}}/delete-all">
|
<button type="submit" formaction="/_gm/feedback/{{.ID}}/delete-all">Delete all from this player</button>
|
||||||
<label><input type="checkbox" name="block" value="1"> ban the player from feedback</label>
|
</div>
|
||||||
<div><button type="submit">Delete all from this player</button></div>
|
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ async function openFeedback(page: Page): Promise<void> {
|
|||||||
await page.getByRole('button', { name: /Settings/ }).click();
|
await page.getByRole('button', { name: /Settings/ }).click();
|
||||||
await expect(page.locator('.pane')).toHaveCount(1);
|
await expect(page.locator('.pane')).toHaveCount(1);
|
||||||
await page.getByRole('button', { name: 'Info', exact: true }).click();
|
await page.getByRole('button', { name: 'Info', exact: true }).click();
|
||||||
await page.getByRole('button', { name: 'Feedback', exact: true }).click();
|
// The About "Feedback" button: its accessible name gains the "1" badge once a reply
|
||||||
|
// is waiting, so match by substring rather than exact.
|
||||||
|
await page.getByRole('button', { name: /Feedback/ }).click();
|
||||||
}
|
}
|
||||||
|
|
||||||
test('feedback: submit a message, then resend is blocked', async ({ page }) => {
|
test('feedback: submit a message, then resend is blocked', async ({ page }) => {
|
||||||
|
|||||||
@@ -34,7 +34,9 @@
|
|||||||
<p class="muted">{t('about.version', { v: version })}</p>
|
<p class="muted">{t('about.version', { v: version })}</p>
|
||||||
|
|
||||||
{#if !(app.profile?.isGuest ?? true)}
|
{#if !(app.profile?.isGuest ?? true)}
|
||||||
<button class="btn feedback" onclick={() => navigate('/feedback')}>{t('feedback.title')}</button>
|
<button class="feedback" onclick={() => navigate('/feedback')}>
|
||||||
|
{t('feedback.title')}{#if app.feedbackReplyUnread}<span class="fbadge">1</span>{/if}
|
||||||
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -78,4 +80,27 @@
|
|||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
.feedback {
|
||||||
|
align-self: flex-start;
|
||||||
|
padding: 12px 18px;
|
||||||
|
border: 1px solid var(--accent);
|
||||||
|
background: var(--accent);
|
||||||
|
color: var(--accent-text);
|
||||||
|
border-radius: var(--radius);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
/* The reply badge sits on the accent button, so it inverts the accent colours. */
|
||||||
|
.fbadge {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 8px;
|
||||||
|
min-width: 18px;
|
||||||
|
padding: 0 5px;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: var(--accent-text);
|
||||||
|
color: var(--accent);
|
||||||
|
font-size: 0.78rem;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1.55;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -94,13 +94,17 @@
|
|||||||
<input bind:this={fileInput} type="file" class="hidden" onchange={pickFile} />
|
<input bind:this={fileInput} type="file" class="hidden" onchange={pickFile} />
|
||||||
{#if file}
|
{#if file}
|
||||||
<span class="fname">{file.name}</span>
|
<span class="fname">{file.name}</span>
|
||||||
<button type="button" class="ghost" onclick={removeFile}>{t('feedback.removeFile')}</button>
|
<button type="button" class="neutral" onclick={removeFile}>{t('feedback.removeFile')}</button>
|
||||||
{:else}
|
{:else}
|
||||||
<button type="button" class="ghost" onclick={() => fileInput.click()} disabled={!enabled}>
|
<button
|
||||||
{t('feedback.attach')}
|
type="button"
|
||||||
</button>
|
class="neutral attach"
|
||||||
|
aria-label={t('feedback.attach')}
|
||||||
|
title={t('feedback.attach')}
|
||||||
|
onclick={() => fileInput.click()}
|
||||||
|
disabled={!enabled}>📎</button>
|
||||||
{/if}
|
{/if}
|
||||||
<button type="button" class="btn" onclick={send} disabled={!canSend}>{t('feedback.send')}</button>
|
<button type="button" class="cta" onclick={send} disabled={!canSend}>{t('feedback.send')}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if fileError}<p class="err">{t('feedback.fileRejected')}</p>{/if}
|
{#if fileError}<p class="err">{t('feedback.fileRejected')}</p>{/if}
|
||||||
@@ -151,8 +155,30 @@
|
|||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
.row .btn {
|
.cta {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
|
padding: 12px 18px;
|
||||||
|
border: 1px solid var(--accent);
|
||||||
|
background: var(--accent);
|
||||||
|
color: var(--accent-text);
|
||||||
|
border-radius: var(--radius);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.neutral {
|
||||||
|
padding: 12px 14px;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
background: var(--surface-2);
|
||||||
|
color: var(--text);
|
||||||
|
border-radius: var(--radius);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.cta:disabled,
|
||||||
|
.neutral:disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
.attach {
|
||||||
|
font-size: 1.15rem;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
.hidden {
|
.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
Reference in New Issue
Block a user