adding flow to add screenshot

This commit is contained in:
Arjun Patel
2022-01-23 16:59:06 -08:00
parent 6d21da7ece
commit 246f2e3c9c
2 changed files with 17 additions and 2 deletions
+14 -1
View File
@@ -1,5 +1,5 @@
import { BsThreeDots } from "react-icons/bs"; import { BsThreeDots } from "react-icons/bs";
import { FaAngleDown, FaCode, FaPlus } from "react-icons/fa"; import { FaAngleDown, FaCode, FaFileImage, FaPlus } from "react-icons/fa";
import Image from "next/image"; import Image from "next/image";
import { Dropdown, Menu, Radio, Tooltip } from "antd"; import { Dropdown, Menu, Radio, Tooltip } from "antd";
@@ -207,6 +207,19 @@ export default function Links() {
</span> </span>
</Dropdown> </Dropdown>
<Tooltip
title={
"screenshots: paste screenshot into the paste.pics website and bring back the link here and just paste it"
}
>
<button
onClick={() => window.open("https://paste.pics/", "_blank")}
className="bg-gray-300 bg-opacity-25 p-2 rounded hover:bg-opacity-40 ml-2"
>
<FaFileImage className="text-lg text-white" />
</button>
</Tooltip>
<Tooltip <Tooltip
title={ title={
"code blocks: copy the link and paste it in here when you are done" "code blocks: copy the link and paste it in here when you are done"
+3 -1
View File
@@ -54,7 +54,8 @@ export default class Link {
url.includes(".png") || url.includes(".png") ||
url.includes(".jpg") || url.includes(".jpg") ||
url.includes(".svg") || url.includes(".svg") ||
url.includes(".gif") url.includes(".gif") ||
url.includes(LinkType.pastePics)
) { ) {
return LinkType.image; return LinkType.image;
} else if (url.includes(LinkType.pdf)) { } else if (url.includes(LinkType.pdf)) {
@@ -82,4 +83,5 @@ export enum LinkType {
image = "image", image = "image",
pdf = "pdf", pdf = "pdf",
codePile = "codepile", codePile = "codepile",
pastePics = "paste.pics",
} }