summaryrefslogtreecommitdiffstats
path: root/gfx/wr/debugger/src/components/ScreenshotPage.vue
blob: 8d4017856e4a9e87d21ae1355f0fe53a17858885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<template>
    <div class="box">
        <h1 class="title">Screenshot <a :disabled="disabled" v-on:click="fetch" class="button is-info">Refresh</a></h1>
        <hr/>
        <div>
            <ul>
                <img v-if="screenshot.length > 0" style="transform: scaleY(-1); width: 1024px; height:768px" :src="'data:image/png;base64,' + screenshot" />
            </ul>
        </div>
    </div>
</template>

<script>
export default {
    computed: {
        disabled() {
            return !this.$store.state.connected
        },
        screenshot() {
            return this.$store.state.screenshot
        },
    },
    methods: {
        fetch: function() {
            this.$store.dispatch('sendMessage', "fetch_screenshot");
        }
    },
}
</script>

<style>
</style>