mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 10:46:00 +00:00
SYNC: disabled messages in new object modal
This commit is contained in:
committed by
Diflow
parent
d19851fc0c
commit
dcba319071
@@ -1,16 +1,30 @@
|
||||
<script lang="ts">
|
||||
import FontIcon from '../icons/FontIcon.svelte';
|
||||
import { isProApp } from '../utility/proTools';
|
||||
|
||||
export let icon;
|
||||
export let title;
|
||||
export let description;
|
||||
export let enabled;
|
||||
export let colorClass;
|
||||
export let disabledMessage = undefined;
|
||||
export let isProFeature;
|
||||
|
||||
$: disabled = !enabled;
|
||||
</script>
|
||||
|
||||
<div class="new-object-button" on:click class:enabled class:disabled data-testid={$$props['data-testid']}>
|
||||
<div
|
||||
class="new-object-button"
|
||||
on:click
|
||||
class:enabled
|
||||
class:disabled
|
||||
data-testid={$$props['data-testid']}
|
||||
title={disabled
|
||||
? isProFeature && !isProApp()
|
||||
? 'This feature is available only in DbGate Premium'
|
||||
: disabledMessage
|
||||
: undefined}
|
||||
>
|
||||
<div class="icon">
|
||||
<FontIcon {icon} colorClass={enabled ? colorClass : null} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user