mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-11 04:36:20 +00:00
code format compare
This commit is contained in:
parent
95d03a7ffd
commit
2b80b9174c
3 changed files with 46 additions and 55 deletions
|
@ -45,13 +45,15 @@
|
|||
qrcodes: [],
|
||||
clipboard: null,
|
||||
visible: false,
|
||||
isJustSub: false,subId: '',
|
||||
isJustSub: false,
|
||||
subId: '',
|
||||
show: function(title = '', dbInbound, client, isJustSub = false) {
|
||||
this.title = title;
|
||||
this.dbInbound = dbInbound;
|
||||
this.inbound = dbInbound.toInbound();
|
||||
this.client = client;
|
||||
this.isJustSub = isJustSub;this.subId = '';
|
||||
this.isJustSub = isJustSub;
|
||||
this.subId = '';
|
||||
this.qrcodes = [];
|
||||
if (this.inbound.protocol == Protocols.WIREGUARD) {
|
||||
this.inbound.genInboundLinks(dbInbound.remark).split('\r\n').forEach((l, index) => {
|
||||
|
|
|
@ -4,10 +4,7 @@
|
|||
:class="themeSwitcher.currentTheme"
|
||||
:ok-text="clientModal.okText" cancel-text='{{ i18n "close" }}'>
|
||||
<template v-if="isEdit">
|
||||
<a-tag v-if="isExpiry || isTrafficExhausted" color="red"
|
||||
style="margin-bottom: 10px;display: block;text-align: center;">Account is (Expired|Traffic Ended) And
|
||||
Disabled
|
||||
</a-tag>
|
||||
<a-tag v-if="isExpiry || isTrafficExhausted" color="red" style="margin-bottom: 10px;display: block;text-align: center;">Account is (Expired|Traffic Ended) And Disabled</a-tag>
|
||||
</template>
|
||||
{{template "form/client"}}
|
||||
</a-modal>
|
||||
|
@ -154,26 +151,18 @@
|
|||
},
|
||||
getClientId(protocol, client) {
|
||||
switch (protocol) {
|
||||
case Protocols.TROJAN:
|
||||
return client.password;
|
||||
case Protocols.SHADOWSOCKS:
|
||||
return client.email;
|
||||
default:
|
||||
return client.id;
|
||||
case Protocols.TROJAN: return client.password;
|
||||
case Protocols.SHADOWSOCKS: return client.email;
|
||||
default: return client.id;
|
||||
}
|
||||
},
|
||||
addClient(protocol, clients) {
|
||||
switch (protocol) {
|
||||
case Protocols.VMESS:
|
||||
return clients.push(new Inbound.VmessSettings.VMESS());
|
||||
case Protocols.VLESS:
|
||||
return clients.push(new Inbound.VLESSSettings.VLESS());
|
||||
case Protocols.TROJAN:
|
||||
return clients.push(new Inbound.TrojanSettings.Trojan());
|
||||
case Protocols.SHADOWSOCKS:
|
||||
return clients.push(new Inbound.ShadowsocksSettings.Shadowsocks(clients[0].method));
|
||||
default:
|
||||
return null;
|
||||
case Protocols.VMESS: return clients.push(new Inbound.VmessSettings.VMESS());
|
||||
case Protocols.VLESS: return clients.push(new Inbound.VLESSSettings.VLESS());
|
||||
case Protocols.TROJAN: return clients.push(new Inbound.TrojanSettings.Trojan());
|
||||
case Protocols.SHADOWSOCKS: return clients.push(new Inbound.ShadowsocksSettings.Shadowsocks(clients[0].method));
|
||||
default: return null;
|
||||
}
|
||||
},
|
||||
close() {
|
||||
|
|
Loading…
Reference in a new issue