Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style(icon for addon): custom icon added
- Loading branch information
1 parent
790059e
commit 10b7d2b
Showing
11 changed files
with
75 additions
and
33 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { useRef } from "react"; | ||
import { PropsGallery } from "./types"; | ||
import ImageDetected from "../../molescules/ImageDetected"; | ||
import ui from "./styles.module.scss"; | ||
|
||
export default function Gallery({ items = [] }: PropsGallery) { | ||
const key = useRef(`${window.crypto.randomUUID()}`); | ||
|
||
if (items.length <= 0) | ||
return ( | ||
<div className="p-5"> | ||
<p>1. Scroll throught your chat</p> | ||
<p>2. Once you find media, re-open this popup</p> | ||
|
||
<hr /> | ||
|
||
<p>Thanks for the comprehesion 😁</p> | ||
<p>The extension must work like this for performance issues</p> | ||
<small className="font-weight-bold"> | ||
<b>Blame Telegram for anti-download media feature 😡</b> | ||
</small> | ||
</div> | ||
); | ||
|
||
return ( | ||
<div className={ui.gallery}> | ||
{items.map((image, i) => ( | ||
<ImageDetected | ||
key={`${key.current}-${i}`} | ||
blobSrc={image.blob} | ||
sentAt={1} | ||
height={image.height} | ||
width={image.width} | ||
/> | ||
))} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.gallery { | ||
display: grid; | ||
grid-template-columns: repeat(3, 25%); | ||
justify-content: space-around; | ||
gap: 10px; | ||
padding: 10px 0; | ||
background-color: transparent; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { CrawledImageDom } from "../../typesContentScript"; | ||
|
||
export interface PropsGallery { | ||
items: CrawledImageDom[]; | ||
} |