Standardise grid button suffixes
This commit is contained in:
parent
bd4a804a96
commit
5153b684fa
|
@ -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}
|
||||
|
|
|
@ -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}>
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue