-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorder and Rotate images using new UI (#438)
- Loading branch information
Showing
27 changed files
with
1,156 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import {useContext} from "react" | ||
import {useDispatch, useSelector} from "react-redux" | ||
import {Tooltip, ActionIcon} from "@mantine/core" | ||
import {IconRotateClockwise} from "@tabler/icons-react" | ||
import {rotatePages, selectSelectedPages} from "@/slices/dualPanel/dualPanel" | ||
import PanelContext from "@/contexts/PanelContext" | ||
import {PanelMode} from "@/types" | ||
import type {RootState} from "@/app/types" | ||
|
||
export default function RotateCCButton() { | ||
const mode: PanelMode = useContext(PanelContext) | ||
const dispatch = useDispatch() | ||
const selectedPages = useSelector((state: RootState) => | ||
selectSelectedPages(state, mode) | ||
) | ||
const onClick = () => { | ||
const pages = selectedPages.map(p => p.page) | ||
dispatch(rotatePages({mode, pages, angle: 90})) | ||
} | ||
|
||
return ( | ||
<Tooltip label="Rotate selected pages clockwise" withArrow> | ||
<ActionIcon size={"lg"} variant="default" onClick={onClick}> | ||
<IconRotateClockwise stroke={1.4} /> | ||
</ActionIcon> | ||
</Tooltip> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import {useContext} from "react" | ||
import {useDispatch, useSelector} from "react-redux" | ||
import {Tooltip, ActionIcon} from "@mantine/core" | ||
import {IconRotate} from "@tabler/icons-react" | ||
import {rotatePages, selectSelectedPages} from "@/slices/dualPanel/dualPanel" | ||
import PanelContext from "@/contexts/PanelContext" | ||
import {PanelMode} from "@/types" | ||
import type {RootState} from "@/app/types" | ||
|
||
export default function RotateCCButton() { | ||
const mode: PanelMode = useContext(PanelContext) | ||
const dispatch = useDispatch() | ||
const selectedPages = useSelector((state: RootState) => | ||
selectSelectedPages(state, mode) | ||
) | ||
const onClick = () => { | ||
const pages = selectedPages.map(p => p.page) | ||
dispatch(rotatePages({mode, pages, angle: -90})) | ||
} | ||
|
||
return ( | ||
<Tooltip label="Rotate selected pages counter-clockwise" withArrow> | ||
<ActionIcon size={"lg"} variant="default" onClick={onClick}> | ||
<IconRotate stroke={1.4} /> | ||
</ActionIcon> | ||
</Tooltip> | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.thumbnail { | ||
.checkbox { | ||
align-self: self-start; | ||
} | ||
} |
Oops, something went wrong.