debug.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <div>
  3. <!-- Top Section // "Sections" Card -->
  4. <v-card max-width="600px" class="rounded-lg">
  5. <v-card-title style="padding-bottom: 0">Debug Information</v-card-title>
  6. <v-card-text style="text-align: left;">
  7. <!-- Gather Browser Information -->
  8. <span><b>Browser Information:</b></span><br>
  9. <span>Browser: {{ device._parsed.name }}</span><br>
  10. <span>Browser Vendor: {{ device._parsed.vendor }}</span><br>
  11. <span>Version: {{ device._parsed.version }}</span><br>
  12. <span>Operating System: {{ device._parsed.os }}</span><br>
  13. <span>Operating System Version: {{ device._parsed.os_version }}</span><br>
  14. <span>Device Type: {{ device._parsed.category }}</span><br><br>
  15. <!-- Gather Extension Information -->
  16. <span><b>Installed Extension Information:</b></span><br>
  17. <span>Extension Version: <span id="extension-version">Waiting For Extension...</span></span><br>
  18. </v-card-text>
  19. <v-card-actions>
  20. <v-spacer />
  21. <v-btn @click="copy()">
  22. <v-icon small style="margin-right: 0.25em;">mdi-content-copy</v-icon>Copy
  23. </v-btn>
  24. </v-card-actions>
  25. </v-card>
  26. </div>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. device: this.$ua,
  33. }
  34. },
  35. methods: {
  36. copy() {
  37. const toCopy = `\`\`\`
  38. Browser Information:
  39. Browser: ${ this.device._parsed.name }
  40. Browser Vendor: ${ this.device._parsed.vendor }
  41. Version: ${ this.device._parsed.version }
  42. Operating System: ${ this.device._parsed.os }
  43. Operating System Version: ${ this.device._parsed.os_version }
  44. Device Type: ${ this.device._parsed.category }
  45. Installed Extension Information:
  46. Extension Version: ${document.getElementById('extension-version').innerHTML}
  47. \`\`\``;
  48. navigator.clipboard.writeText(toCopy);
  49. }
  50. }
  51. }
  52. </script>