Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

ExtraInfo.vue 2 KB
Newer Older
1 2 3
<template>
    <div>
        <div class="nav-div nav-item ml-2">
4
            <span v-if="$store.state.document.name" id="part-name">{{ $store.state.document.name }}</span>
5 6 7 8 9 10
            <span id="part-title"
                  v-if="$store.state.parts.loaded"
                  title="Click to go to another Element (Ctrl+Home)."
                  data-toggle="modal"
                  data-target="#gotoModal"
                  role="button">{{ $store.state.parts.title }} - {{ $store.state.parts.filename }} - ({{ imageSize }})</span>
Eva Bardou's avatar
Eva Bardou committed
11
            <span class="loading" v-if="!$store.state.parts.loaded">Loading&#8230;</span>
12
        </div>
Robin Tissot's avatar
Robin Tissot committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

        <div id="gotoModal"
             class="modal ui-draggable show"
             tabindex="-1"
             role="dialog">
          <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content">
              <div class="modal-body">
                Element #
                <input type="number"
                       v-if="$store.state.parts.loaded"
                       min="1"
                       :max="$store.state.document.partsCount"
                       width="100%"
                       v-bind:value="$store.state.parts.order+1"
                       @change.lazy="goTo"/>
                / {{$store.state.document.partsCount}}
              </div>
            </div>
          </div>
        </div>
34 35 36 37 38
    </div>
</template>

<script>
export default {
Robin Tissot's avatar
Robin Tissot committed
39 40 41 42 43 44 45
    async created() {
        document.addEventListener('keyup', async function(event) {
            if (event.ctrlKey && event.keyCode == 36) { // Home
                $('#gotoModal').modal('show');
            }
        });
    },
46 47
    computed: {
        imageSize() {
Eva Bardou's avatar
Eva Bardou committed
48
            return this.$store.state.parts.image.size[0]+'x'+this.$store.state.parts.image.size[1];
49
        },
Robin Tissot's avatar
Robin Tissot committed
50 51 52 53 54 55
    },
    methods: {
        async goTo(ev) {
            await this.$store.dispatch('parts/loadPartByOrder', ev.target.value-1);
            $('#gotoModal').modal('hide');
        }
56 57 58 59 60
    }
}
</script>

<style scoped>
61
</style>