mirror of
https://github.com/stashapp/stash.git
synced 2026-05-09 05:05:29 +02:00
Merge bf2e2ccede into 01a7583364
This commit is contained in:
commit
c62b7c37be
26 changed files with 27 additions and 27 deletions
|
|
@ -30,7 +30,7 @@ export const GalleryChapterPanel: React.FC<IGalleryChapterPanelProps> = ({
|
|||
return () => {
|
||||
Mousetrap.unbind("n");
|
||||
};
|
||||
});
|
||||
}, [isVisible]);
|
||||
|
||||
function onOpenEditor(chapter?: GQL.GalleryChapterDataFragment) {
|
||||
setIsEditorOpen(true);
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ export const FilteredGalleryList = PatchComponent(
|
|||
Mousetrap.unbind("e");
|
||||
Mousetrap.unbind("d d");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
const onCloseEditDelete = useCloseEditDelete({
|
||||
closeModal,
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ const GroupPage: React.FC<IProps> = ({ group, tabKey }) => {
|
|||
Mousetrap.unbind("e");
|
||||
Mousetrap.unbind("d d");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
useRatingKeybinds(
|
||||
true,
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ export const GroupEditPanel: React.FC<IGroupEditPanel> = ({
|
|||
// Mousetrap.unbind("u");
|
||||
Mousetrap.unbind("s s");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
function updateGroupEditStateFromScraper(
|
||||
state: Partial<GQL.ScrapedGroupDataFragment>
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ export const FilteredGroupList = PatchComponent(
|
|||
Mousetrap.unbind("e");
|
||||
Mousetrap.unbind("d d");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
const onCloseEditDelete = useCloseEditDelete({
|
||||
closeModal,
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ const ImagePage: React.FC<IProps> = ({ image }) => {
|
|||
Mousetrap.unbind("f");
|
||||
Mousetrap.unbind("o");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
const file = useMemo(
|
||||
() => (image.visual_files.length > 0 ? image.visual_files[0] : undefined),
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ export const ImageEditPanel: React.FC<IProps> = ({
|
|||
Mousetrap.unbind("d d");
|
||||
};
|
||||
}
|
||||
});
|
||||
}, [isVisible]);
|
||||
|
||||
const fragmentScrapers = useMemo(() => {
|
||||
return (scrapers?.data?.listScrapers ?? []).filter((s) =>
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ export const EditFilterDialog: React.FC<IEditFilterProps> = ({
|
|||
return () => {
|
||||
Mousetrap.unbind("/");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
async function updatePinnedFilters(filters: string[]) {
|
||||
const configKey = filterModeToConfigKey(currentFilter.mode);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ export const SearchTermInput: React.FC<{
|
|||
return () => {
|
||||
Mousetrap.unbind("/");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
function onSetQuery(value: string) {
|
||||
setLocalInput(value);
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ export const ListViewOptions: React.FC<IListViewOptionsProps> = ({
|
|||
Mousetrap.unbind("v w");
|
||||
Mousetrap.unbind("v t");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
function onChangeZoom(v: number) {
|
||||
if (onSetZoom) {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export function useZoomKeybinds(props: {
|
|||
Mousetrap.unbind("+");
|
||||
Mousetrap.unbind("-");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
}
|
||||
|
||||
export interface IZoomSelectProps {
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ export const MainNavbar: React.FC = () => {
|
|||
Mousetrap.unbind("n");
|
||||
}
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
function maybeRenderLogout() {
|
||||
if (SessionUtils.isLoggedIn()) {
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ const PerformerTabs: React.FC<{
|
|||
Mousetrap.unbind("g");
|
||||
Mousetrap.unbind("m");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Tabs
|
||||
|
|
@ -331,7 +331,7 @@ const PerformerPage: React.FC<IProps> = PatchComponent(
|
|||
Mousetrap.unbind("f");
|
||||
Mousetrap.unbind(",");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
async function onSave(input: GQL.PerformerCreateInput) {
|
||||
await updatePerformer({
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@ export const PerformerEditPanel: React.FC<IPerformerDetails> = ({
|
|||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
}, [isVisible]);
|
||||
|
||||
useEffect(() => {
|
||||
const newQueryableScrapers = (Scrapers?.data?.listScrapers ?? []).filter(
|
||||
|
|
|
|||
|
|
@ -447,7 +447,7 @@ export const FilteredPerformerList = PatchComponent(
|
|||
Mousetrap.unbind("e");
|
||||
Mousetrap.unbind("d d");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
const onCloseEditDelete = useCloseEditDelete({
|
||||
closeModal,
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ const ScenePage: React.FC<IProps> = PatchComponent("ScenePage", (props) => {
|
|||
Mousetrap.unbind("c c");
|
||||
Mousetrap.unbind("c d");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
async function onSave(input: GQL.SceneCreateInput) {
|
||||
await updateScene({
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ export const SceneEditPanel: React.FC<IProps> = ({
|
|||
Mousetrap.unbind("d d");
|
||||
};
|
||||
}
|
||||
});
|
||||
}, [isVisible]);
|
||||
|
||||
useEffect(() => {
|
||||
const toFilter = Scrapers?.data?.listScrapers ?? [];
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export const SceneMarkersPanel: React.FC<ISceneMarkersPanelProps> = ({
|
|||
return () => {
|
||||
Mousetrap.unbind("n");
|
||||
};
|
||||
});
|
||||
}, [isVisible]);
|
||||
|
||||
if (loading) return null;
|
||||
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ const StudioPage: React.FC<IProps> = ({ studio, tabKey }) => {
|
|||
Mousetrap.unbind(",");
|
||||
Mousetrap.unbind("f");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
useRatingKeybinds(
|
||||
true,
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ export const StudioEditPanel: React.FC<IStudioEditPanel> = ({
|
|||
return () => {
|
||||
Mousetrap.unbind("s s");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
async function onSave(input: InputValues, andNew?: boolean) {
|
||||
setIsLoading(true);
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ export const FilteredStudioList = PatchComponent(
|
|||
Mousetrap.unbind("e");
|
||||
Mousetrap.unbind("d d");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
const onCloseEditDelete = useCloseEditDelete({
|
||||
closeModal,
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ const TagPage: React.FC<IProps> = ({ tag, tabKey }) => {
|
|||
Mousetrap.unbind(",");
|
||||
Mousetrap.unbind("f");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
async function onSave(input: GQL.TagCreateInput) {
|
||||
const oldRelations = {
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ export const FilteredTagList = PatchComponent(
|
|||
Mousetrap.unbind("e");
|
||||
Mousetrap.unbind("d d");
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
const onCloseEditDelete = useCloseEditDelete({
|
||||
closeModal,
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ export function useLocalForage<T extends {}>(
|
|||
};
|
||||
localForage.setItem(key, Cache[key]);
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
|
||||
const isLoading = loading || loading === undefined;
|
||||
|
||||
|
|
|
|||
|
|
@ -81,5 +81,5 @@ export function useRatingKeybinds(
|
|||
return () => {
|
||||
Mousetrap.unbind("r");
|
||||
};
|
||||
});
|
||||
}, [isVisible]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ export function useStopWheelScroll(ref: React.RefObject<HTMLElement>) {
|
|||
current.removeEventListener("wheel", stopWheelScroll);
|
||||
}
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
}
|
||||
|
||||
// NumberField is a wrapper around Form.Control that prevents wheel events from scrolling the window.
|
||||
|
|
|
|||
Loading…
Reference in a new issue