From 51f28b5936682931cd28d44524d9b6e290578ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:18:07 -0500 Subject: [PATCH] feat: copy to clipbioard screenshot --- .../components/Model/components/Options.tsx | 63 +++++++++++++++---- src/app/tools/tankopedia/[id]/layout.tsx | 2 +- 2 files changed, 51 insertions(+), 14 deletions(-) diff --git a/src/app/tools/tankopedia/[id]/components/Model/components/Options.tsx b/src/app/tools/tankopedia/[id]/components/Model/components/Options.tsx index 2f098a7bb..709e665f6 100644 --- a/src/app/tools/tankopedia/[id]/components/Model/components/Options.tsx +++ b/src/app/tools/tankopedia/[id]/components/Model/components/Options.tsx @@ -1,5 +1,7 @@ import { CameraIcon, + CopyIcon, + DownloadIcon, EnterFullScreenIcon, ExitFullScreenIcon, EyeOpenIcon, @@ -303,21 +305,56 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { )} - { - if (!canvas.current) return; + + + + + + - const anchor = document.createElement('a'); + + + + + + + + + + + )[tank.nation] } ${strings.common.tank_class_short[tank.class]}`; - const description = `Statistics, armor, and equipment for ${tank.name} in World of Tanks Blitz | WoTB`; + const description = `Statistics, armor, and equipment for ${tank.name} in World of Tanks Blitz (WoTB)`; return (