mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
knip lint
This commit is contained in:
parent
641af64f93
commit
e381e021e9
@ -125,7 +125,7 @@ const parseCreatedBy: MetadataParseFunc<string> = (metadata) => getProperty(meta
|
|||||||
|
|
||||||
const parseGenerationMode: MetadataParseFunc<string> = (metadata) => getProperty(metadata, 'generation_mode', isString);
|
const parseGenerationMode: MetadataParseFunc<string> = (metadata) => getProperty(metadata, 'generation_mode', isString);
|
||||||
|
|
||||||
export const parsePositivePrompt: MetadataParseFunc<ParameterPositivePrompt> = (metadata) =>
|
const parsePositivePrompt: MetadataParseFunc<ParameterPositivePrompt> = (metadata) =>
|
||||||
getProperty(metadata, 'positive_prompt', isParameterPositivePrompt);
|
getProperty(metadata, 'positive_prompt', isParameterPositivePrompt);
|
||||||
|
|
||||||
const parseNegativePrompt: MetadataParseFunc<ParameterNegativePrompt> = (metadata) =>
|
const parseNegativePrompt: MetadataParseFunc<ParameterNegativePrompt> = (metadata) =>
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import type { PayloadAction } from '@reduxjs/toolkit';
|
import type { PayloadAction } from '@reduxjs/toolkit';
|
||||||
import { createSlice } from '@reduxjs/toolkit';
|
import { createSlice } from '@reduxjs/toolkit';
|
||||||
import type { RootState } from 'app/store/store';
|
|
||||||
import type { StylePresetFormData } from 'features/stylePresets/components/StylePresetForm';
|
import type { StylePresetFormData } from 'features/stylePresets/components/StylePresetForm';
|
||||||
|
|
||||||
import type { StylePresetModalState } from './types';
|
import type { StylePresetModalState } from './types';
|
||||||
|
|
||||||
export const initialState: StylePresetModalState = {
|
const initialState: StylePresetModalState = {
|
||||||
isModalOpen: false,
|
isModalOpen: false,
|
||||||
updatingStylePresetId: null,
|
updatingStylePresetId: null,
|
||||||
prefilledFormData: null,
|
prefilledFormData: null,
|
||||||
@ -30,4 +29,3 @@ export const stylePresetModalSlice = createSlice({
|
|||||||
export const { isModalOpenChanged, updatingStylePresetIdChanged, prefilledFormDataChanged } =
|
export const { isModalOpenChanged, updatingStylePresetIdChanged, prefilledFormDataChanged } =
|
||||||
stylePresetModalSlice.actions;
|
stylePresetModalSlice.actions;
|
||||||
|
|
||||||
export const selectStylePresetModalSlice = (state: RootState) => state.stylePresetModal;
|
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import type { PayloadAction } from '@reduxjs/toolkit';
|
import type { PayloadAction } from '@reduxjs/toolkit';
|
||||||
import { createSlice } from '@reduxjs/toolkit';
|
import { createSlice } from '@reduxjs/toolkit';
|
||||||
import type { RootState } from 'app/store/store';
|
|
||||||
import type { StylePresetRecordWithImage } from 'services/api/endpoints/stylePresets';
|
import type { StylePresetRecordWithImage } from 'services/api/endpoints/stylePresets';
|
||||||
|
|
||||||
import type { StylePresetState } from './types';
|
import type { StylePresetState } from './types';
|
||||||
|
|
||||||
export const initialState: StylePresetState = {
|
const initialState: StylePresetState = {
|
||||||
isMenuOpen: false,
|
isMenuOpen: false,
|
||||||
activeStylePreset: null,
|
activeStylePreset: null,
|
||||||
searchTerm: '',
|
searchTerm: '',
|
||||||
@ -34,4 +33,3 @@ export const stylePresetSlice = createSlice({
|
|||||||
export const { isMenuOpenChanged, activeStylePresetChanged, searchTermChanged, viewModeChanged } =
|
export const { isMenuOpenChanged, activeStylePresetChanged, searchTermChanged, viewModeChanged } =
|
||||||
stylePresetSlice.actions;
|
stylePresetSlice.actions;
|
||||||
|
|
||||||
export const selectStylePresetSlice = (state: RootState) => state.stylePreset;
|
|
||||||
|
@ -13,7 +13,7 @@ export type StylePresetRecordWithImage =
|
|||||||
*/
|
*/
|
||||||
const buildStylePresetsUrl = (path: string = '') => buildV1Url(`style_presets/${path}`);
|
const buildStylePresetsUrl = (path: string = '') => buildV1Url(`style_presets/${path}`);
|
||||||
|
|
||||||
export const stylePresetsApi = api.injectEndpoints({
|
const stylePresetsApi = api.injectEndpoints({
|
||||||
endpoints: (build) => ({
|
endpoints: (build) => ({
|
||||||
getStylePreset: build.query<
|
getStylePreset: build.query<
|
||||||
paths['/api/v1/style_presets/i/{style_preset_id}']['get']['responses']['200']['content']['application/json'],
|
paths['/api/v1/style_presets/i/{style_preset_id}']['get']['responses']['200']['content']['application/json'],
|
||||||
@ -99,7 +99,6 @@ export const stylePresetsApi = api.injectEndpoints({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const {
|
export const {
|
||||||
useGetStylePresetQuery,
|
|
||||||
useCreateStylePresetMutation,
|
useCreateStylePresetMutation,
|
||||||
useDeleteStylePresetMutation,
|
useDeleteStylePresetMutation,
|
||||||
useUpdateStylePresetMutation,
|
useUpdateStylePresetMutation,
|
||||||
|
Loading…
Reference in New Issue
Block a user