🔧 Renamed IMPORT_* to LIBRARY_*
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
|||||||
PriorityEnum,
|
PriorityEnum,
|
||||||
SearchResponse,
|
SearchResponse,
|
||||||
} from "threetwo-ui-typings";
|
} from "threetwo-ui-typings";
|
||||||
import { IMPORT_SERVICE_BASE_URI } from "../constants/endpoints";
|
import { LIBRARY_SERVICE_BASE_URI } from "../constants/endpoints";
|
||||||
import {
|
import {
|
||||||
AIRDCPP_SEARCH_RESULTS_ADDED,
|
AIRDCPP_SEARCH_RESULTS_ADDED,
|
||||||
AIRDCPP_SEARCH_RESULTS_UPDATED,
|
AIRDCPP_SEARCH_RESULTS_UPDATED,
|
||||||
@@ -147,7 +147,7 @@ export const downloadAirDCPPItem =
|
|||||||
if (!isNil(downloadResult)) {
|
if (!isNil(downloadResult)) {
|
||||||
bundleDBImportResult = await axios({
|
bundleDBImportResult = await axios({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `${IMPORT_SERVICE_BASE_URI}/applyAirDCPPDownloadMetadata`,
|
url: `${LIBRARY_SERVICE_BASE_URI}/applyAirDCPPDownloadMetadata`,
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json; charset=utf-8",
|
"Content-Type": "application/json; charset=utf-8",
|
||||||
},
|
},
|
||||||
@@ -214,7 +214,7 @@ export const getBundlesForComic =
|
|||||||
}
|
}
|
||||||
const comicObject = await axios({
|
const comicObject = await axios({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `${IMPORT_SERVICE_BASE_URI}/getComicBookById`,
|
url: `${LIBRARY_SERVICE_BASE_URI}/getComicBookById`,
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json; charset=utf-8",
|
"Content-Type": "application/json; charset=utf-8",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
} from "../constants/action-types";
|
} from "../constants/action-types";
|
||||||
import {
|
import {
|
||||||
COMICBOOKINFO_SERVICE_URI,
|
COMICBOOKINFO_SERVICE_URI,
|
||||||
IMPORT_SERVICE_BASE_URI,
|
LIBRARY_SERVICE_BASE_URI,
|
||||||
} from "../constants/endpoints";
|
} from "../constants/endpoints";
|
||||||
|
|
||||||
const http = rateLimiter(axios.create(), {
|
const http = rateLimiter(axios.create(), {
|
||||||
@@ -75,7 +75,7 @@ export const findIssuesForSeriesInLibrary =
|
|||||||
});
|
});
|
||||||
|
|
||||||
await axios({
|
await axios({
|
||||||
url: `${IMPORT_SERVICE_BASE_URI}/findIssuesForSeriesInLibrary`,
|
url: `${LIBRARY_SERVICE_BASE_URI}/findIssuesForSeriesInLibrary`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
params: {
|
params: {
|
||||||
comicObjectID,
|
comicObjectID,
|
||||||
@@ -90,7 +90,7 @@ export const getComicBookDetailById =
|
|||||||
IMS_inProgress: true,
|
IMS_inProgress: true,
|
||||||
});
|
});
|
||||||
const result = await axios.request({
|
const result = await axios.request({
|
||||||
url: `${IMPORT_SERVICE_BASE_URI}/getComicBookById`,
|
url: `${LIBRARY_SERVICE_BASE_URI}/getComicBookById`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
id: comicBookObjectId,
|
id: comicBookObjectId,
|
||||||
@@ -110,7 +110,7 @@ export const getComicBooksDetailsByIds =
|
|||||||
IMS_inProgress: true,
|
IMS_inProgress: true,
|
||||||
});
|
});
|
||||||
const result = await axios.request({
|
const result = await axios.request({
|
||||||
url: `${IMPORT_SERVICE_BASE_URI}/getComicBooksByIds`,
|
url: `${LIBRARY_SERVICE_BASE_URI}/getComicBooksByIds`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
ids: comicBookObjectIds,
|
ids: comicBookObjectIds,
|
||||||
@@ -129,7 +129,7 @@ export const applyComicVineMatch =
|
|||||||
IMS_inProgress: true,
|
IMS_inProgress: true,
|
||||||
});
|
});
|
||||||
const result = await axios.request({
|
const result = await axios.request({
|
||||||
url: `${IMPORT_SERVICE_BASE_URI}/applyComicVineMetadata`,
|
url: `${LIBRARY_SERVICE_BASE_URI}/applyComicVineMetadata`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
match,
|
match,
|
||||||
@@ -151,7 +151,7 @@ export const extractComicArchive =
|
|||||||
});
|
});
|
||||||
const extractedComicBookArchive = await axios({
|
const extractedComicBookArchive = await axios({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `${IMPORT_SERVICE_BASE_URI}/unrarArchive`,
|
url: `${LIBRARY_SERVICE_BASE_URI}/unrarArchive`,
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json; charset=utf-8",
|
"Content-Type": "application/json; charset=utf-8",
|
||||||
},
|
},
|
||||||
@@ -164,7 +164,7 @@ export const extractComicArchive =
|
|||||||
const foo = page.path.split("/");
|
const foo = page.path.split("/");
|
||||||
const folderName = foo[foo.length - 1];
|
const folderName = foo[foo.length - 1];
|
||||||
const imagePath = encodeURI(
|
const imagePath = encodeURI(
|
||||||
`${IMPORT_SERVICE_BASE_URI}/userdata/expanded/` +
|
`${LIBRARY_SERVICE_BASE_URI}/userdata/expanded/` +
|
||||||
folderName +
|
folderName +
|
||||||
`/` +
|
`/` +
|
||||||
page.name +
|
page.name +
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import axios from "axios";
|
|||||||
import { IFolderData } from "threetwo-ui-typings";
|
import { IFolderData } from "threetwo-ui-typings";
|
||||||
import {
|
import {
|
||||||
COMICBOOKINFO_SERVICE_URI,
|
COMICBOOKINFO_SERVICE_URI,
|
||||||
IMPORT_SERVICE_BASE_URI,
|
LIBRARY_SERVICE_BASE_URI,
|
||||||
} from "../constants/endpoints";
|
} from "../constants/endpoints";
|
||||||
import {
|
import {
|
||||||
IMS_COMIC_BOOK_GROUPS_FETCHED,
|
IMS_COMIC_BOOK_GROUPS_FETCHED,
|
||||||
@@ -23,7 +23,7 @@ import { isNil } from "lodash";
|
|||||||
export async function walkFolder(path: string): Promise<Array<IFolderData>> {
|
export async function walkFolder(path: string): Promise<Array<IFolderData>> {
|
||||||
return axios
|
return axios
|
||||||
.request<Array<IFolderData>>({
|
.request<Array<IFolderData>>({
|
||||||
url: `${IMPORT_SERVICE_BASE_URI}/walkFolders`,
|
url: `${LIBRARY_SERVICE_BASE_URI}/walkFolders`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
basePathToWalk: path,
|
basePathToWalk: path,
|
||||||
@@ -78,7 +78,7 @@ export const getComicBooks = (options) => async (dispatch) => {
|
|||||||
const { paginationOptions } = options;
|
const { paginationOptions } = options;
|
||||||
return axios
|
return axios
|
||||||
.request({
|
.request({
|
||||||
url: `${IMPORT_SERVICE_BASE_URI}/getComicBooks`,
|
url: `${LIBRARY_SERVICE_BASE_URI}/getComicBooks`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
paginationOptions,
|
paginationOptions,
|
||||||
@@ -109,7 +109,7 @@ export const importToDB = (payload?: any) => (dispatch) => {
|
|||||||
});
|
});
|
||||||
return axios
|
return axios
|
||||||
.request({
|
.request({
|
||||||
url: `${IMPORT_SERVICE_BASE_URI}/rawImportToDb`,
|
url: `${LIBRARY_SERVICE_BASE_URI}/rawImportToDb`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: comicBookMetadata,
|
data: comicBookMetadata,
|
||||||
transformResponse: (r: string) => JSON.parse(r),
|
transformResponse: (r: string) => JSON.parse(r),
|
||||||
@@ -135,7 +135,7 @@ export const fetchVolumeGroups = () => (dispatch) => {
|
|||||||
});
|
});
|
||||||
axios
|
axios
|
||||||
.request({
|
.request({
|
||||||
url: `${IMPORT_SERVICE_BASE_URI}/getComicBookGroups`,
|
url: `${LIBRARY_SERVICE_BASE_URI}/getComicBookGroups`,
|
||||||
method: "GET",
|
method: "GET",
|
||||||
})
|
})
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
SETTINGS_DB_FLUSH_SUCCESS,
|
SETTINGS_DB_FLUSH_SUCCESS,
|
||||||
} from "../constants/action-types";
|
} from "../constants/action-types";
|
||||||
import {
|
import {
|
||||||
IMPORT_SERVICE_BASE_URI,
|
LIBRARY_SERVICE_BASE_URI,
|
||||||
SETTINGS_SERVICE_BASE_URI,
|
SETTINGS_SERVICE_BASE_URI,
|
||||||
} from "../constants/endpoints";
|
} from "../constants/endpoints";
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ export const flushDb = () => async (dispatch) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const flushDbResult = await axios({
|
const flushDbResult = await axios({
|
||||||
url: `${IMPORT_SERVICE_BASE_URI}/flushDb`,
|
url: `${LIBRARY_SERVICE_BASE_URI}/flushDb`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ $fa-font-path: "~@fortawesome/fontawesome-free/webfonts";
|
|||||||
$bg-color: yellow;
|
$bg-color: yellow;
|
||||||
$border-color: red;
|
$border-color: red;
|
||||||
|
|
||||||
$volume-color: #f2f1f9;
|
$volume-color: #fdecd1;
|
||||||
|
$issue-color: #f2f1f9;
|
||||||
$size-8: 0.9rem;
|
$size-8: 0.9rem;
|
||||||
|
|
||||||
.is-size-8 {
|
.is-size-8 {
|
||||||
@@ -131,7 +132,7 @@ $size-8: 0.9rem;
|
|||||||
box-shadow: 1px 8px 23px 7px rgba(0, 0, 0, 0.12);
|
box-shadow: 1px 8px 23px 7px rgba(0, 0, 0, 0.12);
|
||||||
|
|
||||||
.green-border {
|
.green-border {
|
||||||
border:2px dotted #168B64;
|
border: 1px dotted #168b64;
|
||||||
border-radius: 0.3rem;
|
border-radius: 0.3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,7 +359,7 @@ $size-8: 0.9rem;
|
|||||||
// margin-left: -30px; /* gutter size offset */
|
// margin-left: -30px; /* gutter size offset */
|
||||||
width: auto;
|
width: auto;
|
||||||
.issues-column {
|
.issues-column {
|
||||||
max-width:102px;
|
max-width: 102px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
background-clip: padding-box;
|
background-clip: padding-box;
|
||||||
& > div {
|
& > div {
|
||||||
@@ -366,13 +367,27 @@ $size-8: 0.9rem;
|
|||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Potential issue matches in library slideout panel
|
// Potential issue matches in library slideout panel
|
||||||
.potential-matches-container {
|
.potential-matches-container {
|
||||||
.generic-card {
|
.potential-issue-match {
|
||||||
|
border-radius: 0.3rem;
|
||||||
|
background-color: $issue-color;
|
||||||
|
padding: 10px;
|
||||||
|
pre {
|
||||||
|
padding: 5px;
|
||||||
|
background-color: transparent;
|
||||||
|
border-radius: 0.3rem;
|
||||||
|
white-space: pre-wrap; /* Since CSS 2.1 */
|
||||||
|
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||||
|
white-space: -pre-wrap; /* Opera 4-6 */
|
||||||
|
white-space: -o-pre-wrap; /* Opera 7 */
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
.generic-card {
|
||||||
max-width: 90px;
|
max-width: 90px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
} from "../shared/utils/formatting.utils";
|
} from "../shared/utils/formatting.utils";
|
||||||
import { isUndefined, isEmpty, isNil } from "lodash";
|
import { isUndefined, isEmpty, isNil } from "lodash";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { IMPORT_SERVICE_HOST } from "../constants/endpoints";
|
import { LIBRARY_SERVICE_HOST } from "../constants/endpoints";
|
||||||
import ellipsize from "ellipsize";
|
import ellipsize from "ellipsize";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
@@ -27,7 +27,7 @@ class Card extends React.Component<IProps, IState> {
|
|||||||
metadata: IExtractedComicBookCoverFile,
|
metadata: IExtractedComicBookCoverFile,
|
||||||
): JSX.Element => {
|
): JSX.Element => {
|
||||||
const encodedFilePath = encodeURI(
|
const encodedFilePath = encodeURI(
|
||||||
`${IMPORT_SERVICE_HOST}` + removeLeadingPeriod(metadata.path),
|
`${LIBRARY_SERVICE_HOST}` + removeLeadingPeriod(metadata.path),
|
||||||
);
|
);
|
||||||
const filePath = escapePoundSymbol(encodedFilePath);
|
const filePath = escapePoundSymbol(encodedFilePath);
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import SlidingPane from "react-sliding-pane";
|
|||||||
|
|
||||||
import { escapePoundSymbol } from "../shared/utils/formatting.utils";
|
import { escapePoundSymbol } from "../shared/utils/formatting.utils";
|
||||||
|
|
||||||
import { IMPORT_SERVICE_HOST } from "../constants/endpoints";
|
import { LIBRARY_SERVICE_HOST } from "../constants/endpoints";
|
||||||
import { getSettings } from "../actions/settings.actions";
|
import { getSettings } from "../actions/settings.actions";
|
||||||
import { AirDCPPSocketContext } from "../context/AirDCPPSocket";
|
import { AirDCPPSocketContext } from "../context/AirDCPPSocket";
|
||||||
import AirDCPPSocket from "../services/DcppSearchService";
|
import AirDCPPSocket from "../services/DcppSearchService";
|
||||||
@@ -210,7 +210,7 @@ export const ComicDetail = ({}: ComicDetailProps): ReactElement => {
|
|||||||
let comicBookTitle = "";
|
let comicBookTitle = "";
|
||||||
if (!isNil(comicBookDetailData.rawFileDetails)) {
|
if (!isNil(comicBookDetailData.rawFileDetails)) {
|
||||||
const encodedFilePath = encodeURI(
|
const encodedFilePath = encodeURI(
|
||||||
`${IMPORT_SERVICE_HOST}/${comicBookDetailData.rawFileDetails.cover.filePath}`,
|
`${LIBRARY_SERVICE_HOST}/${comicBookDetailData.rawFileDetails.cover.filePath}`,
|
||||||
);
|
);
|
||||||
imagePath = escapePoundSymbol(encodedFilePath);
|
imagePath = escapePoundSymbol(encodedFilePath);
|
||||||
comicBookTitle = comicBookDetailData.rawFileDetails.name;
|
comicBookTitle = comicBookDetailData.rawFileDetails.name;
|
||||||
|
|||||||
@@ -32,7 +32,15 @@ export const Dashboard = (): ReactElement => {
|
|||||||
|
|
||||||
{!isEmpty(recentComics) && !isEmpty(recentComics.docs) ? (
|
{!isEmpty(recentComics) && !isEmpty(recentComics.docs) ? (
|
||||||
<>
|
<>
|
||||||
|
<div className="columns">
|
||||||
|
<div className="column is-half card">
|
||||||
|
<div className="card-content">
|
||||||
|
<h1 className="is-size-5">13,476 Books</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<RecentlyImported comicBookCovers={recentComics} />
|
<RecentlyImported comicBookCovers={recentComics} />
|
||||||
|
|
||||||
{!isNil(volumeGroups) ? <VolumeGroups /> : null}
|
{!isNil(volumeGroups) ? <VolumeGroups /> : null}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ import PropTypes from "prop-types";
|
|||||||
import { escapePoundSymbol } from "../../shared/utils/formatting.utils";
|
import { escapePoundSymbol } from "../../shared/utils/formatting.utils";
|
||||||
import prettyBytes from "pretty-bytes";
|
import prettyBytes from "pretty-bytes";
|
||||||
import ellipsize from "ellipsize";
|
import ellipsize from "ellipsize";
|
||||||
import { IMPORT_SERVICE_HOST } from "../../constants/endpoints";
|
import { LIBRARY_SERVICE_HOST } from "../../constants/endpoints";
|
||||||
|
|
||||||
// raw file details
|
// raw file details
|
||||||
export const RawFileDetails = (rawFileData): ReactElement => {
|
export const RawFileDetails = (rawFileData): ReactElement => {
|
||||||
const { data } = rawFileData;
|
const { data } = rawFileData;
|
||||||
const encodedFilePath = encodeURI(
|
const encodedFilePath = encodeURI(
|
||||||
`${IMPORT_SERVICE_HOST}/${data.cover.filePath}`,
|
`${LIBRARY_SERVICE_HOST}/${data.cover.filePath}`,
|
||||||
);
|
);
|
||||||
const filePath = escapePoundSymbol(encodedFilePath);
|
const filePath = escapePoundSymbol(encodedFilePath);
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import Masonry from "react-masonry-css";
|
|||||||
import Card from "./Carda";
|
import Card from "./Carda";
|
||||||
import { detectIssueTypes } from "../shared/utils/tradepaperback.utils";
|
import { detectIssueTypes } from "../shared/utils/tradepaperback.utils";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { IMPORT_SERVICE_HOST } from "../constants/endpoints";
|
import { LIBRARY_SERVICE_HOST } from "../constants/endpoints";
|
||||||
|
|
||||||
interface ILibraryGridProps {}
|
interface ILibraryGridProps {}
|
||||||
export const LibraryGrid = (libraryGridProps: ILibraryGridProps) => {
|
export const LibraryGrid = (libraryGridProps: ILibraryGridProps) => {
|
||||||
@@ -47,7 +47,7 @@ export const LibraryGrid = (libraryGridProps: ILibraryGridProps) => {
|
|||||||
let comicName = "";
|
let comicName = "";
|
||||||
if (!isNil(rawFileDetails)) {
|
if (!isNil(rawFileDetails)) {
|
||||||
const encodedFilePath = encodeURI(
|
const encodedFilePath = encodeURI(
|
||||||
`${IMPORT_SERVICE_HOST}` +
|
`${LIBRARY_SERVICE_HOST}` +
|
||||||
removeLeadingPeriod(rawFileDetails.cover.filePath),
|
removeLeadingPeriod(rawFileDetails.cover.filePath),
|
||||||
);
|
);
|
||||||
imagePath = escapePoundSymbol(encodedFilePath);
|
imagePath = escapePoundSymbol(encodedFilePath);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { escapePoundSymbol } from "../shared/utils/formatting.utils";
|
|||||||
import { isNil, isUndefined, map } from "lodash";
|
import { isNil, isUndefined, map } from "lodash";
|
||||||
import { detectIssueTypes } from "../shared/utils/tradepaperback.utils";
|
import { detectIssueTypes } from "../shared/utils/tradepaperback.utils";
|
||||||
import Masonry from "react-masonry-css";
|
import Masonry from "react-masonry-css";
|
||||||
import { IMPORT_SERVICE_HOST } from "../constants/endpoints";
|
import { LIBRARY_SERVICE_HOST } from "../constants/endpoints";
|
||||||
|
|
||||||
type RecentlyImportedProps = {
|
type RecentlyImportedProps = {
|
||||||
comicBookCovers: any;
|
comicBookCovers: any;
|
||||||
@@ -19,7 +19,7 @@ export const RecentlyImported = ({
|
|||||||
default: 5,
|
default: 5,
|
||||||
1100: 4,
|
1100: 4,
|
||||||
700: 2,
|
700: 2,
|
||||||
600: 1,
|
600: 2,
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -38,7 +38,7 @@ export const RecentlyImported = ({
|
|||||||
let comicName = "";
|
let comicName = "";
|
||||||
if (!isNil(rawFileDetails)) {
|
if (!isNil(rawFileDetails)) {
|
||||||
const encodedFilePath = encodeURI(
|
const encodedFilePath = encodeURI(
|
||||||
`${IMPORT_SERVICE_HOST}/${rawFileDetails.cover.filePath}`,
|
`${LIBRARY_SERVICE_HOST}/${rawFileDetails.cover.filePath}`,
|
||||||
);
|
);
|
||||||
imagePath = escapePoundSymbol(encodedFilePath);
|
imagePath = escapePoundSymbol(encodedFilePath);
|
||||||
comicName = rawFileDetails.name;
|
comicName = rawFileDetails.name;
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ import { useDispatch, useSelector } from "react-redux";
|
|||||||
import { getComicBooksDetailsByIds } from "../../actions/comicinfo.actions";
|
import { getComicBooksDetailsByIds } from "../../actions/comicinfo.actions";
|
||||||
import { Card } from "../Carda";
|
import { Card } from "../Carda";
|
||||||
import ellipsize from "ellipsize";
|
import ellipsize from "ellipsize";
|
||||||
import { IMPORT_SERVICE_HOST } from "../../constants/endpoints";
|
import { LIBRARY_SERVICE_HOST } from "../../constants/endpoints";
|
||||||
import { escapePoundSymbol } from "../../shared/utils/formatting.utils";
|
import { escapePoundSymbol } from "../../shared/utils/formatting.utils";
|
||||||
|
import prettyBytes from "pretty-bytes";
|
||||||
|
|
||||||
const PotentialLibraryMatches = (props): ReactElement => {
|
const PotentialLibraryMatches = (props): ReactElement => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
@@ -20,13 +21,11 @@ const PotentialLibraryMatches = (props): ReactElement => {
|
|||||||
{isArray(comicBooks) ? (
|
{isArray(comicBooks) ? (
|
||||||
map(comicBooks, (match) => {
|
map(comicBooks, (match) => {
|
||||||
const encodedFilePath = encodeURI(
|
const encodedFilePath = encodeURI(
|
||||||
`${IMPORT_SERVICE_HOST}/${match.rawFileDetails.cover.filePath}`,
|
`${LIBRARY_SERVICE_HOST}/${match.rawFileDetails.cover.filePath}`,
|
||||||
);
|
);
|
||||||
const filePath = escapePoundSymbol(encodedFilePath);
|
const filePath = escapePoundSymbol(encodedFilePath);
|
||||||
return (
|
return (
|
||||||
<>
|
<div className="potential-issue-match mb-3">
|
||||||
{/* <pre>{JSON.stringify(match, undefined, 2)}</pre> */}
|
|
||||||
|
|
||||||
<div className="columns">
|
<div className="columns">
|
||||||
<div className="column is-one-fifth">
|
<div className="column is-one-fifth">
|
||||||
<Card
|
<Card
|
||||||
@@ -38,9 +37,9 @@ const PotentialLibraryMatches = (props): ReactElement => {
|
|||||||
|
|
||||||
<div className="search-result-details column">
|
<div className="search-result-details column">
|
||||||
<div className="is-size-5">{match.rawFileDetails.name}</div>
|
<div className="is-size-5">{match.rawFileDetails.name}</div>
|
||||||
<span className="subtitle is-size-7">
|
<pre className="code is-size-7">
|
||||||
{match.rawFileDetails.cover.filePath}
|
{match.rawFileDetails.containedIn}
|
||||||
</span>
|
</pre>
|
||||||
<div className="field is-grouped is-grouped-multiline mt-4">
|
<div className="field is-grouped is-grouped-multiline mt-4">
|
||||||
<div className="control">
|
<div className="control">
|
||||||
<div className="tags has-addons">
|
<div className="tags has-addons">
|
||||||
@@ -54,17 +53,14 @@ const PotentialLibraryMatches = (props): ReactElement => {
|
|||||||
<div className="tags has-addons">
|
<div className="tags has-addons">
|
||||||
<span className="tag">File Size</span>
|
<span className="tag">File Size</span>
|
||||||
<span className="tag is-warning">
|
<span className="tag is-warning">
|
||||||
{match.rawFileDetails.fileSize}
|
{prettyBytes(match.rawFileDetails.fileSize)}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* <div className="is-size-7">
|
|
||||||
{ellipsize(issueDescription, 300)}
|
|
||||||
</div> */}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ const VolumeDetails = (props): ReactElement => {
|
|||||||
<span className="icon has-text-success">
|
<span className="icon has-text-success">
|
||||||
<i className="fa-regular fa-clone"></i>
|
<i className="fa-regular fa-clone"></i>
|
||||||
</span>
|
</span>
|
||||||
<span className="is-primary is-size-7">
|
<span className="tag is-light is-warning is-size-7">
|
||||||
{issue.issue.issue_number}
|
{"#" + issue.issue.issue_number}
|
||||||
</span>
|
</span>
|
||||||
</>
|
</>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -37,17 +37,17 @@ export const API_BASE_URI = hostURIBuilder({
|
|||||||
apiPath: "/api",
|
apiPath: "/api",
|
||||||
});
|
});
|
||||||
|
|
||||||
export const IMPORT_SERVICE_HOST = hostURIBuilder({
|
export const LIBRARY_SERVICE_HOST = hostURIBuilder({
|
||||||
protocol: "http",
|
protocol: "http",
|
||||||
host: process.env.UNDERLYING_HOSTNAME || "localhost",
|
host: process.env.UNDERLYING_HOSTNAME || "localhost",
|
||||||
port: "3000",
|
port: "3000",
|
||||||
apiPath: ``,
|
apiPath: ``,
|
||||||
});
|
});
|
||||||
export const IMPORT_SERVICE_BASE_URI = hostURIBuilder({
|
export const LIBRARY_SERVICE_BASE_URI = hostURIBuilder({
|
||||||
protocol: "http",
|
protocol: "http",
|
||||||
host: process.env.UNDERLYING_HOSTNAME || "localhost",
|
host: process.env.UNDERLYING_HOSTNAME || "localhost",
|
||||||
port: "3000",
|
port: "3000",
|
||||||
apiPath: "/api/import",
|
apiPath: "/api/library",
|
||||||
});
|
});
|
||||||
|
|
||||||
export const SETTINGS_SERVICE_BASE_URI = hostURIBuilder({
|
export const SETTINGS_SERVICE_BASE_URI = hostURIBuilder({
|
||||||
|
|||||||
Reference in New Issue
Block a user