mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-13 20:45:17 -05:00
add modelRelationships and aboutModal to disable-able features
This commit is contained in:
committed by
Mary Hipp Rogers
parent
6d16cfdbe2
commit
ee8ed344bd
@@ -14,6 +14,7 @@ export type AppFeature =
|
||||
| 'githubLink'
|
||||
| 'discordLink'
|
||||
| 'bugLink'
|
||||
| 'aboutModal'
|
||||
| 'localization'
|
||||
| 'consoleLogging'
|
||||
| 'dynamicPrompting'
|
||||
@@ -29,7 +30,8 @@ export type AppFeature =
|
||||
| 'hfToken'
|
||||
| 'retryQueueItem'
|
||||
| 'cancelAndClearAll'
|
||||
| 'chatGPT4oHigh';
|
||||
| 'chatGPT4oHigh'
|
||||
| 'modelRelationships';
|
||||
/**
|
||||
* A disable-able Stable Diffusion feature
|
||||
*/
|
||||
|
||||
@@ -29,6 +29,7 @@ import { BASE_COLOR_MAP } from 'features/modelManagerV2/subpanels/ModelManagerPa
|
||||
import ModelImage from 'features/modelManagerV2/subpanels/ModelManagerPanel/ModelImage';
|
||||
import { NavigateToModelManagerButton } from 'features/parameters/components/MainModel/NavigateToModelManagerButton';
|
||||
import { API_BASE_MODELS, MODEL_TYPE_MAP, MODEL_TYPE_SHORT_MAP } from 'features/parameters/types/constants';
|
||||
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
|
||||
import { selectIsModelsTabDisabled } from 'features/system/store/configSlice';
|
||||
import { setActiveTab } from 'features/ui/store/uiSlice';
|
||||
import { filesize } from 'filesize';
|
||||
@@ -192,8 +193,13 @@ export const ModelPicker = typedMemo(
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const selectedKeys = useAppSelector(selectSelectedModelKeys);
|
||||
const isModelRelationshipsEnabled = useFeatureStatus('modelRelationships');
|
||||
|
||||
const { relatedModelKeys } = useGetRelatedModelIdsBatchQuery(selectedKeys, relatedModelKeysQueryOptions);
|
||||
const { relatedModelKeys } = useGetRelatedModelIdsBatchQuery(
|
||||
selectedKeys,
|
||||
{ ...relatedModelKeysQueryOptions, skip: !isModelRelationshipsEnabled },
|
||||
|
||||
);
|
||||
|
||||
const options = useMemo<WithStarred<T>[] | Group<WithStarred<T>>[]>(() => {
|
||||
if (!grouped) {
|
||||
|
||||
@@ -36,6 +36,7 @@ const SettingsMenu = () => {
|
||||
const isBugLinkEnabled = useFeatureStatus('bugLink');
|
||||
const isDiscordLinkEnabled = useFeatureStatus('discordLink');
|
||||
const isGithubLinkEnabled = useFeatureStatus('githubLink');
|
||||
const isAboutModalEnabled = useFeatureStatus('aboutModal');
|
||||
|
||||
return (
|
||||
<Menu isOpen={isOpen} onOpen={onOpen} onClose={onClose} autoSelect={false}>
|
||||
@@ -84,11 +85,13 @@ const SettingsMenu = () => {
|
||||
</SettingsModal>
|
||||
</MenuGroup>
|
||||
<MenuGroup title={t('accessibility.about')}>
|
||||
<AboutModal>
|
||||
<MenuItem as="button" icon={<PiInfoBold />}>
|
||||
{t('accessibility.about')}
|
||||
</MenuItem>
|
||||
</AboutModal>
|
||||
{isAboutModalEnabled && (
|
||||
<AboutModal>
|
||||
<MenuItem as="button" icon={<PiInfoBold />}>
|
||||
{t('accessibility.about')}
|
||||
</MenuItem>
|
||||
</AboutModal>
|
||||
)}
|
||||
</MenuGroup>
|
||||
</MenuList>
|
||||
</Portal>
|
||||
|
||||
Reference in New Issue
Block a user