2018-12-30 23:16:09 +01:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<p>Here, you can change keyboard shortcuts or even create your own.</p>
|
|
|
|
|
|
|
|
<div class="flex flex-column">
|
|
|
|
<div class="action-item-category-header">
|
|
|
|
Crop actions
|
|
|
|
</div>
|
|
|
|
<template v-for="(action, index) of settings.active.actions">
|
|
|
|
<ActionAlt v-if="action.cmd.length === 1 && action.cmd[0].action === 'set-ar'"
|
|
|
|
:action="action"
|
|
|
|
@edit="changeShortcut(index)"
|
|
|
|
>
|
|
|
|
</ActionAlt>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="action-item-category-header">
|
|
|
|
Stretch actions
|
|
|
|
</div>
|
|
|
|
<template v-for="(action, index) of settings.active.actions">
|
|
|
|
<ActionAlt v-if="action.cmd.length === 1 && action.cmd[0].action === 'set-stretch'"
|
|
|
|
:action="action"
|
|
|
|
@edit="changeShortcut(index)"
|
|
|
|
>
|
|
|
|
</ActionAlt>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="action-item-category-header">
|
|
|
|
Alignment actions
|
|
|
|
</div>
|
|
|
|
<template v-for="(action, index) of settings.active.actions">
|
|
|
|
<ActionAlt v-if="action.cmd.length === 1 && action.cmd[0].action === 'set-alignment'"
|
|
|
|
:action="action"
|
|
|
|
@edit="changeShortcut(index)"
|
|
|
|
>
|
|
|
|
</ActionAlt>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<div class="action-item-category-header">
|
|
|
|
Zoom / panning actions
|
|
|
|
</div>
|
|
|
|
<template v-for="(action, index) of settings.active.actions">
|
|
|
|
<ActionAlt v-if="action.cmd.length === 1 && (
|
2019-01-03 02:07:16 +01:00
|
|
|
action.cmd[0].action === 'change-zoom' ||
|
2018-12-30 23:16:09 +01:00
|
|
|
action.cmd[0].action === 'set-zoom' ||
|
|
|
|
action.cmd[0].action === 'set-pan' ||
|
|
|
|
action.cmd[0].action === 'pan' ||
|
|
|
|
action.cmd[0].action === 'set-pan'
|
|
|
|
)"
|
|
|
|
:action="action"
|
|
|
|
@edit="changeShortcut(index)"
|
|
|
|
>
|
|
|
|
</ActionAlt>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<div class="action-item-category-header">
|
|
|
|
Other actions
|
|
|
|
</div>
|
|
|
|
<template v-for="(action, index) of settings.active.actions">
|
|
|
|
<ActionAlt v-if="action.cmd.length > 1 || (
|
2019-01-03 02:07:16 +01:00
|
|
|
action.cmd[0].action !== 'change-zoom' &&
|
2018-12-30 23:16:09 +01:00
|
|
|
action.cmd[0].action !== 'set-zoom' &&
|
|
|
|
action.cmd[0].action !== 'set-pan' &&
|
|
|
|
action.cmd[0].action !== 'pan' &&
|
|
|
|
action.cmd[0].action !== 'set-pan' &&
|
|
|
|
action.cmd[0].action !== 'set-alignment' &&
|
|
|
|
action.cmd[0].action !== 'set-stretch' &&
|
|
|
|
action.cmd[0].action !== 'set-ar'
|
|
|
|
)"
|
|
|
|
:action="action"
|
|
|
|
@edit="changeShortcut(index)"
|
|
|
|
>
|
|
|
|
</ActionAlt>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Button from '../../common/components/button';
|
2019-02-19 21:10:49 +01:00
|
|
|
import Stretch from '../../common/enums/stretch.enum';
|
2018-12-30 23:16:09 +01:00
|
|
|
import ActionAlt from '../../common/components/action-alt';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
Button,
|
|
|
|
ActionAlt,
|
|
|
|
},
|
|
|
|
data () {
|
|
|
|
return {
|
2019-02-19 21:10:49 +01:00
|
|
|
Stretch: Stretch,
|
2018-12-30 23:16:09 +01:00
|
|
|
tableVisibility: {
|
|
|
|
crop: true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
created () {
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
settings: Object
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
settings: (newVal, oldVal) => {
|
|
|
|
console.log("this.settings", this.settings, newVal, oldVal)
|
|
|
|
this.settings = newVal;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
changeShortcut(index) {
|
|
|
|
this.$emit('edit-event', index);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import '../../res/css/colors.scss';
|
|
|
|
|
|
|
|
.action-item-category-header {
|
|
|
|
margin-top: 3rem;
|
|
|
|
color: $primary-color;
|
|
|
|
font-size: 2.4rem;
|
|
|
|
font-variant: small-caps;
|
|
|
|
font-weight: 600;
|
|
|
|
}
|
|
|
|
</style>
|