Skip to content

Commit ad5c05a

Browse files
committed
feat: 그리드 css 선택 메뉴 조건부 설정
1 parent 95b73d6 commit ad5c05a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/renderer/hooks/Grid/useGridContextMenu.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import { usePluginMenuStore } from '@stores/plugin/usePluginMenuStore';
88
import { usePluginDisplayElementStore } from '@stores/plugin/usePluginDisplayElementStore';
9+
import { useSettingsStore } from '@stores/useSettingsStore';
910
import { translatePluginMessage } from '@utils/plugin/pluginI18n';
1011
import type { KeyPosition } from '@src/types/key/keys';
1112
import type {
@@ -66,6 +67,9 @@ export function useGridContextMenu({
6667
t,
6768
noteEffect,
6869
}: UseGridContextMenuParams): UseGridContextMenuReturn {
70+
// 전역 CSS 활성화 여부
71+
const useCustomCSS = useSettingsStore((state) => state.useCustomCSS);
72+
6973
// 플러그인 메뉴 아이템
7074
const pluginKeyMenuItems = usePluginMenuStore((state) => state.keyMenuItems);
7175
const pluginGridMenuItems = usePluginMenuStore(
@@ -177,7 +181,7 @@ export function useGridContextMenu({
177181
{ id: 'addGraph', label: t('contextMenu.addGraph') },
178182
];
179183
const bottomBaseItems: MenuItem[] = [
180-
{ id: 'tabCss', label: t('contextMenu.tabCssSetting') },
184+
{ id: 'tabCss', label: t('contextMenu.tabCssSetting'), disabled: !useCustomCSS },
181185
{
182186
id: 'tabNote',
183187
label: t('contextMenu.tabNoteSetting'),

0 commit comments

Comments
 (0)