Skip to content

Commit

Permalink
shortcut fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhattin committed Nov 15, 2024
1 parent 0fc1a4b commit a028224
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
12 changes: 10 additions & 2 deletions src/components/pages/main_page/display/bulk/BulkEdit.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,21 @@
type: 'confirm',
title: 'Sure to sync the text to Main Tab ?',
body:
'This will write the shloka contents to the main tab text which can then be verified and saved from there' +
'\nAlso be sure to verify if there was distortion of any sorts, it sometimes adds spaces or new lines on its own. ' +
'This will write the shloka contents to the main tab text which can then be verified and saved from there.' +
'\nAlso be sure to verify for any sorts of distortions, it sometimes adds spaces or new lines on its own (nothing too serious). ' +
'If you are adding to an empty non translated shloka it should be fine.',
response: (r: boolean) => {
if (r) on_confirm();
}
});
};
const detect_shortcut_pressed = (event: KeyboardEvent) => {
event.preventDefault();
if (event.altKey && event.key.toLowerCase() === 'x') {
$edit_language_typer_status = !$edit_language_typer_status;
}
};
</script>

<Accordion>
Expand Down Expand Up @@ -189,6 +196,7 @@
class="textarea mt-2.5 h-[60vh]"
value={$bulk_text_data}
oninput={(e) => ($bulk_text_edit_status = true) && input_func(e)}
onkeyup={detect_shortcut_pressed}
></textarea>

<style lang="postcss">
Expand Down
6 changes: 3 additions & 3 deletions src/tools/trigger/trigger_dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const get_result_from_trigger_dev_handle = async <T extends Object>(handl
auth.configure({
accessToken: handle.publicAccessToken
});
for await (const run of runs.subscribeToRun(handle.id)) {
if (run.status === 'COMPLETED') return run.output! as T;
}
const run = await runs.poll(handle.id);
if (run.status === 'COMPLETED') return run.output! as T;
return undefined;
};

0 comments on commit a028224

Please sign in to comment.