1
0
Fork 0
mirror of synced 2024-09-21 03:43:21 +12:00

Standardise grid button suffixes

This commit is contained in:
Andrew Kingston 2024-08-22 12:10:47 +01:00
parent bd4a804a96
commit 5153b684fa
No known key found for this signature in database
4 changed files with 10 additions and 8 deletions

View file

@ -21,6 +21,7 @@
$automationStore.automations,
resourceId
)
$: automationCount = connectedAutomations.length
const findConnectedAutomations = (automations, resourceId) => {
return automations.filter(automation => {
@ -41,11 +42,11 @@
<svelte:fragment slot="anchor" let:open>
<ActionButton
icon="JourneyVoyager"
selected={open || connectedAutomations.length}
selected={open || automationCount}
quiet
accentColor="#5610AD"
>
Automations
Automations{automationCount ? `: ${automationCount}` : ""}
</ActionButton>
</svelte:fragment>
{#if !connectedAutomations.length}

View file

@ -11,7 +11,7 @@
let anchor
$: anyRestricted = $columns.filter(col => !col.visible || col.readonly).length
$: text = anyRestricted ? `Columns (${anyRestricted} restricted)` : "Columns"
$: text = anyRestricted ? `Columns: ${anyRestricted} restricted` : "Columns"
</script>
<div bind:this={anchor}>

View file

@ -24,7 +24,7 @@
$: isView = ds?.type === "viewV2"
$: fetchRowActions(tableId)
$: viewActiveCount = 0
$: activeCount = isView ? viewActiveCount : rowActions.length
$: actionCount = isView ? viewActiveCount : rowActions.length
const rowActionUrl = derived([url, appStore], ([$url, $appStore]) => {
return ({ automationId }) => {
@ -64,11 +64,11 @@
<svelte:fragment slot="anchor" let:open>
<ActionButton
icon="Engagement"
selected={open || activeCount}
selected={open || actionCount}
quiet
accentColor="#A24400"
>
Row actions ({activeCount})
Row actions{actionCount ? `: ${actionCount}` : ""}
</ActionButton>
</svelte:fragment>
A row action is a user-triggered automation for a chosen row.

View file

@ -9,6 +9,7 @@
$: ds = $datasource
$: resourceId = ds?.type === "table" ? ds.tableId : ds?.id
$: connectedScreens = findConnectedScreens($screenStore.screens, resourceId)
$: screenCount = connectedScreens.length
const findConnectedScreens = (screens, resourceId) => {
return screens.filter(screen => {
@ -21,11 +22,11 @@
<svelte:fragment slot="anchor" let:open>
<ActionButton
icon="WebPage"
selected={open || connectedScreens.length}
selected={open || screenCount}
quiet
accentColor="#364800"
>
Screens
Screens{screenCount ? `: ${screenCount}` : ""}
</ActionButton>
</svelte:fragment>
{#if !connectedScreens.length}