mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-23 16:00:38 +00:00
fix: app button tooltip also when disabled + audit log filters (#6751)
* also show tooltip on disabled button * fix: audit log filters
This commit is contained in:
@@ -267,60 +267,64 @@
|
||||
<div class="text-red-500 text-xs">{errorsMessage}</div>
|
||||
{/if}
|
||||
{#key css}
|
||||
<Button
|
||||
on:pointerdown={(e) => e.stopPropagation()}
|
||||
btnClasses={twMerge(
|
||||
css?.button?.class ?? '',
|
||||
isMenuItem ? 'flex items-center justify-start' : '',
|
||||
isMenuItem ? '!border-0' : '',
|
||||
'wm-button',
|
||||
`wm-button-${resolvedConfig.color}`
|
||||
)}
|
||||
variant={isMenuItem ? 'border' : 'contained'}
|
||||
style={css?.button?.style}
|
||||
wrapperClasses={twMerge(
|
||||
css?.container?.class ?? '',
|
||||
resolvedConfig.fillContainer ? 'w-full h-full' : '',
|
||||
isMenuItem ? 'w-full' : '',
|
||||
'wm-button-container',
|
||||
`wm-button-container-${resolvedConfig.color}`
|
||||
)}
|
||||
wrapperStyle={css?.container?.style}
|
||||
disabled={resolvedConfig.disabled}
|
||||
on:click={handleClick}
|
||||
size={resolvedConfig.size}
|
||||
color={resolvedConfig.color}
|
||||
<div
|
||||
class="inline-flex"
|
||||
title={resolvedConfig.tooltip && String(resolvedConfig.tooltip).length > 0
|
||||
? String(resolvedConfig.tooltip)
|
||||
: undefined}
|
||||
loading={resolvedConfig.runInBackground ? backgroundClickFeedback : loading}
|
||||
>
|
||||
{#if resolvedConfig.beforeIcon}
|
||||
{#key resolvedConfig.beforeIcon}
|
||||
<div
|
||||
class={resolvedConfig.label?.toString() &&
|
||||
resolvedConfig.label?.toString()?.length > 0
|
||||
? 'min-w-4'
|
||||
: ''}
|
||||
bind:this={beforeIconComponent}
|
||||
></div>
|
||||
{/key}
|
||||
{/if}
|
||||
{#if resolvedConfig.label?.toString() && resolvedConfig.label?.toString()?.length > 0}
|
||||
<div>{resolvedConfig.label.toString()}</div>
|
||||
{/if}
|
||||
{#if resolvedConfig.afterIcon}
|
||||
{#key resolvedConfig.afterIcon}
|
||||
<div
|
||||
class={resolvedConfig.label?.toString() &&
|
||||
resolvedConfig.label?.toString()?.length > 0
|
||||
? 'min-w-4'
|
||||
: ''}
|
||||
bind:this={afterIconComponent}
|
||||
></div>
|
||||
{/key}
|
||||
{/if}
|
||||
</Button>
|
||||
<Button
|
||||
on:pointerdown={(e) => e.stopPropagation()}
|
||||
btnClasses={twMerge(
|
||||
css?.button?.class ?? '',
|
||||
isMenuItem ? 'flex items-center justify-start' : '',
|
||||
isMenuItem ? '!border-0' : '',
|
||||
'wm-button',
|
||||
`wm-button-${resolvedConfig.color}`
|
||||
)}
|
||||
variant={isMenuItem ? 'border' : 'contained'}
|
||||
style={css?.button?.style}
|
||||
wrapperClasses={twMerge(
|
||||
css?.container?.class ?? '',
|
||||
resolvedConfig.fillContainer ? 'w-full h-full' : '',
|
||||
isMenuItem ? 'w-full' : '',
|
||||
'wm-button-container',
|
||||
`wm-button-container-${resolvedConfig.color}`
|
||||
)}
|
||||
wrapperStyle={css?.container?.style}
|
||||
disabled={resolvedConfig.disabled}
|
||||
on:click={handleClick}
|
||||
size={resolvedConfig.size}
|
||||
color={resolvedConfig.color}
|
||||
loading={resolvedConfig.runInBackground ? backgroundClickFeedback : loading}
|
||||
>
|
||||
{#if resolvedConfig.beforeIcon}
|
||||
{#key resolvedConfig.beforeIcon}
|
||||
<div
|
||||
class={resolvedConfig.label?.toString() &&
|
||||
resolvedConfig.label?.toString()?.length > 0
|
||||
? 'min-w-4'
|
||||
: ''}
|
||||
bind:this={beforeIconComponent}
|
||||
></div>
|
||||
{/key}
|
||||
{/if}
|
||||
{#if resolvedConfig.label?.toString() && resolvedConfig.label?.toString()?.length > 0}
|
||||
<div>{resolvedConfig.label.toString()}</div>
|
||||
{/if}
|
||||
{#if resolvedConfig.afterIcon}
|
||||
{#key resolvedConfig.afterIcon}
|
||||
<div
|
||||
class={resolvedConfig.label?.toString() &&
|
||||
resolvedConfig.label?.toString()?.length > 0
|
||||
? 'min-w-4'
|
||||
: ''}
|
||||
bind:this={afterIconComponent}
|
||||
></div>
|
||||
{/key}
|
||||
{/if}
|
||||
</Button>
|
||||
</div>
|
||||
{/key}
|
||||
</AlignWrapper>
|
||||
</RunnableWrapper>
|
||||
|
||||
@@ -423,7 +423,7 @@
|
||||
|
||||
<Select
|
||||
bind:value={operation}
|
||||
items={['all', ...Object.keys(operations)].map((r) => ({ value: r, label: r }))}
|
||||
items={['all', ...Object.values(operations)].map((r) => ({ value: r, label: r }))}
|
||||
inputClass="dark:!bg-gray-700"
|
||||
RightIcon={ChevronDown}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user