Selaa lähdekoodia

debug information

Front 3 vuotta sitten
vanhempi
sitoutus
72798a62d2
4 muutettua tiedostoa jossa 60 lisäystä ja 3 poistoa
  1. 4 2
      Website/nuxt.config.js
  2. 27 0
      Website/package-lock.json
  3. 1 1
      Website/package.json
  4. 28 0
      Website/pages/debug.vue

+ 4 - 2
Website/nuxt.config.js

@@ -31,12 +31,14 @@ export default {
     apiUrl: "https://returnyoutubedislikeapi.com",
   },
 
+  //server: { host: '0.0.0.0' }, //LINE FOR DEBUGGING ONLY
+
   target: "static",
   css: [],
   plugins: [],
   components: true,
-  buildModules: ["@nuxtjs/vuetify", '@nuxtjs/device'],
-  modules: [],
+  buildModules: ["@nuxtjs/vuetify"],
+  modules: ['nuxt-user-agent'],
 
   // Vuetify module configuration: https://go.nuxtjs.dev/config-vuetify
   vuetify: {

+ 27 - 0
Website/package-lock.json

@@ -10,6 +10,7 @@
       "dependencies": {
         "core-js": "^3.15.1",
         "nuxt": "^2.15.7",
+        "nuxt-user-agent": "^1.2.2",
         "vuetify": "^2.5.5"
       },
       "devDependencies": {
@@ -8930,6 +8931,14 @@
         "nuxt": "bin/nuxt.js"
       }
     },
+    "node_modules/nuxt-user-agent": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/nuxt-user-agent/-/nuxt-user-agent-1.2.2.tgz",
+      "integrity": "sha512-Z9d+r1/PzJAvrr4rX70IWvRyI3qw3RukAGrRZPZ9WeByuCWmVKiW8G1AhdkUOyrDrVoBUC59iLqIVkop/NjSuQ==",
+      "dependencies": {
+        "woothee": "^1.8.1"
+      }
+    },
     "node_modules/object-assign": {
       "version": "4.1.1",
       "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
@@ -14564,6 +14573,11 @@
         "node": ">=8"
       }
     },
+    "node_modules/woothee": {
+      "version": "1.11.1",
+      "resolved": "https://registry.npmjs.org/woothee/-/woothee-1.11.1.tgz",
+      "integrity": "sha512-KdArM3MsNa5tlSBSL29w9ouy9MXZoFPeUdPVnL4QZH3iyV8HsqnwbWw2YLiXEx2wAh0bM55dnl0+qDE6KHBlhQ=="
+    },
     "node_modules/word-wrap": {
       "version": "1.2.3",
       "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
@@ -21537,6 +21551,14 @@
         "@nuxt/webpack": "2.15.8"
       }
     },
+    "nuxt-user-agent": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/nuxt-user-agent/-/nuxt-user-agent-1.2.2.tgz",
+      "integrity": "sha512-Z9d+r1/PzJAvrr4rX70IWvRyI3qw3RukAGrRZPZ9WeByuCWmVKiW8G1AhdkUOyrDrVoBUC59iLqIVkop/NjSuQ==",
+      "requires": {
+        "woothee": "^1.8.1"
+      }
+    },
     "object-assign": {
       "version": "4.1.1",
       "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
@@ -25950,6 +25972,11 @@
         "string-width": "^4.0.0"
       }
     },
+    "woothee": {
+      "version": "1.11.1",
+      "resolved": "https://registry.npmjs.org/woothee/-/woothee-1.11.1.tgz",
+      "integrity": "sha512-KdArM3MsNa5tlSBSL29w9ouy9MXZoFPeUdPVnL4QZH3iyV8HsqnwbWw2YLiXEx2wAh0bM55dnl0+qDE6KHBlhQ=="
+    },
     "word-wrap": {
       "version": "1.2.3",
       "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",

+ 1 - 1
Website/package.json

@@ -12,10 +12,10 @@
   "dependencies": {
     "core-js": "^3.15.1",
     "nuxt": "^2.15.7",
+    "nuxt-user-agent": "^1.2.2",
     "vuetify": "^2.5.5"
   },
   "devDependencies": {
-    "@nuxtjs/device": "^2.1.0",
     "@nuxtjs/vuetify": "^1.12.1",
     "babel-eslint": "^10.1.0",
     "eslint": "^7.32.0",

+ 28 - 0
Website/pages/debug.vue

@@ -0,0 +1,28 @@
+<template>
+  <div>
+    <!--   Top Section // "Sections" Card   -->
+    <v-card max-width="600px" class="rounded-lg">
+      <v-card-title style="padding-bottom: 0">Debug Information</v-card-title>
+      <v-card-text style="text-align: left;">
+        <!--   Dynamically Generate Links From Below   -->
+        <span><b>Browser Information:</b></span><br>
+        <span>Browser: {{ device._parsed.name }}</span><br>
+        <span>Browser Vendor: {{ device._parsed.vendor }}</span><br>
+        <span>Version: {{ device._parsed.version }}</span><br>
+        <span>Operating System: {{ device._parsed.os }}</span><br>
+        <span>Operating System Version: {{ device._parsed.os_version }}</span><br>
+        <span>Device Type: {{ device._parsed.category }}</span><br>
+      </v-card-text>
+    </v-card>
+  </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            device: this.$ua,
+        }
+    }
+}
+</script>