From 64a84a376d41ff7b8e2f247cd8ce879498631ddd Mon Sep 17 00:00:00 2001
From: Erfan Mola <hi@erfanxd.ir>
Date: Tue, 10 Oct 2023 11:36:42 +0330
Subject: [PATCH] Removed Eruda

---
 docs/technologies-used.md |  4 ----
 webApp/package-lock.json  |  6 ------
 webApp/package.json       |  1 -
 webApp/src/App.vue        | 21 ---------------------
 4 files changed, 32 deletions(-)

diff --git a/docs/technologies-used.md b/docs/technologies-used.md
index 87dbb81..1e144ab 100644
--- a/docs/technologies-used.md
+++ b/docs/technologies-used.md
@@ -56,10 +56,6 @@ We use [SparkMD5](https://www.npmjs.com/package/spark-md5) for calculating the M
 
 We use [@twa-dev/sdk](https://github.com/twa-dev/SDK) as a replacement for the legacy `telegram-web-app.js`. Telegram web dudes are a bunch of C++ developers familiar with HTML/CSS, they use JQuery and Bootstrap from the early 80's and they don't provide a modular solution nor a package for their Javascripts, that's why we use this as package a replacement. 
 
-### Eruda
-
-We use [Eruda](https://github.com/liriliri/eruda) console in dev mode as our DevTools alternative in Mobile platforms. I'm an i3wm user who [cannot use webApps on desktop](https://github.com/telegramdesktop/tdesktop/issues/26288), also an iOS user who has [no DevTools in mobile](https://core.telegram.org/bots/webapps#debug-mode-for-mini-apps), that's why I have to use this alternative console. You guys with Android/Windows/MacOS/Linux(supported DE's) will not have this problem.
-
 ## BackEnd
 Initally our aim was to go completely serverless, but [Pusher](#pusher) forced us to authorize our clients at server-side, that's we made a tiny backend for this purpose, **NO DATA IS STORED IN SERVER**.
 
diff --git a/webApp/package-lock.json b/webApp/package-lock.json
index a893bc3..6d854be 100644
--- a/webApp/package-lock.json
+++ b/webApp/package-lock.json
@@ -10,7 +10,6 @@
       "dependencies": {
         "@erfanmola/televue": "^0.1.4",
         "@twa-dev/sdk": "^6.9.0",
-        "eruda": "^3.0.1",
         "lottie-colorify": "^0.8.0",
         "pusher-js": "^8.3.0",
         "spark-md5": "^3.0.2",
@@ -745,11 +744,6 @@
       "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
       "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
     },
-    "node_modules/eruda": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/eruda/-/eruda-3.0.1.tgz",
-      "integrity": "sha512-6q1Xdwga4JTr1mKSW4mzuWSSbmXgqpm/8Wa1QGFGfCWRjC0bCQjbS4u06M1te1moucIS3hBLlbSTPWYH2W0qbQ=="
-    },
     "node_modules/esbuild": {
       "version": "0.18.20",
       "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz",
diff --git a/webApp/package.json b/webApp/package.json
index 22849dd..72f957f 100644
--- a/webApp/package.json
+++ b/webApp/package.json
@@ -11,7 +11,6 @@
   "dependencies": {
     "@erfanmola/televue": "^0.1.4",
     "@twa-dev/sdk": "^6.9.0",
-    "eruda": "^3.0.1",
     "lottie-colorify": "^0.8.0",
     "pusher-js": "^8.3.0",
     "spark-md5": "^3.0.2",
diff --git a/webApp/src/App.vue b/webApp/src/App.vue
index 5ff2dca..6999c00 100644
--- a/webApp/src/App.vue
+++ b/webApp/src/App.vue
@@ -3,9 +3,6 @@
     import { AppearanceProvider, LocaleProvider, AuthProvider } from '@erfanmola/televue';
     import '@erfanmola/televue/style.css';
 
-    // Check if we are in dev mode
-    const devMode = (import.meta.env.MODE === 'development') && true;
-
     // Retrive VITE_HEX_HMAC_SIGNATURE environment variable if available
     const hex_hmac_signature = import.meta.env.VITE_HEX_HMAC_SIGNATURE;
 
@@ -30,24 +27,6 @@
             Your client is not authorized, please use this WebApp from a valid Telegram Client
         </template>
     </component>
-
-    <!-- Include liriliri/eruda developer console if we are in Development Mode -->
-    <teleport to="head" v-if="devMode">
-        <component is="script" v-if="devMode" src="node_modules/eruda/eruda.js"></component>
-        
-        <component is="script" v-if="devMode">
-            let timer = setInterval(() => {
-
-                if (typeof eruda === 'object') {
-
-                    clearInterval(timer);
-                    eruda.init();
-
-                }
-
-            }, 250);
-        </component>
-    </teleport>
 </template>
 
 <style lang="scss">