aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/util/DictationManager.ts4
-rw-r--r--src/client/views/nodes/DocumentView.tsx8
2 files changed, 10 insertions, 2 deletions
diff --git a/src/client/util/DictationManager.ts b/src/client/util/DictationManager.ts
index 3668ca0d2..9c61fe125 100644
--- a/src/client/util/DictationManager.ts
+++ b/src/client/util/DictationManager.ts
@@ -11,7 +11,7 @@ import { listSpec } from "../../new_fields/Schema";
import { AudioField, ImageField } from "../../new_fields/URLField";
import { HistogramField } from "../northstar/dash-fields/HistogramField";
import { MainView } from "../views/MainView";
-import { Clipboard } from "ts-clipboard";
+import { Utils } from "../../Utils";
/**
* This namespace provides a singleton instance of a manager that
@@ -79,7 +79,7 @@ export namespace DictationManager {
try {
results = await listenImpl(options);
if (results) {
- Clipboard.copy(results);
+ Utils.CopyText(results);
main.isListening = false;
let execute = options && options.tryExecute;
main.dictatedPhrase = execute ? results.toLowerCase() : results;
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 57e66ff1b..e5b0b0b52 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -602,6 +602,14 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
if (!ClientUtils.RELEASE) {
let copies: ContextMenuProps[] = [];
copies.push({ description: "Copy URL", event: () => Utils.CopyText(Utils.prepend("/doc/" + this.props.Document[Id])), icon: "link" });
+ copies.push({
+ description: "Copy Context", event: () => {
+ let parent = this.props.ContainingCollectionView;
+ if (parent) {
+ Utils.CopyText(Utils.prepend("/doc/" + parent.props.Document[Id]));
+ }
+ }, icon: "link"
+ });
copies.push({ description: "Copy ID", event: () => Utils.CopyText(this.props.Document[Id]), icon: "fingerprint" });
cm.addItem({ description: "Copy...", subitems: copies, icon: "copy" });
}