From 5b563ae6bebc0d993530c5d14b64d3d78eecbe77 Mon Sep 17 00:00:00 2001 From: Loren Eteval Date: Fri, 6 Oct 2023 22:36:15 +0800 Subject: [PATCH] Refactor the Show Log action Signed-off-by: Loren Eteval --- Furious/Widget/EditConfiguration.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Furious/Widget/EditConfiguration.py b/Furious/Widget/EditConfiguration.py index 083b93c..43c9c87 100644 --- a/Furious/Widget/EditConfiguration.py +++ b/Furious/Widget/EditConfiguration.py @@ -902,20 +902,12 @@ class EditSubscriptionAction(Action): class ShowLogAction(Action): def __init__(self, **kwargs): - super().__init__(_(f'Show {APPLICATION_NAME} Log...'), **kwargs) + super().__init__(_('Show Log...'), **kwargs) def triggeredCallback(self, checked): APP().logViewerWidget.showMaximized() -class ShowTorRelayLogAction(Action): - def __init__(self, **kwargs): - super().__init__(_(f'Show {TorRelay.name()} Log...'), **kwargs) - - def triggeredCallback(self, checked): - APP().torViewerWidget.showMaximized() - - class WhetherUpdateInfoBox(MessageBox): def __init__(self, version='0.0.0', *args, **kwargs): super().__init__(*args, **kwargs) @@ -1425,6 +1417,11 @@ class DownSpeedWorker(Worker): self.updateResult() if coreType == XrayCore.name(): + coreJSON['log'] = { + 'access': '', + 'error': '', + 'loglevel': 'warning', + } # Force redirect coreJSON['inbounds'] = [ { @@ -2586,7 +2583,6 @@ class EditConfigurationWidget(MainWindow): 'name': 'Help', 'actions': [ ShowLogAction(parent=self), - ShowTorRelayLogAction(parent=self), Seperator(), CheckForUpdatesAction(parent=self), AboutAction(parent=self),