mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 11:56:00 +00:00
highlight promo
This commit is contained in:
@@ -183,6 +183,7 @@ export const focusedConnectionOrDatabase = writable<{ conid: string; database?:
|
|||||||
export const focusedTreeDbKey = writable<{ key: string; root: string; type: string; text: string }>(null);
|
export const focusedTreeDbKey = writable<{ key: string; root: string; type: string; text: string }>(null);
|
||||||
|
|
||||||
export const cloudSigninTokenHolder = writableSettingsValue(null, 'cloudSigninTokenHolder');
|
export const cloudSigninTokenHolder = writableSettingsValue(null, 'cloudSigninTokenHolder');
|
||||||
|
export const seenPremiumPromoWidget = writableWithStorage(null, 'seenPremiumPromoWidget');
|
||||||
|
|
||||||
export const cloudConnectionsStore = writable({});
|
export const cloudConnectionsStore = writable({});
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
lockedDatabaseMode,
|
lockedDatabaseMode,
|
||||||
getCurrentConfig,
|
getCurrentConfig,
|
||||||
cloudSigninTokenHolder,
|
cloudSigninTokenHolder,
|
||||||
|
seenPremiumPromoWidget,
|
||||||
} from '../stores';
|
} from '../stores';
|
||||||
import mainMenuDefinition from '../../../../app/src/mainMenuDefinition';
|
import mainMenuDefinition from '../../../../app/src/mainMenuDefinition';
|
||||||
import hasPermission from '../utility/hasPermission';
|
import hasPermission from '../utility/hasPermission';
|
||||||
@@ -101,6 +102,10 @@
|
|||||||
} else {
|
} else {
|
||||||
$selectedWidget = name;
|
$selectedWidget = name;
|
||||||
$visibleWidgetSideBar = true;
|
$visibleWidgetSideBar = true;
|
||||||
|
|
||||||
|
if (name == 'premium') {
|
||||||
|
$seenPremiumPromoWidget = $promoWidget?.identifier || '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//const handleChangeWidget= e => (selectedWidget.set(item.name))
|
//const handleChangeWidget= e => (selectedWidget.set(item.name))
|
||||||
@@ -184,6 +189,9 @@
|
|||||||
<FontIcon icon={item.icon} title={item.title} />
|
<FontIcon icon={item.icon} title={item.title} />
|
||||||
{#if item.isPremiumPromo}
|
{#if item.isPremiumPromo}
|
||||||
<div class="premium-promo">Premium</div>
|
<div class="premium-promo">Premium</div>
|
||||||
|
{#if $promoWidget?.identifier != $seenPremiumPromoWidget}
|
||||||
|
<div class="premium-promo-not-seen">•</div>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
@@ -265,4 +273,12 @@
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.premium-promo-not-seen {
|
||||||
|
position: absolute;
|
||||||
|
font-size: 16pt;
|
||||||
|
color: var(--theme-icon-yellow);
|
||||||
|
top: -5px;
|
||||||
|
right: 5px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user