mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 20:46:01 +00:00
JSON UI
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
getCurrentConfig,
|
||||
cloudSigninTokenHolder,
|
||||
seenPremiumPromoWidget,
|
||||
promoWidgetPreview,
|
||||
} from '../stores';
|
||||
import mainMenuDefinition from '../../../../app/src/mainMenuDefinition';
|
||||
import hasPermission from '../utility/hasPermission';
|
||||
@@ -167,6 +168,8 @@
|
||||
openWebLink(url, true);
|
||||
}
|
||||
}
|
||||
|
||||
$: promoWidgetData = $promoWidgetPreview || $promoWidget;
|
||||
</script>
|
||||
|
||||
<div class="main">
|
||||
@@ -177,7 +180,7 @@
|
||||
{/if}
|
||||
{#each widgets
|
||||
.filter(x => x && hasPermission(`widgets/${x.name}`))
|
||||
.filter(x => !x.isPremiumPromo || (!isProApp() && $promoWidget?.state == 'data'))
|
||||
.filter(x => !x.isPremiumPromo || (!isProApp() && promoWidgetData?.state == 'data'))
|
||||
// .filter(x => !x.isPremiumOnly || isProApp())
|
||||
.filter(x => x.name != 'cloud-private' || $cloudSigninTokenHolder) as item}
|
||||
<div
|
||||
@@ -186,7 +189,7 @@
|
||||
data-testid={`WidgetIconPanel_${item.name}`}
|
||||
on:click={() => handleChangeWidget(item.name)}
|
||||
>
|
||||
{#if item.isPremiumPromo && $promoWidget?.isColoredIcon}
|
||||
{#if item.isPremiumPromo && promoWidgetData?.isColoredIcon}
|
||||
<FontIcon
|
||||
icon={item.icon}
|
||||
title={item.title}
|
||||
@@ -197,7 +200,7 @@
|
||||
{/if}
|
||||
{#if item.isPremiumPromo}
|
||||
<div class="premium-promo">Premium</div>
|
||||
{#if $promoWidget?.identifier != $seenPremiumPromoWidget}
|
||||
{#if promoWidgetData?.identifier != $seenPremiumPromoWidget}
|
||||
<div class="premium-promo-not-seen">•</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user