Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(transcription): warn about consent beside the keep recordings switch
Elian Doran1645089d486f
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex cb604b3d56..461447078a 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -4638,7 +4638,7 @@"identify_speakers_description": "Tells the other participants apart and labels each of their utterances with its speaker; what you say into your microphone is always yours. Turn it off if it mixes up voices, or to save the processing it takes during a recording. It applies from the next recording.","troubleshooting_title": "Troubleshooting","keep_recordings": "Keep recordings for troubleshooting",- "keep_recordings_description": "Keeps the audio of everyone in the meeting, with the settings used and the transcript as it was produced, so that a problem with a recording can be reported and reproduced. It takes about 230 MB per hour of meeting, is never deleted automatically and is not encrypted, even for protected notes. Recording other participants can require their consent where you or they are.",+ "keep_recordings_description": "Keeps the audio of everyone in the meeting, with the settings used and the transcript as it was produced, so that a problem with a recording can be reported and reproduced. It takes about 230 MB per hour of meeting and is never deleted automatically.","saved_in": "Saved in","enabled": "Meeting transcription","enabled_description": "Adds the Transcribe meeting button to the launch bar, which transcribes what you say into your microphone and what the other participants say through your speakers. Recognition runs entirely on this device, so no audio leaves it.",@@ -4646,7 +4646,8 @@"related_resources_description": "See the speech recognition models downloaded to this device, and delete those you no longer need.","model_standard_description": "Parakeet TDT 0.6B v3 by NVIDIA, quantized so that it runs well on most computers.","model_high_accuracy_description": "Parakeet TDT 0.6B v3 by NVIDIA at full precision. It makes fewer mistakes, but needs about 1.6 GB more memory while recording.",- "model_size": "{{size}} download"+ "model_size": "{{size}} download",+ "keep_recordings_warning": "Before turning this on, ask everyone in the meeting to agree to being recorded. Germany, France and several US states make recording a conversation without everyone's consent a criminal offense, and when people join from different places, the strictest of their laws applies. The audio is stored unencrypted, even for protected notes."},"resources_options": {"list_title": "Resources",diff --git a/apps/client/src/widgets/type_widgets/options/transcription.css b/apps/client/src/widgets/type_widgets/options/transcription.cssindex 3b63a58e34..ea3691efd7 100644--- a/apps/client/src/widgets/type_widgets/options/transcription.css+++ b/apps/client/src/widgets/type_widgets/options/transcription.css@@ -9,3 +9,19 @@.transcription-model-picker .description {white-space: pre-line;}++.transcription-keep-recordings-warning {+ display: flex;+ align-items: flex-start;+ gap: 8px;+ font-size: 0.9em;++ .tn-icon {+ color: var(--dropdown-item-icon-destructive-color);+ font-size: 1.2em;+ }++ p {+ margin: 0;+ }+}diff --git a/apps/client/src/widgets/type_widgets/options/transcription.spec.tsx b/apps/client/src/widgets/type_widgets/options/transcription.spec.tsxindex 29b8f79f02..482787db76 100644--- a/apps/client/src/widgets/type_widgets/options/transcription.spec.tsx+++ b/apps/client/src/widgets/type_widgets/options/transcription.spec.tsx@@ -173,6 +173,16 @@ describe("TranscriptionSettings", () => {expect(mocks.savedBools).toEqual([ [ "transcriptionKeepRecordings", true ] ]);});+ it("warns about consent beside the switch that keeps recordings, before it is turned on", () => {+ open();+ const warning = host.querySelector(".transcription-keep-recordings-warning");+ expect(warning?.querySelector(".admonition")).toBeNull();+ expect(warning?.querySelector(".tn-icon.bx-error")).not.toBeNull();+ expect(warning?.textContent).toBe("transcription_options.keep_recordings_warning");+ // Outside the label, so that pressing the warning does not operate the switch.+ expect(warning?.closest("label")).toBeNull();+ });+it("asks for the recordings folder, which creates it, only while recordings are kept", async () => {open();await act(async () => {});diff --git a/apps/client/src/widgets/type_widgets/options/transcription.tsx b/apps/client/src/widgets/type_widgets/options/transcription.tsxindex 22e9391085..b4db38abb7 100644--- a/apps/client/src/widgets/type_widgets/options/transcription.tsx+++ b/apps/client/src/widgets/type_widgets/options/transcription.tsx@@ -10,11 +10,12 @@ import { t } from "../../../services/i18n";import server from "../../../services/server";import { formatSize, isElectron } from "../../../services/utils";import { Badge } from "../../react/Badge";-import { Card, OptionCardSection } from "../../react/Card";+import { Card, CardSection, OptionCardSection } from "../../react/Card";import { DirectoryLocation } from "../../react/DirectoryLink";import FormDropdownList from "../../react/FormDropdownList";import FormToggle from "../../react/FormToggle";import { useTriliumOption, useTriliumOptionBool } from "../../react/hooks";+import Icon from "../../react/Icon";import NoItems from "../../react/NoItems";import OptionsPageHeader from "./components/OptionsPageHeader";import RelatedSettings from "./components/RelatedSettings";@@ -169,6 +170,13 @@ function TroubleshootingSettings() {className="transcription-keep-recordings"label={t("transcription_options.keep_recordings")}description={t("transcription_options.keep_recordings_description")}+ subSections={+ <CardSection className="transcription-keep-recordings-warning">+ <Icon icon="bx bx-error" />+ <p>{t("transcription_options.keep_recordings_warning")}</p>+ </CardSection>+ }+ subSectionsVisible><FormToggle currentValue={keepRecordings} onChange={setKeepRecordings} /></OptionCardSection>