Skip to content

Commit

Permalink
FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
Dartvauder committed Nov 14, 2024
1 parent 5e1927f commit 9c2effc
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ python -m venv venv
call venv\Scripts\activate
python -m pip install --upgrade pip setuptools
pip install wheel
pip install -r TechicalFiles/requirements.txt
pip install -r TechnicalFiles/requirements.txt
timeout /t 2 /nobreak >nul
cls

Expand Down
2 changes: 1 addition & 1 deletion Install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip setuptools
pip install wheel
pip install -r TechicalFiles/requirements.txt
pip install -r TechnicalFiles/requirements.txt
sleep 2
clear

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions TechicalFiles/ui.py → TechnicalFiles/ui.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import tkinter as tk
from tkinter import messagebox, simpledialog, filedialog, ttk
from TechicalFiles.ngrok_manager import NgrokManager
from TechnicalFiles.ngrok_manager import NgrokManager
import json
import webbrowser
from configparser import ConfigParser
import subprocess

with open("TechicalFiles/translations.json", "r", encoding="utf-8") as f:
with open("TechnicalFiles/translations.json", "r", encoding="utf-8") as f:
translations = json.load(f)

manager = None
Expand All @@ -18,7 +18,7 @@ def __init__(self, root):
self.root.title("NgrokManager")

self.config = ConfigParser()
self.config.read('TechicalFiles/config.ini')
self.config.read('TechnicalFiles/config.ini')

self.language = self.config.get('general', 'language', fallback='en')
self.theme = self.config.get('general', 'theme', fallback='dark')
Expand Down Expand Up @@ -141,19 +141,19 @@ def open_web_inspection(self):
def change_region(self, event=None):
self.region = self.region_var.get()
self.config.set('general', 'region', self.region)
with open('TechicalFiles/config.ini', 'w') as configfile:
with open('TechnicalFiles/config.ini', 'w') as configfile:
self.config.write(configfile)

def create_tunnel(self):
token = self.token_entry.get()
region = self.region_var.get()

self.config.set('general', 'ngrok_token', token)
with open('TechicalFiles/config.ini', 'w') as configfile:
with open('TechnicalFiles/config.ini', 'w') as configfile:
self.config.write(configfile)

self.config.set('general', 'region', region)
with open('TechicalFiles/config.ini', 'w') as configfile:
with open('TechnicalFiles/config.ini', 'w') as configfile:
self.config.write(configfile)

global manager
Expand Down Expand Up @@ -214,7 +214,7 @@ def open_tunnel_url(self, event):
def change_language(self, event=None):
self.language = self.language_var.get()
self.config.set('general', 'language', self.language)
with open('TechicalFiles/config.ini', 'w') as configfile:
with open('TechnicalFiles/config.ini', 'w') as configfile:
self.config.write(configfile)

self.t = translations.get(self.language, translations["en"])
Expand All @@ -223,7 +223,7 @@ def change_language(self, event=None):
def change_theme(self, event=None):
self.theme = self.theme_var.get()
self.config.set('general', 'theme', self.theme)
with open('TechicalFiles/config.ini', 'w') as configfile:
with open('TechnicalFiles/config.ini', 'w') as configfile:
self.config.write(configfile)

bg_color = "#2e2e2e" if self.theme == "dark" else "#ffffff"
Expand Down
2 changes: 1 addition & 1 deletion Update.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ call venv\Scripts\activate
echo Updating Application...
python -m pip install --upgrade pip setuptools
pip install wheel
pip install -r TechicalFiles/requirements.txt
pip install -r TechnicalFiles/requirements.txt
timeout /t 2 /nobreak >nul
cls

Expand Down
2 changes: 1 addition & 1 deletion Update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip setuptools
pip install wheel
pip install -r TechicalFiles/requirements.txt
pip install -r TechnicalFiles/requirements.txt
sleep 2
clear

Expand Down
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import tkinter as tk
from configparser import ConfigParser
from TechicalFiles.ui import NgrokApp
from TechnicalFiles.ui import NgrokApp

config = ConfigParser()
config.read('TechicalFiles/config.ini')
config.read('TechnicalFiles/config.ini')

language = config.get('general', 'language', fallback='en')

Expand Down

0 comments on commit 9c2effc

Please sign in to comment.