|
@@ -83,6 +83,13 @@
|
|
|
@click.stop="$emit('extremeClicking', false)">
|
|
|
<img alt="label" src="@/assets/icons/check.svg">
|
|
|
</button-input>
|
|
|
+
|
|
|
+ <div class="current">
|
|
|
+ <text-input v-if="displayedCurrent"
|
|
|
+ v-model="displayedCurrent"
|
|
|
+ @change="currentChange"/>
|
|
|
+ / {{ data.length }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
@@ -90,15 +97,28 @@
|
|
|
<script>
|
|
|
import ButtonInput from "@/components/base/button-input";
|
|
|
import ButtonRow from "@/components/base/button-row";
|
|
|
+import TextInput from "@/components/base/text-input";
|
|
|
|
|
|
export default {
|
|
|
name: "media-control",
|
|
|
- components: {ButtonRow, ButtonInput},
|
|
|
- props: ['hasPrevious', 'hasNext', 'control', 'data', 'project', 'socket', 'filter', 'extremeClicking'],
|
|
|
+ components: {TextInput, ButtonRow, ButtonInput},
|
|
|
+ props: ['hasPrevious', 'hasNext', 'control', 'data', 'project', 'socket', 'filter', 'extremeClicking', 'current'],
|
|
|
data: function () {
|
|
|
return {
|
|
|
showLabelSelection: false,
|
|
|
- showFilterSelection: false
|
|
|
+ showFilterSelection: false,
|
|
|
+ displayedCurrent: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ current: {
|
|
|
+ immediate: true,
|
|
|
+ handler: function (newVal) {
|
|
|
+ if (this.project.unmanaged)
|
|
|
+ this.displayedCurrent = newVal + 1;
|
|
|
+ else
|
|
|
+ this.displayedCurrent = false;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -149,6 +169,14 @@ export default {
|
|
|
});
|
|
|
|
|
|
this.$emit('update', true);
|
|
|
+ },
|
|
|
+ currentChange: function (value) {
|
|
|
+ if (value < 1)
|
|
|
+ this.displayedCurrent = 1;
|
|
|
+ if (value > this.data.length)
|
|
|
+ this.displayedCurrent = this.data.length;
|
|
|
+
|
|
|
+ this.$emit('jump', this.displayedCurrent - 1);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -181,4 +209,13 @@ select {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
+
|
|
|
+.current {
|
|
|
+ display: flex;
|
|
|
+ color: whitesmoke;
|
|
|
+}
|
|
|
+
|
|
|
+.current > .text-input {
|
|
|
+ width: 2.5rem;
|
|
|
+}
|
|
|
</style>
|