fix: some new changes

This commit is contained in:
Ramesh Mane
2026-03-04 14:42:36 +00:00
parent 807e6ca0ce
commit b6f4e6da8d
9 changed files with 244 additions and 91 deletions

View File

@@ -25,32 +25,42 @@ const themeIcon = computed(
</script>
<template>
<NcTooltip v-if="isThemeEnabled" :placement="placement" :arrow="false">
<template #title>
<div class="capitalize">Appearance (beta): {{ selectedTheme }}</div>
</template>
<div
v-e="['c:nocodb:theme']"
class="nc-mini-sidebar-btn-full-width"
:class="[
buttonClass,
{
'nc-render-as-btn': renderAsBtn,
},
]"
data-testid="nc-sidebar-theme"
>
<div class="nc-mini-sidebar-btn relative" @click="toggleTheme">
<GeneralIcon
:icon="themeIcon"
:class="{
'h-5 w-5': themeIcon === 'ncSunMoon',
'h-4 w-4': themeIcon !== 'ncSunMoon',
}"
/>
<template v-if="isThemeEnabled">
<!-- Standalone mode (renderAsBtn) has its own tooltip -->
<NcTooltip v-if="renderAsBtn" :placement="placement" :arrow="false">
<template #title>
<div class="capitalize">Appearance (beta): {{ selectedTheme }}</div>
</template>
<div
v-e="['c:nocodb:theme']"
class="nc-mini-sidebar-btn-full-width nc-render-as-btn"
:class="[buttonClass]"
data-testid="nc-sidebar-theme"
@click="toggleTheme"
>
<div class="nc-mini-sidebar-btn">
<GeneralIcon
:icon="themeIcon"
:class="{
'h-5 w-5': themeIcon === 'ncSunMoon',
'h-4 w-4': themeIcon !== 'ncSunMoon',
}"
/>
</div>
</div>
</NcTooltip>
<!-- Mini sidebar mode parent DashboardMiniSidebarItem handles tooltip -->
<div v-else v-e="['c:nocodb:theme']" class="h-4.5 flex items-center justify-center" data-testid="nc-sidebar-theme" @click="toggleTheme">
<GeneralIcon
:icon="themeIcon"
:class="{
'h-5 w-5': themeIcon === 'ncSunMoon',
'h-4 w-4': themeIcon !== 'ncSunMoon',
}"
/>
</div>
</NcTooltip>
</template>
</template>
<style lang="scss" scoped>