diff --git a/src/renderer/src/pages/settings/aparence/components/theme-actions.tsx b/src/renderer/src/pages/settings/aparence/components/theme-actions.tsx index 8a3d3a6b..2ef1300c 100644 --- a/src/renderer/src/pages/settings/aparence/components/theme-actions.tsx +++ b/src/renderer/src/pages/settings/aparence/components/theme-actions.tsx @@ -7,9 +7,10 @@ import { useState } from "react"; interface ThemeActionsProps { onListUpdated: () => void; + themesCount: number; } -export const ThemeActions = ({ onListUpdated }: ThemeActionsProps) => { +export const ThemeActions = ({ onListUpdated, themesCount }: ThemeActionsProps) => { const { t } = useTranslation("settings"); const [addThemeModalVisible, setAddThemeModalVisible] = useState(false); @@ -41,6 +42,7 @@ export const ThemeActions = ({ onListUpdated }: ThemeActionsProps) => { theme="danger" className="settings-appearance__button" onClick={() => setDeleteAllThemesModalVisible(true)} + disabled={themesCount < 1} > {t("clear_themes")} diff --git a/src/renderer/src/pages/settings/aparence/settings-appearance.tsx b/src/renderer/src/pages/settings/aparence/settings-appearance.tsx index ef656a14..9b1d72d0 100644 --- a/src/renderer/src/pages/settings/aparence/settings-appearance.tsx +++ b/src/renderer/src/pages/settings/aparence/settings-appearance.tsx @@ -19,7 +19,7 @@ export const SettingsAppearance = () => {

Appearance

- +
{!themes.length ? (