mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
cleanup: Minor theme related cleanup
This commit is contained in:
parent
fb015332f2
commit
295444c730
@ -14,7 +14,6 @@ const IAIMantineMultiSelect = (props: IAIMultiSelectProps) => {
|
|||||||
base50,
|
base50,
|
||||||
base100,
|
base100,
|
||||||
base200,
|
base200,
|
||||||
base250,
|
|
||||||
base300,
|
base300,
|
||||||
base400,
|
base400,
|
||||||
base500,
|
base500,
|
||||||
@ -27,7 +26,6 @@ const IAIMantineMultiSelect = (props: IAIMultiSelectProps) => {
|
|||||||
accent400,
|
accent400,
|
||||||
accent500,
|
accent500,
|
||||||
accent600,
|
accent600,
|
||||||
accent700,
|
|
||||||
} = useChakraThemeTokens();
|
} = useChakraThemeTokens();
|
||||||
const [boxShadow] = useToken('shadows', ['dark-lg']);
|
const [boxShadow] = useToken('shadows', ['dark-lg']);
|
||||||
const { colorMode } = useColorMode();
|
const { colorMode } = useColorMode();
|
||||||
|
@ -32,7 +32,6 @@ const IAIMantineSelect = (props: IAISelectProps) => {
|
|||||||
accent400,
|
accent400,
|
||||||
accent500,
|
accent500,
|
||||||
accent600,
|
accent600,
|
||||||
accent700,
|
|
||||||
} = useChakraThemeTokens();
|
} = useChakraThemeTokens();
|
||||||
|
|
||||||
const { colorMode } = useColorMode();
|
const { colorMode } = useColorMode();
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
// Grid drawing adapted from https://longviewcoder.com/2021/12/08/konva-a-better-grid/
|
// Grid drawing adapted from https://longviewcoder.com/2021/12/08/konva-a-better-grid/
|
||||||
|
|
||||||
import { useColorMode, useColorModeValue, useToken } from '@chakra-ui/react';
|
import { useColorMode, useToken } from '@chakra-ui/react';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { RootState } from 'app/store/store';
|
|
||||||
import { useAppSelector } from 'app/store/storeHooks';
|
import { useAppSelector } from 'app/store/storeHooks';
|
||||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||||
import { isEqual, range } from 'lodash-es';
|
import { isEqual, range } from 'lodash-es';
|
||||||
@ -24,9 +23,6 @@ const selector = createSelector(
|
|||||||
);
|
);
|
||||||
|
|
||||||
const IAICanvasGrid = () => {
|
const IAICanvasGrid = () => {
|
||||||
const currentTheme = useAppSelector(
|
|
||||||
(state: RootState) => state.ui.currentTheme
|
|
||||||
);
|
|
||||||
const { stageScale, stageCoordinates, stageDimensions } =
|
const { stageScale, stageCoordinates, stageDimensions } =
|
||||||
useAppSelector(selector);
|
useAppSelector(selector);
|
||||||
const { colorMode } = useColorMode();
|
const { colorMode } = useColorMode();
|
||||||
@ -112,7 +108,6 @@ const IAICanvasGrid = () => {
|
|||||||
stageScale,
|
stageScale,
|
||||||
stageCoordinates,
|
stageCoordinates,
|
||||||
stageDimensions,
|
stageDimensions,
|
||||||
currentTheme,
|
|
||||||
unscale,
|
unscale,
|
||||||
colorMode,
|
colorMode,
|
||||||
darkGridLineColor,
|
darkGridLineColor,
|
||||||
|
@ -1,35 +1,32 @@
|
|||||||
|
import {
|
||||||
|
ButtonGroup,
|
||||||
|
ButtonProps,
|
||||||
|
ButtonSpinner,
|
||||||
|
Menu,
|
||||||
|
MenuButton,
|
||||||
|
MenuItemOption,
|
||||||
|
MenuList,
|
||||||
|
MenuOptionGroup,
|
||||||
|
} from '@chakra-ui/react';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||||
import IAIIconButton, {
|
import IAIIconButton from 'common/components/IAIIconButton';
|
||||||
IAIIconButtonProps,
|
|
||||||
} from 'common/components/IAIIconButton';
|
|
||||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||||
import {
|
import {
|
||||||
|
CancelStrategy,
|
||||||
SystemState,
|
SystemState,
|
||||||
cancelScheduled,
|
cancelScheduled,
|
||||||
cancelTypeChanged,
|
cancelTypeChanged,
|
||||||
CancelStrategy,
|
|
||||||
} from 'features/system/store/systemSlice';
|
} from 'features/system/store/systemSlice';
|
||||||
import { isEqual } from 'lodash-es';
|
import { isEqual } from 'lodash-es';
|
||||||
import { useCallback, memo, useMemo } from 'react';
|
import { memo, useCallback, useMemo } from 'react';
|
||||||
import {
|
|
||||||
ButtonSpinner,
|
|
||||||
ButtonGroup,
|
|
||||||
Menu,
|
|
||||||
MenuButton,
|
|
||||||
MenuList,
|
|
||||||
MenuOptionGroup,
|
|
||||||
MenuItemOption,
|
|
||||||
ButtonGroupProps,
|
|
||||||
ButtonProps,
|
|
||||||
} from '@chakra-ui/react';
|
|
||||||
|
|
||||||
import { useHotkeys } from 'react-hotkeys-hook';
|
import { useHotkeys } from 'react-hotkeys-hook';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { MdCancel, MdCancelScheduleSend } from 'react-icons/md';
|
import { MdCancel, MdCancelScheduleSend } from 'react-icons/md';
|
||||||
|
|
||||||
import { sessionCanceled } from 'services/api/thunks/session';
|
|
||||||
import { ChevronDownIcon } from '@chakra-ui/icons';
|
import { ChevronDownIcon } from '@chakra-ui/icons';
|
||||||
|
import { sessionCanceled } from 'services/api/thunks/session';
|
||||||
|
|
||||||
const cancelButtonSelector = createSelector(
|
const cancelButtonSelector = createSelector(
|
||||||
systemSelector,
|
systemSelector,
|
||||||
@ -141,7 +138,6 @@ const CancelButton = (
|
|||||||
<MenuButton
|
<MenuButton
|
||||||
as={IAIIconButton}
|
as={IAIIconButton}
|
||||||
tooltip={t('parameters.cancel.setType')}
|
tooltip={t('parameters.cancel.setType')}
|
||||||
tooltipPlacement="top"
|
|
||||||
aria-label={t('parameters.cancel.setType')}
|
aria-label={t('parameters.cancel.setType')}
|
||||||
icon={<ChevronDownIcon w="1em" h="1em" />}
|
icon={<ChevronDownIcon w="1em" h="1em" />}
|
||||||
paddingX={0}
|
paddingX={0}
|
||||||
|
@ -9,7 +9,6 @@ import {
|
|||||||
ModalHeader,
|
ModalHeader,
|
||||||
ModalOverlay,
|
ModalOverlay,
|
||||||
Text,
|
Text,
|
||||||
useColorMode,
|
|
||||||
useDisclosure,
|
useDisclosure,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
@ -48,7 +47,6 @@ import {
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { LogLevelName } from 'roarr';
|
import { LogLevelName } from 'roarr';
|
||||||
import SettingsSchedulers from './SettingsSchedulers';
|
import SettingsSchedulers from './SettingsSchedulers';
|
||||||
import { mode } from 'theme/util/mode';
|
|
||||||
|
|
||||||
const selector = createSelector(
|
const selector = createSelector(
|
||||||
[systemSelector, uiSelector],
|
[systemSelector, uiSelector],
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { Flex, Link } from '@chakra-ui/react';
|
import { Flex, Link } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { FaCube, FaKeyboard, FaBug, FaGithub, FaDiscord } from 'react-icons/fa';
|
import { FaBug, FaCube, FaDiscord, FaGithub, FaKeyboard } from 'react-icons/fa';
|
||||||
import { MdSettings } from 'react-icons/md';
|
import { MdSettings } from 'react-icons/md';
|
||||||
import HotkeysModal from './HotkeysModal/HotkeysModal';
|
import HotkeysModal from './HotkeysModal/HotkeysModal';
|
||||||
import LanguagePicker from './LanguagePicker';
|
import LanguagePicker from './LanguagePicker';
|
||||||
import ModelManagerModal from './ModelManager/ModelManagerModal';
|
import ModelManagerModal from './ModelManager/ModelManagerModal';
|
||||||
import SettingsModal from './SettingsModal/SettingsModal';
|
import SettingsModal from './SettingsModal/SettingsModal';
|
||||||
import ThemeChanger from './ThemeChanger';
|
|
||||||
import IAIIconButton from 'common/components/IAIIconButton';
|
import IAIIconButton from 'common/components/IAIIconButton';
|
||||||
import { useFeatureStatus } from '../hooks/useFeatureStatus';
|
import { useFeatureStatus } from '../hooks/useFeatureStatus';
|
||||||
|
|
||||||
@ -53,8 +53,6 @@ const SiteHeaderMenu = () => {
|
|||||||
/>
|
/>
|
||||||
</HotkeysModal>
|
</HotkeysModal>
|
||||||
|
|
||||||
<ThemeChanger />
|
|
||||||
|
|
||||||
{isLocalizationEnabled && <LanguagePicker />}
|
{isLocalizationEnabled && <LanguagePicker />}
|
||||||
|
|
||||||
{isBugLinkEnabled && (
|
{isBugLinkEnabled && (
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
export { default as InvokeAiLogoComponent } from './features/system/components/InvokeAILogoComponent';
|
|
||||||
export { default as ThemeChanger } from './features/system/components/ThemeChanger';
|
|
||||||
export { default as IAIPopover } from './common/components/IAIPopover';
|
|
||||||
export { default as IAIIconButton } from './common/components/IAIIconButton';
|
|
||||||
export { default as SettingsModal } from './features/system/components/SettingsModal/SettingsModal';
|
|
||||||
export { default as StatusIndicator } from './features/system/components/StatusIndicator';
|
|
||||||
export { default as ModelSelect } from './features/system/components/ModelSelect';
|
|
||||||
export { default as InvokeAIUI } from './app/components/InvokeAIUI';
|
export { default as InvokeAIUI } from './app/components/InvokeAIUI';
|
||||||
export type { PartialAppConfig } from './app/types/invokeai';
|
export type { PartialAppConfig } from './app/types/invokeai';
|
||||||
|
export { default as IAIIconButton } from './common/components/IAIIconButton';
|
||||||
|
export { default as IAIPopover } from './common/components/IAIPopover';
|
||||||
|
export { default as InvokeAiLogoComponent } from './features/system/components/InvokeAILogoComponent';
|
||||||
|
export { default as ModelSelect } from './features/system/components/ModelSelect';
|
||||||
|
export { default as SettingsModal } from './features/system/components/SettingsModal/SettingsModal';
|
||||||
|
export { default as StatusIndicator } from './features/system/components/StatusIndicator';
|
||||||
|
@ -44,7 +44,7 @@ export const theme: ThemeOverride = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
styles: {
|
styles: {
|
||||||
global: (props) => ({
|
global: () => ({
|
||||||
layerStyle: 'body',
|
layerStyle: 'body',
|
||||||
'*': { ...no_scrollbar },
|
'*': { ...no_scrollbar },
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user