@social-mail/social-mail-client 1.2.32 → 1.2.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-client",
3
- "version": "1.2.32",
3
+ "version": "1.2.33",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -5,6 +5,7 @@ import { formatNumber, toFileSize } from "../../NumberFormats";
5
5
  import FileTypes from "../../../services/FileTypes";
6
6
  import AppCommands from "../../../web/commands/AppCommands";
7
7
  import Command from "@web-atoms/core/dist/core/Command";
8
+ import audioIcon from "@social-mail/social-mail-client/content/icons/audio.svg";
8
9
 
9
10
  styled.css `
10
11
  border: solid 2px lightgray;
@@ -62,9 +63,13 @@ export default function FilePreview(a: IAppFile) {
62
63
  const size = a.fileSize && toFileSize(a.fileSize);
63
64
 
64
65
  const { appFileID, name, fileContentID } = a;
65
- const src = `/api/files/webp(300)/${appFileID}/${fileContentID}/${name}/${name}.300.webp`;
66
+ let src = `/api/files/webp(300)/${appFileID}/${fileContentID}/${name}/${name}.300.webp`;
66
67
  const p = { appFileID, name, fileContentID };
67
68
 
69
+ if (/^audio\//i.test(a.contentType)) {
70
+ src = audioIcon;
71
+ }
72
+
68
73
  const command = AppCommands.getPreviewCommand(a);
69
74
  if (command) {
70
75
  return <a