mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Improved wall view for images (#3511)
* Proper masonry wall view for images * allow user to configure margin and direction
This commit is contained in:
23
ui/v2.5/src/utils/imageWall.ts
Normal file
23
ui/v2.5/src/utils/imageWall.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
export enum ImageWallDirection {
|
||||
Column = "column",
|
||||
Row = "row",
|
||||
}
|
||||
|
||||
export type ImageWallOptions = {
|
||||
margin: number;
|
||||
direction: ImageWallDirection;
|
||||
};
|
||||
|
||||
export const defaultImageWallDirection: ImageWallDirection =
|
||||
ImageWallDirection.Row;
|
||||
export const defaultImageWallMargin = 3;
|
||||
|
||||
export const imageWallDirectionIntlMap = new Map<ImageWallDirection, string>([
|
||||
[ImageWallDirection.Column, "dialogs.imagewall.direction.column"],
|
||||
[ImageWallDirection.Row, "dialogs.imagewall.direction.row"],
|
||||
]);
|
||||
|
||||
export const defaultImageWallOptions = {
|
||||
margin: defaultImageWallMargin,
|
||||
direction: defaultImageWallDirection,
|
||||
};
|
||||
Reference in New Issue
Block a user