mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-12-25 15:52:43 +00:00
Compare commits
No commits in common. "c93467b85290a15b55c7fa3dde99e2c383a4829e" and "ef625c75d8ddd06b55524caef24f1ad8da45ccc9" have entirely different histories.
c93467b852
...
ef625c75d8
2 changed files with 4 additions and 17 deletions
|
|
@ -104,10 +104,6 @@ func (a *InboundController) addInbound(c *gin.Context) {
|
||||||
|
|
||||||
needRestart := false
|
needRestart := false
|
||||||
inbound, needRestart, err = a.inboundService.AddInbound(inbound)
|
inbound, needRestart, err = a.inboundService.AddInbound(inbound)
|
||||||
if err != nil {
|
|
||||||
jsonMsg(c, I18nWeb(c, "somethingWentWrong"), err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
jsonMsgObj(c, I18nWeb(c, "pages.inbounds.toasts.inboundCreateSuccess"), inbound, err)
|
jsonMsgObj(c, I18nWeb(c, "pages.inbounds.toasts.inboundCreateSuccess"), inbound, err)
|
||||||
if err == nil && needRestart {
|
if err == nil && needRestart {
|
||||||
a.xrayService.SetToNeedRestart()
|
a.xrayService.SetToNeedRestart()
|
||||||
|
|
@ -122,10 +118,6 @@ func (a *InboundController) delInbound(c *gin.Context) {
|
||||||
}
|
}
|
||||||
needRestart := true
|
needRestart := true
|
||||||
needRestart, err = a.inboundService.DelInbound(id)
|
needRestart, err = a.inboundService.DelInbound(id)
|
||||||
if err != nil {
|
|
||||||
jsonMsg(c, I18nWeb(c, "somethingWentWrong"), err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
jsonMsgObj(c, I18nWeb(c, "pages.inbounds.toasts.inboundDeleteSuccess"), id, err)
|
jsonMsgObj(c, I18nWeb(c, "pages.inbounds.toasts.inboundDeleteSuccess"), id, err)
|
||||||
if err == nil && needRestart {
|
if err == nil && needRestart {
|
||||||
a.xrayService.SetToNeedRestart()
|
a.xrayService.SetToNeedRestart()
|
||||||
|
|
@ -148,10 +140,6 @@ func (a *InboundController) updateInbound(c *gin.Context) {
|
||||||
}
|
}
|
||||||
needRestart := true
|
needRestart := true
|
||||||
inbound, needRestart, err = a.inboundService.UpdateInbound(inbound)
|
inbound, needRestart, err = a.inboundService.UpdateInbound(inbound)
|
||||||
if err != nil {
|
|
||||||
jsonMsg(c, I18nWeb(c, "somethingWentWrong"), err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
jsonMsgObj(c, I18nWeb(c, "pages.inbounds.toasts.inboundUpdateSuccess"), inbound, err)
|
jsonMsgObj(c, I18nWeb(c, "pages.inbounds.toasts.inboundUpdateSuccess"), inbound, err)
|
||||||
if err == nil && needRestart {
|
if err == nil && needRestart {
|
||||||
a.xrayService.SetToNeedRestart()
|
a.xrayService.SetToNeedRestart()
|
||||||
|
|
|
||||||
9
x-ui.sh
9
x-ui.sh
|
|
@ -69,7 +69,7 @@ confirm_restart() {
|
||||||
}
|
}
|
||||||
|
|
||||||
before_show_menu() {
|
before_show_menu() {
|
||||||
echo && echo -n -e "${yellow}Press enter to return to the main menu: ${plain}" && read -r temp
|
echo && echo -n -e "${yellow}Press enter to return to the main menu: ${plain}" && read temp
|
||||||
show_menu
|
show_menu
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -125,8 +125,8 @@ update_menu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
legacy_version() {
|
legacy_version() {
|
||||||
echo -n "Enter the panel version (like 2.4.0):"
|
echo "Enter the panel version (like 2.4.0):"
|
||||||
read -r tag_version
|
read tag_version
|
||||||
|
|
||||||
if [ -z "$tag_version" ]; then
|
if [ -z "$tag_version" ]; then
|
||||||
echo "Panel version cannot be empty. Exiting."
|
echo "Panel version cannot be empty. Exiting."
|
||||||
|
|
@ -256,8 +256,7 @@ check_config() {
|
||||||
}
|
}
|
||||||
|
|
||||||
set_port() {
|
set_port() {
|
||||||
echo -n "Enter port number[1-65535]: "
|
echo && echo -n -e "Enter port number[1-65535]: " && read port
|
||||||
read -r port
|
|
||||||
if [[ -z "${port}" ]]; then
|
if [[ -z "${port}" ]]; then
|
||||||
LOGD "Cancelled"
|
LOGD "Cancelled"
|
||||||
before_show_menu
|
before_show_menu
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue