diff --git a/src/components/context-menus/LibraryMenu.tsx b/src/components/context-menus/LibraryMenu.tsx index aa32e3f..d7c9280 100644 --- a/src/components/context-menus/LibraryMenu.tsx +++ b/src/components/context-menus/LibraryMenu.tsx @@ -1,11 +1,10 @@ -import { Menu, MenuItem, showModal, Focusable, MenuGroup, ReorderableEntry, ReorderableList, MenuItemProps } from 'decky-frontend-lib'; +import { Menu, MenuItem, showModal, Focusable, MenuGroup, ReorderableEntry, ReorderableList, MenuItemProps, gamepadContextMenuClasses } from 'decky-frontend-lib'; import { FC, Fragment, VFC, useState } from 'react'; import { TabMasterManager } from '../../state/TabMasterManager'; import { TabMasterContextProvider, useTabMasterContext } from '../../state/TabMasterContext'; import { showModalEditTab, showModalNewTab } from '../modals/EditTabModal'; import { LibraryMenuStyles } from '../styles/LibraryMenuStyles'; import { DestructiveModal } from '../generic/DestructiveModal'; -import { gamepadContextMenuClasses } from '../../lib/GamepadContextMenuClasses'; import { PresetMenuItems } from './PresetMenu'; import { CustomTabContainer } from '../CustomTabContainer'; import { TabListLabel } from '../TabListLabel'; diff --git a/src/components/context-menus/TabProfileMenu.tsx b/src/components/context-menus/TabProfileMenu.tsx index dcc1ccd..911f7e4 100644 --- a/src/components/context-menus/TabProfileMenu.tsx +++ b/src/components/context-menus/TabProfileMenu.tsx @@ -1,8 +1,7 @@ -import { Menu, MenuGroup, MenuItem, showModal, GamepadButton } from 'decky-frontend-lib'; +import { Menu, MenuGroup, MenuItem, showModal, GamepadButton, gamepadContextMenuClasses } from 'decky-frontend-lib'; import { VFC, Fragment, useState } from 'react'; import { TabMasterManager } from '../../state/TabMasterManager'; import { CreateTabProfileModal, OverwriteTabProfileModal } from '../modals/TabProfileModals'; -import { gamepadContextMenuClasses } from '../../lib/GamepadContextMenuClasses'; import { DestructiveModal } from '../generic/DestructiveModal'; diff --git a/src/components/styles/LibraryMenuStyles.tsx b/src/components/styles/LibraryMenuStyles.tsx index b8a0def..a5cb5cb 100644 --- a/src/components/styles/LibraryMenuStyles.tsx +++ b/src/components/styles/LibraryMenuStyles.tsx @@ -1,5 +1,5 @@ +import { gamepadContextMenuClasses } from "decky-frontend-lib"; import { VFC } from 'react'; -import { gamepadContextMenuClasses } from '../../lib/GamepadContextMenuClasses'; /** * CSS styling for the Library Context Menu part of TabMaster. diff --git a/src/lib/GamepadContextMenuClasses.ts b/src/lib/GamepadContextMenuClasses.ts deleted file mode 100644 index 7b69b22..0000000 --- a/src/lib/GamepadContextMenuClasses.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { findModule } from 'decky-frontend-lib'; - -type GamepadContextMenuClasses = Record< - "duration-app-launch" | - "BasicContextMenuModal" | - "BasicContextMenuHeader" | - "BasicContextMenuHeaderShrinkableSpacing" | - "BasicContextMenuContainer" | - "slideInAnimation" | - "contextMenu" | - "contextMenuContents" | - "hasSubMenu" | - "contextMenuFade" | - "contextMenuItem" | - "active" | - "Selected" | - "Focused" | - "Positive" | - "Emphasis" | - "Destructive" | - "Capitalized" | - "MenuSectionHeader" | - "UpperCase" | - "SubMenu" | - "ContextMenuSeparator" | - "Label" | - "Arrow" | - "ItemFocusAnim-darkerGrey-nocolor" | - "ItemFocusAnim-darkerGrey" | - "ItemFocusAnim-darkGrey" | - "ItemFocusAnim-grey" | - "ItemFocusAnimBorder-darkGrey" | - "ItemFocusAnim-green" | - "focusAnimation" | - "hoverAnimation", - string>; - -export const gamepadContextMenuClasses: GamepadContextMenuClasses = findModule( - (mod) => typeof mod === 'object' && mod?.BasicContextMenuModal?.includes('gamepadcontextmenu') -);