Skip to content

Commit

Permalink
Support webp
Browse files Browse the repository at this point in the history
Update packages
Support WEBP file format in media component
Update featured NFTs config
  • Loading branch information
grctest committed Jul 28, 2023
1 parent 39a92f2 commit 0f98074
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"buffer": "^6.0.3",
"embla-carousel-react": "^7.1.0",
"events": "^3.3.0",
"i18next": "^23.2.11",
"i18next": "^23.3.0",
"process": "^0.11.10",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -82,10 +82,10 @@
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
"concurrently": "^8.2.0",
"cross-env": "^7.0.3",
"electron": "^25.3.1",
"electron": "^25.3.2",
"electron-builder": "^24.6.3",
"electronmon": "^2.0.2",
"esbuild": "^0.18.16",
"esbuild": "^0.18.17",
"vite-plugin-electron": "^0.12.0",
"wait-on": "^7.0.1"
},
Expand Down
38 changes: 20 additions & 18 deletions src/components/NFT/Media.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
Modal,
Badge,
Button,
Container,
Card,
Center
} from '@mantine/core';
Expand All @@ -26,9 +25,15 @@ import {
BsQuestion,
} from "react-icons/bs";

import { appStore, tempStore, localePreferenceStore } from '../../lib/states';
import {
HiOutlineClipboardCheck,
HiOutlineClipboardCopy,
HiSearch
} from "react-icons/hi";

import { tempStore, localePreferenceStore } from '../../lib/states';

let imageTypes = ["PNG", "JPEG", "GIF", "TIFF", "BMP"];
let imageTypes = ["PNG", "JPEG", "GIF", "TIFF", "BMP", "WEBP"];
let audioTypes = ["MP3", "MP4", "M4A", "OGG", "FLAC", "WAV", "WMA", "AAC"];
let documentTypes = ["PDF", "DOCX", "ODT", "XLSX", "ODS", "PPTX", "TXT"]
let videoTypes = ["WEBM", "MOV", "QT", "AVI", "WMV", "MPEG"];
Expand Down Expand Up @@ -113,34 +118,31 @@ export default function Media(properties) {
compact
variant="outline"
color={copied ? 'teal' : 'blue'}
style={{marginTop: '5px'}}
onClick={copy}
>
{
copied
? t('nft:nft.json.copied')
: t('nft:nft.json.copy')
? <HiOutlineClipboardCheck />
: <HiOutlineClipboardCopy />
}
</Button>
<Button
variant='outline'
compact
style={{marginTop: '5px'}}
onClick={() => {
setZoomIndex(i);
open();
}}
>
{t("nft:nft.image.zoom")}
</Button>
</>
)}
</CopyButton>
<Button
variant='outline'
compact
onClick={() => {
setZoomIndex(i);
open();
}}
>
<HiSearch />
</Button>
<Badge
variant="light"
leftSection={icon}
size="lg"
style={{marginTop: '5px'}}
>
{image.type}
</Badge>
Expand Down
1 change: 1 addition & 0 deletions src/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
}
],
"featured": [
{"name": "NFTEA.ORBS", "id": "1.3.6542", "issuer": "NFTEA"},
{"name": "NFTEA.POWER", "id": "1.3.6541", "issuer": "NFTEA"},
{"name": "NFTEA.ISOMETRIC", "id": "1.3.6538", "issuer": "NFTEA"},
{"name": "NFTEA.METROPOLIS", "id": "1.3.6537", "issuer": "NFTEA"},
Expand Down

0 comments on commit 0f98074

Please sign in to comment.