mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-25 18:55:19 +02:00
Hide dark mode toggle behind feature flag
This commit is contained in:
parent
813da0ec81
commit
fa396aa0a4
2 changed files with 20 additions and 16 deletions
|
|
@ -16,3 +16,4 @@ export const USE_TRANSFER_CONTROL_OPTIONS = true;
|
||||||
export const USE_PRODUCT_TOUR = true;
|
export const USE_PRODUCT_TOUR = true;
|
||||||
export const SHOW_COPILOT_MARQUEE = false;
|
export const SHOW_COPILOT_MARQUEE = false;
|
||||||
export const SHOW_PROMPTS_SECTION = false;
|
export const SHOW_PROMPTS_SECTION = false;
|
||||||
|
export const SHOW_DARK_MODE_TOGGLE = false;
|
||||||
|
|
@ -23,6 +23,7 @@ import { getProjectConfig } from "@/app/actions/project_actions";
|
||||||
import { createProjectWithOptions } from "../../lib/project-creation-utils";
|
import { createProjectWithOptions } from "../../lib/project-creation-utils";
|
||||||
import { useTheme } from "@/app/providers/theme-provider";
|
import { useTheme } from "@/app/providers/theme-provider";
|
||||||
import { USE_PRODUCT_TOUR } from '@/app/lib/feature_flags';
|
import { USE_PRODUCT_TOUR } from '@/app/lib/feature_flags';
|
||||||
|
import { SHOW_DARK_MODE_TOGGLE } from '@/app/lib/feature_flags';
|
||||||
import { useHelpModal } from "@/app/providers/help-modal-provider";
|
import { useHelpModal } from "@/app/providers/help-modal-provider";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
|
|
@ -263,21 +264,23 @@ export default function Sidebar({ projectId, useAuth, collapsed = false, onToggl
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Tooltip content={collapsed ? "Appearance" : ""} showArrow placement="right">
|
{SHOW_DARK_MODE_TOGGLE && (
|
||||||
<button
|
<Tooltip content={collapsed ? "Appearance" : ""} showArrow placement="right">
|
||||||
onClick={toggleTheme}
|
<button
|
||||||
className={`
|
onClick={toggleTheme}
|
||||||
w-full rounded-md flex items-center
|
className={`
|
||||||
text-[15px] font-medium transition-all duration-200
|
w-full rounded-md flex items-center
|
||||||
${collapsed ? 'justify-center py-4' : 'px-4 py-4 gap-3'}
|
text-[15px] font-medium transition-all duration-200
|
||||||
hover:bg-zinc-100 dark:hover:bg-zinc-800/50
|
${collapsed ? 'justify-center py-4' : 'px-4 py-4 gap-3'}
|
||||||
text-zinc-600 dark:text-zinc-400
|
hover:bg-zinc-100 dark:hover:bg-zinc-800/50
|
||||||
`}
|
text-zinc-600 dark:text-zinc-400
|
||||||
>
|
`}
|
||||||
{ theme == "light" ? <Moon size={COLLAPSED_ICON_SIZE} /> : <Sun size={COLLAPSED_ICON_SIZE} /> }
|
>
|
||||||
{!collapsed && <span>Appearance</span>}
|
{ theme == "light" ? <Moon size={COLLAPSED_ICON_SIZE} /> : <Sun size={COLLAPSED_ICON_SIZE} /> }
|
||||||
</button>
|
{!collapsed && <span>Appearance</span>}
|
||||||
</Tooltip>
|
</button>
|
||||||
|
</Tooltip>
|
||||||
|
)}
|
||||||
|
|
||||||
{useAuth && (
|
{useAuth && (
|
||||||
<Tooltip content={collapsed ? "Account" : ""} showArrow placement="right">
|
<Tooltip content={collapsed ? "Account" : ""} showArrow placement="right">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue