This commit is contained in:
Alireza Ahmadi
2023-04-04 01:26:59 +02:00
parent 1246b54ffa
commit 357630b077
13 changed files with 103 additions and 43 deletions

View File

@@ -7,6 +7,7 @@
<link rel="stylesheet" href="{{ .base_path }}assets/ant-design-vue@1.7.2/antd.min.css">
<link rel="stylesheet" href="{{ .base_path }}assets/element-ui@2.15.0/theme-chalk/display.css">
<link rel="stylesheet" href="{{ .base_path }}assets/css/custom.css?{{ .cur_ver }}">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<style>
[v-cloak] {
display: none;

View File

@@ -173,7 +173,7 @@
return this.clientsBulkModal.inbound;
},
get delayedExpireDays() {
return this.clientsBulkModal.expiryTime < 0 ? this.clientsBulkModal.expiryTime / -84600000 : 0;
return this.clientsBulkModal.expiryTime < 0 ? this.clientsBulkModal.expiryTime / -84600000 : 0;
},
set delayedExpireDays(days){
this.clientsBulkModal.expiryTime = -84600000 * days;

View File

@@ -32,6 +32,7 @@
this.clients = this.getClients(this.inbound.protocol, this.inbound.settings);
this.index = index === null ? this.clients.length : index;
this.isExpired = isEdit ? this.inbound.isExpiry(this.index) : false;
this.delayedStart = false;
if (!isEdit){
this.addClient(this.inbound.protocol, this.clients);
} else {
@@ -100,7 +101,7 @@
else return 'red'
},
get delayedExpireDays() {
return clientModal.isEdit && this.client.expiryTime < 0 ? this.client.expiryTime / -84600000 : 0;
return this.client && this.client.expiryTime < 0 ? this.client.expiryTime / -84600000 : 0;
},
set delayedExpireDays(days){
this.client.expiryTime = -84600000 * days;

View File

@@ -104,11 +104,11 @@
<table v-if="infoModal.clientSettings.subId + infoModal.clientSettings.tgId" style="margin-bottom: 10px;">
<tr v-if="infoModal.clientSettings.subId">
<td>Subscription link</td>
<td><a :href="[[ infoModal.subBase + infoModal.clientSettings.subId ]]" target="_blank">[[ infoModal.subBase + infoModal.clientSettings.subId ]]</a></td>
<td><a :href="[[ subBase + infoModal.clientSettings.subId ]]" target="_blank">[[ subBase + infoModal.clientSettings.subId ]]</a></td>
</tr>
<tr v-if="infoModal.clientSettings.tgId">
<td>Telegram Username</td>
<td><a :href="[[ infoModal.tgBase + infoModal.clientSettings.tgId ]]" target="_blank">@[[ infoModal.clientSettings.tgId ]]</a></td>
<td><a :href="[[ tgBase + infoModal.clientSettings.tgId ]]" target="_blank">@[[ infoModal.clientSettings.tgId ]]</a></td>
</tr>
</table>
</template>
@@ -192,8 +192,6 @@
link: null,
index: null,
isExpired: false,
subBase: window.location.protocol + "//" + window.location.hostname + "/sub/",
tgBase: "https://t.me/",
show(dbInbound, index) {
this.index = index;
this.inbound = dbInbound.toInbound();
@@ -240,8 +238,13 @@
return infoModal.clientSettings.enable;
}
return infoModal.dbInbound.isEnable;
}
},
get subBase() {
return window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port:"") + "/sub/";
},
get tgBase() {
return "https://t.me/"
},
},
methods: {
copyTextToClipboard(elmentId,content) {