🌄 Fixes to card component, and adding a key to DC++ search result rows

This commit is contained in:
2021-09-04 15:30:58 -07:00
parent cdd27a1272
commit bacde33567
5 changed files with 31 additions and 19 deletions

View File

@@ -71,8 +71,6 @@ export const search = (data: SearchData) => async (dispatch) => {
async (searchInfo) => { async (searchInfo) => {
await sleep(5000); await sleep(5000);
// Check the number of received results (in real use cases we should know that even without calling the API) // Check the number of received results (in real use cases we should know that even without calling the API)
const currentInstance = await SocketService.get( const currentInstance = await SocketService.get(
`search/${instance.id}`, `search/${instance.id}`,
@@ -94,10 +92,6 @@ export const search = (data: SearchData) => async (dispatch) => {
// Finally, perform the actual search // Finally, perform the actual search
await SocketService.post(`search/${instance.id}/hub_search`, data); await SocketService.post(`search/${instance.id}/hub_search`, data);
// removeSearchesSentListener();
// removeSeachResultAddedListener();
// removeSearchResultUpdatedListener();
} catch (error) { } catch (error) {
console.log("ERO", error); console.log("ERO", error);
throw error; throw error;

View File

@@ -42,6 +42,10 @@ $border-color: red;
.generic-card { .generic-card {
max-width: 200px; max-width: 200px;
background-color: #fff;
border-bottom-left-radius: 0.3rem;
border-bottom-right-radius: 0.3rem;
box-shadow: 1px 8px 23px 7px rgba(0, 0, 0, 0.12);
.truncate { .truncate {
width: 100px; width: 100px;
@@ -50,18 +54,27 @@ $border-color: red;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.partial-rounded-card-image { .partial-rounded-card-image {
img { figure {
border-top-left-radius: 0.3rem; display: flex;
border-top-right-radius: 0.3rem; img {
border-bottom-left-radius: 0; border-top-left-radius: 0.3rem;
border-bottom-right-radius: 0; border-top-right-radius: 0.3rem;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
} }
} }
.rounded-card-image { .rounded-card-image {
img { figure {
border-radius: 0.3rem; display: flex;
img {
border-radius: 0.3rem;
}
} }
} }
.card-content {
padding: 1rem;
}
} }
.card-container { .card-container {
display: grid; display: grid;
@@ -188,6 +201,12 @@ $border-color: red;
} }
// comicvine search results // comicvine search results
.slide-pane__content {
padding: 24px 12px;
}
.slide-pane__header {
margin-top: 52px;
}
.search-results-container { .search-results-container {
margin: 15px 0 0 0; margin: 15px 0 0 0;
overflow: hidden; overflow: hidden;

View File

@@ -42,9 +42,7 @@ export const AcquisitionPanel = (
// pattern: "Templier T2.cbr", // pattern: "Templier T2.cbr",
extensions: ["cbz", "cbr"], extensions: ["cbz", "cbr"],
}, },
hub_urls: [ hub_urls: ["comic-scans.no-ip.biz:24674"],
"adcs://novosibirsk.dc-dev.club:7111/?kp=SHA256/4XFHJFFBFEI2RS75FPRPPXPZMMKPXR764ABVVCC2QGJPQ34SDZGA",
],
priority: 5, priority: 5,
}; };
@@ -117,9 +115,9 @@ export const AcquisitionPanel = (
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{map(airDCPPSearchResults, ({ result }) => { {map(airDCPPSearchResults, ({ result }, idx) => {
return ( return (
<tr key={result.id}> <tr key={idx}>
<td> <td>
<p className="mb-2"> <p className="mb-2">
{result.type.id === "directory" ? ( {result.type.id === "directory" ? (

View File

@@ -17,7 +17,7 @@ const renderCard = (props): ReactElement => {
case "vertical": case "vertical":
return ( return (
<div> <div>
<div className="card generic-card"> <div className="generic-card">
<div> <div>
<div <div
className={ className={

View File

@@ -339,6 +339,7 @@ export const ComicDetail = ({}: ComicDetailProps): ReactElement => {
<SlidingPane <SlidingPane
isOpen={visible} isOpen={visible}
onRequestClose={() => setVisible(false)} onRequestClose={() => setVisible(false)}
title={"Comic Vine Search Matches"}
width={"600px"} width={"600px"}
> >
{!isEmpty(comicVineSearchQueryObject) && {!isEmpty(comicVineSearchQueryObject) &&