source: main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/App.vue@ 35549

Last change on this file since 35549 was 35508, checked in by cstephen, 3 years ago

Attempt to make WordTimingSelector reactive to size changes.
Restyle colors

File size: 2.4 KB
Line 
1<template>
2 <div class="app-bar theme-primary">
3 <div class="app-bar-content">
4 <span class="heading1">{{ translations.get("Title") }}</span>
5
6 <a class="btn-primary theme-primary-l1" href="https://koreromaori.io" target="_blank">
7 <span class="material-icons mdi-m">open_in_new</span>
8 <u>koreromaori.io</u>
9 </a>
10
11 <toggle-button class="theme-primary-l1" v-model="showInfo" :reverseState="true">
12 <span class="material-icons mdi-l">info</span>
13 </toggle-button>
14 </div>
15
16 <div v-if="showInfo" class="paper" v-html="translations.get('Description')" />
17 </div>
18
19 <div class="paper content">
20 <AudioUpload />
21 </div>
22
23 <ul id="transcription-list" class="list-view content">
24 <transition-group name="transcription-list">
25 <li class="list-item transcription-list-item" v-for="[id, transcription] in transcriptions" :key="id">
26 <TranscriptionItem :transcription="transcription" />
27 </li>
28 </transition-group>
29 </ul>
30</template>
31
32<style lang="scss">
33#transcription-list {
34 margin-bottom: 1em;
35}
36
37.app-bar {
38 display: flex;
39 flex-direction: column;
40 gap: 1em;
41
42 background-color: var(--bg-color);
43 color: var(--fg-color);
44 box-shadow: 0px 0px 4px 3px #6d6d6d;
45
46 padding: 1em;
47 margin-bottom: 1em;
48}
49
50.app-bar-content {
51 display: flex;
52 align-items: center;
53 gap: 1em;
54
55 width: 100%;
56
57 & :first-child {
58 flex-grow: 1;
59 }
60}
61
62.content {
63 margin: 1em;
64}
65
66.transcription-list-item {
67 transition: all 0.8s ease;
68 margin-bottom: 1em;
69
70 &:last-child {
71 margin-bottom: 0;
72 }
73}
74
75.transcription-list-leave-to {
76 opacity: 0;
77}
78
79.transcription-list-leave-active {
80 position: absolute;
81}
82</style>
83
84<script>
85import { mapState } from "vuex";
86import AudioUpload from "./components/AudioUpload.vue"
87import ToggleButton from "./components/ToggleButton.vue";
88import TranscriptionItem from "./components/TranscriptionItem.vue"
89
90export default {
91 name: "App",
92 components: {
93 AudioUpload,
94 TranscriptionItem,
95 ToggleButton
96 },
97 data() {
98 return {
99 showInfo: false
100 }
101 },
102 computed: mapState({
103 translations: state => state.translations,
104 transcriptions: state => state.rawTranscriptions
105 })
106}
107</script>
Note: See TracBrowser for help on using the repository browser.