Skip to content

Commit 13386c1

Browse files
committed
Show notice when album not preserved.
1 parent 26f3d03 commit 13386c1

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

frontend/src/components/AlbumGrid.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
background-position: center;
2020
}
2121

22+
.album-art-container .nodl {
23+
position: absolute;
24+
bottom: 0;
25+
right: 0;
26+
}
27+
2228
.album-art {
2329
position: absolute;
2430
top: 0;

frontend/src/components/AlbumGrid.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { IonCol, IonGrid, IonRow, IonText } from "@ionic/react"
1+
import { IonCol, IonGrid, IonIcon, IonRow, IonText } from "@ionic/react"
22
import { IReleases } from "../api"
33
import { splitRecordsByArtist, splitRecordsByLabel, splitRecordsByYear } from "../utils"
4+
import { cloudOfflineOutline } from "ionicons/icons"
45
import "./AlbumGrid.css"
56

67
interface AlbumProps {
@@ -14,6 +15,7 @@ const AlbumGridEntry: React.FC<AlbumProps> = ({ album, index, staticImage = unde
1415
<IonCol size="6" sizeMd="4" sizeLg="3" key={index}>
1516
<div className="album-art-container" onClick={() => onClickAlbum(album)}>
1617
<img src={staticImage ? staticImage : album.basic_information.thumb} className="album-art" alt="" />
18+
{!staticImage && <IonIcon className="nodl" aria-hidden="true" icon={cloudOfflineOutline} size="large" />}
1719
</div>
1820
<strong style={{ margin: 0 }}>{album.basic_information.title}</strong>
1921
<br />

frontend/src/modal/ViewAlbumDetails.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import {
99
IonItem,
1010
IonLabel,
1111
IonList,
12+
IonIcon,
13+
IonPopover,
1214
} from "@ionic/react"
15+
import { cloudOfflineOutline } from "ionicons/icons"
1316
import { IReleases } from "../api"
1417

1518
interface DisplayProps {
@@ -25,6 +28,18 @@ const ViewAlbumDetails: React.FC<DisplayProps> = ({ album, open, onClose }) => (
2528
<IonButtons slot="start">
2629
<IonButton onClick={() => onClose()}>Close</IonButton>
2730
</IonButtons>
31+
{!album.image_base64 && (
32+
<IonButtons slot="end">
33+
<IonButton id="not-downloaded-notice" color="dark">
34+
<IonIcon slot="icon-only" icon={cloudOfflineOutline}></IonIcon>
35+
</IonButton>
36+
<IonPopover trigger="not-downloaded-notice" triggerAction="click">
37+
<IonContent class="ion-padding">
38+
Image and additional details are still being collected, please reload a few hours later.
39+
</IonContent>
40+
</IonPopover>
41+
</IonButtons>
42+
)}
2843
<IonTitle>{album.basic_information.title}</IonTitle>
2944
</IonToolbar>
3045
</IonHeader>

0 commit comments

Comments
 (0)