Skip to content

Commit bdb293d

Browse files
committed
Add opacity shortcut for video annotation
1 parent 6c0a3aa commit bdb293d

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

resources/assets/js/videos/components/settingsTab.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script>
22
import PowerToggle from '../../core/components/powerToggle';
33
import Settings from '../stores/settings';
4+
import Keyboard from '../../core/keyboard';
45
56
export default {
67
components: {
@@ -87,6 +88,13 @@ export default {
8788
handleUnmuteVideo() {
8889
this.muteVideo = false;
8990
},
91+
toggleAnnotationOpacity() {
92+
if (this.annotationOpacity > 0) {
93+
this.annotationOpacity = 0;
94+
} else {
95+
this.annotationOpacity = 1;
96+
}
97+
},
9098
},
9199
watch: {
92100
annotationOpacity(value) {
@@ -145,6 +153,8 @@ export default {
145153
this.restoreKeys.forEach((key) => {
146154
this[key] = Settings.get(key);
147155
});
156+
157+
Keyboard.on('o', this.toggleAnnotationOpacity);
148158
},
149159
};
150160
</script>

resources/assets/js/videos/videoContainer.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ export default {
175175
},
176176
reachedTrackedAnnotationLimit() {
177177
return this.disableJobTracking;
178+
},
179+
annotationsAreHidden() {
180+
return this.settings.annotationOpacity === 0;
178181
}
179182
},
180183
methods: {

resources/views/videos/show/sidebar-settings.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<sidebar-tab name="settings" icon="cog" title="Settings">
1+
<sidebar-tab name="settings" icon="cog" title="Settings" :highlight="annotationsAreHidden">
22
<settings-tab inline-template
33
v-on:update="handleUpdatedSettings"
44
:supports-jump-by-frame="supportsJumpByFrame"

0 commit comments

Comments
 (0)