This repository has been archived by the owner on Nov 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement ability to clear transcription and add keyboard shortcut
- Loading branch information
1 parent
eca114c
commit 2fe448c
Showing
4 changed files
with
72 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<template> | ||
<b-modal lazy ref="modal" hide-footer title="Clear transcript?" @shown="autofocusElement()"> | ||
<div class="text-right"> | ||
<b-btn ref="cancelButton" class="mr-2" variant="outline-info" @click="hideModal">Cancel</b-btn> | ||
<b-btn variant="danger" @click="clearTranscript">Clear Transcript</b-btn> | ||
</div> | ||
</b-modal> | ||
</template> | ||
|
||
<script> | ||
import { format } from 'date-fns' | ||
export default { | ||
name: 'save-as-file-modal', | ||
computed: { | ||
transcriptEmpty() { | ||
return !this.$store.state.captioner.transcript.interim | ||
&& !this.$store.state.captioner.transcript.final; | ||
}, | ||
}, | ||
methods: { | ||
showModal () { | ||
this.$refs.modal.show(); | ||
}, | ||
hideModal () { | ||
this.$refs.modal.hide(); | ||
}, | ||
autofocusElement () { | ||
this.$refs.cancelButton.focus(); | ||
}, | ||
clearTranscript () { | ||
this.$store.dispatch('captioner/restart'); | ||
this.$store.commit('captioner/CLEAR_TRANSCRIPT'); | ||
this.$refs.modal.hide(); | ||
}, | ||
}, | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters