Standardise grid button suffixes
This commit is contained in:
parent
bd4a804a96
commit
5153b684fa
|
@ -21,6 +21,7 @@
|
||||||
$automationStore.automations,
|
$automationStore.automations,
|
||||||
resourceId
|
resourceId
|
||||||
)
|
)
|
||||||
|
$: automationCount = connectedAutomations.length
|
||||||
|
|
||||||
const findConnectedAutomations = (automations, resourceId) => {
|
const findConnectedAutomations = (automations, resourceId) => {
|
||||||
return automations.filter(automation => {
|
return automations.filter(automation => {
|
||||||
|
@ -41,11 +42,11 @@
|
||||||
<svelte:fragment slot="anchor" let:open>
|
<svelte:fragment slot="anchor" let:open>
|
||||||
<ActionButton
|
<ActionButton
|
||||||
icon="JourneyVoyager"
|
icon="JourneyVoyager"
|
||||||
selected={open || connectedAutomations.length}
|
selected={open || automationCount}
|
||||||
quiet
|
quiet
|
||||||
accentColor="#5610AD"
|
accentColor="#5610AD"
|
||||||
>
|
>
|
||||||
Automations
|
Automations{automationCount ? `: ${automationCount}` : ""}
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
{#if !connectedAutomations.length}
|
{#if !connectedAutomations.length}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
let anchor
|
let anchor
|
||||||
|
|
||||||
$: anyRestricted = $columns.filter(col => !col.visible || col.readonly).length
|
$: anyRestricted = $columns.filter(col => !col.visible || col.readonly).length
|
||||||
$: text = anyRestricted ? `Columns (${anyRestricted} restricted)` : "Columns"
|
$: text = anyRestricted ? `Columns: ${anyRestricted} restricted` : "Columns"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div bind:this={anchor}>
|
<div bind:this={anchor}>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
$: isView = ds?.type === "viewV2"
|
$: isView = ds?.type === "viewV2"
|
||||||
$: fetchRowActions(tableId)
|
$: fetchRowActions(tableId)
|
||||||
$: viewActiveCount = 0
|
$: viewActiveCount = 0
|
||||||
$: activeCount = isView ? viewActiveCount : rowActions.length
|
$: actionCount = isView ? viewActiveCount : rowActions.length
|
||||||
|
|
||||||
const rowActionUrl = derived([url, appStore], ([$url, $appStore]) => {
|
const rowActionUrl = derived([url, appStore], ([$url, $appStore]) => {
|
||||||
return ({ automationId }) => {
|
return ({ automationId }) => {
|
||||||
|
@ -64,11 +64,11 @@
|
||||||
<svelte:fragment slot="anchor" let:open>
|
<svelte:fragment slot="anchor" let:open>
|
||||||
<ActionButton
|
<ActionButton
|
||||||
icon="Engagement"
|
icon="Engagement"
|
||||||
selected={open || activeCount}
|
selected={open || actionCount}
|
||||||
quiet
|
quiet
|
||||||
accentColor="#A24400"
|
accentColor="#A24400"
|
||||||
>
|
>
|
||||||
Row actions ({activeCount})
|
Row actions{actionCount ? `: ${actionCount}` : ""}
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
A row action is a user-triggered automation for a chosen row.
|
A row action is a user-triggered automation for a chosen row.
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
$: ds = $datasource
|
$: ds = $datasource
|
||||||
$: resourceId = ds?.type === "table" ? ds.tableId : ds?.id
|
$: resourceId = ds?.type === "table" ? ds.tableId : ds?.id
|
||||||
$: connectedScreens = findConnectedScreens($screenStore.screens, resourceId)
|
$: connectedScreens = findConnectedScreens($screenStore.screens, resourceId)
|
||||||
|
$: screenCount = connectedScreens.length
|
||||||
|
|
||||||
const findConnectedScreens = (screens, resourceId) => {
|
const findConnectedScreens = (screens, resourceId) => {
|
||||||
return screens.filter(screen => {
|
return screens.filter(screen => {
|
||||||
|
@ -21,11 +22,11 @@
|
||||||
<svelte:fragment slot="anchor" let:open>
|
<svelte:fragment slot="anchor" let:open>
|
||||||
<ActionButton
|
<ActionButton
|
||||||
icon="WebPage"
|
icon="WebPage"
|
||||||
selected={open || connectedScreens.length}
|
selected={open || screenCount}
|
||||||
quiet
|
quiet
|
||||||
accentColor="#364800"
|
accentColor="#364800"
|
||||||
>
|
>
|
||||||
Screens
|
Screens{screenCount ? `: ${screenCount}` : ""}
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
{#if !connectedScreens.length}
|
{#if !connectedScreens.length}
|
||||||
|
|
Loading…
Reference in New Issue