Compare commits
2 Commits
ded8811ca9
...
0338495a57
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0338495a57 | ||
|
|
74062f8381 |
@@ -2,7 +2,7 @@
|
|||||||
"$schema": "../gen/schemas/desktop-schema.json",
|
"$schema": "../gen/schemas/desktop-schema.json",
|
||||||
"identifier": "default",
|
"identifier": "default",
|
||||||
"description": "Capability for the main window",
|
"description": "Capability for the main window",
|
||||||
"windows": ["main", "tasks-float", "transcript-viewer"],
|
"windows": ["main", "tasks-float", "transcript-viewer", "transcription-preview"],
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"core:default",
|
"core:default",
|
||||||
"core:window:allow-start-dragging",
|
"core:window:allow-start-dragging",
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"default":{"identifier":"default","description":"Capability for the main window","local":true,"windows":["main","tasks-float","transcript-viewer"],"permissions":["core:default","core:window:allow-start-dragging","core:window:allow-set-always-on-top","core:window:allow-minimize","core:window:allow-toggle-maximize","core:window:allow-is-maximized","core:window:allow-close","core:window:allow-hide","core:window:allow-show","core:window:allow-set-focus","opener:default","dialog:default","global-shortcut:allow-register","global-shortcut:allow-unregister"]}}
|
{"default":{"identifier":"default","description":"Capability for the main window","local":true,"windows":["main","tasks-float","transcript-viewer","transcription-preview"],"permissions":["core:default","core:window:allow-start-dragging","core:window:allow-set-always-on-top","core:window:allow-minimize","core:window:allow-toggle-maximize","core:window:allow-is-maximized","core:window:allow-close","core:window:allow-hide","core:window:allow-show","core:window:allow-set-focus","opener:default","dialog:default","global-shortcut:allow-register","global-shortcut:allow-unregister"]}}
|
||||||
@@ -196,15 +196,19 @@
|
|||||||
async function addBulkVocabTerms() {
|
async function addBulkVocabTerms() {
|
||||||
const raw = bulkVocabText;
|
const raw = bulkVocabText;
|
||||||
// Accept newline-separated OR comma-separated (or mixed) — whichever the
|
// Accept newline-separated OR comma-separated (or mixed) — whichever the
|
||||||
// user pasted. Trim each entry, drop empties, dedupe within the input.
|
// user pasted. Trim each entry, drop empties, and dedupe case-insensitively
|
||||||
const candidates = Array.from(
|
// so "ACME" and "acme" in the same paste collapse to a single term
|
||||||
new Set(
|
// (Whisper prompts don't care about case).
|
||||||
raw
|
const seen = new Set();
|
||||||
.split(/[\n,]+/)
|
const candidates = [];
|
||||||
.map((entry) => entry.trim())
|
for (const entry of raw.split(/[\n,]+/)) {
|
||||||
.filter((entry) => entry.length > 0),
|
const trimmed = entry.trim();
|
||||||
),
|
if (!trimmed) continue;
|
||||||
);
|
const key = trimmed.toLowerCase();
|
||||||
|
if (seen.has(key)) continue;
|
||||||
|
seen.add(key);
|
||||||
|
candidates.push(trimmed);
|
||||||
|
}
|
||||||
if (candidates.length === 0) {
|
if (candidates.length === 0) {
|
||||||
vocabularyError = "Nothing to import — paste one term per line or separated by commas.";
|
vocabularyError = "Nothing to import — paste one term per line or separated by commas.";
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user