🏞 Beautifying cover display UI
This commit is contained in:
@@ -25,6 +25,17 @@ $border-color: red;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
|
max-width: 200px;
|
||||||
|
margin: 12px;
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
.truncate {
|
||||||
|
width: 100px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { IFolderData } from "../shared/interfaces/comicinfo.interfaces";
|
|
||||||
import { IExtractedComicBookCoverFile } from "../../server/interfaces/folder.interface";
|
import { IExtractedComicBookCoverFile } from "../../server/interfaces/folder.interface";
|
||||||
import { isArray, map, isUndefined, isEmpty, flatten } from "lodash";
|
import { map } from "lodash";
|
||||||
import { socket } from "./Import";
|
|
||||||
import { walkFolder } from "../actions/fileops.actions";
|
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
comicBookCoversMetadata: IExtractedComicBookCoverFile[];
|
comicBookCoversMetadata: IExtractedComicBookCoverFile[];
|
||||||
@@ -14,13 +12,15 @@ class Card extends React.Component<IProps, IState> {
|
|||||||
constructor(props: IProps) {
|
constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
}
|
}
|
||||||
private removeLeadingPeriod = (string) => {
|
private removeLeadingPeriod = (input: string): string => {
|
||||||
if (string.charAt(0) == ".") {
|
if (input.charAt(0) == ".") {
|
||||||
string = string.substr(1);
|
input = input.substr(1);
|
||||||
}
|
}
|
||||||
return string;
|
return input;
|
||||||
};
|
};
|
||||||
public drawCoverCard = (metadata: IExtractedComicBookCoverFile[]) => {
|
public drawCoverCard = (
|
||||||
|
metadata: IExtractedComicBookCoverFile[],
|
||||||
|
): JSX.Element[] => {
|
||||||
return map(metadata, (item: IExtractedComicBookCoverFile) => {
|
return map(metadata, (item: IExtractedComicBookCoverFile) => {
|
||||||
return (
|
return (
|
||||||
<div className="card">
|
<div className="card">
|
||||||
@@ -38,7 +38,7 @@ class Card extends React.Component<IProps, IState> {
|
|||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
<div className="card-content">
|
<div className="card-content">
|
||||||
<div className="content">{item.name}</div>
|
<div className="content truncate">{item.name}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -88,10 +88,9 @@ class Import extends React.Component<IProps, IState> {
|
|||||||
<span>Import and Tag</span>
|
<span>Import and Tag</span>
|
||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
{/* Folder walk results */}
|
|
||||||
{!_.isUndefined(this.state.folderWalkResults) ? (
|
{!_.isUndefined(this.state.folderWalkResults) ? (
|
||||||
<>
|
<>
|
||||||
<div>poopie</div>
|
|
||||||
<Card comicBookCoversMetadata={this.props.garam} />
|
<Card comicBookCoversMetadata={this.props.garam} />
|
||||||
</>
|
</>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
Reference in New Issue
Block a user