This commit is contained in:
megatwig 2026-05-09 03:04:44 +03:00 committed by GitHub
commit c62b7c37be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 27 additions and 27 deletions

View file

@ -30,7 +30,7 @@ export const GalleryChapterPanel: React.FC<IGalleryChapterPanelProps> = ({
return () => {
Mousetrap.unbind("n");
};
});
}, [isVisible]);
function onOpenEditor(chapter?: GQL.GalleryChapterDataFragment) {
setIsEditorOpen(true);

View file

@ -324,7 +324,7 @@ export const FilteredGalleryList = PatchComponent(
Mousetrap.unbind("e");
Mousetrap.unbind("d d");
};
});
}, []);
const onCloseEditDelete = useCloseEditDelete({
closeModal,

View file

@ -243,7 +243,7 @@ const GroupPage: React.FC<IProps> = ({ group, tabKey }) => {
Mousetrap.unbind("e");
Mousetrap.unbind("d d");
};
});
}, []);
useRatingKeybinds(
true,

View file

@ -172,7 +172,7 @@ export const GroupEditPanel: React.FC<IGroupEditPanel> = ({
// Mousetrap.unbind("u");
Mousetrap.unbind("s s");
};
});
}, []);
function updateGroupEditStateFromScraper(
state: Partial<GQL.ScrapedGroupDataFragment>

View file

@ -288,7 +288,7 @@ export const FilteredGroupList = PatchComponent(
Mousetrap.unbind("e");
Mousetrap.unbind("d d");
};
});
}, []);
const onCloseEditDelete = useCloseEditDelete({
closeModal,

View file

@ -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),

View file

@ -177,7 +177,7 @@ export const ImageEditPanel: React.FC<IProps> = ({
Mousetrap.unbind("d d");
};
}
});
}, [isVisible]);
const fragmentScrapers = useMemo(() => {
return (scrapers?.data?.listScrapers ?? []).filter((s) =>

View file

@ -359,7 +359,7 @@ export const EditFilterDialog: React.FC<IEditFilterProps> = ({
return () => {
Mousetrap.unbind("/");
};
});
}, []);
async function updatePinnedFilters(filters: string[]) {
const configKey = filterModeToConfigKey(currentFilter.mode);

View file

@ -86,7 +86,7 @@ export const SearchTermInput: React.FC<{
return () => {
Mousetrap.unbind("/");
};
});
}, []);
function onSetQuery(value: string) {
setLocalInput(value);

View file

@ -105,7 +105,7 @@ export const ListViewOptions: React.FC<IListViewOptionsProps> = ({
Mousetrap.unbind("v w");
Mousetrap.unbind("v t");
};
});
}, []);
function onChangeZoom(v: number) {
if (onSetZoom) {

View file

@ -26,7 +26,7 @@ export function useZoomKeybinds(props: {
Mousetrap.unbind("+");
Mousetrap.unbind("-");
};
});
}, []);
}
export interface IZoomSelectProps {

View file

@ -276,7 +276,7 @@ export const MainNavbar: React.FC = () => {
Mousetrap.unbind("n");
}
};
});
}, []);
function maybeRenderLogout() {
if (SessionUtils.isLoggedIn()) {

View file

@ -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({

View file

@ -383,7 +383,7 @@ export const PerformerEditPanel: React.FC<IPerformerDetails> = ({
}
};
}
});
}, [isVisible]);
useEffect(() => {
const newQueryableScrapers = (Scrapers?.data?.listScrapers ?? []).filter(

View file

@ -447,7 +447,7 @@ export const FilteredPerformerList = PatchComponent(
Mousetrap.unbind("e");
Mousetrap.unbind("d d");
};
});
}, []);
const onCloseEditDelete = useCloseEditDelete({
closeModal,

View file

@ -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({

View file

@ -257,7 +257,7 @@ export const SceneEditPanel: React.FC<IProps> = ({
Mousetrap.unbind("d d");
};
}
});
}, [isVisible]);
useEffect(() => {
const toFilter = Scrapers?.data?.listScrapers ?? [];

View file

@ -36,7 +36,7 @@ export const SceneMarkersPanel: React.FC<ISceneMarkersPanelProps> = ({
return () => {
Mousetrap.unbind("n");
};
});
}, [isVisible]);
if (loading) return null;

View file

@ -354,7 +354,7 @@ const StudioPage: React.FC<IProps> = ({ studio, tabKey }) => {
Mousetrap.unbind(",");
Mousetrap.unbind("f");
};
});
}, []);
useRatingKeybinds(
true,

View file

@ -147,7 +147,7 @@ export const StudioEditPanel: React.FC<IStudioEditPanel> = ({
return () => {
Mousetrap.unbind("s s");
};
});
}, []);
async function onSave(input: InputValues, andNew?: boolean) {
setIsLoading(true);

View file

@ -274,7 +274,7 @@ export const FilteredStudioList = PatchComponent(
Mousetrap.unbind("e");
Mousetrap.unbind("d d");
};
});
}, []);
const onCloseEditDelete = useCloseEditDelete({
closeModal,

View file

@ -359,7 +359,7 @@ const TagPage: React.FC<IProps> = ({ tag, tabKey }) => {
Mousetrap.unbind(",");
Mousetrap.unbind("f");
};
});
}, []);
async function onSave(input: GQL.TagCreateInput) {
const oldRelations = {

View file

@ -276,7 +276,7 @@ export const FilteredTagList = PatchComponent(
Mousetrap.unbind("e");
Mousetrap.unbind("d d");
};
});
}, []);
const onCloseEditDelete = useCloseEditDelete({
closeModal,

View file

@ -83,7 +83,7 @@ export function useLocalForage<T extends {}>(
};
localForage.setItem(key, Cache[key]);
}
});
}, []);
const isLoading = loading || loading === undefined;

View file

@ -81,5 +81,5 @@ export function useRatingKeybinds(
return () => {
Mousetrap.unbind("r");
};
});
}, [isVisible]);
}

View file

@ -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.