summaryrefslogtreecommitdiffstats
path: root/gfx/wr/debugger/src/components/ScreenshotPage.vue
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/wr/debugger/src/components/ScreenshotPage.vue')
-rw-r--r--gfx/wr/debugger/src/components/ScreenshotPage.vue32
1 files changed, 32 insertions, 0 deletions
diff --git a/gfx/wr/debugger/src/components/ScreenshotPage.vue b/gfx/wr/debugger/src/components/ScreenshotPage.vue
new file mode 100644
index 0000000000..8d4017856e
--- /dev/null
+++ b/gfx/wr/debugger/src/components/ScreenshotPage.vue
@@ -0,0 +1,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>