Fix count and status wording (Refs #121)
This commit is contained in:
@@ -137,7 +137,7 @@ function readOperations(now: number, server?: string): FleetOperation[] {
|
||||
? 'Completed with warnings'
|
||||
: 'Complete'
|
||||
: state === 'attention'
|
||||
? `${actionLabels[row.action as ProvisioningAction]} needs attention`
|
||||
? `${actionLabels[row.action as ProvisioningAction]} operation needs attention`
|
||||
: row.stage,
|
||||
detail: row.error ?? row.stage,
|
||||
href: `/provisioning/${encodeURIComponent(row.id)}`
|
||||
|
||||
@@ -73,7 +73,7 @@ function healthEvidence(
|
||||
if (hostOffline)
|
||||
return {
|
||||
state: 'host-offline',
|
||||
reason: `${host.name ? `${host.name}'s host agent` : 'The host agent'} is unavailable. The game may still be running.`,
|
||||
reason: `The host agent${host.name ? ` on ${host.name}` : ''} is unavailable. The game may still be running.`,
|
||||
actionLabel: hostId ? 'Check host' : 'Open diagnostics',
|
||||
actionHref: hostId ? `/hosts/${encodeURIComponent(hostId)}` : diagnostics,
|
||||
since: observedAt(host.lastHeartbeat, now)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
import { page } from '$app/stores';
|
||||
import { goto } from '$app/navigation';
|
||||
import { pollVisible } from '$ui/poll.js';
|
||||
import { plural } from '$ui/plural.js';
|
||||
import {
|
||||
campaignOutcome,
|
||||
campaignTitle,
|
||||
@@ -221,7 +222,7 @@
|
||||
{#if showProgress}<progress
|
||||
max={campaign.servers.length || 1}
|
||||
value={outcome.completed}
|
||||
aria-label={`${outcome.completed} of ${campaign.servers.length} servers complete`}
|
||||
aria-label={`${outcome.completed} of ${campaign.servers.length} ${plural(campaign.servers.length, 'server')} complete`}
|
||||
></progress>{/if}
|
||||
</div></td
|
||||
>
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
import Input from '$ui/components/primitives/Input.svelte';
|
||||
import Select from '$ui/components/primitives/Select.svelte';
|
||||
import { libraryLimit, saveLibraryContext } from '$ui/library-context.js';
|
||||
import { plural } from '$ui/plural.js';
|
||||
const editable = $derived(canOperate($page.data?.user?.role));
|
||||
|
||||
type ArtifactKind = 'script' | 'config' | 'plugin' | 'baseline';
|
||||
@@ -353,7 +354,7 @@
|
||||
</details>{/if}
|
||||
<section class="section">
|
||||
<div class="list-heading">
|
||||
<span>{visible.length} of {plugins.length} plugins</span
|
||||
<span>{visible.length} of {plugins.length} {plural(plugins.length, 'plugin')}</span
|
||||
>{#if visible.length && (search || game || status)}<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
} from '$lib/script-library.js';
|
||||
import { zombieMaps } from '$lib/map-aliases.js';
|
||||
import { libraryLimit, saveLibraryContext } from '$ui/library-context.js';
|
||||
import { plural } from '$ui/plural.js';
|
||||
const editable = $derived(canOperate($page.data?.user?.role));
|
||||
|
||||
let limit = $state(25);
|
||||
@@ -257,7 +258,7 @@
|
||||
>
|
||||
</div>
|
||||
<div class="list-heading">
|
||||
<span>{visible.length} of {scripts.length} scripts</span>
|
||||
<span>{visible.length} of {scripts.length} {plural(scripts.length, 'script')}</span>
|
||||
{#if failedCount && status !== 'failed'}<button
|
||||
class="text-button"
|
||||
onclick={() => {
|
||||
|
||||
Reference in New Issue
Block a user