diff --git a/CHANGELOG.md b/CHANGELOG.md index 7182976f..02c288dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## [8.0.1] - 2022-07-13 + +### 🐞 Fixes + +- Fix `PSD` media card icon image +- Fix missing clipboard icon for the media card action +- Fix in tags rendering on content cards + ## [8.0.0] - 2022-07-11 - [Release notes](https://beta.frontmatter.codes/updates/v8.0.0) ### ✨ New Features diff --git a/package-lock.json b/package-lock.json index a7838275..f716d25e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vscode-front-matter-beta", - "version": "8.0.0", + "version": "8.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "vscode-front-matter-beta", - "version": "8.0.0", + "version": "8.0.1", "license": "MIT", "dependencies": { "node-fetch": "^2.6.7" diff --git a/package.json b/package.json index d5eb730c..b71f0c93 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Front Matter", "description": "Front Matter is a CMS that runs within Visual Studio Code. It gives you the power and control of a full-blown CMS while also providing you the flexibility and speed of the static site generator of your choice like: Hugo, Jekyll, Hexo, NextJs, Gatsby, and many more...", "icon": "assets/frontmatter-teal-128x128.png", - "version": "8.0.0", + "version": "8.0.1", "preview": false, "publisher": "eliostruyf", "galleryBanner": { diff --git a/src/dashboardWebView/components/Contents/Item.tsx b/src/dashboardWebView/components/Contents/Item.tsx index 6fa68cd0..0991241d 100644 --- a/src/dashboardWebView/components/Contents/Item.tsx +++ b/src/dashboardWebView/components/Contents/Item.tsx @@ -30,20 +30,23 @@ export const Item: React.FunctionComponent = ({ fmFilePath, date, ti } const tagField = settings.dashboardState.contents.tags; + let tagsValue = []; if (tagField === "tags") { - return pageData.fmTags; + tagsValue = pageData.fmTags; } else if (tagField === "categories") { - return pageData.fmCategories; + tagsValue = pageData.fmCategories; + } else { + tagsValue = pageData[tagField] || []; } - const tagsValue = pageData[tagField] || []; - - if (Array.isArray(tagsValue)) { + if (typeof tagsValue === "string") { + return [tagsValue]; + } else if (Array.isArray(tagsValue)) { return tagsValue; } - return [tagsValue]; + return []; }, [settings, pageData]); if (view === DashboardViewType.Grid) { @@ -119,4 +122,4 @@ export const Item: React.FunctionComponent = ({ fmFilePath, date, ti } return null; -}; +}; \ No newline at end of file diff --git a/src/dashboardWebView/components/Media/Item.tsx b/src/dashboardWebView/components/Media/Item.tsx index 66d4eeb1..7b5cbbe8 100644 --- a/src/dashboardWebView/components/Media/Item.tsx +++ b/src/dashboardWebView/components/Media/Item.tsx @@ -248,7 +248,7 @@ export const Item: React.FunctionComponent = ({media}: React.PropsWi }, [media]); const isImageFile = useMemo(() => { - if (media.mimeType?.startsWith("image/")) { + if (media.mimeType?.startsWith("image/") && !media.mimeType?.startsWith("image/vnd.adobe.photoshop")) { return true; } return false; @@ -258,12 +258,13 @@ export const Item: React.FunctionComponent = ({media}: React.PropsWi const path = media.fsPath; const extension = path.split('.').pop(); + let icon = ; + console.log(media); + if (isImageFile) { return ; } - let icon = ; - if (isVideoFile) { icon = ; } @@ -384,7 +385,11 @@ export const Item: React.FunctionComponent = ({media}: React.PropsWi Edit metadata} + title={( +
+ Edit metadata +
+ )} onClick={updateMetadata} /> @@ -409,7 +414,11 @@ export const Item: React.FunctionComponent = ({media}: React.PropsWi ) : ( <> + Copy media path + + )} onClick={copyToClipboard} /> { customScriptActions() } diff --git a/src/dashboardWebView/components/Media/Media.tsx b/src/dashboardWebView/components/Media/Media.tsx index 0e1cb602..141fa1ac 100644 --- a/src/dashboardWebView/components/Media/Media.tsx +++ b/src/dashboardWebView/components/Media/Media.tsx @@ -139,9 +139,9 @@ export const Media: React.FunctionComponent = (props: React.PropsWi } { - contentFolders && contentFolders.length > 0 && contentFolders.map(group => ( + contentFolders && contentFolders.length > 0 && contentFolders.map((group, idx) => ( group.folders && group.folders.length > 0 && ( -
+

Content folder: {group.title}