1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-05 00:19:59 +00:00

fix: use reactive feature flags

resolves https://github.com/elk-zone/elk/issues/498
This commit is contained in:
Daniel Roe 2022-12-22 02:32:08 +00:00
parent f1b0befd80
commit a2da1b2ee1
No known key found for this signature in database
GPG key ID: 22D5008E4F5D9B55

View file

@ -1,31 +1,27 @@
<script setup lang="ts">
const featureFlags = useFeatureFlags()
</script>
<template>
<CommonDropdown placement="top">
<slot />
<template #popper>
<CommonDropdownItem
:checked="featureFlags.experimentalVirtualScroll"
:checked="currentUserFeatureFlags.experimentalVirtualScroll"
@click="toggleFeatureFlag('experimentalVirtualScroll')"
>
{{ $t('feature_flag.virtual_scroll') }}
</CommonDropdownItem>
<CommonDropdownItem
:checked="featureFlags.experimentalAvatarOnAvatar"
:checked="currentUserFeatureFlags.experimentalAvatarOnAvatar"
@click="toggleFeatureFlag('experimentalAvatarOnAvatar')"
>
{{ $t('feature_flag.avatar_on_avatar') }}
</CommonDropdownItem>
<CommonDropdownItem
:checked="featureFlags.experimentalGitHubCards"
:checked="currentUserFeatureFlags.experimentalGitHubCards"
@click="toggleFeatureFlag('experimentalGitHubCards')"
>
{{ $t('feature_flag.github_cards') }}
</CommonDropdownItem>
<CommonDropdownItem
:checked="featureFlags.experimentalUserSwitcherSidebar"
:checked="currentUserFeatureFlags.experimentalUserSwitcherSidebar"
@click="toggleFeatureFlag('experimentalUserSwitcherSidebar')"
>
{{ $t('feature_flag.user_switcher_sidebar') }}