Changeset 35430
- Timestamp:
- 2021-09-20T11:27:26+12:00 (3 years ago)
- Location:
- main/trunk/model-interfaces-dev/atea/korero-maori-asr/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/App.vue
r35429 r35430 82 82 this.player.currentTime = playbackTime; 83 83 await this.player.play(); 84 85 this.playbackState.length = this.player.duration; 84 86 }//, 85 87 // shouldPlayAudio(newValue) { -
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/components/AudioTimeBar.vue
r35426 r35430 1 1 <template> 2 2 <div class="root"> 3 <input type="range" class="slider-continuous" v-model.number="sliderValue" :max="audioLength" step="0.01" />3 <input type="range" class="slider-continuous" v-model.number="sliderValue" :max="audioLength" step="0.01" :disabled="isDisabled" /> 4 4 <span>{{ stringSliderValue }}</span> 5 5 </div> … … 21 21 props: { 22 22 modelValue: Number, 23 audioLength: Number 23 audioLength: Number, 24 isDisabled: Boolean 24 25 }, 25 26 emits: [ "update:modelValue" ], 26 data() {27 return {28 myValue: 029 }30 },31 27 computed: { 32 28 sliderValue: { 33 29 get() { 34 if (this.modelValue < 0 ) {30 if (this.modelValue < 0 || this.isDisabled) { 35 31 return 0; 36 32 } … … 43 39 }, 44 40 set(newValue) { 45 // this.myValue = newValue;46 41 this.$emit("update:modelValue", newValue); 47 42 } -
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/components/TranscriptionItemEditor.vue
r35426 r35430 2 2 <div> 3 3 <div class="editor-controls"> 4 <audio-time-bar v-model.number="currentPlaybackTime" :audio-length=" 2" />4 <audio-time-bar v-model.number="currentPlaybackTime" :audio-length="playbackState.length" :isDisabled="playbackState.id != transcription.id" /> 5 5 6 6 <toggle-button v-model="enableEditing"> -
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/main.js
r35426 r35430 35 35 * @param {String} id The ID of the transcription for which audio is being played. 36 36 * @param {Boolean} isPlaying A value indicating if audio is currently being played. 37 * @param {Numbe} currentTime The current time in the audio playback. 37 * @param {Number} currentTime The current time in the audio playback. 38 * @param {Number} length The length of the audio track. 38 39 */ 39 constructor(id = "", isPlaying = false, currentTime = 0 ) {40 constructor(id = "", isPlaying = false, currentTime = 0, length = 0) { 40 41 /** @type {String} The ID of the transcription for which audio is currently being played. */ 41 42 this.id = id; … … 46 47 /** @type {Number} Gets the current time in the playback. */ 47 48 this.currentTime = currentTime; 49 50 /** @type {Number} Gets the length of the current audio track. */ 51 this.length = length; 48 52 } 49 53 } -
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/styles/_material.scss
r35429 r35430 258 258 cursor: pointer; 259 259 260 background : var(--primary-bg-color);260 background-color: var(--primary-bg-color); 261 261 box-shadow: var(--primary-box-shadow-thin); 262 262 263 263 &:hover { 264 264 filter: brightness(var(--hover-brightness)); 265 } 265 } 266 } 267 268 @mixin disabled-slider-thumb { 269 cursor: default; 270 271 &:hover { 272 filter: none; 273 } 266 274 } 267 275 … … 273 281 height: 8px; 274 282 border-radius: 4px; 275 background : scale-color($primary-bg-color-l1, $alpha: -70%);283 background-color: scale-color($primary-bg-color-l1, $alpha: -70%); 276 284 277 285 transition-duration: var(--transition-duration); … … 290 298 291 299 &:hover { 292 background: scale-color($primary-bg-color-l1, $alpha: -60%); 300 background-color: scale-color($primary-bg-color-l1, $alpha: -60%); 301 } 302 } 303 304 .slider-continuous:disabled { 305 filter: grayscale(100%); 306 307 &::-webkit-slider-thumb { 308 @include disabled-slider-thumb(); 309 } 310 311 &::-moz-range-thumb { 312 @include disabled-slider-thumb(); 313 } 314 315 &::-ms-thumb { 316 @include disabled-slider-thumb(); 317 } 318 319 &:hover { 320 background-color: scale-color($primary-bg-color-l1, $alpha: -70%); 293 321 } 294 322 }
Note:
See TracChangeset
for help on using the changeset viewer.