mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-09-30 02:48:11 +03:00
Added "Generate" button for VLESS and VMess "Id" UI
Signed-off-by: LorenEteval <loren.eteval@proton.me>
This commit is contained in:
committed by
Loren Eteval
parent
ad119b8027
commit
f2de89d1af
Vendored
+9
@@ -2164,5 +2164,14 @@ TRANSLATION = {
|
||||
"RU": "Закрыть",
|
||||
"ZH": "关闭",
|
||||
"isReviewed": "True"
|
||||
},
|
||||
"Generate": {
|
||||
"source": [
|
||||
"Furious.Widget.GuiVLESS",
|
||||
"Furious.Widget.GuiVMess"
|
||||
],
|
||||
"RU": "Сгенерировать",
|
||||
"ZH": "生成",
|
||||
"isReviewed": "True"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,9 @@ from Furious.Qt import gettext as _
|
||||
from Furious.Widget.GuiVTransport import *
|
||||
from Furious.Widget.GuiVTLS import *
|
||||
|
||||
from PySide6.QtWidgets import *
|
||||
|
||||
import uuid
|
||||
import functools
|
||||
|
||||
__all__ = ['GuiVLESS']
|
||||
@@ -119,6 +122,22 @@ class GuiVLESSItemBasicId(GuiEditorItemTextInput):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.generateButton = AppQPushButton(_('Generate'))
|
||||
self.generateButton.clicked.connect(self.generateUUID)
|
||||
|
||||
self._widget = QWidget()
|
||||
|
||||
layout = QHBoxLayout(self._widget)
|
||||
layout.setContentsMargins(0, 0, 0, 0)
|
||||
layout.addWidget(self._input)
|
||||
layout.addWidget(self.generateButton)
|
||||
|
||||
def generateUUID(self):
|
||||
self.setText(str(uuid.uuid4()))
|
||||
|
||||
def widgets(self):
|
||||
return self._title, self._widget
|
||||
|
||||
def inputToFactory(self, config: ConfigFactory) -> bool:
|
||||
proxyOutboundUser = getProxyOutboundUser(config)
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ from Furious.Qt import gettext as _
|
||||
from Furious.Widget.GuiVTransport import *
|
||||
from Furious.Widget.GuiVTLS import *
|
||||
|
||||
from PySide6.QtWidgets import *
|
||||
|
||||
import uuid
|
||||
import functools
|
||||
|
||||
__all__ = ['GuiVMess']
|
||||
@@ -119,6 +122,22 @@ class GuiVMessItemBasicId(GuiEditorItemTextInput):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.generateButton = AppQPushButton(_('Generate'))
|
||||
self.generateButton.clicked.connect(self.generateUUID)
|
||||
|
||||
self._widget = QWidget()
|
||||
|
||||
layout = QHBoxLayout(self._widget)
|
||||
layout.setContentsMargins(0, 0, 0, 0)
|
||||
layout.addWidget(self._input)
|
||||
layout.addWidget(self.generateButton)
|
||||
|
||||
def generateUUID(self):
|
||||
self.setText(str(uuid.uuid4()))
|
||||
|
||||
def widgets(self):
|
||||
return self._title, self._widget
|
||||
|
||||
def inputToFactory(self, config: ConfigFactory) -> bool:
|
||||
proxyOutboundUser = getProxyOutboundUser(config)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user