-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: light dark mode for banners (#8343)
- Loading branch information
Showing
6 changed files
with
90 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 13 additions & 1 deletion
14
packages/renderer/src/lib/recommendation/ExtensionBanners.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
<script lang="ts"> | ||
import { onMount } from 'svelte'; | ||
import ExtensionBanner from '/@/lib/recommendation/ExtensionBanner.svelte'; | ||
import { extensionBannerInfos } from '/@/stores/extensionBanners'; | ||
import { AppearanceUtil } from '../appearance/appearance-util'; | ||
let isDark: boolean; | ||
onMount(async () => { | ||
// Retrieve the current theme appearance colour of PD for the banners we will be showing | ||
const appearanceUtil = new AppearanceUtil(); | ||
isDark = await appearanceUtil.isDarkMode(); | ||
}); | ||
</script> | ||
|
||
{#each $extensionBannerInfos as banner (banner.extensionId)} | ||
<ExtensionBanner banner={banner} /> | ||
<ExtensionBanner banner={banner} isDark={isDark} /> | ||
{/each} |
Oops, something went wrong.