Continued work on the send dialog

This commit is contained in:
Philipp Heckel 2022-03-29 15:22:26 -04:00
parent b6426f0417
commit 3e121f5d3c
7 changed files with 212 additions and 98 deletions

View file

@ -43,6 +43,7 @@ import priority2 from "../img/priority-2.svg";
import priority4 from "../img/priority-4.svg";
import priority5 from "../img/priority-5.svg";
import logoOutline from "../img/ntfy-outline.svg";
import Icon from "./Icon";
const Notifications = (props) => {
if (props.mode === "all") {
@ -323,35 +324,6 @@ const Image = (props) => {
);
}
const Icon = (props) => {
const type = props.type;
let imageFile;
if (!type) {
imageFile = fileDocument;
} else if (type.startsWith('image/')) {
imageFile = fileImage;
} else if (type.startsWith('video/')) {
imageFile = fileVideo;
} else if (type.startsWith('audio/')) {
imageFile = fileAudio;
} else if (type === "application/vnd.android.package-archive") {
imageFile = fileApp;
} else {
imageFile = fileDocument;
}
return (
<Box
component="img"
src={imageFile}
loading="lazy"
sx={{
width: '28px',
height: '28px'
}}
/>
);
}
const NoNotifications = (props) => {
const shortUrl = topicShortUrl(props.subscription.baseUrl, props.subscription.topic);
return (