From 951aad0d1fb1bb40e601d42ddff9fda4a284d577 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Wed, 30 Oct 2019 22:03:18 +0100 Subject: [PATCH] Added the possibility to open the dev tools within the client menu --- shared/js/ui/frames/MenuBar.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/shared/js/ui/frames/MenuBar.ts b/shared/js/ui/frames/MenuBar.ts index 222781bb..4dfaa74a 100644 --- a/shared/js/ui/frames/MenuBar.ts +++ b/shared/js/ui/frames/MenuBar.ts @@ -41,6 +41,8 @@ namespace top_menu { open_change_log(); quit(); + + show_dev_tools(): boolean; } export let native_actions: NativeActions; @@ -503,13 +505,20 @@ namespace top_menu { } item = menu.append_item(tr("Visit TeaSpeak.de")); - //TODO: Client direct browser? item.click(() => window.open('https://teaspeak.de/', '_blank')); item = menu.append_item(tr("Visit TeaSpeak forum")); - //TODO: Client direct browser? item.click(() => window.open('https://forum.teaspeak.de/', '_blank')); + if(!app.is_web() && typeof(native_actions.show_dev_tools) && native_actions.show_dev_tools()) { + menu.append_hr(); + item = menu.append_item(tr("Open developer tools")); + item.click(() => native_actions.open_dev_tools()); + + item = menu.append_item(tr("Reload UI")); + item.click(() => native_actions.reload_page()); + } + menu.append_hr(); item = menu.append_item(app.is_web() ? tr("About TeaWeb") : tr("About TeaClient")); item.click(() => Modals.spawnAbout())