Ignore:
Timestamp:
2021-11-08T15:51:51+13:00 (2 years ago)
Author:
cstephen
Message:

Add support for file macronisation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-interfaces-dev/atea/macron-restoration/src/main.js

    r35714 r35723  
    11import { createApp } from "vue";
    22import { createStore } from "vuex"
    3 // import AudioPlayback from "./js/AudioPlaybackModule";
     3import Util from "./js/Util"
    44import App from "./App.vue";
    55import ToggleButton from "./components/ToggleButton.vue"
    6 
    7 // export class TranscriptionExistsError extends Error {
    8 //     constructor(message = "", ...args) {
    9 //         super(message, ...args);
    10 //     }
    11 // }
    126
    137const store = createStore({
     
    159        return {
    1610            /** @type {Map<String, String>} */
    17             translations: new Map()
     11            translations: new Map(),
     12            macronisedFileInfos: [],
     13            directInput: null,
     14            directOutput: []
    1815        }
    1916    },
     
    2118        setTranslations(state, translations) {
    2219            state.translations = translations;
     20        },
     21        pushFileInfo(state, fileInfo) {
     22            state.macronisedFileInfos.push({
     23                id: Util.generateUuid(),
     24                ...fileInfo
     25            });
     26        },
     27        setDirectInput(state, input) {
     28            state.directInput = input;
     29        },
     30        setDirectOutput(state, output) {
     31            state.directOutput = output;
    2332        }
    2433    }
    25     // getters: {
    26     //     hasTranscriptionOfFile: (state) => (file) => {
    27     //         const id = TranscriptionViewModel.getId(file);
    28     //         return state.rawTranscriptions.has(id);
    29     //     },
    30     // }
    3134});
    3235
Note: See TracChangeset for help on using the changeset viewer.