- Timestamp:
- 2021-09-20T15:13:08+12:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/main.js
r35430 r35432 3 3 import App from "./App.vue"; 4 4 import ToggleButton from "./components/ToggleButton.vue" 5 import Util from "./js/Util"6 5 7 6 export class TranscriptionViewModel { … … 14 13 constructor(transcription, file) { 15 14 /** @type {String} The UUID of this transcription. */ 16 this.id = Util.generateUuid();15 this.id = file.name + file.size + file.type; // Should be a fairly reliable indicator of uniqueness. 17 16 18 17 /** @type {String} The transcription. */ … … 53 52 } 54 53 54 export class TranscriptionExistsError extends Error { 55 constructor(message = "", ...args) { 56 super(message, ...args); 57 } 58 } 59 55 60 const store = createStore({ 56 61 state() { … … 70 75 */ 71 76 transcriptionAdd(state, transcription) { 77 if (state.rawTranscriptions.has(transcription.id)) { 78 throw new Error("Transcription already exists"); 79 } 72 80 state.rawTranscriptions.set(transcription.id, transcription); 73 81 },
Note:
See TracChangeset
for help on using the changeset viewer.