From 0d714847f3f6f0c9e73cc31ab0f533eb2789bf58 Mon Sep 17 00:00:00 2001 From: Abdulrehman-Jafer <121712508+Abdulrehman-Jafer@users.noreply.github.com> Date: Sat, 18 Mar 2023 12:25:20 +0500 Subject: [PATCH] web: copy version on clicking the version item in settings (#2131) Signed-off-by: Abdulrehman-Jafer Co-authored-by: Abdullah Atta --- apps/web/src/views/settings.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/web/src/views/settings.js b/apps/web/src/views/settings.js index ed6dcfc5e..2c15a449e 100644 --- a/apps/web/src/views/settings.js +++ b/apps/web/src/views/settings.js @@ -78,6 +78,7 @@ import usePrivacyMode from "../hooks/use-privacy-mode"; import { useTelemetry } from "../hooks/use-telemetry"; import useSpellChecker from "../hooks/use-spell-checker"; import useDesktopIntegration from "../hooks/use-desktop-integration"; +import { writeText } from "clipboard-polyfill"; function subscriptionStatusToString(user) { const status = user?.subscription?.type; @@ -134,6 +135,14 @@ const otherItems = [ title: "Roadmap", description: "See what the future of Notesnook is going to be like!", link: "https://notesnook.com/roadmap" + }, + { + title: "About", + description: `version ${appVersion.formatted}`, + onClick: async () => { + await writeText(`version ${appVersion.formatted}`); + showToast("info", "Copied to clipboard!"); + } } ]; @@ -1033,11 +1042,6 @@ function Settings() { ))} - )} {isLoggedIn && (